@storm-software/projen 0.9.76 → 0.9.78
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-LTKRUM5P.js → chunk-BG73ZJER.js} +3 -5
- package/dist/{chunk-RLLFZW5Z.js → chunk-DUNMCAJE.js} +3 -3
- package/dist/{chunk-GM25EIP6.mjs → chunk-IQHRF4IX.mjs} +1197 -765
- package/dist/{chunk-VBI5UBLI.js → chunk-IRRBMF6O.js} +1310 -878
- package/dist/chunk-NG74QN4S.js +6 -0
- package/dist/{chunk-PHMFOUDC.js → chunk-NNSWWAGP.js} +8 -11
- package/dist/{chunk-IAJM6J3Z.mjs → chunk-NVTKHBEW.mjs} +1 -1
- package/dist/{chunk-EJSKIRCS.mjs → chunk-PEM26WKS.mjs} +7 -10
- package/dist/{chunk-JSBLU2B7.mjs → chunk-SHIGQSVE.mjs} +4 -6
- package/dist/{chunk-BSYROGZP.mjs → chunk-ZVRRJOP5.mjs} +1 -1
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +10 -10
- package/dist/index.mjs +5 -5
- package/dist/src/components/index.js +3 -3
- package/dist/src/components/index.mjs +2 -2
- package/dist/src/components/nx-workspace.js +127 -247
- package/dist/src/components/nx-workspace.mjs +127 -247
- package/dist/src/generators/init/generator.js +4 -4
- package/dist/src/generators/init/generator.mjs +3 -3
- package/dist/tsup.config.js +3 -6
- package/dist/tsup.config.mjs +2 -5
- package/package.json +1 -1
- package/dist/chunk-DQ67WT5G.js +0 -6
|
@@ -1,39 +1,43 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkNNSWWAGPjs = require('./chunk-NNSWWAGP.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
var _chunkLTKRUM5Pjs = require('./chunk-LTKRUM5P.js');
|
|
8
|
+
var _chunkBG73ZJERjs = require('./chunk-BG73ZJER.js');
|
|
10
9
|
|
|
11
10
|
// src/generators/init/generator.ts
|
|
12
|
-
|
|
11
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
13
17
|
var _devkit = require('@nx/devkit');
|
|
14
18
|
|
|
15
19
|
// ../workspace-tools/index.ts
|
|
16
|
-
|
|
20
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
17
21
|
|
|
18
22
|
// ../workspace-tools/executors.ts
|
|
19
|
-
|
|
23
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
20
24
|
|
|
21
25
|
// ../workspace-tools/src/executors/cargo-build/executor.ts
|
|
22
|
-
|
|
26
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
23
27
|
|
|
24
28
|
// ../workspace-tools/src/base/base-executor.ts
|
|
25
|
-
|
|
29
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
26
30
|
|
|
27
31
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
28
|
-
|
|
32
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
29
33
|
var _c12 = require('c12');
|
|
30
34
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
31
35
|
|
|
32
36
|
// ../config-tools/src/logger/console.ts
|
|
33
|
-
|
|
37
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
34
38
|
|
|
35
39
|
// ../config-tools/src/types.ts
|
|
36
|
-
|
|
40
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
37
41
|
var LogLevel = {
|
|
38
42
|
SILENT: 0,
|
|
39
43
|
FATAL: 10,
|
|
@@ -58,13 +62,13 @@ var LogLevelLabel = {
|
|
|
58
62
|
};
|
|
59
63
|
|
|
60
64
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
61
|
-
|
|
65
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
62
66
|
|
|
63
67
|
// ../config/src/index.ts
|
|
64
|
-
|
|
68
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
65
69
|
|
|
66
70
|
// ../config/src/constants.ts
|
|
67
|
-
|
|
71
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
68
72
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
69
73
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
70
74
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
@@ -87,10 +91,10 @@ If this sounds interesting, and you would like to help us in creating the next g
|
|
|
87
91
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
88
92
|
|
|
89
93
|
// ../config/src/define-config.ts
|
|
90
|
-
|
|
94
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
91
95
|
|
|
92
96
|
// ../config/src/schema.ts
|
|
93
|
-
|
|
97
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
94
98
|
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
95
99
|
var DarkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
96
100
|
var LightColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
@@ -166,23 +170,39 @@ var RegistryConfigSchema = _zod2.default.object({
|
|
|
166
170
|
cyclone: RegistryUrlConfigSchema,
|
|
167
171
|
container: RegistryUrlConfigSchema
|
|
168
172
|
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
169
|
-
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
173
|
+
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
174
|
+
MultiThemeColorConfigSchema
|
|
175
|
+
).describe("Colors used for various workspace elements");
|
|
170
176
|
var ColorConfigMapSchema = _zod2.default.union([
|
|
171
|
-
_zod2.default.object({
|
|
172
|
-
base: ColorConfigSchema
|
|
173
|
-
}),
|
|
177
|
+
_zod2.default.object({ base: ColorConfigSchema }),
|
|
174
178
|
_zod2.default.record(_zod2.default.string(), ColorConfigSchema)
|
|
175
179
|
]);
|
|
176
|
-
var ExtendsItemSchema = _zod2.default.string().trim().describe(
|
|
177
|
-
|
|
180
|
+
var ExtendsItemSchema = _zod2.default.string().trim().describe(
|
|
181
|
+
"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."
|
|
182
|
+
);
|
|
183
|
+
var ExtendsSchema = ExtendsItemSchema.or(
|
|
184
|
+
_zod2.default.array(ExtendsItemSchema)
|
|
185
|
+
).describe(
|
|
186
|
+
"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."
|
|
187
|
+
);
|
|
178
188
|
var WorkspaceBotConfigSchema = _zod2.default.object({
|
|
179
|
-
name: _zod2.default.string().trim().default("stormie-bot").describe(
|
|
189
|
+
name: _zod2.default.string().trim().default("stormie-bot").describe(
|
|
190
|
+
"The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
191
|
+
),
|
|
180
192
|
email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
181
|
-
}).describe(
|
|
193
|
+
}).describe(
|
|
194
|
+
"The workspace's bot user's config used to automated various operations tasks"
|
|
195
|
+
);
|
|
182
196
|
var WorkspaceReleaseConfigSchema = _zod2.default.object({
|
|
183
|
-
banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
|
|
184
|
-
|
|
185
|
-
|
|
197
|
+
banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
|
|
198
|
+
"A URL to a banner image used to display the workspace's release"
|
|
199
|
+
),
|
|
200
|
+
header: _zod2.default.string().trim().optional().describe(
|
|
201
|
+
"A header message appended to the start of the workspace's release notes"
|
|
202
|
+
),
|
|
203
|
+
footer: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe(
|
|
204
|
+
"A footer message appended to the end of the workspace's release notes"
|
|
205
|
+
)
|
|
186
206
|
}).describe("The workspace's release config used during the release process");
|
|
187
207
|
var WorkspaceAccountConfigSchema = _zod2.default.object({
|
|
188
208
|
twitter: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
@@ -191,23 +211,41 @@ var WorkspaceAccountConfigSchema = _zod2.default.object({
|
|
|
191
211
|
slack: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
|
|
192
212
|
medium: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
193
213
|
github: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
194
|
-
}).describe(
|
|
214
|
+
}).describe(
|
|
215
|
+
"The workspace's account config used to store various social media links"
|
|
216
|
+
);
|
|
195
217
|
var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
196
|
-
cache: _zod2.default.string().trim().optional().describe(
|
|
218
|
+
cache: _zod2.default.string().trim().optional().describe(
|
|
219
|
+
"The directory used to store the environment's cached file data"
|
|
220
|
+
),
|
|
197
221
|
data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
198
|
-
config: _zod2.default.string().trim().optional().describe(
|
|
222
|
+
config: _zod2.default.string().trim().optional().describe(
|
|
223
|
+
"The directory used to store the environment's configuration files"
|
|
224
|
+
),
|
|
199
225
|
temp: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
200
226
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
201
|
-
build: _zod2.default.string().trim().default("dist").describe(
|
|
202
|
-
|
|
227
|
+
build: _zod2.default.string().trim().default("dist").describe(
|
|
228
|
+
"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
229
|
+
)
|
|
230
|
+
}).describe(
|
|
231
|
+
"Various directories used by the workspace to store data, cache, and configuration files"
|
|
232
|
+
);
|
|
203
233
|
var errorConfigSchema = _zod2.default.object({
|
|
204
234
|
codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
|
|
205
|
-
url: _zod2.default.string().trim().url().optional().describe(
|
|
235
|
+
url: _zod2.default.string().trim().url().optional().describe(
|
|
236
|
+
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
237
|
+
)
|
|
206
238
|
}).describe("The workspace's error config used during the error process");
|
|
207
239
|
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
208
|
-
$schema: _zod2.default.string().trim().default(
|
|
240
|
+
$schema: _zod2.default.string().trim().default(
|
|
241
|
+
"https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
|
|
242
|
+
).optional().nullish().describe(
|
|
243
|
+
"The URL to the JSON schema file that describes the Storm configuration file"
|
|
244
|
+
),
|
|
209
245
|
extends: ExtendsSchema.optional(),
|
|
210
|
-
name: _zod2.default.string().trim().toLowerCase().optional().describe(
|
|
246
|
+
name: _zod2.default.string().trim().toLowerCase().optional().describe(
|
|
247
|
+
"The name of the service/package/scope using this configuration"
|
|
248
|
+
),
|
|
211
249
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
212
250
|
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
213
251
|
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -223,21 +261,16 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
223
261
|
release: WorkspaceReleaseConfigSchema,
|
|
224
262
|
account: WorkspaceAccountConfigSchema,
|
|
225
263
|
error: errorConfigSchema,
|
|
226
|
-
mode: _zod2.default.enum([
|
|
227
|
-
"development",
|
|
228
|
-
"staging",
|
|
229
|
-
"production"
|
|
230
|
-
]).default("production").describe("The current runtime environment mode for the package"),
|
|
264
|
+
mode: _zod2.default.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment mode for the package"),
|
|
231
265
|
workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
|
|
232
|
-
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe(
|
|
266
|
+
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe(
|
|
267
|
+
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
268
|
+
),
|
|
233
269
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
234
270
|
directories: WorkspaceDirectoryConfigSchema,
|
|
235
|
-
packageManager: _zod2.default.enum([
|
|
236
|
-
"
|
|
237
|
-
|
|
238
|
-
"pnpm",
|
|
239
|
-
"bun"
|
|
240
|
-
]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
|
|
271
|
+
packageManager: _zod2.default.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
272
|
+
"The JavaScript/TypeScript package manager used by the repository"
|
|
273
|
+
),
|
|
241
274
|
timezone: _zod2.default.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
242
275
|
locale: _zod2.default.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
243
276
|
logLevel: _zod2.default.enum([
|
|
@@ -250,16 +283,26 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
250
283
|
"debug",
|
|
251
284
|
"trace",
|
|
252
285
|
"all"
|
|
253
|
-
]).default("info").describe(
|
|
254
|
-
|
|
286
|
+
]).default("info").describe(
|
|
287
|
+
"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`)."
|
|
288
|
+
),
|
|
289
|
+
skipConfigLogging: _zod2.default.boolean().optional().describe(
|
|
290
|
+
"Should the logging of the current Storm Workspace configuration be skipped?"
|
|
291
|
+
),
|
|
255
292
|
registry: RegistryConfigSchema,
|
|
256
|
-
configFile: _zod2.default.string().trim().nullable().default(null).describe(
|
|
257
|
-
|
|
293
|
+
configFile: _zod2.default.string().trim().nullable().default(null).describe(
|
|
294
|
+
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
295
|
+
),
|
|
296
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
297
|
+
"Storm theme config values used for styling various package elements"
|
|
298
|
+
),
|
|
258
299
|
extensions: _zod2.default.record(_zod2.default.any()).optional().default({}).describe("Configuration of each used extension")
|
|
259
|
-
}).describe(
|
|
300
|
+
}).describe(
|
|
301
|
+
"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."
|
|
302
|
+
);
|
|
260
303
|
|
|
261
304
|
// ../config/src/types.ts
|
|
262
|
-
|
|
305
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
263
306
|
var COLOR_KEYS = [
|
|
264
307
|
"dark",
|
|
265
308
|
"light",
|
|
@@ -284,20 +327,24 @@ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(
|
|
|
284
327
|
var _path = require('path'); var path4 = _interopRequireWildcard(_path);
|
|
285
328
|
|
|
286
329
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
287
|
-
|
|
330
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
288
331
|
|
|
289
332
|
// ../config-tools/src/utilities/find-up.ts
|
|
290
|
-
|
|
333
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
291
334
|
|
|
292
335
|
|
|
293
336
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
294
337
|
var depth = 0;
|
|
295
338
|
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
296
339
|
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
297
|
-
if (endDirectoryNames.some(
|
|
340
|
+
if (endDirectoryNames.some(
|
|
341
|
+
(endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName))
|
|
342
|
+
)) {
|
|
298
343
|
return _startPath;
|
|
299
344
|
}
|
|
300
|
-
if (endFileNames.some(
|
|
345
|
+
if (endFileNames.some(
|
|
346
|
+
(endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName))
|
|
347
|
+
)) {
|
|
301
348
|
return _startPath;
|
|
302
349
|
}
|
|
303
350
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
@@ -306,7 +353,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
306
353
|
}
|
|
307
354
|
return void 0;
|
|
308
355
|
}
|
|
309
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
310
356
|
|
|
311
357
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
312
358
|
var rootFiles = [
|
|
@@ -353,21 +399,31 @@ var rootDirectories = [
|
|
|
353
399
|
];
|
|
354
400
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
355
401
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
356
|
-
return
|
|
357
|
-
|
|
358
|
-
|
|
402
|
+
return _chunkNNSWWAGPjs.correctPaths.call(void 0,
|
|
403
|
+
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
return _chunkNNSWWAGPjs.correctPaths.call(void 0,
|
|
407
|
+
findFolderUp(
|
|
408
|
+
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
409
|
+
rootFiles,
|
|
410
|
+
rootDirectories
|
|
411
|
+
)
|
|
412
|
+
);
|
|
359
413
|
}
|
|
360
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
361
414
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
362
415
|
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
363
416
|
if (!result) {
|
|
364
|
-
throw new Error(
|
|
365
|
-
|
|
366
|
-
|
|
417
|
+
throw new Error(
|
|
418
|
+
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
419
|
+
${rootFiles.join(
|
|
420
|
+
"\n"
|
|
421
|
+
)}
|
|
422
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
423
|
+
);
|
|
367
424
|
}
|
|
368
425
|
return result;
|
|
369
426
|
}
|
|
370
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
|
|
371
427
|
|
|
372
428
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
373
429
|
var DEFAULT_COLOR_CONFIG = {
|
|
@@ -398,7 +454,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
398
454
|
negative: "#dc2626"
|
|
399
455
|
}
|
|
400
456
|
};
|
|
401
|
-
var getDefaultConfig =
|
|
457
|
+
var getDefaultConfig = async (root) => {
|
|
402
458
|
let license = STORM_DEFAULT_LICENSE;
|
|
403
459
|
let homepage = STORM_DEFAULT_HOMEPAGE;
|
|
404
460
|
let name = void 0;
|
|
@@ -406,7 +462,10 @@ var getDefaultConfig = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, asyn
|
|
|
406
462
|
let repository = void 0;
|
|
407
463
|
const workspaceRoot3 = findWorkspaceRoot(root);
|
|
408
464
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot3, "package.json"))) {
|
|
409
|
-
const file = await _promises.readFile.call(void 0,
|
|
465
|
+
const file = await _promises.readFile.call(void 0,
|
|
466
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, workspaceRoot3, "package.json"),
|
|
467
|
+
"utf8"
|
|
468
|
+
);
|
|
410
469
|
if (file) {
|
|
411
470
|
const packageJson = JSON.parse(file);
|
|
412
471
|
if (packageJson.name) {
|
|
@@ -443,43 +502,43 @@ var getDefaultConfig = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, asyn
|
|
|
443
502
|
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
444
503
|
}
|
|
445
504
|
};
|
|
446
|
-
}
|
|
505
|
+
};
|
|
447
506
|
|
|
448
507
|
// ../config-tools/src/logger/chalk.ts
|
|
449
|
-
|
|
508
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
450
509
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
451
510
|
var chalkDefault = {
|
|
452
|
-
hex:
|
|
453
|
-
bgHex:
|
|
454
|
-
whiteBright:
|
|
455
|
-
}),
|
|
456
|
-
whiteBright:
|
|
457
|
-
gray:
|
|
511
|
+
hex: (_) => (message) => message,
|
|
512
|
+
bgHex: (_) => ({
|
|
513
|
+
whiteBright: (message) => message
|
|
514
|
+
}),
|
|
515
|
+
whiteBright: (message) => message,
|
|
516
|
+
gray: (message) => message,
|
|
458
517
|
bold: {
|
|
459
|
-
hex:
|
|
460
|
-
bgHex:
|
|
461
|
-
whiteBright:
|
|
462
|
-
}),
|
|
463
|
-
whiteBright:
|
|
518
|
+
hex: (_) => (message) => message,
|
|
519
|
+
bgHex: (_) => ({
|
|
520
|
+
whiteBright: (message) => message
|
|
521
|
+
}),
|
|
522
|
+
whiteBright: (message) => message
|
|
464
523
|
},
|
|
465
524
|
dim: {
|
|
466
|
-
hex:
|
|
467
|
-
gray:
|
|
525
|
+
hex: (_) => (message) => message,
|
|
526
|
+
gray: (message) => message
|
|
468
527
|
}
|
|
469
528
|
};
|
|
470
|
-
var getChalk =
|
|
529
|
+
var getChalk = () => {
|
|
471
530
|
let _chalk = _chalk3.default;
|
|
472
531
|
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])) {
|
|
473
532
|
_chalk = chalkDefault;
|
|
474
533
|
}
|
|
475
534
|
return _chalk;
|
|
476
|
-
}
|
|
535
|
+
};
|
|
477
536
|
|
|
478
537
|
// ../config-tools/src/logger/console-icons.ts
|
|
479
|
-
|
|
538
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
480
539
|
|
|
481
540
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
482
|
-
|
|
541
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
483
542
|
function isUnicodeSupported() {
|
|
484
543
|
if (process.platform !== "win32") {
|
|
485
544
|
return process.env.TERM !== "linux";
|
|
@@ -489,10 +548,9 @@ function isUnicodeSupported() {
|
|
|
489
548
|
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
490
549
|
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";
|
|
491
550
|
}
|
|
492
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
|
|
493
551
|
|
|
494
552
|
// ../config-tools/src/logger/console-icons.ts
|
|
495
|
-
var useIcon =
|
|
553
|
+
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
496
554
|
var CONSOLE_ICONS = {
|
|
497
555
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
498
556
|
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
@@ -505,14 +563,14 @@ var CONSOLE_ICONS = {
|
|
|
505
563
|
};
|
|
506
564
|
|
|
507
565
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
508
|
-
|
|
509
|
-
var formatTimestamp =
|
|
566
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
567
|
+
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
510
568
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
511
|
-
}
|
|
569
|
+
};
|
|
512
570
|
|
|
513
571
|
// ../config-tools/src/logger/get-log-level.ts
|
|
514
|
-
|
|
515
|
-
var getLogLevel =
|
|
572
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
573
|
+
var getLogLevel = (label) => {
|
|
516
574
|
switch (label) {
|
|
517
575
|
case "all":
|
|
518
576
|
return LogLevel.ALL;
|
|
@@ -533,8 +591,8 @@ var getLogLevel = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (label) =
|
|
|
533
591
|
default:
|
|
534
592
|
return LogLevel.INFO;
|
|
535
593
|
}
|
|
536
|
-
}
|
|
537
|
-
var getLogLevelLabel =
|
|
594
|
+
};
|
|
595
|
+
var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
538
596
|
if (logLevel >= LogLevel.ALL) {
|
|
539
597
|
return LogLevelLabel.ALL;
|
|
540
598
|
}
|
|
@@ -560,10 +618,10 @@ var getLogLevelLabel = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (log
|
|
|
560
618
|
return LogLevelLabel.SILENT;
|
|
561
619
|
}
|
|
562
620
|
return LogLevelLabel.INFO;
|
|
563
|
-
}
|
|
621
|
+
};
|
|
564
622
|
|
|
565
623
|
// ../config-tools/src/logger/console.ts
|
|
566
|
-
var getLogFn =
|
|
624
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
567
625
|
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;
|
|
568
626
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
569
627
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
@@ -572,103 +630,123 @@ var getLogFn = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (logLevel =
|
|
|
572
630
|
}
|
|
573
631
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
574
632
|
return (message) => {
|
|
575
|
-
console.error(
|
|
633
|
+
console.error(
|
|
634
|
+
`
|
|
576
635
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
577
|
-
`
|
|
636
|
+
`
|
|
637
|
+
);
|
|
578
638
|
};
|
|
579
639
|
}
|
|
580
640
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
581
641
|
return (message) => {
|
|
582
|
-
console.error(
|
|
642
|
+
console.error(
|
|
643
|
+
`
|
|
583
644
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
584
|
-
`
|
|
645
|
+
`
|
|
646
|
+
);
|
|
585
647
|
};
|
|
586
648
|
}
|
|
587
649
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
588
650
|
return (message) => {
|
|
589
|
-
console.warn(
|
|
651
|
+
console.warn(
|
|
652
|
+
`
|
|
590
653
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
591
|
-
`
|
|
654
|
+
`
|
|
655
|
+
);
|
|
592
656
|
};
|
|
593
657
|
}
|
|
594
658
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
595
659
|
return (message) => {
|
|
596
|
-
console.info(
|
|
660
|
+
console.info(
|
|
661
|
+
`
|
|
597
662
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
598
|
-
`
|
|
663
|
+
`
|
|
664
|
+
);
|
|
599
665
|
};
|
|
600
666
|
}
|
|
601
667
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
602
668
|
return (message) => {
|
|
603
|
-
console.info(
|
|
669
|
+
console.info(
|
|
670
|
+
`
|
|
604
671
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
605
|
-
`
|
|
672
|
+
`
|
|
673
|
+
);
|
|
606
674
|
};
|
|
607
675
|
}
|
|
608
676
|
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
609
677
|
return (message) => {
|
|
610
|
-
console.debug(
|
|
678
|
+
console.debug(
|
|
679
|
+
`
|
|
611
680
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
612
|
-
`
|
|
681
|
+
`
|
|
682
|
+
);
|
|
613
683
|
};
|
|
614
684
|
}
|
|
615
685
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
616
686
|
return (message) => {
|
|
617
|
-
console.debug(
|
|
687
|
+
console.debug(
|
|
688
|
+
`
|
|
618
689
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
619
|
-
`
|
|
690
|
+
`
|
|
691
|
+
);
|
|
620
692
|
};
|
|
621
693
|
}
|
|
622
694
|
return (message) => {
|
|
623
|
-
console.log(
|
|
695
|
+
console.log(
|
|
696
|
+
`
|
|
624
697
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
625
|
-
`
|
|
698
|
+
`
|
|
699
|
+
);
|
|
626
700
|
};
|
|
627
|
-
}
|
|
628
|
-
var writeFatal =
|
|
629
|
-
var writeError =
|
|
630
|
-
var writeWarning =
|
|
631
|
-
var writeInfo =
|
|
632
|
-
var writeSuccess =
|
|
633
|
-
var writeDebug =
|
|
634
|
-
var writeTrace =
|
|
635
|
-
var getStopwatch =
|
|
701
|
+
};
|
|
702
|
+
var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
|
|
703
|
+
var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
704
|
+
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
705
|
+
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
706
|
+
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
707
|
+
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
708
|
+
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
709
|
+
var getStopwatch = (name) => {
|
|
636
710
|
const start = process.hrtime();
|
|
637
711
|
return () => {
|
|
638
712
|
const end = process.hrtime(start);
|
|
639
|
-
console.info(
|
|
640
|
-
|
|
641
|
-
`
|
|
713
|
+
console.info(
|
|
714
|
+
`
|
|
715
|
+
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
716
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
717
|
+
)}ms to complete
|
|
718
|
+
`
|
|
719
|
+
);
|
|
642
720
|
};
|
|
643
|
-
}
|
|
721
|
+
};
|
|
644
722
|
var MAX_DEPTH = 4;
|
|
645
|
-
var formatLogMessage =
|
|
723
|
+
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
646
724
|
if (depth2 > MAX_DEPTH) {
|
|
647
725
|
return "<max depth>";
|
|
648
726
|
}
|
|
649
727
|
const prefix = _nullishCoalesce(options.prefix, () => ( "-"));
|
|
650
728
|
const skip = _nullishCoalesce(options.skip, () => ( []));
|
|
651
729
|
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
652
|
-
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
var _isFunction =
|
|
730
|
+
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
731
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
732
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
|
|
733
|
+
message[key],
|
|
734
|
+
{ prefix: `${prefix}-`, skip },
|
|
735
|
+
depth2 + 1
|
|
736
|
+
) : message[key]}`
|
|
737
|
+
).join("\n")}` : message;
|
|
738
|
+
};
|
|
739
|
+
var _isFunction = (value) => {
|
|
662
740
|
try {
|
|
663
741
|
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]));
|
|
664
742
|
} catch (e) {
|
|
665
743
|
return false;
|
|
666
744
|
}
|
|
667
|
-
}
|
|
745
|
+
};
|
|
668
746
|
|
|
669
747
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
670
|
-
|
|
671
|
-
var applyWorkspaceBaseTokens =
|
|
748
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
749
|
+
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
672
750
|
let result = option;
|
|
673
751
|
if (!result) {
|
|
674
752
|
return result;
|
|
@@ -678,7 +756,10 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void
|
|
|
678
756
|
if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
|
|
679
757
|
for (const optionKey of optionKeys) {
|
|
680
758
|
if (result.includes(`{${optionKey}}`)) {
|
|
681
|
-
result = result.replaceAll(
|
|
759
|
+
result = result.replaceAll(
|
|
760
|
+
`{${optionKey}}`,
|
|
761
|
+
_optionalChain([tokenParams, 'optionalAccess', _26 => _26[optionKey]]) || ""
|
|
762
|
+
);
|
|
682
763
|
}
|
|
683
764
|
}
|
|
684
765
|
}
|
|
@@ -688,40 +769,56 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void
|
|
|
688
769
|
if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
|
|
689
770
|
for (const configKey of configKeys) {
|
|
690
771
|
if (result.includes(`{${configKey}}`)) {
|
|
691
|
-
result = result.replaceAll(
|
|
772
|
+
result = result.replaceAll(
|
|
773
|
+
`{${configKey}}`,
|
|
774
|
+
tokenParams.config[configKey] || ""
|
|
775
|
+
);
|
|
692
776
|
}
|
|
693
777
|
}
|
|
694
778
|
}
|
|
695
779
|
}
|
|
696
780
|
if (result.includes("{workspaceRoot}")) {
|
|
697
|
-
result = result.replaceAll(
|
|
781
|
+
result = result.replaceAll(
|
|
782
|
+
"{workspaceRoot}",
|
|
783
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _27 => _27.config, 'optionalAccess', _28 => _28.workspaceRoot]))), () => ( findWorkspaceRoot()))
|
|
784
|
+
);
|
|
698
785
|
}
|
|
699
786
|
return result;
|
|
700
|
-
}
|
|
701
|
-
var applyWorkspaceProjectTokens =
|
|
787
|
+
};
|
|
788
|
+
var applyWorkspaceProjectTokens = (option, tokenParams) => {
|
|
702
789
|
return applyWorkspaceBaseTokens(option, tokenParams);
|
|
703
|
-
}
|
|
704
|
-
var applyWorkspaceTokens =
|
|
790
|
+
};
|
|
791
|
+
var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
705
792
|
if (!options) {
|
|
706
793
|
return {};
|
|
707
794
|
}
|
|
708
795
|
const result = {};
|
|
709
796
|
for (const option of Object.keys(options)) {
|
|
710
797
|
if (typeof options[option] === "string") {
|
|
711
|
-
result[option] = await Promise.resolve(
|
|
798
|
+
result[option] = await Promise.resolve(
|
|
799
|
+
tokenizerFn(options[option], tokenParams)
|
|
800
|
+
);
|
|
712
801
|
} else if (Array.isArray(options[option])) {
|
|
713
|
-
result[option] = await Promise.all(
|
|
802
|
+
result[option] = await Promise.all(
|
|
803
|
+
options[option].map(
|
|
804
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item
|
|
805
|
+
)
|
|
806
|
+
);
|
|
714
807
|
} else if (typeof options[option] === "object") {
|
|
715
|
-
result[option] = await applyWorkspaceTokens(
|
|
808
|
+
result[option] = await applyWorkspaceTokens(
|
|
809
|
+
options[option],
|
|
810
|
+
tokenParams,
|
|
811
|
+
tokenizerFn
|
|
812
|
+
);
|
|
716
813
|
} else {
|
|
717
814
|
result[option] = options[option];
|
|
718
815
|
}
|
|
719
816
|
}
|
|
720
817
|
return result;
|
|
721
|
-
}
|
|
818
|
+
};
|
|
722
819
|
|
|
723
820
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
724
|
-
var getConfigFileByName =
|
|
821
|
+
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
725
822
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
726
823
|
const configs = await Promise.all([
|
|
727
824
|
_c12.loadConfig.call(void 0, {
|
|
@@ -731,7 +828,10 @@ var getConfigFileByName = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, a
|
|
|
731
828
|
envName: _optionalChain([fileName, 'optionalAccess', _29 => _29.toUpperCase, 'call', _30 => _30()]),
|
|
732
829
|
jitiOptions: {
|
|
733
830
|
debug: false,
|
|
734
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
831
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
832
|
+
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
833
|
+
"jiti"
|
|
834
|
+
)
|
|
735
835
|
},
|
|
736
836
|
...options
|
|
737
837
|
}),
|
|
@@ -742,32 +842,45 @@ var getConfigFileByName = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, a
|
|
|
742
842
|
envName: _optionalChain([fileName, 'optionalAccess', _31 => _31.toUpperCase, 'call', _32 => _32()]),
|
|
743
843
|
jitiOptions: {
|
|
744
844
|
debug: false,
|
|
745
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
845
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
846
|
+
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
847
|
+
"jiti"
|
|
848
|
+
)
|
|
746
849
|
},
|
|
747
850
|
configFile: fileName,
|
|
748
851
|
...options
|
|
749
852
|
})
|
|
750
853
|
]);
|
|
751
854
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
752
|
-
}
|
|
753
|
-
var getConfigFile =
|
|
855
|
+
};
|
|
856
|
+
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
754
857
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
755
858
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
756
859
|
let config = result.config;
|
|
757
860
|
const configFile = result.configFile;
|
|
758
861
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
759
|
-
writeTrace(
|
|
760
|
-
|
|
761
|
-
|
|
862
|
+
writeTrace(
|
|
863
|
+
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
864
|
+
{
|
|
865
|
+
logLevel: "all"
|
|
866
|
+
}
|
|
867
|
+
);
|
|
762
868
|
}
|
|
763
869
|
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
764
|
-
const results = await Promise.all(
|
|
870
|
+
const results = await Promise.all(
|
|
871
|
+
additionalFileNames.map(
|
|
872
|
+
(fileName) => getConfigFileByName(fileName, workspacePath)
|
|
873
|
+
)
|
|
874
|
+
);
|
|
765
875
|
for (const result2 of results) {
|
|
766
876
|
if (_optionalChain([result2, 'optionalAccess', _33 => _33.config]) && _optionalChain([result2, 'optionalAccess', _34 => _34.configFile]) && Object.keys(result2.config).length > 0) {
|
|
767
877
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
768
|
-
writeTrace(
|
|
769
|
-
|
|
770
|
-
|
|
878
|
+
writeTrace(
|
|
879
|
+
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
880
|
+
{
|
|
881
|
+
logLevel: "all"
|
|
882
|
+
}
|
|
883
|
+
);
|
|
771
884
|
}
|
|
772
885
|
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
773
886
|
}
|
|
@@ -778,25 +891,27 @@ var getConfigFile = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, async (
|
|
|
778
891
|
}
|
|
779
892
|
config.configFile = configFile;
|
|
780
893
|
return config;
|
|
781
|
-
}
|
|
894
|
+
};
|
|
782
895
|
|
|
783
896
|
// ../config-tools/src/create-storm-config.ts
|
|
784
|
-
|
|
897
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
785
898
|
|
|
786
899
|
|
|
787
900
|
// ../config-tools/src/env/get-env.ts
|
|
788
|
-
|
|
789
|
-
var getExtensionEnv =
|
|
901
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
902
|
+
var getExtensionEnv = (extensionName) => {
|
|
790
903
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
791
904
|
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
792
|
-
const name = key.replace(prefix, "").split("_").map(
|
|
905
|
+
const name = key.replace(prefix, "").split("_").map(
|
|
906
|
+
(i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
|
|
907
|
+
).join("");
|
|
793
908
|
if (name) {
|
|
794
909
|
ret[name] = process.env[key];
|
|
795
910
|
}
|
|
796
911
|
return ret;
|
|
797
912
|
}, {});
|
|
798
|
-
}
|
|
799
|
-
var getConfigEnv =
|
|
913
|
+
};
|
|
914
|
+
var getConfigEnv = () => {
|
|
800
915
|
const prefix = "STORM_";
|
|
801
916
|
let config = {
|
|
802
917
|
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
@@ -833,15 +948,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, () => {
|
|
|
833
948
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
834
949
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
835
950
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
836
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
837
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
951
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
952
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
838
953
|
directories: {
|
|
839
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
840
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
841
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
842
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
843
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
844
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
954
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
955
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
956
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
957
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
958
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
959
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkNNSWWAGPjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
845
960
|
},
|
|
846
961
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
847
962
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -864,14 +979,25 @@ var getConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, () => {
|
|
|
864
979
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
865
980
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
866
981
|
},
|
|
867
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
982
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
983
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
984
|
+
) ? getLogLevelLabel(
|
|
985
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
986
|
+
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
868
987
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
869
988
|
};
|
|
870
|
-
const themeNames = Object.keys(process.env).filter(
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
989
|
+
const themeNames = Object.keys(process.env).filter(
|
|
990
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
|
|
991
|
+
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
992
|
+
)
|
|
993
|
+
);
|
|
994
|
+
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
995
|
+
(ret, themeName) => {
|
|
996
|
+
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
997
|
+
return ret;
|
|
998
|
+
},
|
|
999
|
+
{}
|
|
1000
|
+
) : getThemeColorConfigEnv(prefix);
|
|
875
1001
|
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
876
1002
|
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
877
1003
|
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
@@ -892,23 +1018,17 @@ var getConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, () => {
|
|
|
892
1018
|
config = {
|
|
893
1019
|
...config,
|
|
894
1020
|
...parsed,
|
|
895
|
-
colors: {
|
|
896
|
-
|
|
897
|
-
...parsed.colors
|
|
898
|
-
},
|
|
899
|
-
extensions: {
|
|
900
|
-
...config.extensions,
|
|
901
|
-
...parsed.extensions
|
|
902
|
-
}
|
|
1021
|
+
colors: { ...config.colors, ...parsed.colors },
|
|
1022
|
+
extensions: { ...config.extensions, ...parsed.extensions }
|
|
903
1023
|
};
|
|
904
1024
|
}
|
|
905
1025
|
return config;
|
|
906
|
-
}
|
|
907
|
-
var getThemeColorConfigEnv =
|
|
1026
|
+
};
|
|
1027
|
+
var getThemeColorConfigEnv = (prefix, theme) => {
|
|
908
1028
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
909
1029
|
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
910
|
-
}
|
|
911
|
-
var getSingleThemeColorConfigEnv =
|
|
1030
|
+
};
|
|
1031
|
+
var getSingleThemeColorConfigEnv = (prefix) => {
|
|
912
1032
|
return {
|
|
913
1033
|
dark: process.env[`${prefix}DARK`],
|
|
914
1034
|
light: process.env[`${prefix}LIGHT`],
|
|
@@ -925,14 +1045,16 @@ var getSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(
|
|
|
925
1045
|
positive: process.env[`${prefix}POSITIVE`],
|
|
926
1046
|
negative: process.env[`${prefix}NEGATIVE`]
|
|
927
1047
|
};
|
|
928
|
-
}
|
|
929
|
-
var getMultiThemeColorConfigEnv =
|
|
1048
|
+
};
|
|
1049
|
+
var getMultiThemeColorConfigEnv = (prefix) => {
|
|
930
1050
|
return {
|
|
931
|
-
light: getBaseThemeColorConfigEnv(
|
|
1051
|
+
light: getBaseThemeColorConfigEnv(
|
|
1052
|
+
`${prefix}_LIGHT_`
|
|
1053
|
+
),
|
|
932
1054
|
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
933
1055
|
};
|
|
934
|
-
}
|
|
935
|
-
var getBaseThemeColorConfigEnv =
|
|
1056
|
+
};
|
|
1057
|
+
var getBaseThemeColorConfigEnv = (prefix) => {
|
|
936
1058
|
return {
|
|
937
1059
|
foreground: process.env[`${prefix}FOREGROUND`],
|
|
938
1060
|
background: process.env[`${prefix}BACKGROUND`],
|
|
@@ -949,14 +1071,17 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(vo
|
|
|
949
1071
|
positive: process.env[`${prefix}POSITIVE`],
|
|
950
1072
|
negative: process.env[`${prefix}NEGATIVE`]
|
|
951
1073
|
};
|
|
952
|
-
}
|
|
1074
|
+
};
|
|
953
1075
|
|
|
954
1076
|
// ../config-tools/src/env/set-env.ts
|
|
955
|
-
|
|
956
|
-
var setExtensionEnv =
|
|
1077
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1078
|
+
var setExtensionEnv = (extensionName, extension) => {
|
|
957
1079
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
958
1080
|
if (extension[key]) {
|
|
959
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _35 => _35.replace, 'call', _36 => _36(
|
|
1081
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _35 => _35.replace, 'call', _36 => _36(
|
|
1082
|
+
/([A-Z])+/g,
|
|
1083
|
+
(input) => input ? _optionalChain([input, 'access', _37 => _37[0], 'optionalAccess', _38 => _38.toUpperCase, 'call', _39 => _39()]) + input.slice(1) : ""
|
|
1084
|
+
), 'access', _40 => _40.split, 'call', _41 => _41(/(?=[A-Z])|[.\-\s_]/), 'access', _42 => _42.map, 'call', _43 => _43((x) => x.toLowerCase())]), () => ( []));
|
|
960
1085
|
let extensionKey;
|
|
961
1086
|
if (result.length === 0) {
|
|
962
1087
|
return;
|
|
@@ -971,8 +1096,8 @@ var setExtensionEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (exte
|
|
|
971
1096
|
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
972
1097
|
}
|
|
973
1098
|
}
|
|
974
|
-
}
|
|
975
|
-
var setConfigEnv =
|
|
1099
|
+
};
|
|
1100
|
+
var setConfigEnv = (config) => {
|
|
976
1101
|
const prefix = "STORM_";
|
|
977
1102
|
if (config.extends) {
|
|
978
1103
|
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
@@ -1052,36 +1177,42 @@ var setConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (config)
|
|
|
1052
1177
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1053
1178
|
}
|
|
1054
1179
|
if (config.configFile) {
|
|
1055
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
1180
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkNNSWWAGPjs.correctPaths.call(void 0, config.configFile);
|
|
1056
1181
|
}
|
|
1057
1182
|
if (config.workspaceRoot) {
|
|
1058
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
1059
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
1060
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
1183
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkNNSWWAGPjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1184
|
+
process.env.NX_WORKSPACE_ROOT = _chunkNNSWWAGPjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1185
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkNNSWWAGPjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1061
1186
|
}
|
|
1062
1187
|
if (config.directories) {
|
|
1063
1188
|
if (!config.skipCache && config.directories.cache) {
|
|
1064
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
1189
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkNNSWWAGPjs.correctPaths.call(void 0,
|
|
1190
|
+
config.directories.cache
|
|
1191
|
+
);
|
|
1065
1192
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1066
1193
|
}
|
|
1067
1194
|
if (config.directories.data) {
|
|
1068
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
1195
|
+
process.env[`${prefix}DATA_DIR`] = _chunkNNSWWAGPjs.correctPaths.call(void 0, config.directories.data);
|
|
1069
1196
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1070
1197
|
}
|
|
1071
1198
|
if (config.directories.config) {
|
|
1072
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
1199
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkNNSWWAGPjs.correctPaths.call(void 0,
|
|
1200
|
+
config.directories.config
|
|
1201
|
+
);
|
|
1073
1202
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1074
1203
|
}
|
|
1075
1204
|
if (config.directories.temp) {
|
|
1076
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
1205
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkNNSWWAGPjs.correctPaths.call(void 0, config.directories.temp);
|
|
1077
1206
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1078
1207
|
}
|
|
1079
1208
|
if (config.directories.log) {
|
|
1080
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
1209
|
+
process.env[`${prefix}LOG_DIR`] = _chunkNNSWWAGPjs.correctPaths.call(void 0, config.directories.log);
|
|
1081
1210
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1082
1211
|
}
|
|
1083
1212
|
if (config.directories.build) {
|
|
1084
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
1213
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkNNSWWAGPjs.correctPaths.call(void 0,
|
|
1214
|
+
config.directories.build
|
|
1215
|
+
);
|
|
1085
1216
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1086
1217
|
}
|
|
1087
1218
|
}
|
|
@@ -1102,7 +1233,10 @@ var setConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (config)
|
|
|
1102
1233
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1103
1234
|
}
|
|
1104
1235
|
} else {
|
|
1105
|
-
setThemeColorConfigEnv(
|
|
1236
|
+
setThemeColorConfigEnv(
|
|
1237
|
+
`${prefix}COLOR_`,
|
|
1238
|
+
config.colors
|
|
1239
|
+
);
|
|
1106
1240
|
}
|
|
1107
1241
|
if (config.repository) {
|
|
1108
1242
|
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
@@ -1114,7 +1248,9 @@ var setConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (config)
|
|
|
1114
1248
|
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
1115
1249
|
}
|
|
1116
1250
|
if (config.externalPackagePatterns) {
|
|
1117
|
-
process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
|
|
1251
|
+
process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
|
|
1252
|
+
config.externalPackagePatterns
|
|
1253
|
+
);
|
|
1118
1254
|
}
|
|
1119
1255
|
if (config.registry) {
|
|
1120
1256
|
if (config.registry.github) {
|
|
@@ -1127,20 +1263,28 @@ var setConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (config)
|
|
|
1127
1263
|
process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
|
|
1128
1264
|
}
|
|
1129
1265
|
if (config.registry.cyclone) {
|
|
1130
|
-
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
1266
|
+
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
1267
|
+
config.registry.cyclone
|
|
1268
|
+
);
|
|
1131
1269
|
}
|
|
1132
1270
|
if (config.registry.container) {
|
|
1133
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
1271
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
1272
|
+
config.registry.container
|
|
1273
|
+
);
|
|
1134
1274
|
}
|
|
1135
1275
|
}
|
|
1136
1276
|
if (config.logLevel) {
|
|
1137
1277
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1138
1278
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1139
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
1279
|
+
process.env.NX_VERBOSE_LOGGING = String(
|
|
1280
|
+
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
1281
|
+
);
|
|
1140
1282
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1141
1283
|
}
|
|
1142
1284
|
if (config.skipConfigLogging !== void 0) {
|
|
1143
|
-
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
1285
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
1286
|
+
config.skipConfigLogging
|
|
1287
|
+
);
|
|
1144
1288
|
}
|
|
1145
1289
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1146
1290
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
@@ -1148,11 +1292,11 @@ var setConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (config)
|
|
|
1148
1292
|
setExtensionEnv(key, config.extensions[key]);
|
|
1149
1293
|
}
|
|
1150
1294
|
}
|
|
1151
|
-
}
|
|
1152
|
-
var setThemeColorConfigEnv =
|
|
1295
|
+
};
|
|
1296
|
+
var setThemeColorConfigEnv = (prefix, config) => {
|
|
1153
1297
|
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);
|
|
1154
|
-
}
|
|
1155
|
-
var setSingleThemeColorConfigEnv =
|
|
1298
|
+
};
|
|
1299
|
+
var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
1156
1300
|
if (config.dark) {
|
|
1157
1301
|
process.env[`${prefix}DARK`] = config.dark;
|
|
1158
1302
|
}
|
|
@@ -1195,14 +1339,14 @@ var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(
|
|
|
1195
1339
|
if (config.negative) {
|
|
1196
1340
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1197
1341
|
}
|
|
1198
|
-
}
|
|
1199
|
-
var setMultiThemeColorConfigEnv =
|
|
1342
|
+
};
|
|
1343
|
+
var setMultiThemeColorConfigEnv = (prefix, config) => {
|
|
1200
1344
|
return {
|
|
1201
1345
|
light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
|
|
1202
1346
|
dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
|
|
1203
1347
|
};
|
|
1204
|
-
}
|
|
1205
|
-
var setBaseThemeColorConfigEnv =
|
|
1348
|
+
};
|
|
1349
|
+
var setBaseThemeColorConfigEnv = (prefix, config) => {
|
|
1206
1350
|
if (config.foreground) {
|
|
1207
1351
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
1208
1352
|
}
|
|
@@ -1245,12 +1389,12 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(vo
|
|
|
1245
1389
|
if (config.negative) {
|
|
1246
1390
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1247
1391
|
}
|
|
1248
|
-
}
|
|
1392
|
+
};
|
|
1249
1393
|
|
|
1250
1394
|
// ../config-tools/src/create-storm-config.ts
|
|
1251
1395
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1252
1396
|
var _static_cache = void 0;
|
|
1253
|
-
var createStormWorkspaceConfig =
|
|
1397
|
+
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot3, skipLogs = false, useDefault = true) => {
|
|
1254
1398
|
let result;
|
|
1255
1399
|
if (!_optionalChain([_static_cache, 'optionalAccess', _57 => _57.data]) || !_optionalChain([_static_cache, 'optionalAccess', _58 => _58.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1256
1400
|
let _workspaceRoot = workspaceRoot3;
|
|
@@ -1261,16 +1405,19 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(vo
|
|
|
1261
1405
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1262
1406
|
if (!configFile) {
|
|
1263
1407
|
if (!skipLogs) {
|
|
1264
|
-
writeWarning(
|
|
1265
|
-
|
|
1266
|
-
|
|
1408
|
+
writeWarning(
|
|
1409
|
+
"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",
|
|
1410
|
+
{ logLevel: "all" }
|
|
1411
|
+
);
|
|
1267
1412
|
}
|
|
1268
1413
|
if (useDefault === false) {
|
|
1269
1414
|
return void 0;
|
|
1270
1415
|
}
|
|
1271
1416
|
}
|
|
1272
1417
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1273
|
-
result = await stormWorkspaceConfigSchema.parseAsync(
|
|
1418
|
+
result = await stormWorkspaceConfigSchema.parseAsync(
|
|
1419
|
+
_defu2.default.call(void 0, configEnv, configFile, defaultConfig)
|
|
1420
|
+
);
|
|
1274
1421
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1275
1422
|
} else {
|
|
1276
1423
|
result = _static_cache.data;
|
|
@@ -1286,11 +1433,9 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(vo
|
|
|
1286
1433
|
data: result
|
|
1287
1434
|
};
|
|
1288
1435
|
return result;
|
|
1289
|
-
}
|
|
1290
|
-
var createConfigExtension =
|
|
1291
|
-
const extension_cache_key = {
|
|
1292
|
-
extensionName
|
|
1293
|
-
};
|
|
1436
|
+
};
|
|
1437
|
+
var createConfigExtension = (extensionName, schema) => {
|
|
1438
|
+
const extension_cache_key = { extensionName };
|
|
1294
1439
|
if (_extension_cache.has(extension_cache_key)) {
|
|
1295
1440
|
return _extension_cache.get(extension_cache_key);
|
|
1296
1441
|
}
|
|
@@ -1300,39 +1445,50 @@ var createConfigExtension = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0,
|
|
|
1300
1445
|
}
|
|
1301
1446
|
_extension_cache.set(extension_cache_key, extension);
|
|
1302
1447
|
return extension;
|
|
1303
|
-
}
|
|
1304
|
-
var loadStormWorkspaceConfig =
|
|
1305
|
-
const config = await createStormWorkspaceConfig(
|
|
1448
|
+
};
|
|
1449
|
+
var loadStormWorkspaceConfig = async (workspaceRoot3, skipLogs = false) => {
|
|
1450
|
+
const config = await createStormWorkspaceConfig(
|
|
1451
|
+
void 0,
|
|
1452
|
+
void 0,
|
|
1453
|
+
workspaceRoot3,
|
|
1454
|
+
skipLogs,
|
|
1455
|
+
true
|
|
1456
|
+
);
|
|
1306
1457
|
setConfigEnv(config);
|
|
1307
1458
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1308
|
-
writeTrace(
|
|
1309
|
-
|
|
1459
|
+
writeTrace(
|
|
1460
|
+
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1461
|
+
${formatLogMessage(config)}`,
|
|
1462
|
+
config
|
|
1463
|
+
);
|
|
1310
1464
|
}
|
|
1311
1465
|
return config;
|
|
1312
|
-
}
|
|
1466
|
+
};
|
|
1313
1467
|
|
|
1314
1468
|
// ../config-tools/src/get-config.ts
|
|
1315
|
-
|
|
1316
|
-
var getConfig =
|
|
1469
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1470
|
+
var getConfig = (workspaceRoot3, skipLogs = false) => {
|
|
1317
1471
|
return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
|
|
1318
|
-
}
|
|
1319
|
-
var getWorkspaceConfig =
|
|
1472
|
+
};
|
|
1473
|
+
var getWorkspaceConfig = (skipLogs = false, options = {}) => {
|
|
1320
1474
|
let workspaceRoot3 = options.workspaceRoot;
|
|
1321
1475
|
if (!workspaceRoot3) {
|
|
1322
1476
|
workspaceRoot3 = findWorkspaceRoot(options.cwd);
|
|
1323
1477
|
}
|
|
1324
1478
|
return getConfig(workspaceRoot3, skipLogs);
|
|
1325
|
-
}
|
|
1479
|
+
};
|
|
1326
1480
|
|
|
1327
1481
|
// ../workspace-tools/src/base/base-executor.ts
|
|
1328
1482
|
|
|
1329
|
-
var withRunExecutor =
|
|
1483
|
+
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
1330
1484
|
const stopwatch = getStopwatch(name);
|
|
1331
1485
|
let options = _options;
|
|
1332
1486
|
let config = {};
|
|
1333
1487
|
try {
|
|
1334
1488
|
if (!_optionalChain([context, 'access', _59 => _59.projectsConfigurations, 'optionalAccess', _60 => _60.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1335
|
-
throw new Error(
|
|
1489
|
+
throw new Error(
|
|
1490
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
1491
|
+
);
|
|
1336
1492
|
}
|
|
1337
1493
|
const workspaceRoot3 = findWorkspaceRoot();
|
|
1338
1494
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
|
|
@@ -1341,35 +1497,50 @@ var withRunExecutor = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (name
|
|
|
1341
1497
|
config.workspaceRoot = workspaceRoot3;
|
|
1342
1498
|
writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
1343
1499
|
if (!executorOptions.skipReadingConfig) {
|
|
1344
|
-
writeTrace(
|
|
1500
|
+
writeTrace(
|
|
1501
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1345
1502
|
- workspaceRoot: ${workspaceRoot3}
|
|
1346
1503
|
- projectRoot: ${projectRoot}
|
|
1347
1504
|
- sourceRoot: ${sourceRoot}
|
|
1348
1505
|
- projectName: ${projectName}
|
|
1349
|
-
`,
|
|
1506
|
+
`,
|
|
1507
|
+
config
|
|
1508
|
+
);
|
|
1350
1509
|
config = await getConfig(workspaceRoot3);
|
|
1351
1510
|
}
|
|
1352
1511
|
if (_optionalChain([executorOptions, 'optionalAccess', _61 => _61.hooks, 'optionalAccess', _62 => _62.applyDefaultOptions])) {
|
|
1353
1512
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
1354
|
-
options = await Promise.resolve(
|
|
1513
|
+
options = await Promise.resolve(
|
|
1514
|
+
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
1515
|
+
);
|
|
1355
1516
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
1356
1517
|
}
|
|
1357
|
-
writeTrace(
|
|
1518
|
+
writeTrace(
|
|
1519
|
+
`Executor schema options \u2699\uFE0F
|
|
1358
1520
|
${formatLogMessage(options)}
|
|
1359
|
-
`,
|
|
1360
|
-
const tokenized = await applyWorkspaceTokens(options, _defu.defu.call(void 0, {
|
|
1361
|
-
workspaceRoot: workspaceRoot3,
|
|
1362
|
-
projectRoot,
|
|
1363
|
-
sourceRoot,
|
|
1364
|
-
projectName,
|
|
1521
|
+
`,
|
|
1365
1522
|
config
|
|
1366
|
-
|
|
1367
|
-
|
|
1523
|
+
);
|
|
1524
|
+
const tokenized = await applyWorkspaceTokens(
|
|
1525
|
+
options,
|
|
1526
|
+
_defu.defu.call(void 0,
|
|
1527
|
+
{ workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config },
|
|
1528
|
+
config,
|
|
1529
|
+
context.projectsConfigurations.projects[context.projectName]
|
|
1530
|
+
),
|
|
1531
|
+
applyWorkspaceProjectTokens
|
|
1532
|
+
);
|
|
1533
|
+
writeTrace(
|
|
1534
|
+
`Executor schema tokenized options \u2699\uFE0F
|
|
1368
1535
|
${formatLogMessage(tokenized)}
|
|
1369
|
-
`,
|
|
1536
|
+
`,
|
|
1537
|
+
config
|
|
1538
|
+
);
|
|
1370
1539
|
if (_optionalChain([executorOptions, 'optionalAccess', _63 => _63.hooks, 'optionalAccess', _64 => _64.preProcess])) {
|
|
1371
1540
|
writeDebug("Running the preProcess hook...", config);
|
|
1372
|
-
await Promise.resolve(
|
|
1541
|
+
await Promise.resolve(
|
|
1542
|
+
executorOptions.hooks.preProcess(tokenized, config)
|
|
1543
|
+
);
|
|
1373
1544
|
writeDebug("Completed the preProcess hook", config);
|
|
1374
1545
|
}
|
|
1375
1546
|
const ret = executorFn(tokenized, context, config);
|
|
@@ -1379,10 +1550,15 @@ ${formatLogMessage(tokenized)}
|
|
|
1379
1550
|
void iter;
|
|
1380
1551
|
}
|
|
1381
1552
|
}
|
|
1382
|
-
const result = await Promise.resolve(
|
|
1553
|
+
const result = await Promise.resolve(
|
|
1554
|
+
ret
|
|
1555
|
+
);
|
|
1383
1556
|
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")) {
|
|
1384
|
-
writeTrace(
|
|
1385
|
-
${
|
|
1557
|
+
writeTrace(
|
|
1558
|
+
`Failure determined by the ${name} executor
|
|
1559
|
+
${formatLogMessage(result)}`,
|
|
1560
|
+
config
|
|
1561
|
+
);
|
|
1386
1562
|
console.error(result);
|
|
1387
1563
|
throw new Error(`The ${name} executor failed to run`, {
|
|
1388
1564
|
cause: _optionalChain([result, 'optionalAccess', _74 => _74.error])
|
|
@@ -1399,27 +1575,36 @@ ${formatLogMessage(result)}`, config);
|
|
|
1399
1575
|
success: true
|
|
1400
1576
|
};
|
|
1401
1577
|
} catch (error) {
|
|
1402
|
-
writeFatal(
|
|
1403
|
-
|
|
1578
|
+
writeFatal(
|
|
1579
|
+
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
1580
|
+
config
|
|
1581
|
+
);
|
|
1582
|
+
writeError(
|
|
1583
|
+
`An exception was thrown in the executor's process
|
|
1404
1584
|
- Details: ${error.message}
|
|
1405
|
-
- Stacktrace: ${error.stack}`,
|
|
1585
|
+
- Stacktrace: ${error.stack}`,
|
|
1586
|
+
config
|
|
1587
|
+
);
|
|
1406
1588
|
return {
|
|
1407
1589
|
success: false
|
|
1408
1590
|
};
|
|
1409
1591
|
} finally {
|
|
1410
1592
|
stopwatch();
|
|
1411
1593
|
}
|
|
1412
|
-
}
|
|
1413
|
-
var _isFunction2 =
|
|
1594
|
+
};
|
|
1595
|
+
var _isFunction2 = (value) => {
|
|
1414
1596
|
try {
|
|
1415
1597
|
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]));
|
|
1416
1598
|
} catch (e) {
|
|
1417
1599
|
return false;
|
|
1418
1600
|
}
|
|
1419
|
-
}
|
|
1601
|
+
};
|
|
1420
1602
|
|
|
1421
1603
|
// ../workspace-tools/src/utils/cargo.ts
|
|
1422
|
-
|
|
1604
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1605
|
+
|
|
1606
|
+
|
|
1607
|
+
|
|
1423
1608
|
|
|
1424
1609
|
var _child_process = require('child_process');
|
|
1425
1610
|
|
|
@@ -1431,7 +1616,7 @@ var INVALID_CARGO_ARGS = [
|
|
|
1431
1616
|
"package",
|
|
1432
1617
|
"tsConfig"
|
|
1433
1618
|
];
|
|
1434
|
-
var buildCargoCommand =
|
|
1619
|
+
var buildCargoCommand = (baseCommand, options, context) => {
|
|
1435
1620
|
const args = [];
|
|
1436
1621
|
if (options.toolchain && options.toolchain !== "stable") {
|
|
1437
1622
|
args.push(`+${options.toolchain}`);
|
|
@@ -1469,13 +1654,12 @@ var buildCargoCommand = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (ba
|
|
|
1469
1654
|
args.push("--target-dir", options.outputPath);
|
|
1470
1655
|
}
|
|
1471
1656
|
return args;
|
|
1472
|
-
}
|
|
1657
|
+
};
|
|
1473
1658
|
async function cargoCommand(...args) {
|
|
1474
1659
|
console.log(`> cargo ${args.join(" ")}`);
|
|
1475
1660
|
args.push("--color", "always");
|
|
1476
1661
|
return await Promise.resolve(runProcess("cargo", ...args));
|
|
1477
1662
|
}
|
|
1478
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, cargoCommand, "cargoCommand");
|
|
1479
1663
|
function cargoCommandSync(args = "", options) {
|
|
1480
1664
|
const normalizedOptions = {
|
|
1481
1665
|
stdio: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _80 => _80.stdio]), () => ( "inherit")),
|
|
@@ -1502,7 +1686,6 @@ function cargoCommandSync(args = "", options) {
|
|
|
1502
1686
|
};
|
|
1503
1687
|
}
|
|
1504
1688
|
}
|
|
1505
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, cargoCommandSync, "cargoCommandSync");
|
|
1506
1689
|
function cargoMetadata() {
|
|
1507
1690
|
const output3 = cargoCommandSync("metadata --format-version=1", {
|
|
1508
1691
|
stdio: "pipe"
|
|
@@ -1513,15 +1696,12 @@ function cargoMetadata() {
|
|
|
1513
1696
|
}
|
|
1514
1697
|
return JSON.parse(output3.output);
|
|
1515
1698
|
}
|
|
1516
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, cargoMetadata, "cargoMetadata");
|
|
1517
1699
|
function runProcess(processCmd, ...args) {
|
|
1518
1700
|
const metadata = cargoMetadata();
|
|
1519
1701
|
const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _82 => _82.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, _devkit.workspaceRoot, "dist", "cargo")));
|
|
1520
1702
|
return new Promise((resolve) => {
|
|
1521
1703
|
if (process.env.VERCEL) {
|
|
1522
|
-
return resolve({
|
|
1523
|
-
success: true
|
|
1524
|
-
});
|
|
1704
|
+
return resolve({ success: true });
|
|
1525
1705
|
}
|
|
1526
1706
|
_child_process.execSync.call(void 0, `${processCmd} ${args.join(" ")}`, {
|
|
1527
1707
|
cwd: process.cwd(),
|
|
@@ -1532,127 +1712,133 @@ function runProcess(processCmd, ...args) {
|
|
|
1532
1712
|
CARGO_BUILD_TARGET_DIR: targetDir
|
|
1533
1713
|
},
|
|
1534
1714
|
windowsHide: true,
|
|
1535
|
-
stdio: [
|
|
1536
|
-
"inherit",
|
|
1537
|
-
"inherit",
|
|
1538
|
-
"inherit"
|
|
1539
|
-
]
|
|
1540
|
-
});
|
|
1541
|
-
resolve({
|
|
1542
|
-
success: true
|
|
1715
|
+
stdio: ["inherit", "inherit", "inherit"]
|
|
1543
1716
|
});
|
|
1717
|
+
resolve({ success: true });
|
|
1544
1718
|
});
|
|
1545
1719
|
}
|
|
1546
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, runProcess, "runProcess");
|
|
1547
1720
|
|
|
1548
1721
|
// ../workspace-tools/src/executors/cargo-build/executor.ts
|
|
1549
1722
|
async function cargoBuildExecutor(options, context) {
|
|
1550
1723
|
const command = buildCargoCommand("build", options, context);
|
|
1551
1724
|
return await cargoCommand(...command);
|
|
1552
1725
|
}
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
options
|
|
1560
|
-
|
|
1561
|
-
|
|
1726
|
+
var executor_default = withRunExecutor(
|
|
1727
|
+
"Cargo Build",
|
|
1728
|
+
cargoBuildExecutor,
|
|
1729
|
+
{
|
|
1730
|
+
skipReadingConfig: false,
|
|
1731
|
+
hooks: {
|
|
1732
|
+
applyDefaultOptions: (options) => {
|
|
1733
|
+
options.outputPath ??= "dist/target/{projectRoot}";
|
|
1734
|
+
options.toolchain ??= "stable";
|
|
1735
|
+
return options;
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1562
1738
|
}
|
|
1563
|
-
|
|
1739
|
+
);
|
|
1564
1740
|
|
|
1565
1741
|
// ../workspace-tools/src/executors/cargo-check/executor.ts
|
|
1566
|
-
|
|
1742
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1567
1743
|
async function cargoCheckExecutor(options, context) {
|
|
1568
1744
|
const command = buildCargoCommand("check", options, context);
|
|
1569
1745
|
return await cargoCommand(...command);
|
|
1570
1746
|
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1747
|
+
var executor_default2 = withRunExecutor(
|
|
1748
|
+
"Cargo Check",
|
|
1749
|
+
cargoCheckExecutor,
|
|
1750
|
+
{
|
|
1751
|
+
skipReadingConfig: false,
|
|
1752
|
+
hooks: {
|
|
1753
|
+
applyDefaultOptions: (options) => {
|
|
1754
|
+
options.toolchain ??= "stable";
|
|
1755
|
+
return options;
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1579
1758
|
}
|
|
1580
|
-
|
|
1759
|
+
);
|
|
1581
1760
|
|
|
1582
1761
|
// ../workspace-tools/src/executors/cargo-clippy/executor.ts
|
|
1583
|
-
|
|
1762
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1584
1763
|
async function cargoClippyExecutor(options, context) {
|
|
1585
1764
|
const command = buildCargoCommand("clippy", options, context);
|
|
1586
1765
|
return await cargoCommand(...command);
|
|
1587
1766
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
options
|
|
1595
|
-
|
|
1596
|
-
|
|
1767
|
+
var executor_default3 = withRunExecutor(
|
|
1768
|
+
"Cargo Clippy",
|
|
1769
|
+
cargoClippyExecutor,
|
|
1770
|
+
{
|
|
1771
|
+
skipReadingConfig: false,
|
|
1772
|
+
hooks: {
|
|
1773
|
+
applyDefaultOptions: (options) => {
|
|
1774
|
+
options.toolchain ??= "stable";
|
|
1775
|
+
options.fix ??= false;
|
|
1776
|
+
return options;
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1597
1779
|
}
|
|
1598
|
-
|
|
1780
|
+
);
|
|
1599
1781
|
|
|
1600
1782
|
// ../workspace-tools/src/executors/cargo-doc/executor.ts
|
|
1601
|
-
|
|
1783
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1602
1784
|
async function cargoDocExecutor(options, context) {
|
|
1603
|
-
const opts = {
|
|
1604
|
-
...options
|
|
1605
|
-
};
|
|
1785
|
+
const opts = { ...options };
|
|
1606
1786
|
opts["no-deps"] = opts.noDeps;
|
|
1607
1787
|
delete opts.noDeps;
|
|
1608
1788
|
const command = buildCargoCommand("doc", options, context);
|
|
1609
1789
|
return await cargoCommand(...command);
|
|
1610
1790
|
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
options
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1791
|
+
var executor_default4 = withRunExecutor(
|
|
1792
|
+
"Cargo Doc",
|
|
1793
|
+
cargoDocExecutor,
|
|
1794
|
+
{
|
|
1795
|
+
skipReadingConfig: false,
|
|
1796
|
+
hooks: {
|
|
1797
|
+
applyDefaultOptions: (options) => {
|
|
1798
|
+
options.outputPath ??= "dist/docs/{projectRoot}";
|
|
1799
|
+
options.toolchain ??= "stable";
|
|
1800
|
+
options.release ??= options.profile ? false : true;
|
|
1801
|
+
options.allFeatures ??= true;
|
|
1802
|
+
options.lib ??= true;
|
|
1803
|
+
options.bins ??= true;
|
|
1804
|
+
options.examples ??= true;
|
|
1805
|
+
options.noDeps ??= false;
|
|
1806
|
+
return options;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1626
1809
|
}
|
|
1627
|
-
|
|
1810
|
+
);
|
|
1628
1811
|
|
|
1629
1812
|
// ../workspace-tools/src/executors/cargo-format/executor.ts
|
|
1630
|
-
|
|
1813
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1631
1814
|
async function cargoFormatExecutor(options, context) {
|
|
1632
1815
|
const command = buildCargoCommand("fmt", options, context);
|
|
1633
1816
|
return await cargoCommand(...command);
|
|
1634
1817
|
}
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
options
|
|
1642
|
-
|
|
1643
|
-
|
|
1818
|
+
var executor_default5 = withRunExecutor(
|
|
1819
|
+
"Cargo Format",
|
|
1820
|
+
cargoFormatExecutor,
|
|
1821
|
+
{
|
|
1822
|
+
skipReadingConfig: false,
|
|
1823
|
+
hooks: {
|
|
1824
|
+
applyDefaultOptions: (options) => {
|
|
1825
|
+
options.outputPath ??= "dist/target/{projectRoot}";
|
|
1826
|
+
options.toolchain ??= "stable";
|
|
1827
|
+
return options;
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1644
1830
|
}
|
|
1645
|
-
|
|
1831
|
+
);
|
|
1646
1832
|
|
|
1647
1833
|
// ../workspace-tools/src/executors/cargo-publish/executor.ts
|
|
1648
|
-
|
|
1834
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1649
1835
|
|
|
1650
1836
|
|
|
1651
1837
|
|
|
1652
1838
|
var _https = require('https'); var _https2 = _interopRequireDefault(_https);
|
|
1653
1839
|
|
|
1654
1840
|
// ../workspace-tools/src/utils/toml.ts
|
|
1655
|
-
|
|
1841
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1656
1842
|
var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
|
|
1657
1843
|
|
|
1658
1844
|
|
|
@@ -1660,21 +1846,21 @@ var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml
|
|
|
1660
1846
|
var LARGE_BUFFER = 1024 * 1e6;
|
|
1661
1847
|
|
|
1662
1848
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1663
|
-
|
|
1849
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1664
1850
|
|
|
1665
1851
|
// ../esbuild/src/build.ts
|
|
1666
|
-
|
|
1852
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1667
1853
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
1668
1854
|
var _globby = require('globby');
|
|
1669
1855
|
|
|
1670
1856
|
// ../esbuild/src/assets.ts
|
|
1671
|
-
|
|
1857
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1672
1858
|
|
|
1673
1859
|
// ../build-tools/src/index.ts
|
|
1674
|
-
|
|
1860
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1675
1861
|
|
|
1676
1862
|
// ../build-tools/src/config.ts
|
|
1677
|
-
|
|
1863
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1678
1864
|
var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
1679
1865
|
*
|
|
1680
1866
|
* \u26A1 Built by Storm Software
|
|
@@ -1685,39 +1871,39 @@ var DEFAULT_ENVIRONMENT = "production";
|
|
|
1685
1871
|
var DEFAULT_ORGANIZATION = "storm-software";
|
|
1686
1872
|
|
|
1687
1873
|
// ../build-tools/src/plugins/index.ts
|
|
1688
|
-
|
|
1874
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1689
1875
|
|
|
1690
1876
|
// ../build-tools/src/plugins/analyze.ts
|
|
1691
|
-
|
|
1877
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1692
1878
|
|
|
1693
1879
|
// ../build-tools/src/plugins/swc.ts
|
|
1694
|
-
|
|
1880
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1695
1881
|
var _core = require('@swc/core');
|
|
1696
1882
|
|
|
1697
1883
|
// ../build-tools/src/plugins/ts-resolve.ts
|
|
1698
|
-
|
|
1884
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1699
1885
|
|
|
1700
1886
|
var _module = require('module');
|
|
1701
1887
|
|
|
1702
1888
|
var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
|
|
1703
1889
|
|
|
1704
1890
|
// ../build-tools/src/plugins/type-definitions.ts
|
|
1705
|
-
|
|
1891
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1706
1892
|
|
|
1707
1893
|
|
|
1708
1894
|
|
|
1709
1895
|
// ../build-tools/src/types.ts
|
|
1710
|
-
|
|
1896
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1711
1897
|
|
|
1712
1898
|
// ../build-tools/src/utilities/index.ts
|
|
1713
|
-
|
|
1899
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1714
1900
|
|
|
1715
1901
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
1716
|
-
|
|
1902
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1717
1903
|
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
1718
1904
|
var _glob = require('glob');
|
|
1719
1905
|
|
|
1720
|
-
var copyAssets =
|
|
1906
|
+
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
1721
1907
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
1722
1908
|
pendingAssets.push({
|
|
1723
1909
|
input: projectRoot,
|
|
@@ -1743,8 +1929,11 @@ var copyAssets = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, async (con
|
|
|
1743
1929
|
output: "src/"
|
|
1744
1930
|
});
|
|
1745
1931
|
}
|
|
1746
|
-
writeTrace(
|
|
1747
|
-
|
|
1932
|
+
writeTrace(
|
|
1933
|
+
`\u{1F4DD} Copying the following assets to the output directory:
|
|
1934
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkNNSWWAGPjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
1935
|
+
config
|
|
1936
|
+
);
|
|
1748
1937
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
1749
1938
|
projectDir: projectRoot,
|
|
1750
1939
|
rootDir: config.workspaceRoot,
|
|
@@ -1753,29 +1942,46 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
1753
1942
|
});
|
|
1754
1943
|
await assetHandler.processAllAssetsOnce();
|
|
1755
1944
|
if (includeSrc === true) {
|
|
1756
|
-
writeDebug(
|
|
1945
|
+
writeDebug(
|
|
1946
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
1947
|
+
outputPath,
|
|
1948
|
+
"src"
|
|
1949
|
+
)}`,
|
|
1950
|
+
config
|
|
1951
|
+
);
|
|
1757
1952
|
const files = await _glob.glob.call(void 0, [
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1953
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
1954
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
1955
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
1956
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
1762
1957
|
]);
|
|
1763
|
-
await Promise.allSettled(
|
|
1958
|
+
await Promise.allSettled(
|
|
1959
|
+
files.map(
|
|
1960
|
+
async (file) => _promises.writeFile.call(void 0,
|
|
1961
|
+
file,
|
|
1962
|
+
`${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
1764
1963
|
|
|
1765
1964
|
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
1766
1965
|
|
|
1767
|
-
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
1966
|
+
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
1967
|
+
)
|
|
1968
|
+
)
|
|
1969
|
+
);
|
|
1768
1970
|
}
|
|
1769
|
-
}
|
|
1971
|
+
};
|
|
1770
1972
|
|
|
1771
1973
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
1772
|
-
|
|
1974
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1773
1975
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
1774
1976
|
|
|
1775
1977
|
|
|
1776
1978
|
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
|
|
1982
|
+
|
|
1777
1983
|
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
1778
|
-
var addPackageDependencies =
|
|
1984
|
+
var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, packageJson) => {
|
|
1779
1985
|
let projectGraph;
|
|
1780
1986
|
try {
|
|
1781
1987
|
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
@@ -1784,16 +1990,35 @@ var addPackageDependencies = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0
|
|
|
1784
1990
|
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
1785
1991
|
}
|
|
1786
1992
|
if (!projectGraph) {
|
|
1787
|
-
throw new Error(
|
|
1993
|
+
throw new Error(
|
|
1994
|
+
"The Build process failed because the project graph is not available. Please run the build command again."
|
|
1995
|
+
);
|
|
1788
1996
|
}
|
|
1789
|
-
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
1997
|
+
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
1998
|
+
void 0,
|
|
1999
|
+
projectGraph,
|
|
2000
|
+
workspaceRoot3,
|
|
2001
|
+
projectName,
|
|
2002
|
+
process.env.NX_TASK_TARGET_TARGET || "build",
|
|
2003
|
+
process.env.NX_TASK_TARGET_CONFIGURATION || "production",
|
|
2004
|
+
true
|
|
2005
|
+
);
|
|
1790
2006
|
const localPackages = [];
|
|
1791
|
-
for (const project of projectDependencies.dependencies.filter(
|
|
2007
|
+
for (const project of projectDependencies.dependencies.filter(
|
|
2008
|
+
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _83 => _83.node, 'access', _84 => _84.data, 'optionalAccess', _85 => _85.root]) !== projectRoot && _optionalChain([dep, 'access', _86 => _86.node, 'access', _87 => _87.data, 'optionalAccess', _88 => _88.root]) !== workspaceRoot3
|
|
2009
|
+
)) {
|
|
1792
2010
|
const projectNode = project.node;
|
|
1793
2011
|
if (projectNode.data.root) {
|
|
1794
|
-
const projectPackageJsonPath =
|
|
2012
|
+
const projectPackageJsonPath = _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2013
|
+
workspaceRoot3,
|
|
2014
|
+
projectNode.data.root,
|
|
2015
|
+
"package.json"
|
|
2016
|
+
);
|
|
1795
2017
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
1796
|
-
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
2018
|
+
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
2019
|
+
projectPackageJsonPath,
|
|
2020
|
+
"utf8"
|
|
2021
|
+
);
|
|
1797
2022
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
1798
2023
|
if (projectPackageJson.private !== true) {
|
|
1799
2024
|
localPackages.push(projectPackageJson);
|
|
@@ -1802,19 +2027,33 @@ var addPackageDependencies = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0
|
|
|
1802
2027
|
}
|
|
1803
2028
|
}
|
|
1804
2029
|
if (localPackages.length > 0) {
|
|
1805
|
-
writeTrace(
|
|
1806
|
-
|
|
2030
|
+
writeTrace(
|
|
2031
|
+
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
2032
|
+
);
|
|
2033
|
+
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
2034
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
2035
|
+
"utf8"
|
|
2036
|
+
);
|
|
1807
2037
|
const projectJson = JSON.parse(projectJsonFile);
|
|
1808
2038
|
const projectName2 = projectJson.name;
|
|
1809
2039
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1810
2040
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _89 => _89.projects, 'optionalAccess', _90 => _90[projectName2]])) {
|
|
1811
|
-
throw new Error(
|
|
2041
|
+
throw new Error(
|
|
2042
|
+
"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."
|
|
2043
|
+
);
|
|
1812
2044
|
}
|
|
1813
2045
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _91 => _91.projects, 'optionalAccess', _92 => _92[projectName2], 'access', _93 => _93.implicitDependencies, 'optionalAccess', _94 => _94.reduce, 'call', _95 => _95((ret, dep) => {
|
|
1814
2046
|
if (_optionalChain([projectConfigurations, 'access', _96 => _96.projects, 'optionalAccess', _97 => _97[dep]])) {
|
|
1815
|
-
const depPackageJsonPath =
|
|
2047
|
+
const depPackageJsonPath = _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2048
|
+
workspaceRoot3,
|
|
2049
|
+
projectConfigurations.projects[dep].root,
|
|
2050
|
+
"package.json"
|
|
2051
|
+
);
|
|
1816
2052
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
1817
|
-
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
2053
|
+
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
2054
|
+
depPackageJsonPath,
|
|
2055
|
+
"utf8"
|
|
2056
|
+
);
|
|
1818
2057
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
1819
2058
|
if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
|
|
1820
2059
|
ret.push(depPackageJson.name);
|
|
@@ -1839,10 +2078,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0
|
|
|
1839
2078
|
writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
|
|
1840
2079
|
}
|
|
1841
2080
|
return packageJson;
|
|
1842
|
-
}
|
|
1843
|
-
var addWorkspacePackageJsonFields =
|
|
2081
|
+
};
|
|
2082
|
+
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
1844
2083
|
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
|
|
1845
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
2084
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
2085
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, workspaceRoot3, "package.json"),
|
|
2086
|
+
"utf8"
|
|
2087
|
+
);
|
|
1846
2088
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
1847
2089
|
packageJson.type ??= "module";
|
|
1848
2090
|
packageJson.sideEffects ??= false;
|
|
@@ -1851,11 +2093,9 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call
|
|
|
1851
2093
|
if (distSrc.startsWith("/")) {
|
|
1852
2094
|
distSrc = distSrc.substring(1);
|
|
1853
2095
|
}
|
|
1854
|
-
packageJson.source ??= `${
|
|
2096
|
+
packageJson.source ??= `${_chunkNNSWWAGPjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
1855
2097
|
}
|
|
1856
|
-
packageJson.files ??= [
|
|
1857
|
-
"dist/**/*"
|
|
1858
|
-
];
|
|
2098
|
+
packageJson.files ??= ["dist/**/*"];
|
|
1859
2099
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
1860
2100
|
packageJson.files.push("src/**/*");
|
|
1861
2101
|
}
|
|
@@ -1871,28 +2111,24 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call
|
|
|
1871
2111
|
packageJson.author ??= workspacePackageJson.author;
|
|
1872
2112
|
packageJson.maintainers ??= workspacePackageJson.maintainers;
|
|
1873
2113
|
if (!packageJson.maintainers && packageJson.author) {
|
|
1874
|
-
packageJson.maintainers = [
|
|
1875
|
-
packageJson.author
|
|
1876
|
-
];
|
|
2114
|
+
packageJson.maintainers = [packageJson.author];
|
|
1877
2115
|
}
|
|
1878
2116
|
packageJson.contributors ??= workspacePackageJson.contributors;
|
|
1879
2117
|
if (!packageJson.contributors && packageJson.author) {
|
|
1880
|
-
packageJson.contributors = [
|
|
1881
|
-
packageJson.author
|
|
1882
|
-
];
|
|
2118
|
+
packageJson.contributors = [packageJson.author];
|
|
1883
2119
|
}
|
|
1884
2120
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
1885
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
2121
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkNNSWWAGPjs.joinPaths.call(void 0, "packages", projectName);
|
|
1886
2122
|
return packageJson;
|
|
1887
|
-
}
|
|
2123
|
+
};
|
|
1888
2124
|
|
|
1889
2125
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
1890
|
-
|
|
2126
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1891
2127
|
|
|
1892
2128
|
|
|
1893
2129
|
// ../build-tools/src/utilities/get-env.ts
|
|
1894
|
-
|
|
1895
|
-
var getEnv =
|
|
2130
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2131
|
+
var getEnv = (builder, options) => {
|
|
1896
2132
|
return {
|
|
1897
2133
|
STORM_BUILD: builder,
|
|
1898
2134
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
@@ -1903,51 +2139,63 @@ var getEnv = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (builder, opti
|
|
|
1903
2139
|
STORM_TARGET: JSON.stringify(options.target),
|
|
1904
2140
|
...options.env
|
|
1905
2141
|
};
|
|
1906
|
-
}
|
|
2142
|
+
};
|
|
1907
2143
|
|
|
1908
2144
|
// ../build-tools/src/utilities/get-file-banner.ts
|
|
1909
|
-
|
|
2145
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1910
2146
|
|
|
1911
2147
|
// ../build-tools/src/utilities/get-out-extension.ts
|
|
1912
|
-
|
|
2148
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1913
2149
|
|
|
1914
2150
|
// ../build-tools/src/utilities/get-project-deps.ts
|
|
1915
|
-
|
|
2151
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1916
2152
|
|
|
1917
2153
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
1918
|
-
|
|
2154
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1919
2155
|
|
|
1920
2156
|
|
|
1921
2157
|
|
|
1922
2158
|
// ../build-tools/src/utilities/task-graph.ts
|
|
1923
|
-
|
|
2159
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2160
|
+
|
|
2161
|
+
|
|
2162
|
+
|
|
1924
2163
|
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
1925
2164
|
|
|
1926
2165
|
// ../esbuild/src/assets.ts
|
|
1927
2166
|
async function copyBuildAssets(context) {
|
|
1928
2167
|
if (_optionalChain([context, 'access', _106 => _106.result, 'optionalAccess', _107 => _107.errors, 'access', _108 => _108.length]) === 0) {
|
|
1929
|
-
writeDebug(
|
|
2168
|
+
writeDebug(
|
|
2169
|
+
` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
|
|
2170
|
+
context.workspaceConfig
|
|
2171
|
+
);
|
|
1930
2172
|
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
1931
|
-
await copyAssets(
|
|
2173
|
+
await copyAssets(
|
|
2174
|
+
context.workspaceConfig,
|
|
2175
|
+
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
2176
|
+
context.outputPath,
|
|
2177
|
+
context.options.projectRoot,
|
|
2178
|
+
context.sourceRoot,
|
|
2179
|
+
true,
|
|
2180
|
+
false
|
|
2181
|
+
);
|
|
1932
2182
|
stopwatch();
|
|
1933
2183
|
}
|
|
1934
2184
|
return context;
|
|
1935
2185
|
}
|
|
1936
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1937
2186
|
|
|
1938
2187
|
// ../esbuild/src/clean.ts
|
|
1939
|
-
|
|
2188
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1940
2189
|
|
|
1941
2190
|
async function cleanDirectories(directory) {
|
|
1942
|
-
await _promises.rm.call(void 0, directory, {
|
|
1943
|
-
recursive: true,
|
|
1944
|
-
force: true
|
|
1945
|
-
});
|
|
2191
|
+
await _promises.rm.call(void 0, directory, { recursive: true, force: true });
|
|
1946
2192
|
}
|
|
1947
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
1948
2193
|
|
|
1949
2194
|
// ../esbuild/src/context.ts
|
|
1950
|
-
|
|
2195
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
|
|
1951
2199
|
|
|
1952
2200
|
|
|
1953
2201
|
|
|
@@ -1955,7 +2203,7 @@ _chunkLTKRUM5Pjs.init_cjs_shims.call(void 0, );
|
|
|
1955
2203
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
1956
2204
|
|
|
1957
2205
|
// ../esbuild/src/config.ts
|
|
1958
|
-
|
|
2206
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
1959
2207
|
var DEFAULT_BUILD_OPTIONS = {
|
|
1960
2208
|
assets: [],
|
|
1961
2209
|
platform: "node",
|
|
@@ -2001,49 +2249,52 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
2001
2249
|
};
|
|
2002
2250
|
|
|
2003
2251
|
// ../esbuild/src/plugins/resolve-paths.ts
|
|
2004
|
-
|
|
2252
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2005
2253
|
|
|
2006
2254
|
function resolvePathsConfig(options, cwd, projectRoot) {
|
|
2007
2255
|
if (_optionalChain([options, 'optionalAccess', _109 => _109.compilerOptions, 'optionalAccess', _110 => _110.paths])) {
|
|
2008
2256
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
2009
2257
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
2010
|
-
return [
|
|
2011
|
-
key,
|
|
2012
|
-
paths2.map((v) => path4.default.resolve(cwd, v))
|
|
2013
|
-
];
|
|
2258
|
+
return [key, paths2.map((v) => path4.default.resolve(cwd, v))];
|
|
2014
2259
|
});
|
|
2015
2260
|
return Object.fromEntries(resolvedPaths);
|
|
2016
2261
|
}
|
|
2017
2262
|
if (options.extends) {
|
|
2018
|
-
const extendsPath = path4.default.resolve(
|
|
2263
|
+
const extendsPath = path4.default.resolve(
|
|
2264
|
+
projectRoot ? _chunkNNSWWAGPjs.joinPaths.call(void 0, cwd, projectRoot, options.extends) : _chunkNNSWWAGPjs.joinPaths.call(void 0, cwd, options.extends)
|
|
2265
|
+
);
|
|
2019
2266
|
const extendsDir = path4.default.dirname(extendsPath);
|
|
2020
|
-
const extendsConfig =
|
|
2267
|
+
const extendsConfig = _chunkBG73ZJERjs.__require.call(void 0, extendsPath);
|
|
2021
2268
|
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
2022
2269
|
}
|
|
2023
2270
|
return [];
|
|
2024
2271
|
}
|
|
2025
|
-
|
|
2026
|
-
var resolvePathsPlugin = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (context) => ({
|
|
2272
|
+
var resolvePathsPlugin = (context) => ({
|
|
2027
2273
|
name: "storm:resolve-paths",
|
|
2028
2274
|
setup(build3) {
|
|
2029
|
-
const parentTsConfig = build3.initialOptions.tsconfig ?
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2275
|
+
const parentTsConfig = build3.initialOptions.tsconfig ? _chunkBG73ZJERjs.__require.call(void 0, _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2276
|
+
context.workspaceConfig.workspaceRoot,
|
|
2277
|
+
build3.initialOptions.tsconfig.replace(
|
|
2278
|
+
context.workspaceConfig.workspaceRoot,
|
|
2279
|
+
""
|
|
2280
|
+
)
|
|
2281
|
+
)) : _chunkBG73ZJERjs.__require.call(void 0, _chunkNNSWWAGPjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
2282
|
+
const resolvedTsPaths = resolvePathsConfig(
|
|
2283
|
+
parentTsConfig,
|
|
2284
|
+
context.workspaceConfig.workspaceRoot,
|
|
2285
|
+
context.options.projectRoot
|
|
2286
|
+
);
|
|
2287
|
+
const packagesRegex = new RegExp(
|
|
2288
|
+
`^(${Object.keys(resolvedTsPaths).join("|")})$`
|
|
2289
|
+
);
|
|
2290
|
+
build3.onResolve({ filter: packagesRegex }, (args) => {
|
|
2035
2291
|
if (_optionalChain([build3, 'access', _111 => _111.initialOptions, 'access', _112 => _112.external, 'optionalAccess', _113 => _113.includes, 'call', _114 => _114(args.path)])) {
|
|
2036
|
-
return {
|
|
2037
|
-
path: args.path,
|
|
2038
|
-
external: true
|
|
2039
|
-
};
|
|
2292
|
+
return { path: args.path, external: true };
|
|
2040
2293
|
}
|
|
2041
|
-
return {
|
|
2042
|
-
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
2043
|
-
};
|
|
2294
|
+
return { path: `${resolvedTsPaths[args.path][0]}/index.ts` };
|
|
2044
2295
|
});
|
|
2045
2296
|
}
|
|
2046
|
-
})
|
|
2297
|
+
});
|
|
2047
2298
|
|
|
2048
2299
|
// ../esbuild/src/context.ts
|
|
2049
2300
|
async function resolveContext(userOptions) {
|
|
@@ -2060,7 +2311,11 @@ async function resolveContext(userOptions) {
|
|
|
2060
2311
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
2061
2312
|
exitOnError: true
|
|
2062
2313
|
});
|
|
2063
|
-
const projectJsonPath =
|
|
2314
|
+
const projectJsonPath = _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2315
|
+
workspaceRoot3.dir,
|
|
2316
|
+
projectRoot,
|
|
2317
|
+
"project.json"
|
|
2318
|
+
);
|
|
2064
2319
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2065
2320
|
throw new Error("Cannot find project.json configuration");
|
|
2066
2321
|
}
|
|
@@ -2069,18 +2324,24 @@ async function resolveContext(userOptions) {
|
|
|
2069
2324
|
const projectName = projectJson.name || userOptions.name;
|
|
2070
2325
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2071
2326
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _115 => _115.projects, 'optionalAccess', _116 => _116[projectName]])) {
|
|
2072
|
-
throw new Error(
|
|
2327
|
+
throw new Error(
|
|
2328
|
+
"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."
|
|
2329
|
+
);
|
|
2073
2330
|
}
|
|
2074
2331
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
2075
2332
|
options.name ??= projectName;
|
|
2076
|
-
const packageJsonPath =
|
|
2333
|
+
const packageJsonPath = _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2334
|
+
workspaceRoot3.dir,
|
|
2335
|
+
options.projectRoot,
|
|
2336
|
+
"package.json"
|
|
2337
|
+
);
|
|
2077
2338
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2078
2339
|
throw new Error("Cannot find package.json configuration");
|
|
2079
2340
|
}
|
|
2080
2341
|
const env = getEnv("esbuild", options);
|
|
2081
2342
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
2082
2343
|
const resolvedOptions = {
|
|
2083
|
-
tsconfig:
|
|
2344
|
+
tsconfig: _chunkNNSWWAGPjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json"),
|
|
2084
2345
|
...options,
|
|
2085
2346
|
metafile: userOptions.mode === "development",
|
|
2086
2347
|
clean: false,
|
|
@@ -2106,8 +2367,12 @@ async function resolveContext(userOptions) {
|
|
|
2106
2367
|
projectConfigurations,
|
|
2107
2368
|
projectName,
|
|
2108
2369
|
projectGraph,
|
|
2109
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
2110
|
-
outputPath: resolvedOptions.outputPath ||
|
|
2370
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkNNSWWAGPjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
2371
|
+
outputPath: resolvedOptions.outputPath || _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2372
|
+
workspaceConfig.workspaceRoot,
|
|
2373
|
+
"dist",
|
|
2374
|
+
resolvedOptions.projectRoot
|
|
2375
|
+
),
|
|
2111
2376
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2112
2377
|
};
|
|
2113
2378
|
context.options.esbuildPlugins = [
|
|
@@ -2116,28 +2381,49 @@ async function resolveContext(userOptions) {
|
|
|
2116
2381
|
];
|
|
2117
2382
|
return context;
|
|
2118
2383
|
}
|
|
2119
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
2120
2384
|
|
|
2121
2385
|
// ../esbuild/src/package-json.ts
|
|
2122
|
-
|
|
2386
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2123
2387
|
|
|
2124
2388
|
|
|
2125
2389
|
|
|
2126
2390
|
async function generatePackageJson(context) {
|
|
2127
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
2391
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkNNSWWAGPjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
2128
2392
|
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
2129
2393
|
const stopwatch = getStopwatch("Write package.json file");
|
|
2130
|
-
const packageJsonPath =
|
|
2394
|
+
const packageJsonPath = _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2395
|
+
context.options.projectRoot,
|
|
2396
|
+
"project.json"
|
|
2397
|
+
);
|
|
2131
2398
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2132
2399
|
throw new Error("Cannot find package.json configuration");
|
|
2133
2400
|
}
|
|
2134
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
2401
|
+
const packageJsonFile = await _promises2.default.readFile(
|
|
2402
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2403
|
+
context.workspaceConfig.workspaceRoot,
|
|
2404
|
+
context.options.projectRoot,
|
|
2405
|
+
"package.json"
|
|
2406
|
+
),
|
|
2407
|
+
"utf8"
|
|
2408
|
+
);
|
|
2135
2409
|
let packageJson = JSON.parse(packageJsonFile);
|
|
2136
2410
|
if (!packageJson) {
|
|
2137
2411
|
throw new Error("Cannot find package.json configuration file");
|
|
2138
2412
|
}
|
|
2139
|
-
packageJson = await addPackageDependencies(
|
|
2140
|
-
|
|
2413
|
+
packageJson = await addPackageDependencies(
|
|
2414
|
+
context.workspaceConfig.workspaceRoot,
|
|
2415
|
+
context.options.projectRoot,
|
|
2416
|
+
context.projectName,
|
|
2417
|
+
packageJson
|
|
2418
|
+
);
|
|
2419
|
+
packageJson = await addWorkspacePackageJsonFields(
|
|
2420
|
+
context.workspaceConfig,
|
|
2421
|
+
context.options.projectRoot,
|
|
2422
|
+
context.sourceRoot,
|
|
2423
|
+
context.projectName,
|
|
2424
|
+
false,
|
|
2425
|
+
packageJson
|
|
2426
|
+
);
|
|
2141
2427
|
if (context.options.entry) {
|
|
2142
2428
|
packageJson.exports ??= {};
|
|
2143
2429
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -2207,23 +2493,28 @@ async function generatePackageJson(context) {
|
|
|
2207
2493
|
if (isDts) {
|
|
2208
2494
|
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
2209
2495
|
}
|
|
2210
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
2211
|
-
|
|
2212
|
-
ret[key.replace("/index", "")]
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2496
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
2497
|
+
(ret, key) => {
|
|
2498
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
2499
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
2500
|
+
}
|
|
2501
|
+
return ret;
|
|
2502
|
+
},
|
|
2503
|
+
packageJson.exports
|
|
2504
|
+
);
|
|
2216
2505
|
}
|
|
2217
2506
|
}
|
|
2218
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
2507
|
+
await _devkit.writeJsonFile.call(void 0,
|
|
2508
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
2509
|
+
packageJson
|
|
2510
|
+
);
|
|
2219
2511
|
stopwatch();
|
|
2220
2512
|
}
|
|
2221
2513
|
return context;
|
|
2222
2514
|
}
|
|
2223
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
2224
2515
|
|
|
2225
2516
|
// ../esbuild/src/plugins/deps-check.ts
|
|
2226
|
-
|
|
2517
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2227
2518
|
|
|
2228
2519
|
|
|
2229
2520
|
var unusedIgnore = [
|
|
@@ -2250,16 +2541,12 @@ var unusedIgnore = [
|
|
|
2250
2541
|
// these are indirectly used by build
|
|
2251
2542
|
"buffer"
|
|
2252
2543
|
];
|
|
2253
|
-
var missingIgnore = [
|
|
2254
|
-
|
|
2255
|
-
"@prisma/client",
|
|
2256
|
-
"ts-toolbelt"
|
|
2257
|
-
];
|
|
2258
|
-
var depsCheckPlugin = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (bundle) => ({
|
|
2544
|
+
var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
|
|
2545
|
+
var depsCheckPlugin = (bundle) => ({
|
|
2259
2546
|
name: "storm:deps-check",
|
|
2260
2547
|
setup(build3) {
|
|
2261
2548
|
const pkgJsonPath = path4.default.join(process.cwd(), "package.json");
|
|
2262
|
-
const pkgContents =
|
|
2549
|
+
const pkgContents = _chunkBG73ZJERjs.__require.call(void 0, pkgJsonPath);
|
|
2263
2550
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
2264
2551
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
2265
2552
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -2269,9 +2556,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (bund
|
|
|
2269
2556
|
];
|
|
2270
2557
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2271
2558
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2272
|
-
build3.onResolve({
|
|
2273
|
-
filter: onlyPackages
|
|
2274
|
-
}, (args) => {
|
|
2559
|
+
build3.onResolve({ filter: onlyPackages }, (args) => {
|
|
2275
2560
|
if (args.importer.includes(process.cwd())) {
|
|
2276
2561
|
if (args.path[0] === "@") {
|
|
2277
2562
|
const [org, pkg] = args.path.split("/");
|
|
@@ -2281,19 +2566,13 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (bund
|
|
|
2281
2566
|
collectedDependencies.add(pkg);
|
|
2282
2567
|
}
|
|
2283
2568
|
}
|
|
2284
|
-
return {
|
|
2285
|
-
external: true
|
|
2286
|
-
};
|
|
2569
|
+
return { external: true };
|
|
2287
2570
|
});
|
|
2288
2571
|
build3.onEnd(() => {
|
|
2289
|
-
const unusedDependencies = [
|
|
2290
|
-
...dependencies
|
|
2291
|
-
].filter((dep) => {
|
|
2572
|
+
const unusedDependencies = [...dependencies].filter((dep) => {
|
|
2292
2573
|
return !collectedDependencies.has(dep) || _module.builtinModules.includes(dep);
|
|
2293
2574
|
});
|
|
2294
|
-
const missingDependencies = [
|
|
2295
|
-
...collectedDependencies
|
|
2296
|
-
].filter((dep) => {
|
|
2575
|
+
const missingDependencies = [...collectedDependencies].filter((dep) => {
|
|
2297
2576
|
return !dependencies.includes(dep) && !_module.builtinModules.includes(dep);
|
|
2298
2577
|
});
|
|
2299
2578
|
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
@@ -2302,8 +2581,12 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (bund
|
|
|
2302
2581
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
2303
2582
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
2304
2583
|
});
|
|
2305
|
-
writeWarning(
|
|
2306
|
-
|
|
2584
|
+
writeWarning(
|
|
2585
|
+
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
2586
|
+
);
|
|
2587
|
+
writeError(
|
|
2588
|
+
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
2589
|
+
);
|
|
2307
2590
|
if (filteredMissingDeps.length > 0) {
|
|
2308
2591
|
throw new Error(`Missing dependencies detected - please install them:
|
|
2309
2592
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -2311,37 +2594,49 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
2311
2594
|
}
|
|
2312
2595
|
});
|
|
2313
2596
|
}
|
|
2314
|
-
})
|
|
2597
|
+
});
|
|
2315
2598
|
|
|
2316
2599
|
// ../esbuild/src/tsup.ts
|
|
2317
|
-
|
|
2600
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2318
2601
|
var _tsup = require('tsup');
|
|
2319
2602
|
async function executeTsup(context) {
|
|
2320
|
-
writeDebug(
|
|
2603
|
+
writeDebug(
|
|
2604
|
+
` \u{1F680} Running ${context.options.name} build`,
|
|
2605
|
+
context.workspaceConfig
|
|
2606
|
+
);
|
|
2321
2607
|
const stopwatch = getStopwatch(`${context.options.name} build`);
|
|
2322
2608
|
await _tsup.build.call(void 0, {
|
|
2323
2609
|
...context.options,
|
|
2324
|
-
outDir: context.options.distDir ?
|
|
2610
|
+
outDir: context.options.distDir ? _chunkNNSWWAGPjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
2325
2611
|
workspaceConfig: context.workspaceConfig
|
|
2326
2612
|
});
|
|
2327
2613
|
stopwatch();
|
|
2328
2614
|
return context;
|
|
2329
2615
|
}
|
|
2330
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, executeTsup, "executeTsup");
|
|
2331
2616
|
|
|
2332
2617
|
// ../esbuild/src/build.ts
|
|
2333
2618
|
async function reportResults(context) {
|
|
2334
2619
|
if (_optionalChain([context, 'access', _117 => _117.result, 'optionalAccess', _118 => _118.errors, 'access', _119 => _119.length]) === 0) {
|
|
2335
2620
|
if (context.result.warnings.length > 0) {
|
|
2336
|
-
writeWarning(
|
|
2621
|
+
writeWarning(
|
|
2622
|
+
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
2623
|
+
context.workspaceConfig
|
|
2624
|
+
);
|
|
2337
2625
|
}
|
|
2338
|
-
writeSuccess(
|
|
2626
|
+
writeSuccess(
|
|
2627
|
+
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
2628
|
+
context.workspaceConfig
|
|
2629
|
+
);
|
|
2339
2630
|
} else if (_optionalChain([context, 'access', _120 => _120.result, 'optionalAccess', _121 => _121.errors]) && _optionalChain([context, 'access', _122 => _122.result, 'optionalAccess', _123 => _123.errors, 'access', _124 => _124.length]) > 0) {
|
|
2340
|
-
writeError(
|
|
2341
|
-
|
|
2631
|
+
writeError(
|
|
2632
|
+
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
2633
|
+
context.workspaceConfig
|
|
2634
|
+
);
|
|
2635
|
+
throw new Error(
|
|
2636
|
+
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
2637
|
+
);
|
|
2342
2638
|
}
|
|
2343
2639
|
}
|
|
2344
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, reportResults, "reportResults");
|
|
2345
2640
|
async function dependencyCheck(options) {
|
|
2346
2641
|
if (process.env.DEV === "true") {
|
|
2347
2642
|
return void 0;
|
|
@@ -2352,43 +2647,39 @@ async function dependencyCheck(options) {
|
|
|
2352
2647
|
const buildPromise = esbuild.build({
|
|
2353
2648
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
2354
2649
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
2355
|
-
ignore: [
|
|
2356
|
-
"./src/__tests__/**/*",
|
|
2357
|
-
"./tests/e2e/**/*",
|
|
2358
|
-
"./dist/**/*"
|
|
2359
|
-
],
|
|
2650
|
+
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
2360
2651
|
gitignore: true
|
|
2361
2652
|
}),
|
|
2362
2653
|
logLevel: "silent",
|
|
2654
|
+
// there will be errors
|
|
2363
2655
|
bundle: true,
|
|
2656
|
+
// we bundle to get everything
|
|
2364
2657
|
write: false,
|
|
2658
|
+
// no need to write for analysis
|
|
2365
2659
|
outdir: "out",
|
|
2366
|
-
plugins: [
|
|
2367
|
-
depsCheckPlugin(options.bundle)
|
|
2368
|
-
]
|
|
2660
|
+
plugins: [depsCheckPlugin(options.bundle)]
|
|
2369
2661
|
});
|
|
2370
2662
|
await buildPromise.catch(() => {
|
|
2371
2663
|
});
|
|
2372
2664
|
return void 0;
|
|
2373
2665
|
}
|
|
2374
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
2375
2666
|
async function cleanOutputPath(context) {
|
|
2376
2667
|
if (context.clean !== false && context.outputPath) {
|
|
2377
|
-
writeDebug(
|
|
2668
|
+
writeDebug(
|
|
2669
|
+
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
2670
|
+
context.workspaceConfig
|
|
2671
|
+
);
|
|
2378
2672
|
const stopwatch = getStopwatch(`${context.options.name} output clean`);
|
|
2379
2673
|
await cleanDirectories(context.outputPath);
|
|
2380
2674
|
stopwatch();
|
|
2381
2675
|
}
|
|
2382
2676
|
return context;
|
|
2383
2677
|
}
|
|
2384
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
2385
2678
|
async function build2(options) {
|
|
2386
2679
|
writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
|
|
2387
2680
|
const stopwatch = getStopwatch("ESBuild pipeline");
|
|
2388
2681
|
try {
|
|
2389
|
-
const opts = Array.isArray(options) ? options : [
|
|
2390
|
-
options
|
|
2391
|
-
];
|
|
2682
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
2392
2683
|
if (opts.length === 0) {
|
|
2393
2684
|
throw new Error("No build options were provided");
|
|
2394
2685
|
}
|
|
@@ -2403,19 +2694,22 @@ async function build2(options) {
|
|
|
2403
2694
|
await reportResults(context);
|
|
2404
2695
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
2405
2696
|
} catch (error) {
|
|
2406
|
-
writeFatal(
|
|
2697
|
+
writeFatal(
|
|
2698
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
2699
|
+
);
|
|
2407
2700
|
throw error;
|
|
2408
2701
|
} finally {
|
|
2409
2702
|
stopwatch();
|
|
2410
2703
|
}
|
|
2411
2704
|
}
|
|
2412
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, build2, "build");
|
|
2413
2705
|
|
|
2414
2706
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
2415
2707
|
async function esbuildExecutorFn(options, context, config) {
|
|
2416
2708
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
2417
2709
|
if (!_optionalChain([context, 'access', _125 => _125.projectsConfigurations, 'optionalAccess', _126 => _126.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _127 => _127.projectsConfigurations, 'access', _128 => _128.projects, 'access', _129 => _129[context.projectName], 'optionalAccess', _130 => _130.root])) {
|
|
2418
|
-
throw new Error(
|
|
2710
|
+
throw new Error(
|
|
2711
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
2712
|
+
);
|
|
2419
2713
|
}
|
|
2420
2714
|
await build2({
|
|
2421
2715
|
...options,
|
|
@@ -2429,28 +2723,29 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
2429
2723
|
success: true
|
|
2430
2724
|
};
|
|
2431
2725
|
}
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2726
|
+
var executor_default6 = withRunExecutor(
|
|
2727
|
+
"Storm ESBuild build",
|
|
2728
|
+
esbuildExecutorFn,
|
|
2729
|
+
{
|
|
2730
|
+
skipReadingConfig: false,
|
|
2731
|
+
hooks: {
|
|
2732
|
+
applyDefaultOptions: async (options, config) => {
|
|
2733
|
+
options.entry ??= ["src/index.ts"];
|
|
2734
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
2735
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
2736
|
+
return options;
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2444
2739
|
}
|
|
2445
|
-
|
|
2740
|
+
);
|
|
2446
2741
|
|
|
2447
2742
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
2448
|
-
|
|
2743
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2449
2744
|
|
|
2450
2745
|
|
|
2451
2746
|
|
|
2452
2747
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
2453
|
-
|
|
2748
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2454
2749
|
|
|
2455
2750
|
|
|
2456
2751
|
var _prettier = require('prettier');
|
|
@@ -2460,7 +2755,7 @@ var _readyamlfile = require('read-yaml-file'); var _readyamlfile2 = _interopRequ
|
|
|
2460
2755
|
var LARGE_BUFFER2 = 1024 * 1e6;
|
|
2461
2756
|
|
|
2462
2757
|
// ../workspace-tools/src/executors/size-limit/executor.ts
|
|
2463
|
-
|
|
2758
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2464
2759
|
|
|
2465
2760
|
var _esbuild2 = require('@size-limit/esbuild'); var _esbuild3 = _interopRequireDefault(_esbuild2);
|
|
2466
2761
|
var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _interopRequireDefault(_esbuildwhy);
|
|
@@ -2468,34 +2763,41 @@ var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_fi
|
|
|
2468
2763
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
2469
2764
|
async function sizeLimitExecutorFn(options, context, config) {
|
|
2470
2765
|
if (!_optionalChain([context, 'optionalAccess', _139 => _139.projectName]) || !_optionalChain([context, 'access', _140 => _140.projectsConfigurations, 'optionalAccess', _141 => _141.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2471
|
-
throw new Error(
|
|
2766
|
+
throw new Error(
|
|
2767
|
+
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
2768
|
+
);
|
|
2472
2769
|
}
|
|
2473
2770
|
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
2474
|
-
_sizelimit2.default.call(void 0, [
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'access', _144 => _144[context.projectName], 'optionalAccess', _145 => _145.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context, 'access', _146 => _146.projectsConfigurations, 'access', _147 => _147.projects, 'access', _148 => _148[context.projectName], 'optionalAccess', _149 => _149.root]), () => ( "./")), "src")))
|
|
2771
|
+
_sizelimit2.default.call(void 0, [_file2.default, _esbuild3.default, _esbuildwhy2.default], {
|
|
2772
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'access', _144 => _144[context.projectName], 'optionalAccess', _145 => _145.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
2773
|
+
_nullishCoalesce(_optionalChain([context, 'access', _146 => _146.projectsConfigurations, 'access', _147 => _147.projects, 'access', _148 => _148[context.projectName], 'optionalAccess', _149 => _149.root]), () => ( "./")),
|
|
2774
|
+
"src"
|
|
2775
|
+
)))
|
|
2480
2776
|
}).then((result) => {
|
|
2481
|
-
writeInfo(
|
|
2777
|
+
writeInfo(
|
|
2778
|
+
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
2779
|
+
config
|
|
2780
|
+
);
|
|
2482
2781
|
});
|
|
2483
2782
|
return {
|
|
2484
2783
|
success: true
|
|
2485
2784
|
};
|
|
2486
2785
|
}
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2786
|
+
var executor_default7 = withRunExecutor(
|
|
2787
|
+
"Size-Limit Performance Test Executor",
|
|
2788
|
+
sizeLimitExecutorFn,
|
|
2789
|
+
{
|
|
2790
|
+
skipReadingConfig: false,
|
|
2791
|
+
hooks: {
|
|
2792
|
+
applyDefaultOptions: (options) => {
|
|
2793
|
+
return options;
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2494
2796
|
}
|
|
2495
|
-
|
|
2797
|
+
);
|
|
2496
2798
|
|
|
2497
2799
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
2498
|
-
|
|
2800
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2499
2801
|
var _fsextra = require('fs-extra');
|
|
2500
2802
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
2501
2803
|
async function typiaExecutorFn(options, _, config) {
|
|
@@ -2503,114 +2805,144 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
2503
2805
|
writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
2504
2806
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
2505
2807
|
}
|
|
2506
|
-
await Promise.all(
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2808
|
+
await Promise.all(
|
|
2809
|
+
options.entry.map((entry) => {
|
|
2810
|
+
writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
2811
|
+
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
2812
|
+
input: entry,
|
|
2813
|
+
output: options.outputPath,
|
|
2814
|
+
project: options.tsconfig
|
|
2815
|
+
});
|
|
2816
|
+
})
|
|
2817
|
+
);
|
|
2514
2818
|
return {
|
|
2515
2819
|
success: true
|
|
2516
2820
|
};
|
|
2517
2821
|
}
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2822
|
+
var executor_default8 = withRunExecutor(
|
|
2823
|
+
"Typia runtime validation generator",
|
|
2824
|
+
typiaExecutorFn,
|
|
2825
|
+
{
|
|
2826
|
+
skipReadingConfig: false,
|
|
2827
|
+
hooks: {
|
|
2828
|
+
applyDefaultOptions: (options) => {
|
|
2829
|
+
options.entry ??= ["{sourceRoot}/index.ts"];
|
|
2830
|
+
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
2831
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
2832
|
+
options.clean ??= true;
|
|
2833
|
+
return options;
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2531
2836
|
}
|
|
2532
|
-
|
|
2837
|
+
);
|
|
2533
2838
|
|
|
2534
2839
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
2535
|
-
|
|
2840
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2536
2841
|
|
|
2537
2842
|
var _jiti = require('jiti');
|
|
2538
2843
|
async function unbuildExecutorFn(options, context, config) {
|
|
2539
2844
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2540
2845
|
if (!_optionalChain([context, 'access', _150 => _150.projectsConfigurations, 'optionalAccess', _151 => _151.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2541
|
-
throw new Error(
|
|
2846
|
+
throw new Error(
|
|
2847
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
2848
|
+
);
|
|
2542
2849
|
}
|
|
2543
2850
|
if (!context.projectsConfigurations.projects[context.projectName].root) {
|
|
2544
|
-
throw new Error(
|
|
2851
|
+
throw new Error(
|
|
2852
|
+
"The Build process failed because the project root is not valid. Please run this command from a workspace root directory."
|
|
2853
|
+
);
|
|
2545
2854
|
}
|
|
2546
2855
|
if (!context.projectsConfigurations.projects[context.projectName].sourceRoot) {
|
|
2547
|
-
throw new Error(
|
|
2856
|
+
throw new Error(
|
|
2857
|
+
"The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
|
|
2858
|
+
);
|
|
2548
2859
|
}
|
|
2549
2860
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
2550
|
-
fsCache: config.skipCache ? false :
|
|
2861
|
+
fsCache: config.skipCache ? false : _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2862
|
+
config.workspaceRoot,
|
|
2863
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
2864
|
+
"jiti"
|
|
2865
|
+
),
|
|
2551
2866
|
interopDefault: true
|
|
2552
2867
|
});
|
|
2553
|
-
const stormUnbuild = await jiti.import(
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
}
|
|
2565
|
-
},
|
|
2566
|
-
rollup: {
|
|
2567
|
-
emitCJS: true,
|
|
2568
|
-
watch: false,
|
|
2569
|
-
dts: {
|
|
2570
|
-
respectExternal: true
|
|
2868
|
+
const stormUnbuild = await jiti.import(
|
|
2869
|
+
jiti.esmResolve("@storm-software/unbuild/build")
|
|
2870
|
+
);
|
|
2871
|
+
await stormUnbuild.build(
|
|
2872
|
+
_defu.defu.call(void 0,
|
|
2873
|
+
{
|
|
2874
|
+
...options,
|
|
2875
|
+
projectRoot: context.projectsConfigurations.projects[context.projectName].root,
|
|
2876
|
+
projectName: context.projectName,
|
|
2877
|
+
sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
|
|
2878
|
+
platform: options.platform
|
|
2571
2879
|
},
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2880
|
+
{
|
|
2881
|
+
stubOptions: {
|
|
2882
|
+
jiti: {
|
|
2883
|
+
fsCache: config.skipCache ? false : _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
2884
|
+
config.workspaceRoot,
|
|
2885
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
2886
|
+
"jiti"
|
|
2887
|
+
)
|
|
2888
|
+
}
|
|
2889
|
+
},
|
|
2890
|
+
rollup: {
|
|
2891
|
+
emitCJS: true,
|
|
2892
|
+
watch: false,
|
|
2893
|
+
dts: {
|
|
2894
|
+
respectExternal: true
|
|
2895
|
+
},
|
|
2896
|
+
esbuild: {
|
|
2897
|
+
target: options.target,
|
|
2898
|
+
format: "esm",
|
|
2899
|
+
platform: options.platform,
|
|
2900
|
+
minify: _nullishCoalesce(options.minify, () => ( !options.debug)),
|
|
2901
|
+
sourcemap: _nullishCoalesce(options.sourcemap, () => ( options.debug)),
|
|
2902
|
+
treeShaking: options.treeShaking
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2579
2905
|
}
|
|
2580
|
-
|
|
2581
|
-
|
|
2906
|
+
)
|
|
2907
|
+
);
|
|
2582
2908
|
return {
|
|
2583
2909
|
success: true
|
|
2584
2910
|
};
|
|
2585
2911
|
}
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
options
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
"
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2912
|
+
var executor_default9 = withRunExecutor(
|
|
2913
|
+
"TypeScript Unbuild build",
|
|
2914
|
+
unbuildExecutorFn,
|
|
2915
|
+
{
|
|
2916
|
+
skipReadingConfig: false,
|
|
2917
|
+
hooks: {
|
|
2918
|
+
applyDefaultOptions: async (options, config) => {
|
|
2919
|
+
options.debug ??= false;
|
|
2920
|
+
options.treeShaking ??= true;
|
|
2921
|
+
options.buildOnly ??= false;
|
|
2922
|
+
options.platform ??= "neutral";
|
|
2923
|
+
options.entry ??= ["{sourceRoot}"];
|
|
2924
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
2925
|
+
return options;
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2601
2928
|
}
|
|
2602
|
-
|
|
2929
|
+
);
|
|
2603
2930
|
|
|
2604
2931
|
// ../workspace-tools/generators.ts
|
|
2605
|
-
|
|
2932
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2606
2933
|
|
|
2607
2934
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2608
|
-
|
|
2935
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2936
|
+
|
|
2937
|
+
|
|
2938
|
+
|
|
2939
|
+
|
|
2940
|
+
|
|
2609
2941
|
|
|
2610
2942
|
|
|
2611
2943
|
// ../workspace-tools/src/base/base-generator.ts
|
|
2612
|
-
|
|
2613
|
-
var withRunGenerator =
|
|
2944
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2945
|
+
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
2614
2946
|
skipReadingConfig: false
|
|
2615
2947
|
}) => async (tree, _options) => {
|
|
2616
2948
|
const stopwatch = getStopwatch(name);
|
|
@@ -2622,27 +2954,40 @@ var withRunGenerator = /* @__PURE__ */ _chunkLTKRUM5Pjs.__name.call(void 0, (nam
|
|
|
2622
2954
|
`, config);
|
|
2623
2955
|
const workspaceRoot3 = findWorkspaceRoot();
|
|
2624
2956
|
if (!generatorOptions.skipReadingConfig) {
|
|
2625
|
-
writeDebug(
|
|
2626
|
-
|
|
2957
|
+
writeDebug(
|
|
2958
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
2959
|
+
- workspaceRoot: ${workspaceRoot3}`,
|
|
2960
|
+
config
|
|
2961
|
+
);
|
|
2627
2962
|
config = await getConfig(workspaceRoot3);
|
|
2628
2963
|
}
|
|
2629
2964
|
if (_optionalChain([generatorOptions, 'optionalAccess', _152 => _152.hooks, 'optionalAccess', _153 => _153.applyDefaultOptions])) {
|
|
2630
2965
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
2631
|
-
options = await Promise.resolve(
|
|
2966
|
+
options = await Promise.resolve(
|
|
2967
|
+
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
2968
|
+
);
|
|
2632
2969
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
2633
2970
|
}
|
|
2634
|
-
writeTrace(
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
workspaceRoot: tree.root,
|
|
2971
|
+
writeTrace(
|
|
2972
|
+
`Generator schema options \u2699\uFE0F
|
|
2973
|
+
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
2638
2974
|
config
|
|
2639
|
-
|
|
2975
|
+
);
|
|
2976
|
+
const tokenized = await applyWorkspaceTokens(
|
|
2977
|
+
options,
|
|
2978
|
+
{ workspaceRoot: tree.root, config },
|
|
2979
|
+
applyWorkspaceBaseTokens
|
|
2980
|
+
);
|
|
2640
2981
|
if (_optionalChain([generatorOptions, 'optionalAccess', _154 => _154.hooks, 'optionalAccess', _155 => _155.preProcess])) {
|
|
2641
2982
|
writeDebug("Running the preProcess hook...", config);
|
|
2642
|
-
await Promise.resolve(
|
|
2983
|
+
await Promise.resolve(
|
|
2984
|
+
generatorOptions.hooks.preProcess(tokenized, config)
|
|
2985
|
+
);
|
|
2643
2986
|
writeDebug("Completed the preProcess hook", config);
|
|
2644
2987
|
}
|
|
2645
|
-
const result = await Promise.resolve(
|
|
2988
|
+
const result = await Promise.resolve(
|
|
2989
|
+
generatorFn(tree, tokenized, config)
|
|
2990
|
+
);
|
|
2646
2991
|
if (result) {
|
|
2647
2992
|
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _156 => _156.error, 'optionalAccess', _157 => _157.message]) && typeof _optionalChain([result, 'optionalAccess', _158 => _158.error, 'optionalAccess', _159 => _159.message]) === "string" && _optionalChain([result, 'optionalAccess', _160 => _160.error, 'optionalAccess', _161 => _161.name]) && typeof _optionalChain([result, 'optionalAccess', _162 => _162.error, 'optionalAccess', _163 => _163.name]) === "string") {
|
|
2648
2993
|
throw new Error(`The ${name} generator failed to run`, {
|
|
@@ -2663,26 +3008,46 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2663
3008
|
};
|
|
2664
3009
|
} catch (error) {
|
|
2665
3010
|
return () => {
|
|
2666
|
-
writeFatal(
|
|
2667
|
-
|
|
3011
|
+
writeFatal(
|
|
3012
|
+
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
3013
|
+
config
|
|
3014
|
+
);
|
|
3015
|
+
writeError(
|
|
3016
|
+
`An exception was thrown in the generator's process
|
|
2668
3017
|
- Details: ${error.message}
|
|
2669
|
-
- Stacktrace: ${error.stack}`,
|
|
3018
|
+
- Stacktrace: ${error.stack}`,
|
|
3019
|
+
config
|
|
3020
|
+
);
|
|
2670
3021
|
};
|
|
2671
3022
|
} finally {
|
|
2672
3023
|
stopwatch();
|
|
2673
3024
|
}
|
|
2674
|
-
}
|
|
3025
|
+
};
|
|
2675
3026
|
|
|
2676
3027
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
2677
|
-
|
|
3028
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3029
|
+
|
|
3030
|
+
|
|
3031
|
+
|
|
3032
|
+
|
|
3033
|
+
|
|
3034
|
+
|
|
3035
|
+
|
|
3036
|
+
|
|
3037
|
+
|
|
3038
|
+
|
|
2678
3039
|
|
|
2679
3040
|
var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
|
|
3041
|
+
|
|
3042
|
+
|
|
3043
|
+
|
|
3044
|
+
|
|
2680
3045
|
var _js = require('@nx/js');
|
|
2681
3046
|
var _init = require('@nx/js/src/generators/init/init'); var _init2 = _interopRequireDefault(_init);
|
|
2682
3047
|
var _generator = require('@nx/js/src/generators/setup-verdaccio/generator'); var _generator2 = _interopRequireDefault(_generator);
|
|
2683
3048
|
|
|
2684
3049
|
// ../workspace-tools/src/utils/project-tags.ts
|
|
2685
|
-
|
|
3050
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2686
3051
|
var ProjectTagConstants = {
|
|
2687
3052
|
Language: {
|
|
2688
3053
|
TAG_ID: "language",
|
|
@@ -2720,26 +3085,30 @@ var ProjectTagConstants = {
|
|
|
2720
3085
|
TAG_ID: "plugin"
|
|
2721
3086
|
}
|
|
2722
3087
|
};
|
|
2723
|
-
var formatProjectTag =
|
|
3088
|
+
var formatProjectTag = (variant, value) => {
|
|
2724
3089
|
return `${variant}:${value}`;
|
|
2725
|
-
}
|
|
2726
|
-
var hasProjectTag =
|
|
3090
|
+
};
|
|
3091
|
+
var hasProjectTag = (project, variant) => {
|
|
2727
3092
|
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
2728
3093
|
const prefix = formatProjectTag(variant, "");
|
|
2729
|
-
return project.tags.some(
|
|
2730
|
-
|
|
2731
|
-
|
|
3094
|
+
return project.tags.some(
|
|
3095
|
+
(tag) => tag.startsWith(prefix) && tag.length > prefix.length
|
|
3096
|
+
);
|
|
3097
|
+
};
|
|
3098
|
+
var addProjectTag = (project, variant, value, options = {
|
|
2732
3099
|
overwrite: false
|
|
2733
3100
|
}) => {
|
|
2734
3101
|
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
2735
3102
|
if (options.overwrite || !hasProjectTag(project, variant)) {
|
|
2736
|
-
project.tags = project.tags.filter(
|
|
3103
|
+
project.tags = project.tags.filter(
|
|
3104
|
+
(tag) => !tag.startsWith(formatProjectTag(variant, ""))
|
|
3105
|
+
);
|
|
2737
3106
|
project.tags.push(formatProjectTag(variant, value));
|
|
2738
3107
|
}
|
|
2739
|
-
}
|
|
3108
|
+
};
|
|
2740
3109
|
|
|
2741
3110
|
// ../workspace-tools/src/utils/versions.ts
|
|
2742
|
-
|
|
3111
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
2743
3112
|
var typesNodeVersion = "20.9.0";
|
|
2744
3113
|
var nxVersion = "^18.0.4";
|
|
2745
3114
|
var nodeVersion = "20.11.0";
|
|
@@ -2747,42 +3116,41 @@ var pnpmVersion = "8.10.2";
|
|
|
2747
3116
|
|
|
2748
3117
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
2749
3118
|
async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
2750
|
-
const normalized = await normalizeOptions(tree, {
|
|
2751
|
-
...options
|
|
2752
|
-
});
|
|
3119
|
+
const normalized = await normalizeOptions(tree, { ...options });
|
|
2753
3120
|
const tasks = [];
|
|
2754
|
-
tasks.push(
|
|
2755
|
-
|
|
2756
|
-
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
2757
|
-
}));
|
|
2758
|
-
tasks.push(_devkit.addDependenciesToPackageJson.call(void 0, tree, {}, {
|
|
2759
|
-
"@storm-software/workspace-tools": "latest",
|
|
2760
|
-
"@storm-software/testing-tools": "latest",
|
|
2761
|
-
..._nullishCoalesce(options.devDependencies, () => ( {}))
|
|
2762
|
-
}));
|
|
2763
|
-
if (normalized.publishable) {
|
|
2764
|
-
tasks.push(await _generator2.default.call(void 0, tree, {
|
|
3121
|
+
tasks.push(
|
|
3122
|
+
await _init2.default.call(void 0, tree, {
|
|
2765
3123
|
...normalized,
|
|
2766
|
-
|
|
2767
|
-
})
|
|
3124
|
+
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
3125
|
+
})
|
|
3126
|
+
);
|
|
3127
|
+
tasks.push(
|
|
3128
|
+
_devkit.addDependenciesToPackageJson.call(void 0,
|
|
3129
|
+
tree,
|
|
3130
|
+
{},
|
|
3131
|
+
{
|
|
3132
|
+
"@storm-software/workspace-tools": "latest",
|
|
3133
|
+
"@storm-software/testing-tools": "latest",
|
|
3134
|
+
..._nullishCoalesce(options.devDependencies, () => ( {}))
|
|
3135
|
+
}
|
|
3136
|
+
)
|
|
3137
|
+
);
|
|
3138
|
+
if (normalized.publishable) {
|
|
3139
|
+
tasks.push(await _generator2.default.call(void 0, tree, { ...normalized, skipFormat: true }));
|
|
2768
3140
|
}
|
|
2769
3141
|
const projectConfig = {
|
|
2770
3142
|
root: normalized.directory,
|
|
2771
3143
|
projectType: "library",
|
|
2772
|
-
sourceRoot:
|
|
3144
|
+
sourceRoot: _chunkNNSWWAGPjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
2773
3145
|
targets: {
|
|
2774
3146
|
build: {
|
|
2775
3147
|
executor: options.buildExecutor,
|
|
2776
|
-
outputs: [
|
|
2777
|
-
"{options.outputPath}"
|
|
2778
|
-
],
|
|
3148
|
+
outputs: ["{options.outputPath}"],
|
|
2779
3149
|
options: {
|
|
2780
|
-
entry: [
|
|
2781
|
-
_chunkPHMFOUDCjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
2782
|
-
],
|
|
3150
|
+
entry: [_chunkNNSWWAGPjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
2783
3151
|
outputPath: getOutputPath(normalized),
|
|
2784
|
-
tsconfig:
|
|
2785
|
-
project:
|
|
3152
|
+
tsconfig: _chunkNNSWWAGPjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
3153
|
+
project: _chunkNNSWWAGPjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
2786
3154
|
defaultConfiguration: "production",
|
|
2787
3155
|
platform: "neutral",
|
|
2788
3156
|
assets: [
|
|
@@ -2814,9 +3182,12 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2814
3182
|
if (options.platform) {
|
|
2815
3183
|
projectConfig.targets.build.options.platform = options.platform === "worker" ? "node" : options.platform;
|
|
2816
3184
|
}
|
|
2817
|
-
addProjectTag(
|
|
2818
|
-
|
|
2819
|
-
|
|
3185
|
+
addProjectTag(
|
|
3186
|
+
projectConfig,
|
|
3187
|
+
ProjectTagConstants.Platform.TAG_ID,
|
|
3188
|
+
options.platform === "node" ? ProjectTagConstants.Platform.NODE : options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL,
|
|
3189
|
+
{ overwrite: false }
|
|
3190
|
+
);
|
|
2820
3191
|
createProjectTsConfigJson(tree, normalized);
|
|
2821
3192
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
2822
3193
|
let repository = {
|
|
@@ -2836,7 +3207,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2836
3207
|
if (!normalized.importPath) {
|
|
2837
3208
|
normalized.importPath = normalized.name;
|
|
2838
3209
|
}
|
|
2839
|
-
const packageJsonPath =
|
|
3210
|
+
const packageJsonPath = _chunkNNSWWAGPjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2840
3211
|
if (tree.exists(packageJsonPath)) {
|
|
2841
3212
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2842
3213
|
if (!normalized.importPath) {
|
|
@@ -2893,10 +3264,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2893
3264
|
}));
|
|
2894
3265
|
}
|
|
2895
3266
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2896
|
-
|
|
3267
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
3268
|
+
normalized.projectRoot,
|
|
3269
|
+
"./src",
|
|
3270
|
+
`index.${normalized.js ? "js" : "ts"}`
|
|
3271
|
+
)
|
|
2897
3272
|
]);
|
|
2898
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2899
|
-
|
|
3273
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkNNSWWAGPjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
3274
|
+
_chunkNNSWWAGPjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2900
3275
|
]);
|
|
2901
3276
|
if (tree.exists("package.json")) {
|
|
2902
3277
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2907,7 +3282,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2907
3282
|
description = packageJson.description;
|
|
2908
3283
|
}
|
|
2909
3284
|
}
|
|
2910
|
-
const tsconfigPath =
|
|
3285
|
+
const tsconfigPath = _chunkNNSWWAGPjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2911
3286
|
if (tree.exists(tsconfigPath)) {
|
|
2912
3287
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2913
3288
|
json.composite ??= true;
|
|
@@ -2921,46 +3296,33 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2921
3296
|
outDir: `${_devkit.offsetFromRoot.call(void 0, normalized.projectRoot)}dist/out-tsc`
|
|
2922
3297
|
},
|
|
2923
3298
|
files: [],
|
|
2924
|
-
include: [
|
|
2925
|
-
|
|
2926
|
-
"src/**/*.js"
|
|
2927
|
-
],
|
|
2928
|
-
exclude: [
|
|
2929
|
-
"jest.config.ts",
|
|
2930
|
-
"src/**/*.spec.ts",
|
|
2931
|
-
"src/**/*.test.ts"
|
|
2932
|
-
]
|
|
3299
|
+
include: ["src/**/*.ts", "src/**/*.js"],
|
|
3300
|
+
exclude: ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
|
|
2933
3301
|
});
|
|
2934
3302
|
}
|
|
2935
3303
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2936
3304
|
return null;
|
|
2937
3305
|
}
|
|
2938
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, typeScriptLibraryGeneratorFn, "typeScriptLibraryGeneratorFn");
|
|
2939
3306
|
function getOutputPath(options) {
|
|
2940
|
-
const parts = [
|
|
2941
|
-
"dist"
|
|
2942
|
-
];
|
|
3307
|
+
const parts = ["dist"];
|
|
2943
3308
|
if (options.projectRoot === ".") {
|
|
2944
3309
|
parts.push(options.name);
|
|
2945
3310
|
} else {
|
|
2946
3311
|
parts.push(options.projectRoot);
|
|
2947
3312
|
}
|
|
2948
|
-
return
|
|
3313
|
+
return _chunkNNSWWAGPjs.joinPaths.call(void 0, ...parts);
|
|
2949
3314
|
}
|
|
2950
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2951
3315
|
function createProjectTsConfigJson(tree, options) {
|
|
2952
3316
|
const tsconfig = {
|
|
2953
3317
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
2954
3318
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _178 => _178.tsconfigOptions]), () => ( {})),
|
|
2955
3319
|
compilerOptions: {
|
|
2956
3320
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2957
|
-
outDir:
|
|
3321
|
+
outDir: _chunkNNSWWAGPjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2958
3322
|
noEmit: true,
|
|
2959
3323
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _179 => _179.tsconfigOptions, 'optionalAccess', _180 => _180.compilerOptions]), () => ( {}))
|
|
2960
3324
|
},
|
|
2961
|
-
files: [
|
|
2962
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _181 => _181.tsconfigOptions, 'optionalAccess', _182 => _182.files]), () => ( []))
|
|
2963
|
-
],
|
|
3325
|
+
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _181 => _181.tsconfigOptions, 'optionalAccess', _182 => _182.files]), () => ( []))],
|
|
2964
3326
|
include: [
|
|
2965
3327
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _183 => _183.tsconfigOptions, 'optionalAccess', _184 => _184.include]), () => ( [])),
|
|
2966
3328
|
"src/**/*.ts",
|
|
@@ -2974,9 +3336,8 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2974
3336
|
"src/**/*.test.ts"
|
|
2975
3337
|
]
|
|
2976
3338
|
};
|
|
2977
|
-
_devkit.writeJson.call(void 0, tree,
|
|
3339
|
+
_devkit.writeJson.call(void 0, tree, _chunkNNSWWAGPjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2978
3340
|
}
|
|
2979
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2980
3341
|
async function normalizeOptions(tree, options, config) {
|
|
2981
3342
|
let importPath = options.importPath;
|
|
2982
3343
|
if (!importPath && _optionalChain([config, 'optionalAccess', _187 => _187.namespace])) {
|
|
@@ -2984,7 +3345,9 @@ async function normalizeOptions(tree, options, config) {
|
|
|
2984
3345
|
}
|
|
2985
3346
|
if (options.publishable) {
|
|
2986
3347
|
if (!importPath) {
|
|
2987
|
-
throw new Error(
|
|
3348
|
+
throw new Error(
|
|
3349
|
+
`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)`
|
|
3350
|
+
);
|
|
2988
3351
|
}
|
|
2989
3352
|
}
|
|
2990
3353
|
let bundler = "tsc";
|
|
@@ -2993,7 +3356,12 @@ async function normalizeOptions(tree, options, config) {
|
|
|
2993
3356
|
}
|
|
2994
3357
|
const { Linter } = _devkit.ensurePackage.call(void 0, "@nx/eslint", nxVersion);
|
|
2995
3358
|
const rootProject = false;
|
|
2996
|
-
const {
|
|
3359
|
+
const {
|
|
3360
|
+
projectName,
|
|
3361
|
+
names: projectNames,
|
|
3362
|
+
projectRoot,
|
|
3363
|
+
importPath: normalizedImportPath
|
|
3364
|
+
} = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, tree, {
|
|
2997
3365
|
name: options.name,
|
|
2998
3366
|
projectType: "library",
|
|
2999
3367
|
directory: options.directory,
|
|
@@ -3030,11 +3398,16 @@ async function normalizeOptions(tree, options, config) {
|
|
|
3030
3398
|
shouldUseSwcJest: false
|
|
3031
3399
|
};
|
|
3032
3400
|
}
|
|
3033
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
3034
3401
|
|
|
3035
3402
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
3036
3403
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
3037
|
-
const filesDir =
|
|
3404
|
+
const filesDir = _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
3405
|
+
__dirname,
|
|
3406
|
+
"src",
|
|
3407
|
+
"generators",
|
|
3408
|
+
"browser-library",
|
|
3409
|
+
"files"
|
|
3410
|
+
);
|
|
3038
3411
|
const tsLibraryGeneratorOptions = {
|
|
3039
3412
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
3040
3413
|
platform: "browser",
|
|
@@ -3060,7 +3433,9 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
3060
3433
|
directory: schema.directory
|
|
3061
3434
|
};
|
|
3062
3435
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
3063
|
-
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
3436
|
+
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
3437
|
+
options.projectNames.projectFileName
|
|
3438
|
+
);
|
|
3064
3439
|
_devkit.generateFiles.call(void 0, tree, filesDir, options.projectRoot, {
|
|
3065
3440
|
...schema,
|
|
3066
3441
|
dot: ".",
|
|
@@ -3091,76 +3466,112 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
3091
3466
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3092
3467
|
return null;
|
|
3093
3468
|
}
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
options
|
|
3100
|
-
|
|
3101
|
-
|
|
3469
|
+
var generator_default = withRunGenerator(
|
|
3470
|
+
"TypeScript Library Creator (Browser Platform)",
|
|
3471
|
+
browserLibraryGeneratorFn,
|
|
3472
|
+
{
|
|
3473
|
+
hooks: {
|
|
3474
|
+
applyDefaultOptions: (options) => {
|
|
3475
|
+
options.description ??= "A library used by Storm Software to support browser applications";
|
|
3476
|
+
options.platform ??= "browser";
|
|
3477
|
+
return options;
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3102
3480
|
}
|
|
3103
|
-
|
|
3481
|
+
);
|
|
3104
3482
|
|
|
3105
3483
|
// ../workspace-tools/src/generators/config-schema/generator.ts
|
|
3106
|
-
|
|
3484
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3107
3485
|
|
|
3108
3486
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
3109
3487
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
3110
|
-
writeInfo(
|
|
3111
|
-
|
|
3488
|
+
writeInfo(
|
|
3489
|
+
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
3490
|
+
config
|
|
3491
|
+
);
|
|
3492
|
+
writeTrace(
|
|
3493
|
+
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
3494
|
+
config
|
|
3495
|
+
);
|
|
3112
3496
|
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, stormWorkspaceConfigSchema, {
|
|
3113
3497
|
name: "StormWorkspaceConfiguration"
|
|
3114
3498
|
});
|
|
3115
3499
|
writeTrace(jsonSchema, config);
|
|
3116
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3500
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
3501
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _189 => _189.workspaceRoot]), () => ( findWorkspaceRoot())),
|
|
3502
|
+
_optionalChain([options, 'access', _190 => _190.outputFile, 'optionalAccess', _191 => _191.startsWith, 'call', _192 => _192("./")]) ? "" : "./"
|
|
3503
|
+
);
|
|
3504
|
+
writeTrace(
|
|
3505
|
+
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
3506
|
+
config
|
|
3507
|
+
);
|
|
3508
|
+
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
3121
3509
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3122
|
-
writeSuccess(
|
|
3510
|
+
writeSuccess(
|
|
3511
|
+
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
3512
|
+
config
|
|
3513
|
+
);
|
|
3123
3514
|
return {
|
|
3124
3515
|
success: true
|
|
3125
3516
|
};
|
|
3126
3517
|
}
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3518
|
+
var generator_default2 = withRunGenerator(
|
|
3519
|
+
"Configuration Schema Creator",
|
|
3520
|
+
configSchemaGeneratorFn,
|
|
3521
|
+
{
|
|
3522
|
+
hooks: {
|
|
3523
|
+
applyDefaultOptions: (options) => {
|
|
3524
|
+
options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
|
|
3525
|
+
return options;
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3134
3528
|
}
|
|
3135
|
-
|
|
3529
|
+
);
|
|
3136
3530
|
|
|
3137
3531
|
// ../workspace-tools/src/generators/init/init.ts
|
|
3138
|
-
|
|
3532
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3533
|
+
|
|
3534
|
+
|
|
3535
|
+
|
|
3139
3536
|
|
|
3140
3537
|
async function initGenerator(tree, schema) {
|
|
3141
|
-
const task = _devkit.addDependenciesToPackageJson.call(void 0,
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3538
|
+
const task = _devkit.addDependenciesToPackageJson.call(void 0,
|
|
3539
|
+
tree,
|
|
3540
|
+
{
|
|
3541
|
+
nx: "^19.6.2",
|
|
3542
|
+
"@nx/workspace": "^19.6.2",
|
|
3543
|
+
"@nx/js": "^19.6.2",
|
|
3544
|
+
"@storm-software/eslint": "latest",
|
|
3545
|
+
"@storm-software/prettier": "latest",
|
|
3546
|
+
"@storm-software/config-tools": "latest",
|
|
3547
|
+
"@storm-software/testing-tools": "latest",
|
|
3548
|
+
"@storm-software/git-tools": "latest",
|
|
3549
|
+
"@storm-software/linting-tools": "latest"
|
|
3550
|
+
},
|
|
3551
|
+
{}
|
|
3552
|
+
);
|
|
3152
3553
|
if (!schema.skipFormat) {
|
|
3153
3554
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3154
3555
|
}
|
|
3155
3556
|
return task;
|
|
3156
3557
|
}
|
|
3157
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, initGenerator, "initGenerator");
|
|
3158
3558
|
|
|
3159
3559
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
3160
|
-
|
|
3560
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3561
|
+
|
|
3562
|
+
|
|
3563
|
+
|
|
3564
|
+
|
|
3565
|
+
|
|
3161
3566
|
|
|
3162
3567
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
3163
|
-
const filesDir =
|
|
3568
|
+
const filesDir = _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
3569
|
+
__dirname,
|
|
3570
|
+
"src",
|
|
3571
|
+
"generators",
|
|
3572
|
+
"neutral-library",
|
|
3573
|
+
"files"
|
|
3574
|
+
);
|
|
3164
3575
|
const tsLibraryGeneratorOptions = {
|
|
3165
3576
|
...schema,
|
|
3166
3577
|
platform: "neutral",
|
|
@@ -3168,7 +3579,9 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
3168
3579
|
buildExecutor: "@storm-software/workspace-tools:unbuild"
|
|
3169
3580
|
};
|
|
3170
3581
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
3171
|
-
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
3582
|
+
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
3583
|
+
options.projectNames.projectFileName
|
|
3584
|
+
);
|
|
3172
3585
|
_devkit.generateFiles.call(void 0, tree, filesDir, options.projectRoot, {
|
|
3173
3586
|
...schema,
|
|
3174
3587
|
dot: ".",
|
|
@@ -3189,22 +3602,36 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
3189
3602
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3190
3603
|
return null;
|
|
3191
3604
|
}
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
options
|
|
3198
|
-
|
|
3199
|
-
|
|
3605
|
+
var generator_default3 = withRunGenerator(
|
|
3606
|
+
"TypeScript Library Creator (Neutral Platform)",
|
|
3607
|
+
neutralLibraryGeneratorFn,
|
|
3608
|
+
{
|
|
3609
|
+
hooks: {
|
|
3610
|
+
applyDefaultOptions: (options) => {
|
|
3611
|
+
options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
|
|
3612
|
+
options.platform = "neutral";
|
|
3613
|
+
return options;
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3200
3616
|
}
|
|
3201
|
-
|
|
3617
|
+
);
|
|
3202
3618
|
|
|
3203
3619
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
3204
|
-
|
|
3620
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
|
|
3624
|
+
|
|
3625
|
+
|
|
3205
3626
|
|
|
3206
3627
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
3207
|
-
const filesDir =
|
|
3628
|
+
const filesDir = _chunkNNSWWAGPjs.joinPaths.call(void 0,
|
|
3629
|
+
__dirname,
|
|
3630
|
+
"src",
|
|
3631
|
+
"generators",
|
|
3632
|
+
"node-library",
|
|
3633
|
+
"files"
|
|
3634
|
+
);
|
|
3208
3635
|
const tsLibraryGeneratorOptions = {
|
|
3209
3636
|
platform: "node",
|
|
3210
3637
|
devDependencies: {
|
|
@@ -3237,19 +3664,29 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
|
3237
3664
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3238
3665
|
return null;
|
|
3239
3666
|
}
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
options
|
|
3246
|
-
|
|
3247
|
-
|
|
3667
|
+
var generator_default4 = withRunGenerator(
|
|
3668
|
+
"TypeScript Library Creator (NodeJs Platform)",
|
|
3669
|
+
nodeLibraryGeneratorFn,
|
|
3670
|
+
{
|
|
3671
|
+
hooks: {
|
|
3672
|
+
applyDefaultOptions: (options) => {
|
|
3673
|
+
options.description ??= "A library used by Storm Software to support NodeJs applications";
|
|
3674
|
+
options.platform ??= "node";
|
|
3675
|
+
return options;
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3248
3678
|
}
|
|
3249
|
-
|
|
3679
|
+
);
|
|
3250
3680
|
|
|
3251
3681
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
3252
|
-
|
|
3682
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3683
|
+
|
|
3684
|
+
|
|
3685
|
+
|
|
3686
|
+
|
|
3687
|
+
|
|
3688
|
+
|
|
3689
|
+
|
|
3253
3690
|
|
|
3254
3691
|
|
|
3255
3692
|
async function presetGeneratorFn(tree, options) {
|
|
@@ -3465,26 +3902,42 @@ async function presetGeneratorFn(tree, options) {
|
|
|
3465
3902
|
"nx-cloud": "latest"
|
|
3466
3903
|
};
|
|
3467
3904
|
}
|
|
3468
|
-
await Promise.resolve(
|
|
3905
|
+
await Promise.resolve(
|
|
3906
|
+
_devkit.addDependenciesToPackageJson.call(void 0,
|
|
3907
|
+
tree,
|
|
3908
|
+
dependencies,
|
|
3909
|
+
{},
|
|
3910
|
+
_devkit.joinPathFragments.call(void 0, projectRoot, "package.json")
|
|
3911
|
+
)
|
|
3912
|
+
);
|
|
3469
3913
|
return null;
|
|
3470
3914
|
}
|
|
3471
|
-
|
|
3472
|
-
|
|
3915
|
+
var generator_default5 = withRunGenerator(
|
|
3916
|
+
"Storm Workspace Preset Generator",
|
|
3917
|
+
presetGeneratorFn
|
|
3918
|
+
);
|
|
3473
3919
|
|
|
3474
3920
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
3475
|
-
|
|
3921
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3922
|
+
|
|
3923
|
+
|
|
3924
|
+
|
|
3925
|
+
|
|
3926
|
+
|
|
3927
|
+
|
|
3928
|
+
|
|
3476
3929
|
|
|
3477
3930
|
var _resolvelocalpackagedependencies = require('@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies');
|
|
3478
3931
|
var _updatelockfile = require('@nx/js/src/release/utils/update-lock-file');
|
|
3479
3932
|
|
|
3480
3933
|
// ../git-tools/src/index.ts
|
|
3481
|
-
|
|
3934
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3482
3935
|
|
|
3483
3936
|
// ../git-tools/src/commit/config.ts
|
|
3484
|
-
|
|
3937
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3485
3938
|
|
|
3486
3939
|
// ../git-tools/src/types.ts
|
|
3487
|
-
|
|
3940
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3488
3941
|
var DEFAULT_COMMIT_TYPES = {
|
|
3489
3942
|
/* --- Bumps version when selected --- */
|
|
3490
3943
|
chore: {
|
|
@@ -3619,7 +4072,9 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
3619
4072
|
type: "select",
|
|
3620
4073
|
title: "Commit Type",
|
|
3621
4074
|
description: "Select the commit type that best describes your changes",
|
|
3622
|
-
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
|
|
4075
|
+
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
|
|
4076
|
+
(type) => DEFAULT_COMMIT_TYPES[type].hidden !== true
|
|
4077
|
+
).reduce((ret, type) => {
|
|
3623
4078
|
ret[type] = DEFAULT_COMMIT_TYPES[type];
|
|
3624
4079
|
return ret;
|
|
3625
4080
|
}, {}),
|
|
@@ -3659,7 +4114,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
3659
4114
|
type: "input",
|
|
3660
4115
|
title: "Breaking Changes (Details)",
|
|
3661
4116
|
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
3662
|
-
when:
|
|
4117
|
+
when: (answers) => answers.isBreaking === true,
|
|
3663
4118
|
maxLength: 600,
|
|
3664
4119
|
minLength: 3
|
|
3665
4120
|
},
|
|
@@ -3673,37 +4128,40 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
3673
4128
|
type: "input",
|
|
3674
4129
|
title: "Open Issue Affected (Details)",
|
|
3675
4130
|
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
3676
|
-
when:
|
|
4131
|
+
when: (answers) => answers.isIssueAffected === true,
|
|
3677
4132
|
maxLength: 600,
|
|
3678
4133
|
minLength: 3
|
|
3679
4134
|
}
|
|
3680
4135
|
};
|
|
3681
|
-
var RuleConfigSeverity;
|
|
3682
|
-
(function(RuleConfigSeverity2) {
|
|
3683
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
|
|
3684
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Warning"] = 1] = "Warning";
|
|
3685
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
|
|
3686
|
-
})(RuleConfigSeverity || (RuleConfigSeverity = {}));
|
|
3687
4136
|
|
|
3688
4137
|
// ../git-tools/src/release/config.ts
|
|
3689
|
-
|
|
4138
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3690
4139
|
|
|
3691
4140
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
3692
4141
|
|
|
3693
4142
|
|
|
3694
4143
|
var _config = require('nx/src/command-line/release/config/config');
|
|
4144
|
+
|
|
4145
|
+
|
|
4146
|
+
|
|
3695
4147
|
var _git = require('nx/src/command-line/release/utils/git');
|
|
4148
|
+
|
|
4149
|
+
|
|
4150
|
+
|
|
3696
4151
|
var _resolvesemverspecifier = require('nx/src/command-line/release/utils/resolve-semver-specifier');
|
|
3697
4152
|
var _semver = require('nx/src/command-line/release/utils/semver');
|
|
4153
|
+
|
|
4154
|
+
|
|
4155
|
+
|
|
3698
4156
|
var _versionlegacy = require('nx/src/command-line/release/version-legacy');
|
|
3699
4157
|
var _utils = require('nx/src/tasks-runner/utils');
|
|
3700
4158
|
var _semver3 = require('semver');
|
|
3701
4159
|
|
|
3702
4160
|
// ../workspace-tools/src/base/index.ts
|
|
3703
|
-
|
|
4161
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3704
4162
|
|
|
3705
4163
|
// ../workspace-tools/src/base/base-executor.untyped.ts
|
|
3706
|
-
|
|
4164
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3707
4165
|
var _untyped = require('untyped');
|
|
3708
4166
|
var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3709
4167
|
$schema: {
|
|
@@ -3723,7 +4181,7 @@ var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
|
3723
4181
|
});
|
|
3724
4182
|
|
|
3725
4183
|
// ../workspace-tools/src/base/base-generator.untyped.ts
|
|
3726
|
-
|
|
4184
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3727
4185
|
|
|
3728
4186
|
var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3729
4187
|
$schema: {
|
|
@@ -3741,7 +4199,7 @@ var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
|
3741
4199
|
});
|
|
3742
4200
|
|
|
3743
4201
|
// ../workspace-tools/src/base/cargo-base-executor.untyped.ts
|
|
3744
|
-
|
|
4202
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3745
4203
|
|
|
3746
4204
|
var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3747
4205
|
...base_executor_untyped_default,
|
|
@@ -3763,11 +4221,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
3763
4221
|
$schema: {
|
|
3764
4222
|
title: "Toolchain",
|
|
3765
4223
|
description: "The type of toolchain to use for the build",
|
|
3766
|
-
enum: [
|
|
3767
|
-
"stable",
|
|
3768
|
-
"beta",
|
|
3769
|
-
"nightly"
|
|
3770
|
-
],
|
|
4224
|
+
enum: ["stable", "beta", "nightly"],
|
|
3771
4225
|
default: "stable"
|
|
3772
4226
|
},
|
|
3773
4227
|
$default: "stable"
|
|
@@ -3805,17 +4259,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
3805
4259
|
title: "Features",
|
|
3806
4260
|
type: "string",
|
|
3807
4261
|
description: "The features to build",
|
|
3808
|
-
oneOf: [
|
|
3809
|
-
{
|
|
3810
|
-
type: "string"
|
|
3811
|
-
},
|
|
3812
|
-
{
|
|
3813
|
-
type: "array",
|
|
3814
|
-
items: {
|
|
3815
|
-
type: "string"
|
|
3816
|
-
}
|
|
3817
|
-
}
|
|
3818
|
-
]
|
|
4262
|
+
oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
|
|
3819
4263
|
}
|
|
3820
4264
|
},
|
|
3821
4265
|
allFeatures: {
|
|
@@ -3828,7 +4272,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
3828
4272
|
});
|
|
3829
4273
|
|
|
3830
4274
|
// ../workspace-tools/src/base/typescript-build-executor.untyped.ts
|
|
3831
|
-
|
|
4275
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
3832
4276
|
|
|
3833
4277
|
var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3834
4278
|
...base_executor_untyped_default,
|
|
@@ -3836,10 +4280,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3836
4280
|
id: "TypeScriptBuildExecutorSchema",
|
|
3837
4281
|
title: "TypeScript Build Executor",
|
|
3838
4282
|
description: "A type definition for the base TypeScript build executor schema",
|
|
3839
|
-
required: [
|
|
3840
|
-
"entry",
|
|
3841
|
-
"tsconfig"
|
|
3842
|
-
]
|
|
4283
|
+
required: ["entry", "tsconfig"]
|
|
3843
4284
|
},
|
|
3844
4285
|
entry: {
|
|
3845
4286
|
$schema: {
|
|
@@ -3847,13 +4288,9 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3847
4288
|
format: "path",
|
|
3848
4289
|
type: "array",
|
|
3849
4290
|
description: "The entry file or files to build",
|
|
3850
|
-
items: {
|
|
3851
|
-
type: "string"
|
|
3852
|
-
}
|
|
4291
|
+
items: { type: "string" }
|
|
3853
4292
|
},
|
|
3854
|
-
$default: [
|
|
3855
|
-
"{sourceRoot}/index.ts"
|
|
3856
|
-
]
|
|
4293
|
+
$default: ["{sourceRoot}/index.ts"]
|
|
3857
4294
|
},
|
|
3858
4295
|
tsconfig: {
|
|
3859
4296
|
$schema: {
|
|
@@ -3933,7 +4370,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3933
4370
|
]
|
|
3934
4371
|
},
|
|
3935
4372
|
$default: "esnext",
|
|
3936
|
-
$resolve:
|
|
4373
|
+
$resolve: (val = "esnext") => val.toLowerCase()
|
|
3937
4374
|
},
|
|
3938
4375
|
format: {
|
|
3939
4376
|
$schema: {
|
|
@@ -3942,28 +4379,17 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3942
4379
|
description: "The format to build",
|
|
3943
4380
|
items: {
|
|
3944
4381
|
type: "string",
|
|
3945
|
-
enum: [
|
|
3946
|
-
"cjs",
|
|
3947
|
-
"esm",
|
|
3948
|
-
"iife"
|
|
3949
|
-
]
|
|
4382
|
+
enum: ["cjs", "esm", "iife"]
|
|
3950
4383
|
}
|
|
3951
4384
|
},
|
|
3952
|
-
$resolve:
|
|
3953
|
-
"cjs",
|
|
3954
|
-
"esm"
|
|
3955
|
-
]) => [].concat(val), "$resolve")
|
|
4385
|
+
$resolve: (val = ["cjs", "esm"]) => [].concat(val)
|
|
3956
4386
|
},
|
|
3957
4387
|
platform: {
|
|
3958
4388
|
$schema: {
|
|
3959
4389
|
title: "Platform",
|
|
3960
4390
|
type: "string",
|
|
3961
4391
|
description: "The platform to build",
|
|
3962
|
-
enum: [
|
|
3963
|
-
"neutral",
|
|
3964
|
-
"node",
|
|
3965
|
-
"browser"
|
|
3966
|
-
]
|
|
4392
|
+
enum: ["neutral", "node", "browser"]
|
|
3967
4393
|
},
|
|
3968
4394
|
$default: "neutral"
|
|
3969
4395
|
},
|
|
@@ -3973,7 +4399,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3973
4399
|
type: "array",
|
|
3974
4400
|
description: "The external dependencies"
|
|
3975
4401
|
},
|
|
3976
|
-
$resolve:
|
|
4402
|
+
$resolve: (val = []) => [].concat(val)
|
|
3977
4403
|
},
|
|
3978
4404
|
define: {
|
|
3979
4405
|
$schema: {
|
|
@@ -3982,7 +4408,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3982
4408
|
tsType: "Record<string, string>",
|
|
3983
4409
|
description: "The define values"
|
|
3984
4410
|
},
|
|
3985
|
-
$resolve:
|
|
4411
|
+
$resolve: (val = {}) => val,
|
|
3986
4412
|
$default: {}
|
|
3987
4413
|
},
|
|
3988
4414
|
env: {
|
|
@@ -3992,13 +4418,13 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3992
4418
|
tsType: "Record<string, string>",
|
|
3993
4419
|
description: "The environment variable values"
|
|
3994
4420
|
},
|
|
3995
|
-
$resolve:
|
|
4421
|
+
$resolve: (val = {}) => val,
|
|
3996
4422
|
$default: {}
|
|
3997
4423
|
}
|
|
3998
4424
|
});
|
|
3999
4425
|
|
|
4000
4426
|
// ../workspace-tools/src/base/typescript-library-generator.untyped.ts
|
|
4001
|
-
|
|
4427
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4002
4428
|
|
|
4003
4429
|
var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4004
4430
|
...base_generator_untyped_default,
|
|
@@ -4006,10 +4432,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4006
4432
|
id: "TypeScriptLibraryGeneratorSchema",
|
|
4007
4433
|
title: "TypeScript Library Generator",
|
|
4008
4434
|
description: "A type definition for the base TypeScript Library Generator schema",
|
|
4009
|
-
required: [
|
|
4010
|
-
"directory",
|
|
4011
|
-
"name"
|
|
4012
|
-
]
|
|
4435
|
+
required: ["directory", "name"]
|
|
4013
4436
|
},
|
|
4014
4437
|
name: {
|
|
4015
4438
|
$schema: {
|
|
@@ -4038,12 +4461,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4038
4461
|
title: "Platform",
|
|
4039
4462
|
type: "string",
|
|
4040
4463
|
description: "The platform to target with the library",
|
|
4041
|
-
enum: [
|
|
4042
|
-
"neutral",
|
|
4043
|
-
"node",
|
|
4044
|
-
"worker",
|
|
4045
|
-
"browser"
|
|
4046
|
-
]
|
|
4464
|
+
enum: ["neutral", "node", "worker", "browser"]
|
|
4047
4465
|
},
|
|
4048
4466
|
$default: "neutral"
|
|
4049
4467
|
},
|
|
@@ -4065,11 +4483,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4065
4483
|
$schema: {
|
|
4066
4484
|
title: "Unit Test Runner",
|
|
4067
4485
|
type: "string",
|
|
4068
|
-
enum: [
|
|
4069
|
-
"jest",
|
|
4070
|
-
"vitest",
|
|
4071
|
-
"none"
|
|
4072
|
-
],
|
|
4486
|
+
enum: ["jest", "vitest", "none"],
|
|
4073
4487
|
description: "The unit test runner to use"
|
|
4074
4488
|
}
|
|
4075
4489
|
},
|
|
@@ -4077,10 +4491,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4077
4491
|
$schema: {
|
|
4078
4492
|
title: "Test Environment",
|
|
4079
4493
|
type: "string",
|
|
4080
|
-
enum: [
|
|
4081
|
-
"jsdom",
|
|
4082
|
-
"node"
|
|
4083
|
-
],
|
|
4494
|
+
enum: ["jsdom", "node"],
|
|
4084
4495
|
description: "The test environment to use"
|
|
4085
4496
|
}
|
|
4086
4497
|
},
|
|
@@ -4119,29 +4530,42 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4119
4530
|
});
|
|
4120
4531
|
|
|
4121
4532
|
// ../workspace-tools/src/types.ts
|
|
4122
|
-
|
|
4533
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4123
4534
|
|
|
4124
4535
|
// ../workspace-tools/src/utils/index.ts
|
|
4125
|
-
|
|
4536
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4126
4537
|
|
|
4127
4538
|
// ../workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
4128
|
-
|
|
4539
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4129
4540
|
|
|
4130
4541
|
// ../workspace-tools/src/utils/create-cli-options.ts
|
|
4131
|
-
|
|
4542
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4132
4543
|
|
|
4133
4544
|
|
|
4134
4545
|
// ../workspace-tools/src/utils/get-project-configurations.ts
|
|
4135
|
-
|
|
4546
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4136
4547
|
var _retrieveworkspacefiles = require('nx/src/project-graph/utils/retrieve-workspace-files');
|
|
4137
4548
|
|
|
4138
4549
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
4139
|
-
|
|
4550
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4551
|
+
|
|
4552
|
+
|
|
4553
|
+
|
|
4554
|
+
|
|
4555
|
+
|
|
4556
|
+
|
|
4557
|
+
|
|
4140
4558
|
|
|
4141
4559
|
|
|
4142
4560
|
|
|
4143
4561
|
var _npmparser = require('nx/src/plugins/js/lock-file/npm-parser');
|
|
4562
|
+
|
|
4563
|
+
|
|
4564
|
+
|
|
4144
4565
|
var _pnpmparser = require('nx/src/plugins/js/lock-file/pnpm-parser');
|
|
4566
|
+
|
|
4567
|
+
|
|
4568
|
+
|
|
4145
4569
|
var _yarnparser = require('nx/src/plugins/js/lock-file/yarn-parser');
|
|
4146
4570
|
var YARN_LOCK_FILE = "yarn.lock";
|
|
4147
4571
|
var NPM_LOCK_FILE = "package-lock.json";
|
|
@@ -4151,19 +4575,22 @@ var NPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, NPM_LOCK_FILE
|
|
|
4151
4575
|
var PNPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, PNPM_LOCK_FILE);
|
|
4152
4576
|
|
|
4153
4577
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
4154
|
-
|
|
4578
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4579
|
+
|
|
4580
|
+
|
|
4581
|
+
|
|
4155
4582
|
|
|
4156
4583
|
|
|
4157
4584
|
|
|
4158
4585
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4159
|
-
|
|
4586
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4160
4587
|
|
|
4161
4588
|
|
|
4162
4589
|
|
|
4163
4590
|
|
|
4164
4591
|
|
|
4165
4592
|
// ../workspace-tools/src/utils/typia-transform.ts
|
|
4166
|
-
|
|
4593
|
+
_chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
|
|
4167
4594
|
var _transform = require('typia/lib/transform'); var _transform2 = _interopRequireDefault(_transform);
|
|
4168
4595
|
|
|
4169
4596
|
// src/generators/init/generator.ts
|
|
@@ -4175,18 +4602,23 @@ async function initGeneratorFn(tree, options, config) {
|
|
|
4175
4602
|
}
|
|
4176
4603
|
return task;
|
|
4177
4604
|
}
|
|
4178
|
-
|
|
4179
|
-
|
|
4605
|
+
var generator_default6 = withRunGenerator(
|
|
4606
|
+
"Initialize Storm Projen workspace",
|
|
4607
|
+
initGeneratorFn
|
|
4608
|
+
);
|
|
4180
4609
|
function addProjenDeps(tree, options) {
|
|
4181
4610
|
return () => {
|
|
4182
4611
|
const packageJson = _devkit.readJsonFile.call(void 0, `${options.directory}/package.json`);
|
|
4183
4612
|
packageJson.dependencies["projen"] ??= "^0.91.6";
|
|
4184
4613
|
if (packageJson) {
|
|
4185
|
-
_devkit.addDependenciesToPackageJson.call(void 0,
|
|
4614
|
+
_devkit.addDependenciesToPackageJson.call(void 0,
|
|
4615
|
+
tree,
|
|
4616
|
+
packageJson.dependencies || {},
|
|
4617
|
+
packageJson.devDependencies || {}
|
|
4618
|
+
)();
|
|
4186
4619
|
}
|
|
4187
4620
|
};
|
|
4188
4621
|
}
|
|
4189
|
-
_chunkLTKRUM5Pjs.__name.call(void 0, addProjenDeps, "addProjenDeps");
|
|
4190
4622
|
|
|
4191
4623
|
|
|
4192
4624
|
|