@storm-software/projen 0.9.56 → 0.9.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{chunk-LUEIOVQW.mjs → chunk-2L3DEJ35.mjs} +1 -1
- package/dist/{chunk-ZOWG3HAS.js → chunk-44UHVCK5.js} +7 -7
- package/dist/chunk-4DGWICVW.js +6 -0
- package/dist/{chunk-3WPO62ST.js → chunk-74PQUMLM.js} +462 -1351
- package/dist/{chunk-ZG2OCU4F.js → chunk-BBEYLIXN.js} +2 -2
- package/dist/{chunk-L5O7P2JV.mjs → chunk-C24G3GOI.mjs} +1 -1
- package/dist/{chunk-Q7YWQALM.mjs → chunk-JXMH6QXP.mjs} +205 -1094
- package/dist/{chunk-NUF2HZO6.mjs → chunk-QEAXX4TN.mjs} +1 -1
- package/dist/{chunk-BLRPMSEM.js → chunk-VKHIP4EU.js} +3 -3
- package/dist/{chunk-JKQ5N3E7.mjs → chunk-WOH3JDTU.mjs} +2 -2
- 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 +17 -17
- package/dist/src/components/nx-workspace.mjs +2 -2
- package/dist/src/generators/init/generator.js +4 -4
- package/dist/src/generators/init/generator.mjs +3 -3
- package/dist/tsup.config.js +2 -2
- package/dist/tsup.config.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-Z34UIHED.js +0 -6
|
@@ -1,39 +1,39 @@
|
|
|
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; }
|
|
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 _chunk44UHVCK5js = require('./chunk-44UHVCK5.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkBBEYLIXNjs = require('./chunk-BBEYLIXN.js');
|
|
10
10
|
|
|
11
11
|
// src/generators/init/generator.ts
|
|
12
|
-
|
|
12
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
13
13
|
var _devkit = require('@nx/devkit');
|
|
14
14
|
|
|
15
15
|
// ../workspace-tools/index.ts
|
|
16
|
-
|
|
16
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
17
17
|
|
|
18
18
|
// ../workspace-tools/executors.ts
|
|
19
|
-
|
|
19
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
20
20
|
|
|
21
21
|
// ../workspace-tools/src/executors/cargo-build/executor.ts
|
|
22
|
-
|
|
22
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
23
23
|
|
|
24
24
|
// ../workspace-tools/src/base/base-executor.ts
|
|
25
|
-
|
|
25
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
26
26
|
|
|
27
27
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
28
|
-
|
|
28
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
29
29
|
var _c12 = require('c12');
|
|
30
30
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
31
31
|
|
|
32
32
|
// ../config-tools/src/logger/console.ts
|
|
33
|
-
|
|
33
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
34
34
|
|
|
35
35
|
// ../config-tools/src/types.ts
|
|
36
|
-
|
|
36
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
37
37
|
var LogLevel = {
|
|
38
38
|
SILENT: 0,
|
|
39
39
|
FATAL: 10,
|
|
@@ -58,13 +58,13 @@ var LogLevelLabel = {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
61
|
-
|
|
61
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
62
62
|
|
|
63
63
|
// ../config/src/index.ts
|
|
64
|
-
|
|
64
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
65
65
|
|
|
66
66
|
// ../config/src/constants.ts
|
|
67
|
-
|
|
67
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
68
68
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
69
69
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
70
70
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
@@ -87,10 +87,10 @@ If this sounds interesting, and you would like to help us in creating the next g
|
|
|
87
87
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
88
88
|
|
|
89
89
|
// ../config/src/define-config.ts
|
|
90
|
-
|
|
90
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
91
91
|
|
|
92
92
|
// ../config/src/schema.ts
|
|
93
|
-
|
|
93
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
94
94
|
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
95
95
|
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
96
|
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");
|
|
@@ -259,7 +259,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
259
259
|
}).describe("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.");
|
|
260
260
|
|
|
261
261
|
// ../config/src/types.ts
|
|
262
|
-
|
|
262
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
263
263
|
var COLOR_KEYS = [
|
|
264
264
|
"dark",
|
|
265
265
|
"light",
|
|
@@ -281,13 +281,13 @@ var COLOR_KEYS = [
|
|
|
281
281
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
282
282
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
283
283
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
284
|
-
var _path = require('path'); var
|
|
284
|
+
var _path = require('path'); var path3 = _interopRequireWildcard(_path);
|
|
285
285
|
|
|
286
286
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
287
|
-
|
|
287
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
288
288
|
|
|
289
289
|
// ../config-tools/src/utilities/find-up.ts
|
|
290
|
-
|
|
290
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
291
291
|
|
|
292
292
|
|
|
293
293
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -306,7 +306,7 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
306
306
|
}
|
|
307
307
|
return void 0;
|
|
308
308
|
}
|
|
309
|
-
|
|
309
|
+
_chunkBBEYLIXNjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
310
310
|
|
|
311
311
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
312
312
|
var rootFiles = [
|
|
@@ -353,11 +353,11 @@ var rootDirectories = [
|
|
|
353
353
|
];
|
|
354
354
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
355
355
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
356
|
-
return
|
|
356
|
+
return _chunk44UHVCK5js.correctPaths.call(void 0, _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
|
|
357
357
|
}
|
|
358
|
-
return
|
|
358
|
+
return _chunk44UHVCK5js.correctPaths.call(void 0, findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
|
|
359
359
|
}
|
|
360
|
-
|
|
360
|
+
_chunkBBEYLIXNjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
361
361
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
362
362
|
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
363
363
|
if (!result) {
|
|
@@ -367,7 +367,7 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
|
367
367
|
}
|
|
368
368
|
return result;
|
|
369
369
|
}
|
|
370
|
-
|
|
370
|
+
_chunkBBEYLIXNjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
|
|
371
371
|
|
|
372
372
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
373
373
|
var DEFAULT_COLOR_CONFIG = {
|
|
@@ -398,7 +398,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
398
398
|
negative: "#dc2626"
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
|
-
var getDefaultConfig = /* @__PURE__ */
|
|
401
|
+
var getDefaultConfig = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (root) => {
|
|
402
402
|
let license = STORM_DEFAULT_LICENSE;
|
|
403
403
|
let homepage = STORM_DEFAULT_HOMEPAGE;
|
|
404
404
|
let name = void 0;
|
|
@@ -406,7 +406,7 @@ var getDefaultConfig = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, asyn
|
|
|
406
406
|
let repository = void 0;
|
|
407
407
|
const workspaceRoot3 = findWorkspaceRoot(root);
|
|
408
408
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot3, "package.json"))) {
|
|
409
|
-
const file = await _promises.readFile.call(void 0,
|
|
409
|
+
const file = await _promises.readFile.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
410
410
|
if (file) {
|
|
411
411
|
const packageJson = JSON.parse(file);
|
|
412
412
|
if (packageJson.name) {
|
|
@@ -446,28 +446,28 @@ var getDefaultConfig = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, asyn
|
|
|
446
446
|
}, "getDefaultConfig");
|
|
447
447
|
|
|
448
448
|
// ../config-tools/src/logger/chalk.ts
|
|
449
|
-
|
|
449
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
450
450
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
451
451
|
var chalkDefault = {
|
|
452
|
-
hex: /* @__PURE__ */
|
|
453
|
-
bgHex: /* @__PURE__ */
|
|
454
|
-
whiteBright: /* @__PURE__ */
|
|
452
|
+
hex: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
453
|
+
bgHex: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (_) => ({
|
|
454
|
+
whiteBright: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
455
455
|
}), "bgHex"),
|
|
456
|
-
whiteBright: /* @__PURE__ */
|
|
457
|
-
gray: /* @__PURE__ */
|
|
456
|
+
whiteBright: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message) => message, "whiteBright"),
|
|
457
|
+
gray: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message) => message, "gray"),
|
|
458
458
|
bold: {
|
|
459
|
-
hex: /* @__PURE__ */
|
|
460
|
-
bgHex: /* @__PURE__ */
|
|
461
|
-
whiteBright: /* @__PURE__ */
|
|
459
|
+
hex: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
460
|
+
bgHex: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (_) => ({
|
|
461
|
+
whiteBright: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
462
462
|
}), "bgHex"),
|
|
463
|
-
whiteBright: /* @__PURE__ */
|
|
463
|
+
whiteBright: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
464
464
|
},
|
|
465
465
|
dim: {
|
|
466
|
-
hex: /* @__PURE__ */
|
|
467
|
-
gray: /* @__PURE__ */
|
|
466
|
+
hex: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
467
|
+
gray: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message) => message, "gray")
|
|
468
468
|
}
|
|
469
469
|
};
|
|
470
|
-
var getChalk = /* @__PURE__ */
|
|
470
|
+
var getChalk = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, () => {
|
|
471
471
|
let _chalk = _chalk3.default;
|
|
472
472
|
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
473
|
_chalk = chalkDefault;
|
|
@@ -476,10 +476,10 @@ var getChalk = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, () => {
|
|
|
476
476
|
}, "getChalk");
|
|
477
477
|
|
|
478
478
|
// ../config-tools/src/logger/console-icons.ts
|
|
479
|
-
|
|
479
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
480
480
|
|
|
481
481
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
482
|
-
|
|
482
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
483
483
|
function isUnicodeSupported() {
|
|
484
484
|
if (process.platform !== "win32") {
|
|
485
485
|
return process.env.TERM !== "linux";
|
|
@@ -489,10 +489,10 @@ function isUnicodeSupported() {
|
|
|
489
489
|
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
490
490
|
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
491
|
}
|
|
492
|
-
|
|
492
|
+
_chunkBBEYLIXNjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
|
|
493
493
|
|
|
494
494
|
// ../config-tools/src/logger/console-icons.ts
|
|
495
|
-
var useIcon = /* @__PURE__ */
|
|
495
|
+
var useIcon = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
|
|
496
496
|
var CONSOLE_ICONS = {
|
|
497
497
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
498
498
|
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
@@ -505,14 +505,14 @@ var CONSOLE_ICONS = {
|
|
|
505
505
|
};
|
|
506
506
|
|
|
507
507
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
508
|
-
|
|
509
|
-
var formatTimestamp = /* @__PURE__ */
|
|
508
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
509
|
+
var formatTimestamp = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (date = /* @__PURE__ */ new Date()) => {
|
|
510
510
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
511
511
|
}, "formatTimestamp");
|
|
512
512
|
|
|
513
513
|
// ../config-tools/src/logger/get-log-level.ts
|
|
514
|
-
|
|
515
|
-
var getLogLevel = /* @__PURE__ */
|
|
514
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
515
|
+
var getLogLevel = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (label) => {
|
|
516
516
|
switch (label) {
|
|
517
517
|
case "all":
|
|
518
518
|
return LogLevel.ALL;
|
|
@@ -534,7 +534,7 @@ var getLogLevel = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (label) =
|
|
|
534
534
|
return LogLevel.INFO;
|
|
535
535
|
}
|
|
536
536
|
}, "getLogLevel");
|
|
537
|
-
var getLogLevelLabel = /* @__PURE__ */
|
|
537
|
+
var getLogLevelLabel = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
|
|
538
538
|
if (logLevel >= LogLevel.ALL) {
|
|
539
539
|
return LogLevelLabel.ALL;
|
|
540
540
|
}
|
|
@@ -561,13 +561,9 @@ var getLogLevelLabel = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (log
|
|
|
561
561
|
}
|
|
562
562
|
return LogLevelLabel.INFO;
|
|
563
563
|
}, "getLogLevelLabel");
|
|
564
|
-
var isVerbose = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
|
|
565
|
-
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
566
|
-
return logLevel >= LogLevel.DEBUG;
|
|
567
|
-
}, "isVerbose");
|
|
568
564
|
|
|
569
565
|
// ../config-tools/src/logger/console.ts
|
|
570
|
-
var getLogFn = /* @__PURE__ */
|
|
566
|
+
var getLogFn = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
571
567
|
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;
|
|
572
568
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
573
569
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
@@ -629,14 +625,14 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, ()
|
|
|
629
625
|
`);
|
|
630
626
|
};
|
|
631
627
|
}, "getLogFn");
|
|
632
|
-
var writeFatal = /* @__PURE__ */
|
|
633
|
-
var writeError = /* @__PURE__ */
|
|
634
|
-
var writeWarning = /* @__PURE__ */
|
|
635
|
-
var writeInfo = /* @__PURE__ */
|
|
636
|
-
var writeSuccess = /* @__PURE__ */
|
|
637
|
-
var writeDebug = /* @__PURE__ */
|
|
638
|
-
var writeTrace = /* @__PURE__ */
|
|
639
|
-
var getStopwatch = /* @__PURE__ */
|
|
628
|
+
var writeFatal = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.FATAL, config)(message), "writeFatal");
|
|
629
|
+
var writeError = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
|
|
630
|
+
var writeWarning = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.WARN, config)(message), "writeWarning");
|
|
631
|
+
var writeInfo = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
|
|
632
|
+
var writeSuccess = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
|
|
633
|
+
var writeDebug = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
|
|
634
|
+
var writeTrace = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
|
|
635
|
+
var getStopwatch = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (name) => {
|
|
640
636
|
const start = process.hrtime();
|
|
641
637
|
return () => {
|
|
642
638
|
const end = process.hrtime(start);
|
|
@@ -646,23 +642,23 @@ var getStopwatch = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (name) =
|
|
|
646
642
|
};
|
|
647
643
|
}, "getStopwatch");
|
|
648
644
|
var MAX_DEPTH = 4;
|
|
649
|
-
var formatLogMessage = /* @__PURE__ */
|
|
645
|
+
var formatLogMessage = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (message, options = {}, depth2 = 0) => {
|
|
650
646
|
if (depth2 > MAX_DEPTH) {
|
|
651
647
|
return "<max depth>";
|
|
652
648
|
}
|
|
653
649
|
const prefix = _nullishCoalesce(options.prefix, () => ( "-"));
|
|
654
|
-
const
|
|
650
|
+
const skip = _nullishCoalesce(options.skip, () => ( []));
|
|
655
651
|
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
656
652
|
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
|
|
657
653
|
prefix: `${prefix}-`,
|
|
658
|
-
skip
|
|
654
|
+
skip
|
|
659
655
|
}, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
660
|
-
${Object.keys(message).filter((key) => !
|
|
656
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], {
|
|
661
657
|
prefix: `${prefix}-`,
|
|
662
|
-
skip
|
|
658
|
+
skip
|
|
663
659
|
}, depth2 + 1) : message[key]}`).join("\n")}` : message;
|
|
664
660
|
}, "formatLogMessage");
|
|
665
|
-
var _isFunction = /* @__PURE__ */
|
|
661
|
+
var _isFunction = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (value) => {
|
|
666
662
|
try {
|
|
667
663
|
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]));
|
|
668
664
|
} catch (e) {
|
|
@@ -671,8 +667,8 @@ var _isFunction = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (value) =
|
|
|
671
667
|
}, "_isFunction");
|
|
672
668
|
|
|
673
669
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
674
|
-
|
|
675
|
-
var applyWorkspaceBaseTokens = /* @__PURE__ */
|
|
670
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
671
|
+
var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (option, tokenParams) => {
|
|
676
672
|
let result = option;
|
|
677
673
|
if (!result) {
|
|
678
674
|
return result;
|
|
@@ -702,10 +698,10 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void
|
|
|
702
698
|
}
|
|
703
699
|
return result;
|
|
704
700
|
}, "applyWorkspaceBaseTokens");
|
|
705
|
-
var applyWorkspaceProjectTokens = /* @__PURE__ */
|
|
701
|
+
var applyWorkspaceProjectTokens = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (option, tokenParams) => {
|
|
706
702
|
return applyWorkspaceBaseTokens(option, tokenParams);
|
|
707
703
|
}, "applyWorkspaceProjectTokens");
|
|
708
|
-
var applyWorkspaceTokens = /* @__PURE__ */
|
|
704
|
+
var applyWorkspaceTokens = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (options, tokenParams, tokenizerFn) => {
|
|
709
705
|
if (!options) {
|
|
710
706
|
return {};
|
|
711
707
|
}
|
|
@@ -724,28 +720,8 @@ var applyWorkspaceTokens = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0,
|
|
|
724
720
|
return result;
|
|
725
721
|
}, "applyWorkspaceTokens");
|
|
726
722
|
|
|
727
|
-
// ../config-tools/src/utilities/run.ts
|
|
728
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
729
|
-
var _child_process = require('child_process');
|
|
730
|
-
var LARGE_BUFFER = 1024 * 1e6;
|
|
731
|
-
var run = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), stdio = "inherit", env = process.env) => {
|
|
732
|
-
return _child_process.execSync.call(void 0, command, {
|
|
733
|
-
cwd,
|
|
734
|
-
env: {
|
|
735
|
-
...process.env,
|
|
736
|
-
...env,
|
|
737
|
-
CLICOLOR: "true",
|
|
738
|
-
FORCE_COLOR: "true"
|
|
739
|
-
},
|
|
740
|
-
windowsHide: true,
|
|
741
|
-
stdio,
|
|
742
|
-
maxBuffer: LARGE_BUFFER,
|
|
743
|
-
killSignal: "SIGTERM"
|
|
744
|
-
});
|
|
745
|
-
}, "run");
|
|
746
|
-
|
|
747
723
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
748
|
-
var getConfigFileByName = /* @__PURE__ */
|
|
724
|
+
var getConfigFileByName = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
749
725
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
750
726
|
const configs = await Promise.all([
|
|
751
727
|
_c12.loadConfig.call(void 0, {
|
|
@@ -755,7 +731,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, a
|
|
|
755
731
|
envName: _optionalChain([fileName, 'optionalAccess', _29 => _29.toUpperCase, 'call', _30 => _30()]),
|
|
756
732
|
jitiOptions: {
|
|
757
733
|
debug: false,
|
|
758
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
734
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk44UHVCK5js.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
759
735
|
},
|
|
760
736
|
...options
|
|
761
737
|
}),
|
|
@@ -766,7 +742,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, a
|
|
|
766
742
|
envName: _optionalChain([fileName, 'optionalAccess', _31 => _31.toUpperCase, 'call', _32 => _32()]),
|
|
767
743
|
jitiOptions: {
|
|
768
744
|
debug: false,
|
|
769
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
745
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk44UHVCK5js.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
770
746
|
},
|
|
771
747
|
configFile: fileName,
|
|
772
748
|
...options
|
|
@@ -774,7 +750,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, a
|
|
|
774
750
|
]);
|
|
775
751
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
776
752
|
}, "getConfigFileByName");
|
|
777
|
-
var getConfigFile = /* @__PURE__ */
|
|
753
|
+
var getConfigFile = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
778
754
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
779
755
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
780
756
|
let config = result.config;
|
|
@@ -805,12 +781,12 @@ var getConfigFile = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, async (
|
|
|
805
781
|
}, "getConfigFile");
|
|
806
782
|
|
|
807
783
|
// ../config-tools/src/create-storm-config.ts
|
|
808
|
-
|
|
784
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
809
785
|
|
|
810
786
|
|
|
811
787
|
// ../config-tools/src/env/get-env.ts
|
|
812
|
-
|
|
813
|
-
var getExtensionEnv = /* @__PURE__ */
|
|
788
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
789
|
+
var getExtensionEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (extensionName) => {
|
|
814
790
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
815
791
|
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
816
792
|
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
@@ -820,7 +796,7 @@ var getExtensionEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (exte
|
|
|
820
796
|
return ret;
|
|
821
797
|
}, {});
|
|
822
798
|
}, "getExtensionEnv");
|
|
823
|
-
var getConfigEnv = /* @__PURE__ */
|
|
799
|
+
var getConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, () => {
|
|
824
800
|
const prefix = "STORM_";
|
|
825
801
|
let config = {
|
|
826
802
|
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
@@ -857,15 +833,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, () => {
|
|
|
857
833
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
858
834
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
859
835
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
860
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
861
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
836
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
837
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
862
838
|
directories: {
|
|
863
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
864
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
865
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
866
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
867
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
868
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
839
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
840
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
841
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
842
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
843
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
844
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunk44UHVCK5js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
869
845
|
},
|
|
870
846
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
871
847
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -928,11 +904,11 @@ var getConfigEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, () => {
|
|
|
928
904
|
}
|
|
929
905
|
return config;
|
|
930
906
|
}, "getConfigEnv");
|
|
931
|
-
var getThemeColorConfigEnv = /* @__PURE__ */
|
|
907
|
+
var getThemeColorConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (prefix, theme) => {
|
|
932
908
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
933
909
|
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
934
910
|
}, "getThemeColorConfigEnv");
|
|
935
|
-
var getSingleThemeColorConfigEnv = /* @__PURE__ */
|
|
911
|
+
var getSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (prefix) => {
|
|
936
912
|
return {
|
|
937
913
|
dark: process.env[`${prefix}DARK`],
|
|
938
914
|
light: process.env[`${prefix}LIGHT`],
|
|
@@ -950,13 +926,13 @@ var getSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(
|
|
|
950
926
|
negative: process.env[`${prefix}NEGATIVE`]
|
|
951
927
|
};
|
|
952
928
|
}, "getSingleThemeColorConfigEnv");
|
|
953
|
-
var getMultiThemeColorConfigEnv = /* @__PURE__ */
|
|
929
|
+
var getMultiThemeColorConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (prefix) => {
|
|
954
930
|
return {
|
|
955
931
|
light: getBaseThemeColorConfigEnv(`${prefix}_LIGHT_`),
|
|
956
932
|
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
957
933
|
};
|
|
958
934
|
}, "getMultiThemeColorConfigEnv");
|
|
959
|
-
var getBaseThemeColorConfigEnv = /* @__PURE__ */
|
|
935
|
+
var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (prefix) => {
|
|
960
936
|
return {
|
|
961
937
|
foreground: process.env[`${prefix}FOREGROUND`],
|
|
962
938
|
background: process.env[`${prefix}BACKGROUND`],
|
|
@@ -976,8 +952,8 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(vo
|
|
|
976
952
|
}, "getBaseThemeColorConfigEnv");
|
|
977
953
|
|
|
978
954
|
// ../config-tools/src/env/set-env.ts
|
|
979
|
-
|
|
980
|
-
var setExtensionEnv = /* @__PURE__ */
|
|
955
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
956
|
+
var setExtensionEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (extensionName, extension) => {
|
|
981
957
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
982
958
|
if (extension[key]) {
|
|
983
959
|
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _35 => _35.replace, 'call', _36 => _36(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _37 => _37[0], 'optionalAccess', _38 => _38.toUpperCase, 'call', _39 => _39()]) + input.slice(1) : ""), 'access', _40 => _40.split, 'call', _41 => _41(/(?=[A-Z])|[.\-\s_]/), 'access', _42 => _42.map, 'call', _43 => _43((x) => x.toLowerCase())]), () => ( []));
|
|
@@ -996,7 +972,7 @@ var setExtensionEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (exte
|
|
|
996
972
|
}
|
|
997
973
|
}
|
|
998
974
|
}, "setExtensionEnv");
|
|
999
|
-
var setConfigEnv = /* @__PURE__ */
|
|
975
|
+
var setConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (config) => {
|
|
1000
976
|
const prefix = "STORM_";
|
|
1001
977
|
if (config.extends) {
|
|
1002
978
|
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
@@ -1076,36 +1052,36 @@ var setConfigEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (config)
|
|
|
1076
1052
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1077
1053
|
}
|
|
1078
1054
|
if (config.configFile) {
|
|
1079
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
1055
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunk44UHVCK5js.correctPaths.call(void 0, config.configFile);
|
|
1080
1056
|
}
|
|
1081
1057
|
if (config.workspaceRoot) {
|
|
1082
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
1083
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
1084
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
1058
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunk44UHVCK5js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1059
|
+
process.env.NX_WORKSPACE_ROOT = _chunk44UHVCK5js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1060
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunk44UHVCK5js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1085
1061
|
}
|
|
1086
1062
|
if (config.directories) {
|
|
1087
1063
|
if (!config.skipCache && config.directories.cache) {
|
|
1088
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
1064
|
+
process.env[`${prefix}CACHE_DIR`] = _chunk44UHVCK5js.correctPaths.call(void 0, config.directories.cache);
|
|
1089
1065
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1090
1066
|
}
|
|
1091
1067
|
if (config.directories.data) {
|
|
1092
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
1068
|
+
process.env[`${prefix}DATA_DIR`] = _chunk44UHVCK5js.correctPaths.call(void 0, config.directories.data);
|
|
1093
1069
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1094
1070
|
}
|
|
1095
1071
|
if (config.directories.config) {
|
|
1096
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
1072
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunk44UHVCK5js.correctPaths.call(void 0, config.directories.config);
|
|
1097
1073
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1098
1074
|
}
|
|
1099
1075
|
if (config.directories.temp) {
|
|
1100
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
1076
|
+
process.env[`${prefix}TEMP_DIR`] = _chunk44UHVCK5js.correctPaths.call(void 0, config.directories.temp);
|
|
1101
1077
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1102
1078
|
}
|
|
1103
1079
|
if (config.directories.log) {
|
|
1104
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
1080
|
+
process.env[`${prefix}LOG_DIR`] = _chunk44UHVCK5js.correctPaths.call(void 0, config.directories.log);
|
|
1105
1081
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1106
1082
|
}
|
|
1107
1083
|
if (config.directories.build) {
|
|
1108
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
1084
|
+
process.env[`${prefix}BUILD_DIR`] = _chunk44UHVCK5js.correctPaths.call(void 0, config.directories.build);
|
|
1109
1085
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1110
1086
|
}
|
|
1111
1087
|
}
|
|
@@ -1173,10 +1149,10 @@ var setConfigEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (config)
|
|
|
1173
1149
|
}
|
|
1174
1150
|
}
|
|
1175
1151
|
}, "setConfigEnv");
|
|
1176
|
-
var setThemeColorConfigEnv = /* @__PURE__ */
|
|
1152
|
+
var setThemeColorConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (prefix, config) => {
|
|
1177
1153
|
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);
|
|
1178
1154
|
}, "setThemeColorConfigEnv");
|
|
1179
|
-
var setSingleThemeColorConfigEnv = /* @__PURE__ */
|
|
1155
|
+
var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (prefix, config) => {
|
|
1180
1156
|
if (config.dark) {
|
|
1181
1157
|
process.env[`${prefix}DARK`] = config.dark;
|
|
1182
1158
|
}
|
|
@@ -1220,13 +1196,13 @@ var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(
|
|
|
1220
1196
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1221
1197
|
}
|
|
1222
1198
|
}, "setSingleThemeColorConfigEnv");
|
|
1223
|
-
var setMultiThemeColorConfigEnv = /* @__PURE__ */
|
|
1199
|
+
var setMultiThemeColorConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (prefix, config) => {
|
|
1224
1200
|
return {
|
|
1225
1201
|
light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
|
|
1226
1202
|
dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
|
|
1227
1203
|
};
|
|
1228
1204
|
}, "setMultiThemeColorConfigEnv");
|
|
1229
|
-
var setBaseThemeColorConfigEnv = /* @__PURE__ */
|
|
1205
|
+
var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (prefix, config) => {
|
|
1230
1206
|
if (config.foreground) {
|
|
1231
1207
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
1232
1208
|
}
|
|
@@ -1274,7 +1250,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(vo
|
|
|
1274
1250
|
// ../config-tools/src/create-storm-config.ts
|
|
1275
1251
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1276
1252
|
var _static_cache = void 0;
|
|
1277
|
-
var createStormWorkspaceConfig = /* @__PURE__ */
|
|
1253
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (extensionName, schema, workspaceRoot3, skipLogs = false, useDefault = true) => {
|
|
1278
1254
|
let result;
|
|
1279
1255
|
if (!_optionalChain([_static_cache, 'optionalAccess', _57 => _57.data]) || !_optionalChain([_static_cache, 'optionalAccess', _58 => _58.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1280
1256
|
let _workspaceRoot = workspaceRoot3;
|
|
@@ -1311,7 +1287,7 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(vo
|
|
|
1311
1287
|
};
|
|
1312
1288
|
return result;
|
|
1313
1289
|
}, "createStormWorkspaceConfig");
|
|
1314
|
-
var createConfigExtension = /* @__PURE__ */
|
|
1290
|
+
var createConfigExtension = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (extensionName, schema) => {
|
|
1315
1291
|
const extension_cache_key = {
|
|
1316
1292
|
extensionName
|
|
1317
1293
|
};
|
|
@@ -1325,7 +1301,7 @@ var createConfigExtension = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0,
|
|
|
1325
1301
|
_extension_cache.set(extension_cache_key, extension);
|
|
1326
1302
|
return extension;
|
|
1327
1303
|
}, "createConfigExtension");
|
|
1328
|
-
var loadStormWorkspaceConfig = /* @__PURE__ */
|
|
1304
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (workspaceRoot3, skipLogs = false) => {
|
|
1329
1305
|
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot3, skipLogs, true);
|
|
1330
1306
|
setConfigEnv(config);
|
|
1331
1307
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
@@ -1336,25 +1312,32 @@ ${formatLogMessage(config)}`, config);
|
|
|
1336
1312
|
}, "loadStormWorkspaceConfig");
|
|
1337
1313
|
|
|
1338
1314
|
// ../config-tools/src/get-config.ts
|
|
1339
|
-
|
|
1340
|
-
var getConfig = /* @__PURE__ */
|
|
1315
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1316
|
+
var getConfig = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (workspaceRoot3, skipLogs = false) => {
|
|
1341
1317
|
return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
|
|
1342
1318
|
}, "getConfig");
|
|
1319
|
+
var getWorkspaceConfig = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (skipLogs = false, options = {}) => {
|
|
1320
|
+
let workspaceRoot3 = options.workspaceRoot;
|
|
1321
|
+
if (!workspaceRoot3) {
|
|
1322
|
+
workspaceRoot3 = findWorkspaceRoot(options.cwd);
|
|
1323
|
+
}
|
|
1324
|
+
return getConfig(workspaceRoot3, skipLogs);
|
|
1325
|
+
}, "getWorkspaceConfig");
|
|
1343
1326
|
|
|
1344
1327
|
// ../workspace-tools/src/base/base-executor.ts
|
|
1345
1328
|
|
|
1346
|
-
var withRunExecutor = /* @__PURE__ */
|
|
1329
|
+
var withRunExecutor = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
1347
1330
|
const stopwatch = getStopwatch(name);
|
|
1348
1331
|
let options = _options;
|
|
1349
1332
|
let config = {};
|
|
1350
1333
|
try {
|
|
1351
|
-
if (!_optionalChain([
|
|
1334
|
+
if (!_optionalChain([context, 'access', _59 => _59.projectsConfigurations, 'optionalAccess', _60 => _60.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1352
1335
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1353
1336
|
}
|
|
1354
1337
|
const workspaceRoot3 = findWorkspaceRoot();
|
|
1355
|
-
const projectRoot =
|
|
1356
|
-
const sourceRoot =
|
|
1357
|
-
const projectName =
|
|
1338
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
|
|
1339
|
+
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot3;
|
|
1340
|
+
const projectName = context.projectName;
|
|
1358
1341
|
config.workspaceRoot = workspaceRoot3;
|
|
1359
1342
|
writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
1360
1343
|
if (!executorOptions.skipReadingConfig) {
|
|
@@ -1380,7 +1363,7 @@ ${formatLogMessage(options)}
|
|
|
1380
1363
|
sourceRoot,
|
|
1381
1364
|
projectName,
|
|
1382
1365
|
config
|
|
1383
|
-
}, config,
|
|
1366
|
+
}, config, context.projectsConfigurations.projects[context.projectName]), applyWorkspaceProjectTokens);
|
|
1384
1367
|
writeTrace(`Executor schema tokenized options \u2699\uFE0F
|
|
1385
1368
|
${formatLogMessage(tokenized)}
|
|
1386
1369
|
`, config);
|
|
@@ -1389,7 +1372,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1389
1372
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
1390
1373
|
writeDebug("Completed the preProcess hook", config);
|
|
1391
1374
|
}
|
|
1392
|
-
const ret = executorFn(tokenized,
|
|
1375
|
+
const ret = executorFn(tokenized, context, config);
|
|
1393
1376
|
if (_isFunction2(_optionalChain([ret, 'optionalAccess', _65 => _65.next]))) {
|
|
1394
1377
|
const asyncGen = ret;
|
|
1395
1378
|
for await (const iter of asyncGen) {
|
|
@@ -1427,7 +1410,7 @@ ${formatLogMessage(result)}`, config);
|
|
|
1427
1410
|
stopwatch();
|
|
1428
1411
|
}
|
|
1429
1412
|
}, "withRunExecutor");
|
|
1430
|
-
var _isFunction2 = /* @__PURE__ */
|
|
1413
|
+
var _isFunction2 = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (value) => {
|
|
1431
1414
|
try {
|
|
1432
1415
|
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]));
|
|
1433
1416
|
} catch (e) {
|
|
@@ -1436,9 +1419,9 @@ var _isFunction2 = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (value)
|
|
|
1436
1419
|
}, "_isFunction");
|
|
1437
1420
|
|
|
1438
1421
|
// ../workspace-tools/src/utils/cargo.ts
|
|
1439
|
-
|
|
1440
|
-
|
|
1422
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1441
1423
|
|
|
1424
|
+
var _child_process = require('child_process');
|
|
1442
1425
|
|
|
1443
1426
|
var INVALID_CARGO_ARGS = [
|
|
1444
1427
|
"allFeatures",
|
|
@@ -1448,7 +1431,7 @@ var INVALID_CARGO_ARGS = [
|
|
|
1448
1431
|
"package",
|
|
1449
1432
|
"tsConfig"
|
|
1450
1433
|
];
|
|
1451
|
-
var buildCargoCommand = /* @__PURE__ */
|
|
1434
|
+
var buildCargoCommand = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (baseCommand, options, context) => {
|
|
1452
1435
|
const args = [];
|
|
1453
1436
|
if (options.toolchain && options.toolchain !== "stable") {
|
|
1454
1437
|
args.push(`+${options.toolchain}`);
|
|
@@ -1470,8 +1453,8 @@ var buildCargoCommand = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (ba
|
|
|
1470
1453
|
args.push(`--${key}`, String(value));
|
|
1471
1454
|
}
|
|
1472
1455
|
}
|
|
1473
|
-
if (
|
|
1474
|
-
args.push("-p",
|
|
1456
|
+
if (context.projectName) {
|
|
1457
|
+
args.push("-p", context.projectName);
|
|
1475
1458
|
}
|
|
1476
1459
|
if (options.allFeatures && !args.includes("--all-features")) {
|
|
1477
1460
|
args.push("--all-features");
|
|
@@ -1492,7 +1475,7 @@ async function cargoCommand(...args) {
|
|
|
1492
1475
|
args.push("--color", "always");
|
|
1493
1476
|
return await Promise.resolve(runProcess("cargo", ...args));
|
|
1494
1477
|
}
|
|
1495
|
-
|
|
1478
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cargoCommand, "cargoCommand");
|
|
1496
1479
|
function cargoCommandSync(args = "", options) {
|
|
1497
1480
|
const normalizedOptions = {
|
|
1498
1481
|
stdio: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _80 => _80.stdio]), () => ( "inherit")),
|
|
@@ -1519,7 +1502,7 @@ function cargoCommandSync(args = "", options) {
|
|
|
1519
1502
|
};
|
|
1520
1503
|
}
|
|
1521
1504
|
}
|
|
1522
|
-
|
|
1505
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cargoCommandSync, "cargoCommandSync");
|
|
1523
1506
|
function cargoMetadata() {
|
|
1524
1507
|
const output3 = cargoCommandSync("metadata --format-version=1", {
|
|
1525
1508
|
stdio: "pipe"
|
|
@@ -1530,7 +1513,7 @@ function cargoMetadata() {
|
|
|
1530
1513
|
}
|
|
1531
1514
|
return JSON.parse(output3.output);
|
|
1532
1515
|
}
|
|
1533
|
-
|
|
1516
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cargoMetadata, "cargoMetadata");
|
|
1534
1517
|
function runProcess(processCmd, ...args) {
|
|
1535
1518
|
const metadata = cargoMetadata();
|
|
1536
1519
|
const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _82 => _82.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, _devkit.workspaceRoot, "dist", "cargo")));
|
|
@@ -1560,18 +1543,18 @@ function runProcess(processCmd, ...args) {
|
|
|
1560
1543
|
});
|
|
1561
1544
|
});
|
|
1562
1545
|
}
|
|
1563
|
-
|
|
1546
|
+
_chunkBBEYLIXNjs.__name.call(void 0, runProcess, "runProcess");
|
|
1564
1547
|
|
|
1565
1548
|
// ../workspace-tools/src/executors/cargo-build/executor.ts
|
|
1566
|
-
async function cargoBuildExecutor(options,
|
|
1567
|
-
const command = buildCargoCommand("build", options,
|
|
1549
|
+
async function cargoBuildExecutor(options, context) {
|
|
1550
|
+
const command = buildCargoCommand("build", options, context);
|
|
1568
1551
|
return await cargoCommand(...command);
|
|
1569
1552
|
}
|
|
1570
|
-
|
|
1553
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cargoBuildExecutor, "cargoBuildExecutor");
|
|
1571
1554
|
var executor_default = withRunExecutor("Cargo Build", cargoBuildExecutor, {
|
|
1572
1555
|
skipReadingConfig: false,
|
|
1573
1556
|
hooks: {
|
|
1574
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
1557
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
1575
1558
|
options.outputPath ??= "dist/target/{projectRoot}";
|
|
1576
1559
|
options.toolchain ??= "stable";
|
|
1577
1560
|
return options;
|
|
@@ -1580,16 +1563,16 @@ var executor_default = withRunExecutor("Cargo Build", cargoBuildExecutor, {
|
|
|
1580
1563
|
});
|
|
1581
1564
|
|
|
1582
1565
|
// ../workspace-tools/src/executors/cargo-check/executor.ts
|
|
1583
|
-
|
|
1584
|
-
async function cargoCheckExecutor(options,
|
|
1585
|
-
const command = buildCargoCommand("check", options,
|
|
1566
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1567
|
+
async function cargoCheckExecutor(options, context) {
|
|
1568
|
+
const command = buildCargoCommand("check", options, context);
|
|
1586
1569
|
return await cargoCommand(...command);
|
|
1587
1570
|
}
|
|
1588
|
-
|
|
1571
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
|
|
1589
1572
|
var executor_default2 = withRunExecutor("Cargo Check", cargoCheckExecutor, {
|
|
1590
1573
|
skipReadingConfig: false,
|
|
1591
1574
|
hooks: {
|
|
1592
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
1575
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
1593
1576
|
options.toolchain ??= "stable";
|
|
1594
1577
|
return options;
|
|
1595
1578
|
}, "applyDefaultOptions")
|
|
@@ -1597,16 +1580,16 @@ var executor_default2 = withRunExecutor("Cargo Check", cargoCheckExecutor, {
|
|
|
1597
1580
|
});
|
|
1598
1581
|
|
|
1599
1582
|
// ../workspace-tools/src/executors/cargo-clippy/executor.ts
|
|
1600
|
-
|
|
1601
|
-
async function cargoClippyExecutor(options,
|
|
1602
|
-
const command = buildCargoCommand("clippy", options,
|
|
1583
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1584
|
+
async function cargoClippyExecutor(options, context) {
|
|
1585
|
+
const command = buildCargoCommand("clippy", options, context);
|
|
1603
1586
|
return await cargoCommand(...command);
|
|
1604
1587
|
}
|
|
1605
|
-
|
|
1588
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cargoClippyExecutor, "cargoClippyExecutor");
|
|
1606
1589
|
var executor_default3 = withRunExecutor("Cargo Clippy", cargoClippyExecutor, {
|
|
1607
1590
|
skipReadingConfig: false,
|
|
1608
1591
|
hooks: {
|
|
1609
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
1592
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
1610
1593
|
options.toolchain ??= "stable";
|
|
1611
1594
|
options.fix ??= false;
|
|
1612
1595
|
return options;
|
|
@@ -1615,21 +1598,21 @@ var executor_default3 = withRunExecutor("Cargo Clippy", cargoClippyExecutor, {
|
|
|
1615
1598
|
});
|
|
1616
1599
|
|
|
1617
1600
|
// ../workspace-tools/src/executors/cargo-doc/executor.ts
|
|
1618
|
-
|
|
1619
|
-
async function cargoDocExecutor(options,
|
|
1601
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1602
|
+
async function cargoDocExecutor(options, context) {
|
|
1620
1603
|
const opts = {
|
|
1621
1604
|
...options
|
|
1622
1605
|
};
|
|
1623
1606
|
opts["no-deps"] = opts.noDeps;
|
|
1624
1607
|
delete opts.noDeps;
|
|
1625
|
-
const command = buildCargoCommand("doc", options,
|
|
1608
|
+
const command = buildCargoCommand("doc", options, context);
|
|
1626
1609
|
return await cargoCommand(...command);
|
|
1627
1610
|
}
|
|
1628
|
-
|
|
1611
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cargoDocExecutor, "cargoDocExecutor");
|
|
1629
1612
|
var executor_default4 = withRunExecutor("Cargo Doc", cargoDocExecutor, {
|
|
1630
1613
|
skipReadingConfig: false,
|
|
1631
1614
|
hooks: {
|
|
1632
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
1615
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
1633
1616
|
options.outputPath ??= "dist/docs/{projectRoot}";
|
|
1634
1617
|
options.toolchain ??= "stable";
|
|
1635
1618
|
options.release ??= options.profile ? false : true;
|
|
@@ -1644,16 +1627,16 @@ var executor_default4 = withRunExecutor("Cargo Doc", cargoDocExecutor, {
|
|
|
1644
1627
|
});
|
|
1645
1628
|
|
|
1646
1629
|
// ../workspace-tools/src/executors/cargo-format/executor.ts
|
|
1647
|
-
|
|
1648
|
-
async function cargoFormatExecutor(options,
|
|
1649
|
-
const command = buildCargoCommand("fmt", options,
|
|
1630
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1631
|
+
async function cargoFormatExecutor(options, context) {
|
|
1632
|
+
const command = buildCargoCommand("fmt", options, context);
|
|
1650
1633
|
return await cargoCommand(...command);
|
|
1651
1634
|
}
|
|
1652
|
-
|
|
1635
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
|
|
1653
1636
|
var executor_default5 = withRunExecutor("Cargo Format", cargoFormatExecutor, {
|
|
1654
1637
|
skipReadingConfig: false,
|
|
1655
1638
|
hooks: {
|
|
1656
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
1639
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
1657
1640
|
options.outputPath ??= "dist/target/{projectRoot}";
|
|
1658
1641
|
options.toolchain ??= "stable";
|
|
1659
1642
|
return options;
|
|
@@ -1662,32 +1645,32 @@ var executor_default5 = withRunExecutor("Cargo Format", cargoFormatExecutor, {
|
|
|
1662
1645
|
});
|
|
1663
1646
|
|
|
1664
1647
|
// ../workspace-tools/src/executors/cargo-publish/executor.ts
|
|
1665
|
-
|
|
1648
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1666
1649
|
|
|
1667
1650
|
|
|
1668
1651
|
|
|
1669
1652
|
var _https = require('https'); var _https2 = _interopRequireDefault(_https);
|
|
1670
1653
|
|
|
1671
1654
|
// ../workspace-tools/src/utils/toml.ts
|
|
1672
|
-
|
|
1655
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1673
1656
|
var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
|
|
1674
1657
|
|
|
1675
1658
|
|
|
1676
1659
|
// ../workspace-tools/src/executors/cargo-publish/executor.ts
|
|
1677
|
-
var
|
|
1660
|
+
var LARGE_BUFFER = 1024 * 1e6;
|
|
1678
1661
|
|
|
1679
1662
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1680
|
-
|
|
1663
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1681
1664
|
|
|
1682
1665
|
// ../esbuild/src/build.ts
|
|
1683
|
-
|
|
1666
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1684
1667
|
|
|
1685
1668
|
|
|
1686
1669
|
// ../build-tools/src/index.ts
|
|
1687
|
-
|
|
1670
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1688
1671
|
|
|
1689
1672
|
// ../build-tools/src/config.ts
|
|
1690
|
-
|
|
1673
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1691
1674
|
var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
1692
1675
|
*
|
|
1693
1676
|
* \u26A1 Built by Storm Software
|
|
@@ -1699,39 +1682,39 @@ var DEFAULT_TARGET = "esnext";
|
|
|
1699
1682
|
var DEFAULT_ORGANIZATION = "storm-software";
|
|
1700
1683
|
|
|
1701
1684
|
// ../build-tools/src/plugins/index.ts
|
|
1702
|
-
|
|
1685
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1703
1686
|
|
|
1704
1687
|
// ../build-tools/src/plugins/analyze.ts
|
|
1705
|
-
|
|
1688
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1706
1689
|
|
|
1707
1690
|
// ../build-tools/src/plugins/swc.ts
|
|
1708
|
-
|
|
1691
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1709
1692
|
var _core = require('@swc/core');
|
|
1710
1693
|
|
|
1711
1694
|
// ../build-tools/src/plugins/ts-resolve.ts
|
|
1712
|
-
|
|
1695
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1713
1696
|
|
|
1714
1697
|
var _module = require('module');
|
|
1715
1698
|
|
|
1716
1699
|
var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
|
|
1717
1700
|
|
|
1718
1701
|
// ../build-tools/src/plugins/type-definitions.ts
|
|
1719
|
-
|
|
1702
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1720
1703
|
|
|
1721
1704
|
|
|
1722
1705
|
|
|
1723
1706
|
// ../build-tools/src/types.ts
|
|
1724
|
-
|
|
1707
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1725
1708
|
|
|
1726
1709
|
// ../build-tools/src/utilities/index.ts
|
|
1727
|
-
|
|
1710
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1728
1711
|
|
|
1729
1712
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
1730
|
-
|
|
1713
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1731
1714
|
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
1732
1715
|
var _glob = require('glob');
|
|
1733
1716
|
|
|
1734
|
-
var copyAssets = /* @__PURE__ */
|
|
1717
|
+
var copyAssets = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
1735
1718
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
1736
1719
|
pendingAssets.push({
|
|
1737
1720
|
input: projectRoot,
|
|
@@ -1758,7 +1741,7 @@ var copyAssets = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, async (con
|
|
|
1758
1741
|
});
|
|
1759
1742
|
}
|
|
1760
1743
|
writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
|
|
1761
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
1744
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk44UHVCK5js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
1762
1745
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
1763
1746
|
projectDir: projectRoot,
|
|
1764
1747
|
rootDir: config.workspaceRoot,
|
|
@@ -1767,12 +1750,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
1767
1750
|
});
|
|
1768
1751
|
await assetHandler.processAllAssetsOnce();
|
|
1769
1752
|
if (includeSrc === true) {
|
|
1770
|
-
writeDebug(`\u{1F4DD} Adding banner and writing source files: ${
|
|
1753
|
+
writeDebug(`\u{1F4DD} Adding banner and writing source files: ${_chunk44UHVCK5js.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
1771
1754
|
const files = await _glob.glob.call(void 0, [
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1755
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
1756
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
1757
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
1758
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
1776
1759
|
]);
|
|
1777
1760
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
1778
1761
|
|
|
@@ -1783,20 +1766,20 @@ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `//
|
|
|
1783
1766
|
}, "copyAssets");
|
|
1784
1767
|
|
|
1785
1768
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
1786
|
-
|
|
1769
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1787
1770
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
1788
1771
|
|
|
1789
1772
|
|
|
1790
1773
|
|
|
1791
1774
|
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
1792
|
-
var addPackageDependencies = /* @__PURE__ */
|
|
1775
|
+
var addPackageDependencies = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (workspaceRoot3, projectRoot, projectName, packageJson) => {
|
|
1793
1776
|
const projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
1794
1777
|
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
1795
1778
|
const localPackages = [];
|
|
1796
1779
|
for (const project of projectDependencies.dependencies.filter((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)) {
|
|
1797
1780
|
const projectNode = project.node;
|
|
1798
1781
|
if (projectNode.data.root) {
|
|
1799
|
-
const projectPackageJsonPath =
|
|
1782
|
+
const projectPackageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
1800
1783
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
1801
1784
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
1802
1785
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -1808,7 +1791,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0
|
|
|
1808
1791
|
}
|
|
1809
1792
|
if (localPackages.length > 0) {
|
|
1810
1793
|
writeTrace(`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
1811
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
1794
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
1812
1795
|
const projectJson = JSON.parse(projectJsonFile);
|
|
1813
1796
|
const projectName2 = projectJson.name;
|
|
1814
1797
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -1817,7 +1800,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0
|
|
|
1817
1800
|
}
|
|
1818
1801
|
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) => {
|
|
1819
1802
|
if (_optionalChain([projectConfigurations, 'access', _96 => _96.projects, 'optionalAccess', _97 => _97[dep]])) {
|
|
1820
|
-
const depPackageJsonPath =
|
|
1803
|
+
const depPackageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
|
|
1821
1804
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
1822
1805
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
1823
1806
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -1845,9 +1828,9 @@ var addPackageDependencies = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0
|
|
|
1845
1828
|
}
|
|
1846
1829
|
return packageJson;
|
|
1847
1830
|
}, "addPackageDependencies");
|
|
1848
|
-
var addWorkspacePackageJsonFields = /* @__PURE__ */
|
|
1849
|
-
const workspaceRoot3 =
|
|
1850
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
1831
|
+
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
1832
|
+
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
|
|
1833
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
1851
1834
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
1852
1835
|
packageJson.type ??= "module";
|
|
1853
1836
|
packageJson.sideEffects ??= false;
|
|
@@ -1856,7 +1839,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call
|
|
|
1856
1839
|
if (distSrc.startsWith("/")) {
|
|
1857
1840
|
distSrc = distSrc.substring(1);
|
|
1858
1841
|
}
|
|
1859
|
-
packageJson.source ??= `${
|
|
1842
|
+
packageJson.source ??= `${_chunk44UHVCK5js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
1860
1843
|
}
|
|
1861
1844
|
packageJson.files ??= [
|
|
1862
1845
|
"dist/**/*"
|
|
@@ -1887,17 +1870,17 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call
|
|
|
1887
1870
|
];
|
|
1888
1871
|
}
|
|
1889
1872
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
1890
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
1873
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk44UHVCK5js.joinPaths.call(void 0, "packages", projectName);
|
|
1891
1874
|
return packageJson;
|
|
1892
1875
|
}, "addWorkspacePackageJsonFields");
|
|
1893
1876
|
|
|
1894
1877
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
1895
|
-
|
|
1878
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1896
1879
|
|
|
1897
1880
|
|
|
1898
1881
|
// ../build-tools/src/utilities/get-env.ts
|
|
1899
|
-
|
|
1900
|
-
var getEnv = /* @__PURE__ */
|
|
1882
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1883
|
+
var getEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (builder, options) => {
|
|
1901
1884
|
return {
|
|
1902
1885
|
STORM_BUILD: builder,
|
|
1903
1886
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
@@ -1911,507 +1894,64 @@ var getEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (builder, opti
|
|
|
1911
1894
|
}, "getEnv");
|
|
1912
1895
|
|
|
1913
1896
|
// ../build-tools/src/utilities/get-file-banner.ts
|
|
1914
|
-
|
|
1897
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1915
1898
|
|
|
1916
1899
|
// ../build-tools/src/utilities/get-out-extension.ts
|
|
1917
|
-
|
|
1900
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1918
1901
|
|
|
1919
1902
|
// ../build-tools/src/utilities/get-project-deps.ts
|
|
1920
|
-
|
|
1903
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1921
1904
|
|
|
1922
1905
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
1923
|
-
|
|
1906
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1924
1907
|
|
|
1925
1908
|
|
|
1926
1909
|
|
|
1927
1910
|
// ../build-tools/src/utilities/task-graph.ts
|
|
1928
|
-
|
|
1911
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1929
1912
|
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
1930
1913
|
|
|
1931
1914
|
// ../esbuild/src/build.ts
|
|
1932
1915
|
var _chokidar = require('chokidar');
|
|
1933
1916
|
|
|
1934
1917
|
var _estoolkit = require('es-toolkit');
|
|
1935
|
-
var
|
|
1936
|
-
var _esbuild = require('esbuild'); var esbuild2 = _interopRequireWildcard(_esbuild); var esbuild = _interopRequireWildcard(_esbuild);
|
|
1918
|
+
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
1937
1919
|
var _globby = require('globby');
|
|
1938
1920
|
|
|
1939
1921
|
|
|
1940
1922
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
1941
|
-
|
|
1942
|
-
// ../esbuild/src/base/renderer-engine.ts
|
|
1943
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
1944
|
-
|
|
1945
|
-
var _sourcemap = require('source-map');
|
|
1946
|
-
|
|
1947
|
-
// ../esbuild/src/utilities/output-file.ts
|
|
1948
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
var outputFile = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, async (filepath, data, options) => {
|
|
1952
|
-
await _fs2.default.promises.mkdir(path6.default.dirname(filepath), {
|
|
1953
|
-
recursive: true
|
|
1954
|
-
});
|
|
1955
|
-
await _fs2.default.promises.writeFile(filepath, data, options);
|
|
1956
|
-
}, "outputFile");
|
|
1957
|
-
|
|
1958
|
-
// ../esbuild/src/base/renderer-engine.ts
|
|
1959
|
-
var parseSourceMap = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (map2) => {
|
|
1960
|
-
return typeof map2 === "string" ? JSON.parse(map2) : map2;
|
|
1961
|
-
}, "parseSourceMap");
|
|
1962
|
-
var isJS = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (path7) => /\.(js|mjs|cjs)$/.test(path7), "isJS");
|
|
1963
|
-
var isCSS = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (path7) => /\.css$/.test(path7), "isCSS");
|
|
1964
|
-
var getSourcemapComment = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (inline, map2, filepath, isCssFile) => {
|
|
1965
|
-
if (!map2) return "";
|
|
1966
|
-
const prefix = isCssFile ? "/*" : "//";
|
|
1967
|
-
const suffix = isCssFile ? " */" : "";
|
|
1968
|
-
const url = inline ? `data:application/json;base64,${Buffer.from(typeof map2 === "string" ? map2 : JSON.stringify(map2)).toString("base64")}` : `${path6.default.basename(filepath)}.map`;
|
|
1969
|
-
return `${prefix}# sourceMappingURL=${url}${suffix}`;
|
|
1970
|
-
}, "getSourcemapComment");
|
|
1971
|
-
var RendererEngine = class {
|
|
1972
|
-
static {
|
|
1973
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, this, "RendererEngine");
|
|
1974
|
-
}
|
|
1975
|
-
#renderers;
|
|
1976
|
-
#options;
|
|
1977
|
-
constructor(renderers) {
|
|
1978
|
-
this.#renderers = renderers;
|
|
1979
|
-
}
|
|
1980
|
-
setOptions(options) {
|
|
1981
|
-
this.#options = options;
|
|
1982
|
-
}
|
|
1983
|
-
getOptions() {
|
|
1984
|
-
if (!this.#options) {
|
|
1985
|
-
throw new Error(`Renderer options is not set`);
|
|
1986
|
-
}
|
|
1987
|
-
return this.#options;
|
|
1988
|
-
}
|
|
1989
|
-
modifyEsbuildOptions(options) {
|
|
1990
|
-
for (const renderer of this.#renderers) {
|
|
1991
|
-
if (renderer.esbuildOptions) {
|
|
1992
|
-
renderer.esbuildOptions.call(this.getOptions(), options);
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
async buildStarted() {
|
|
1997
|
-
for (const renderer of this.#renderers) {
|
|
1998
|
-
if (renderer.buildStart) {
|
|
1999
|
-
await renderer.buildStart.call(this.getOptions());
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
async buildFinished({ outputFiles, metafile }) {
|
|
2004
|
-
const files = outputFiles.filter((file) => !file.path.endsWith(".map")).map((file) => {
|
|
2005
|
-
if (isJS(file.path) || isCSS(file.path)) {
|
|
2006
|
-
let relativePath = path6.default.relative(this.getOptions().config.workspaceRoot, file.path);
|
|
2007
|
-
if (!relativePath.startsWith("\\\\?\\")) {
|
|
2008
|
-
relativePath = relativePath.replace(/\\/g, "/");
|
|
2009
|
-
}
|
|
2010
|
-
const meta = _optionalChain([metafile, 'optionalAccess', _106 => _106.outputs, 'access', _107 => _107[relativePath]]);
|
|
2011
|
-
return {
|
|
2012
|
-
type: "chunk",
|
|
2013
|
-
path: file.path,
|
|
2014
|
-
code: file.text,
|
|
2015
|
-
map: _optionalChain([outputFiles, 'access', _108 => _108.find, 'call', _109 => _109((f) => f.path === `${file.path}.map`), 'optionalAccess', _110 => _110.text]),
|
|
2016
|
-
entryPoint: _optionalChain([meta, 'optionalAccess', _111 => _111.entryPoint]),
|
|
2017
|
-
exports: _optionalChain([meta, 'optionalAccess', _112 => _112.exports]),
|
|
2018
|
-
imports: _optionalChain([meta, 'optionalAccess', _113 => _113.imports])
|
|
2019
|
-
};
|
|
2020
|
-
} else {
|
|
2021
|
-
return {
|
|
2022
|
-
type: "asset",
|
|
2023
|
-
path: file.path,
|
|
2024
|
-
contents: file.contents
|
|
2025
|
-
};
|
|
2026
|
-
}
|
|
2027
|
-
});
|
|
2028
|
-
const writtenFiles = [];
|
|
2029
|
-
await Promise.all(files.map(async (info) => {
|
|
2030
|
-
for (const renderer of this.#renderers) {
|
|
2031
|
-
if (info.type === "chunk" && renderer.renderChunk) {
|
|
2032
|
-
const result = await renderer.renderChunk.call(this.getOptions(), info.code, info);
|
|
2033
|
-
if (result) {
|
|
2034
|
-
info.code = result.code;
|
|
2035
|
-
if (result.map) {
|
|
2036
|
-
const originalConsumer = await new (0, _sourcemap.SourceMapConsumer)(parseSourceMap(info.map));
|
|
2037
|
-
const newConsumer = await new (0, _sourcemap.SourceMapConsumer)(parseSourceMap(result.map));
|
|
2038
|
-
const generator = _sourcemap.SourceMapGenerator.fromSourceMap(newConsumer);
|
|
2039
|
-
generator.applySourceMap(originalConsumer, info.path);
|
|
2040
|
-
info.map = generator.toJSON();
|
|
2041
|
-
originalConsumer.destroy();
|
|
2042
|
-
newConsumer.destroy();
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
const inlineSourceMap = this.#options.sourcemap === "inline";
|
|
2048
|
-
const contents = info.type === "chunk" ? info.code + getSourcemapComment(inlineSourceMap, info.map, info.path, isCSS(info.path)) : info.contents;
|
|
2049
|
-
await outputFile(info.path, contents, {
|
|
2050
|
-
mode: info.type === "chunk" ? info.mode : void 0
|
|
2051
|
-
});
|
|
2052
|
-
writtenFiles.push({
|
|
2053
|
-
get name() {
|
|
2054
|
-
return path6.default.relative(process.cwd(), info.path);
|
|
2055
|
-
},
|
|
2056
|
-
get size() {
|
|
2057
|
-
return contents.length;
|
|
2058
|
-
}
|
|
2059
|
-
});
|
|
2060
|
-
if (info.type === "chunk" && info.map && !inlineSourceMap) {
|
|
2061
|
-
const map2 = typeof info.map === "string" ? JSON.parse(info.map) : info.map;
|
|
2062
|
-
const outPath = `${info.path}.map`;
|
|
2063
|
-
const contents2 = JSON.stringify(map2);
|
|
2064
|
-
await outputFile(outPath, contents2);
|
|
2065
|
-
writtenFiles.push({
|
|
2066
|
-
get name() {
|
|
2067
|
-
return path6.default.relative(process.cwd(), outPath);
|
|
2068
|
-
},
|
|
2069
|
-
get size() {
|
|
2070
|
-
return contents2.length;
|
|
2071
|
-
}
|
|
2072
|
-
});
|
|
2073
|
-
}
|
|
2074
|
-
}));
|
|
2075
|
-
for (const renderer of this.#renderers) {
|
|
2076
|
-
if (renderer.buildEnd) {
|
|
2077
|
-
await renderer.buildEnd.call(this.getOptions(), {
|
|
2078
|
-
writtenFiles
|
|
2079
|
-
});
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
};
|
|
1923
|
+
var _tsup = require('tsup');
|
|
2084
1924
|
|
|
2085
1925
|
// ../esbuild/src/clean.ts
|
|
2086
|
-
|
|
1926
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
2087
1927
|
|
|
2088
|
-
async function cleanDirectories(
|
|
1928
|
+
async function cleanDirectories(directory) {
|
|
2089
1929
|
await _promises.rm.call(void 0, directory, {
|
|
2090
1930
|
recursive: true,
|
|
2091
1931
|
force: true
|
|
2092
1932
|
});
|
|
2093
1933
|
}
|
|
2094
|
-
|
|
1934
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
2095
1935
|
|
|
2096
1936
|
// ../esbuild/src/config.ts
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
// ../esbuild/src/plugins/esm-split-code-to-cjs.ts
|
|
2100
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2101
|
-
|
|
2102
|
-
var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2103
|
-
name: "storm:esm-split-code-to-cjs",
|
|
2104
|
-
setup(build4) {
|
|
2105
|
-
build4.onEnd(async (result) => {
|
|
2106
|
-
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _114 => _114.metafile, 'optionalAccess', _115 => _115.outputs]), () => ( {})));
|
|
2107
|
-
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
2108
|
-
await esbuild.build({
|
|
2109
|
-
outdir: resolvedOptions.outdir,
|
|
2110
|
-
entryPoints: jsFiles,
|
|
2111
|
-
allowOverwrite: true,
|
|
2112
|
-
format: "cjs",
|
|
2113
|
-
logLevel: "error",
|
|
2114
|
-
packages: "external"
|
|
2115
|
-
});
|
|
2116
|
-
});
|
|
2117
|
-
}
|
|
2118
|
-
}), "esmSplitCodeToCjsPlugin");
|
|
2119
|
-
|
|
2120
|
-
// ../esbuild/src/plugins/fix-imports.ts
|
|
2121
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2122
|
-
var fixImportsPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2123
|
-
name: "storm:fix-imports",
|
|
2124
|
-
setup(build4) {
|
|
2125
|
-
build4.onResolve({
|
|
2126
|
-
filter: /^spdx-exceptions/
|
|
2127
|
-
}, () => {
|
|
2128
|
-
return {
|
|
2129
|
-
path: _chunkZG2OCU4Fjs.__require.resolve("spdx-exceptions")
|
|
2130
|
-
};
|
|
2131
|
-
});
|
|
2132
|
-
build4.onResolve({
|
|
2133
|
-
filter: /^spdx-license-ids/
|
|
2134
|
-
}, () => {
|
|
2135
|
-
return {
|
|
2136
|
-
path: _chunkZG2OCU4Fjs.__require.resolve("spdx-license-ids")
|
|
2137
|
-
};
|
|
2138
|
-
});
|
|
2139
|
-
}
|
|
2140
|
-
}), "fixImportsPlugin");
|
|
2141
|
-
|
|
2142
|
-
// ../esbuild/src/plugins/native-node-module.ts
|
|
2143
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2144
|
-
|
|
2145
|
-
var nativeNodeModulesPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (options, resolvedOptions) => {
|
|
2146
|
-
return {
|
|
2147
|
-
name: "native-node-modules",
|
|
2148
|
-
setup(build4) {
|
|
2149
|
-
build4.onResolve({
|
|
2150
|
-
filter: /\.node$/,
|
|
2151
|
-
namespace: "file"
|
|
2152
|
-
}, (args) => {
|
|
2153
|
-
const resolvedId = _chunkZG2OCU4Fjs.__require.resolve(args.path, {
|
|
2154
|
-
paths: [
|
|
2155
|
-
args.resolveDir
|
|
2156
|
-
]
|
|
2157
|
-
});
|
|
2158
|
-
if (resolvedId.endsWith(".node")) {
|
|
2159
|
-
return {
|
|
2160
|
-
path: resolvedId,
|
|
2161
|
-
namespace: "node-file"
|
|
2162
|
-
};
|
|
2163
|
-
}
|
|
2164
|
-
return {
|
|
2165
|
-
path: resolvedId
|
|
2166
|
-
};
|
|
2167
|
-
});
|
|
2168
|
-
build4.onLoad({
|
|
2169
|
-
filter: /.*/,
|
|
2170
|
-
namespace: "node-file"
|
|
2171
|
-
}, (args) => {
|
|
2172
|
-
return {
|
|
2173
|
-
contents: `
|
|
2174
|
-
import path from ${JSON.stringify(args.path)}
|
|
2175
|
-
try { module.exports = require(path) }
|
|
2176
|
-
catch {}
|
|
2177
|
-
`,
|
|
2178
|
-
resolveDir: _path.dirname.call(void 0, args.path)
|
|
2179
|
-
};
|
|
2180
|
-
});
|
|
2181
|
-
build4.onResolve({
|
|
2182
|
-
filter: /\.node$/,
|
|
2183
|
-
namespace: "node-file"
|
|
2184
|
-
}, (args) => ({
|
|
2185
|
-
path: args.path,
|
|
2186
|
-
namespace: "file"
|
|
2187
|
-
}));
|
|
2188
|
-
const opts = build4.initialOptions;
|
|
2189
|
-
opts.loader = opts.loader || {};
|
|
2190
|
-
opts.loader[".node"] = "file";
|
|
2191
|
-
}
|
|
2192
|
-
};
|
|
2193
|
-
}, "nativeNodeModulesPlugin");
|
|
2194
|
-
|
|
2195
|
-
// ../esbuild/src/plugins/node-protocol.ts
|
|
2196
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2197
|
-
var nodeProtocolPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (options, resolvedOptions) => {
|
|
2198
|
-
const nodeProtocol = "node:";
|
|
2199
|
-
return {
|
|
2200
|
-
name: "node-protocol-plugin",
|
|
2201
|
-
setup({ onResolve }) {
|
|
2202
|
-
onResolve({
|
|
2203
|
-
filter: /^node:/
|
|
2204
|
-
}, ({ path: path7 }) => ({
|
|
2205
|
-
path: path7.slice(nodeProtocol.length),
|
|
2206
|
-
external: true
|
|
2207
|
-
}));
|
|
2208
|
-
}
|
|
2209
|
-
};
|
|
2210
|
-
}, "nodeProtocolPlugin");
|
|
2211
|
-
|
|
2212
|
-
// ../esbuild/src/plugins/on-error.ts
|
|
2213
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2214
|
-
var onErrorPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2215
|
-
name: "storm:on-error",
|
|
2216
|
-
setup(build4) {
|
|
2217
|
-
build4.onEnd((result) => {
|
|
2218
|
-
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
2219
|
-
writeError(`The following errors occurred during the build:
|
|
2220
|
-
${result.errors.map((error) => error.text).join("\n")}
|
|
2221
|
-
|
|
2222
|
-
`, resolvedOptions.config);
|
|
2223
|
-
throw new Error("Storm esbuild process failed with errors.");
|
|
2224
|
-
}
|
|
2225
|
-
});
|
|
2226
|
-
}
|
|
2227
|
-
}), "onErrorPlugin");
|
|
2228
|
-
|
|
2229
|
-
// ../esbuild/src/plugins/resolve-paths.ts
|
|
2230
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2231
|
-
|
|
2232
|
-
function resolvePathsConfig(options, cwd) {
|
|
2233
|
-
if (_optionalChain([options, 'optionalAccess', _116 => _116.compilerOptions, 'optionalAccess', _117 => _117.paths])) {
|
|
2234
|
-
const paths = Object.entries(options.compilerOptions.paths);
|
|
2235
|
-
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
2236
|
-
return [
|
|
2237
|
-
key,
|
|
2238
|
-
paths2.map((v) => path6.default.resolve(cwd, v))
|
|
2239
|
-
];
|
|
2240
|
-
});
|
|
2241
|
-
return Object.fromEntries(resolvedPaths);
|
|
2242
|
-
}
|
|
2243
|
-
if (options.extends) {
|
|
2244
|
-
const extendsPath = path6.default.resolve(cwd, options.extends);
|
|
2245
|
-
const extendsDir = path6.default.dirname(extendsPath);
|
|
2246
|
-
const extendsConfig = _chunkZG2OCU4Fjs.__require.call(void 0, extendsPath);
|
|
2247
|
-
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
2248
|
-
}
|
|
2249
|
-
return [];
|
|
2250
|
-
}
|
|
2251
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
2252
|
-
var resolvePathsPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2253
|
-
name: "storm:resolve-paths",
|
|
2254
|
-
setup(build4) {
|
|
2255
|
-
const parentTsConfig = build4.initialOptions.tsconfig ? _chunkZG2OCU4Fjs.__require.call(void 0, _chunkZOWG3HASjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : _chunkZG2OCU4Fjs.__require.call(void 0, _chunkZOWG3HASjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
2256
|
-
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
2257
|
-
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
2258
|
-
build4.onResolve({
|
|
2259
|
-
filter: packagesRegex
|
|
2260
|
-
}, (args) => {
|
|
2261
|
-
if (_optionalChain([build4, 'access', _118 => _118.initialOptions, 'access', _119 => _119.external, 'optionalAccess', _120 => _120.includes, 'call', _121 => _121(args.path)])) {
|
|
2262
|
-
return {
|
|
2263
|
-
path: args.path,
|
|
2264
|
-
external: true
|
|
2265
|
-
};
|
|
2266
|
-
}
|
|
2267
|
-
return {
|
|
2268
|
-
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
2269
|
-
};
|
|
2270
|
-
});
|
|
2271
|
-
}
|
|
2272
|
-
}), "resolvePathsPlugin");
|
|
2273
|
-
|
|
2274
|
-
// ../esbuild/src/plugins/tsc.ts
|
|
2275
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2276
|
-
var _apiextractor = require('@microsoft/api-extractor');
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
2280
|
-
const { dependencies, peerDependencies, devDependencies } = _chunkZG2OCU4Fjs.__require.call(void 0, _chunkZOWG3HASjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
2281
|
-
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
2282
|
-
p,
|
|
2283
|
-
getTypeDependencyPackageName(p)
|
|
2284
|
-
]);
|
|
2285
|
-
const peerDependenciesKeys = Object.keys(_nullishCoalesce(peerDependencies, () => ( {}))).flatMap((p) => [
|
|
2286
|
-
p,
|
|
2287
|
-
getTypeDependencyPackageName(p)
|
|
2288
|
-
]);
|
|
2289
|
-
const devDependenciesKeys = Object.keys(_nullishCoalesce(devDependencies, () => ( {}))).flatMap((p) => [
|
|
2290
|
-
p,
|
|
2291
|
-
getTypeDependencyPackageName(p)
|
|
2292
|
-
]);
|
|
2293
|
-
const includeDeps = devDependenciesKeys;
|
|
2294
|
-
const excludeDeps = /* @__PURE__ */ new Set([
|
|
2295
|
-
...dependenciesKeys,
|
|
2296
|
-
...peerDependenciesKeys,
|
|
2297
|
-
...externals
|
|
2298
|
-
]);
|
|
2299
|
-
const bundledPackages = includeDeps.filter((dep) => !excludeDeps.has(dep));
|
|
2300
|
-
const extractorConfig = _apiextractor.ExtractorConfig.prepare({
|
|
2301
|
-
configObject: {
|
|
2302
|
-
projectFolder: options.projectRoot,
|
|
2303
|
-
mainEntryPointFilePath: filename,
|
|
2304
|
-
bundledPackages,
|
|
2305
|
-
compiler: {
|
|
2306
|
-
tsconfigFilePath: options.tsconfig,
|
|
2307
|
-
overrideTsconfig: {
|
|
2308
|
-
compilerOptions: {
|
|
2309
|
-
paths: {}
|
|
2310
|
-
// bug with api extract + paths
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
},
|
|
2314
|
-
dtsRollup: {
|
|
2315
|
-
enabled: true,
|
|
2316
|
-
untrimmedFilePath: _chunkZOWG3HASjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
2317
|
-
},
|
|
2318
|
-
tsdocMetadata: {
|
|
2319
|
-
enabled: false
|
|
2320
|
-
}
|
|
2321
|
-
},
|
|
2322
|
-
packageJsonFullPath: _chunkZOWG3HASjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
2323
|
-
configObjectFullPath: void 0
|
|
2324
|
-
});
|
|
2325
|
-
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
2326
|
-
showVerboseMessages: true,
|
|
2327
|
-
localBuild: true
|
|
2328
|
-
});
|
|
2329
|
-
if (extractorResult.succeeded === false) {
|
|
2330
|
-
writeError(`API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
2331
|
-
throw new Error("API Extractor completed with errors");
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, bundleTypeDefinitions, "bundleTypeDefinitions");
|
|
2335
|
-
var tscPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2336
|
-
name: "storm:tsc",
|
|
2337
|
-
setup(build4) {
|
|
2338
|
-
if (options.dts === false) {
|
|
2339
|
-
return;
|
|
2340
|
-
}
|
|
2341
|
-
build4.onStart(async () => {
|
|
2342
|
-
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
2343
|
-
await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
2344
|
-
}
|
|
2345
|
-
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && _optionalChain([resolvedOptions, 'access', _122 => _122.entryPoints, 'access', _123 => _123[0], 'optionalAccess', _124 => _124.in]) && resolvedOptions.entryPoints[0].in.endsWith(".ts")) {
|
|
2346
|
-
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
2347
|
-
const typeOutDir = resolvedOptions.outdir;
|
|
2348
|
-
const entryPoint = resolvedOptions.entryPoints[0].in.replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
2349
|
-
const bundlePath = _chunkZOWG3HASjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
2350
|
-
let dtsPath;
|
|
2351
|
-
if (_fs.existsSync.call(void 0, _chunkZOWG3HASjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
2352
|
-
dtsPath = _chunkZOWG3HASjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
2353
|
-
} else if (_fs.existsSync.call(void 0, _chunkZOWG3HASjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
2354
|
-
dtsPath = _chunkZOWG3HASjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
2355
|
-
}
|
|
2356
|
-
const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
2357
|
-
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
2358
|
-
bundleTypeDefinitions(dtsPath, bundlePath, _nullishCoalesce(resolvedOptions.external, () => ( [])), resolvedOptions);
|
|
2359
|
-
const dtsContents = await _promises2.default.readFile(`${bundlePath}.d.ts`, "utf8");
|
|
2360
|
-
await _promises2.default.writeFile(`${bundlePath}.${ext}`, dtsContents);
|
|
2361
|
-
} else {
|
|
2362
|
-
await _promises2.default.writeFile(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
|
|
2363
|
-
}
|
|
2364
|
-
}
|
|
2365
|
-
});
|
|
2366
|
-
}
|
|
2367
|
-
}), "tscPlugin");
|
|
2368
|
-
function getTypeDependencyPackageName(npmPackage) {
|
|
2369
|
-
if (npmPackage.startsWith("@")) {
|
|
2370
|
-
const [scope, name] = npmPackage.split("/");
|
|
2371
|
-
return `@types/${_optionalChain([scope, 'optionalAccess', _125 => _125.slice, 'call', _126 => _126(1)])}__${name}`;
|
|
2372
|
-
}
|
|
2373
|
-
return `@types/${npmPackage}`;
|
|
2374
|
-
}
|
|
2375
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, getTypeDependencyPackageName, "getTypeDependencyPackageName");
|
|
2376
|
-
|
|
2377
|
-
// ../esbuild/src/config.ts
|
|
2378
|
-
var getDefaultBuildPlugins = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (options, resolvedOptions) => [
|
|
2379
|
-
nodeProtocolPlugin(options, resolvedOptions),
|
|
2380
|
-
resolvePathsPlugin(options, resolvedOptions),
|
|
2381
|
-
fixImportsPlugin(options, resolvedOptions),
|
|
2382
|
-
nativeNodeModulesPlugin(options, resolvedOptions),
|
|
2383
|
-
esmSplitCodeToCjsPlugin(options, resolvedOptions),
|
|
2384
|
-
tscPlugin(options, resolvedOptions),
|
|
2385
|
-
onErrorPlugin(options, resolvedOptions)
|
|
2386
|
-
], "getDefaultBuildPlugins");
|
|
1937
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
2387
1938
|
var DEFAULT_BUILD_OPTIONS = {
|
|
1939
|
+
assets: [],
|
|
2388
1940
|
platform: "node",
|
|
2389
|
-
target:
|
|
1941
|
+
target: [
|
|
1942
|
+
"esnext"
|
|
1943
|
+
],
|
|
2390
1944
|
format: "esm",
|
|
2391
|
-
external: [],
|
|
2392
|
-
logLevel: "error",
|
|
2393
1945
|
tsconfig: "tsconfig.json",
|
|
2394
1946
|
mode: "production",
|
|
1947
|
+
generatePackageJson: true,
|
|
1948
|
+
includeSrc: false,
|
|
2395
1949
|
keepNames: true,
|
|
2396
|
-
metafile:
|
|
2397
|
-
|
|
2398
|
-
|
|
1950
|
+
metafile: false,
|
|
1951
|
+
treeshake: true,
|
|
1952
|
+
shims: false,
|
|
2399
1953
|
watch: false,
|
|
2400
1954
|
bundle: true,
|
|
2401
|
-
clean: true,
|
|
2402
|
-
debug: false,
|
|
2403
|
-
resolveExtensions: [
|
|
2404
|
-
".tsx",
|
|
2405
|
-
".ts",
|
|
2406
|
-
".cts",
|
|
2407
|
-
".mts",
|
|
2408
|
-
".jsx",
|
|
2409
|
-
".js",
|
|
2410
|
-
".cjs",
|
|
2411
|
-
".mjs",
|
|
2412
|
-
".css",
|
|
2413
|
-
".json"
|
|
2414
|
-
],
|
|
2415
1955
|
loader: {
|
|
2416
1956
|
".aac": "file",
|
|
2417
1957
|
".css": "file",
|
|
@@ -2433,11 +1973,14 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
2433
1973
|
".woff": "file",
|
|
2434
1974
|
".woff2": "file"
|
|
2435
1975
|
},
|
|
2436
|
-
banner:
|
|
1976
|
+
banner: {
|
|
1977
|
+
js: DEFAULT_COMPILED_BANNER,
|
|
1978
|
+
css: DEFAULT_COMPILED_BANNER
|
|
1979
|
+
}
|
|
2437
1980
|
};
|
|
2438
1981
|
|
|
2439
1982
|
// ../esbuild/src/plugins/deps-check.ts
|
|
2440
|
-
|
|
1983
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
2441
1984
|
|
|
2442
1985
|
|
|
2443
1986
|
var unusedIgnore = [
|
|
@@ -2469,11 +2012,11 @@ var missingIgnore = [
|
|
|
2469
2012
|
"@prisma/client",
|
|
2470
2013
|
"ts-toolbelt"
|
|
2471
2014
|
];
|
|
2472
|
-
var depsCheckPlugin = /* @__PURE__ */
|
|
2015
|
+
var depsCheckPlugin = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (bundle) => ({
|
|
2473
2016
|
name: "storm:deps-check",
|
|
2474
|
-
setup(
|
|
2475
|
-
const pkgJsonPath =
|
|
2476
|
-
const pkgContents =
|
|
2017
|
+
setup(build3) {
|
|
2018
|
+
const pkgJsonPath = path3.default.join(process.cwd(), "package.json");
|
|
2019
|
+
const pkgContents = _chunkBBEYLIXNjs.__require.call(void 0, pkgJsonPath);
|
|
2477
2020
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
2478
2021
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
2479
2022
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -2483,7 +2026,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (bund
|
|
|
2483
2026
|
];
|
|
2484
2027
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2485
2028
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2486
|
-
|
|
2029
|
+
build3.onResolve({
|
|
2487
2030
|
filter: onlyPackages
|
|
2488
2031
|
}, (args) => {
|
|
2489
2032
|
if (args.importer.includes(process.cwd())) {
|
|
@@ -2499,7 +2042,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (bund
|
|
|
2499
2042
|
external: true
|
|
2500
2043
|
};
|
|
2501
2044
|
});
|
|
2502
|
-
|
|
2045
|
+
build3.onEnd(() => {
|
|
2503
2046
|
const unusedDependencies = [
|
|
2504
2047
|
...dependencies
|
|
2505
2048
|
].filter((dep) => {
|
|
@@ -2527,395 +2070,53 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
2527
2070
|
}
|
|
2528
2071
|
}), "depsCheckPlugin");
|
|
2529
2072
|
|
|
2530
|
-
// ../esbuild/src/renderers/shebang.ts
|
|
2531
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2532
|
-
var shebangRenderer = {
|
|
2533
|
-
name: "shebang",
|
|
2534
|
-
renderChunk(_, __, info) {
|
|
2535
|
-
if (info.type === "chunk" && /\.(cjs|js|mjs)$/.test(info.path) && info.code.startsWith("#!")) {
|
|
2536
|
-
info.mode = 493;
|
|
2537
|
-
}
|
|
2538
|
-
}
|
|
2539
|
-
};
|
|
2540
|
-
|
|
2541
|
-
// ../esbuild/src/tsc.ts
|
|
2542
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2543
|
-
var _bundlerequire = require('bundle-require');
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
|
|
2548
|
-
function ensureTempDeclarationDir(workspaceConfig) {
|
|
2549
|
-
const root = workspaceConfig.directories.temp || _path.join.call(void 0, workspaceConfig.workspaceRoot, "tmp");
|
|
2550
|
-
const dirPath = _path.join.call(void 0, root, ".tsc", "declaration");
|
|
2551
|
-
if (_fs.existsSync.call(void 0, dirPath)) {
|
|
2552
|
-
return dirPath;
|
|
2553
|
-
}
|
|
2554
|
-
_fs.mkdirSync.call(void 0, dirPath, {
|
|
2555
|
-
recursive: true
|
|
2556
|
-
});
|
|
2557
|
-
const gitIgnorePath = _path.join.call(void 0, root, ".tsc", ".gitignore");
|
|
2558
|
-
_fs.writeFileSync.call(void 0, gitIgnorePath, "**/*\n");
|
|
2559
|
-
return dirPath;
|
|
2560
|
-
}
|
|
2561
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, ensureTempDeclarationDir, "ensureTempDeclarationDir");
|
|
2562
|
-
function slash(path7) {
|
|
2563
|
-
const isExtendedLengthPath = path7.startsWith("\\\\?\\");
|
|
2564
|
-
if (isExtendedLengthPath) {
|
|
2565
|
-
return path7;
|
|
2566
|
-
}
|
|
2567
|
-
return path7.replace(/\\/g, "/");
|
|
2568
|
-
}
|
|
2569
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, slash, "slash");
|
|
2570
|
-
function toAbsolutePath(workspaceConfig, p, cwd) {
|
|
2571
|
-
if (_path.isAbsolute.call(void 0, p)) {
|
|
2572
|
-
return p;
|
|
2573
|
-
}
|
|
2574
|
-
return slash(_path.normalize.call(void 0, _path.join.call(void 0, cwd || workspaceConfig.workspaceRoot, p)));
|
|
2575
|
-
}
|
|
2576
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, toAbsolutePath, "toAbsolutePath");
|
|
2577
|
-
var AliasPool = (_class = class AliasPool2 {constructor() { _class.prototype.__init.call(this); }
|
|
2578
|
-
static {
|
|
2579
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, this, "AliasPool");
|
|
2580
|
-
}
|
|
2581
|
-
__init() {this.seen = /* @__PURE__ */ new Set()}
|
|
2582
|
-
assign(name) {
|
|
2583
|
-
let suffix = 0;
|
|
2584
|
-
let alias = name === "default" ? "default_alias" : name;
|
|
2585
|
-
while (this.seen.has(alias)) {
|
|
2586
|
-
alias = `${name}_alias_${++suffix}`;
|
|
2587
|
-
if (suffix >= 1e3) {
|
|
2588
|
-
throw new Error("Alias generation exceeded limit. Possible infinite loop detected.");
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
this.seen.add(alias);
|
|
2592
|
-
return alias;
|
|
2593
|
-
}
|
|
2594
|
-
}, _class);
|
|
2595
|
-
function getExports(workspaceConfig, program, fileMapping) {
|
|
2596
|
-
const checker = program.getTypeChecker();
|
|
2597
|
-
const aliasPool = new AliasPool();
|
|
2598
|
-
const assignAlias = aliasPool.assign.bind(aliasPool);
|
|
2599
|
-
function extractExports(sourceFileName) {
|
|
2600
|
-
const cwd = program.getCurrentDirectory();
|
|
2601
|
-
sourceFileName = toAbsolutePath(workspaceConfig, sourceFileName, cwd);
|
|
2602
|
-
const sourceFile = program.getSourceFile(sourceFileName);
|
|
2603
|
-
if (!sourceFile) {
|
|
2604
|
-
return [];
|
|
2605
|
-
}
|
|
2606
|
-
const destFileName = fileMapping.get(sourceFileName);
|
|
2607
|
-
if (!destFileName) {
|
|
2608
|
-
return [];
|
|
2609
|
-
}
|
|
2610
|
-
const moduleSymbol = checker.getSymbolAtLocation(sourceFile);
|
|
2611
|
-
if (!moduleSymbol) {
|
|
2612
|
-
return [];
|
|
2613
|
-
}
|
|
2614
|
-
const exports = [];
|
|
2615
|
-
const exportSymbols = checker.getExportsOfModule(moduleSymbol);
|
|
2616
|
-
exportSymbols.forEach((symbol) => {
|
|
2617
|
-
const name = symbol.getName();
|
|
2618
|
-
exports.push({
|
|
2619
|
-
kind: "named",
|
|
2620
|
-
sourceFileName,
|
|
2621
|
-
destFileName,
|
|
2622
|
-
name,
|
|
2623
|
-
alias: assignAlias(name),
|
|
2624
|
-
isTypeOnly: false
|
|
2625
|
-
});
|
|
2626
|
-
});
|
|
2627
|
-
return exports;
|
|
2628
|
-
}
|
|
2629
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, extractExports, "extractExports");
|
|
2630
|
-
return program.getRootFileNames().flatMap(extractExports);
|
|
2631
|
-
}
|
|
2632
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, getExports, "getExports");
|
|
2633
|
-
function emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles = true, customTransformers) {
|
|
2634
|
-
const fileMapping = /* @__PURE__ */ new Map();
|
|
2635
|
-
const writeFile3 = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
2636
|
-
const sourceFile = _optionalChain([sourceFiles, 'optionalAccess', _127 => _127[0]]);
|
|
2637
|
-
const sourceFileName = _optionalChain([sourceFile, 'optionalAccess', _128 => _128.fileName]);
|
|
2638
|
-
if (sourceFileName && !fileName.endsWith(".map")) {
|
|
2639
|
-
const cwd = program.getCurrentDirectory();
|
|
2640
|
-
fileMapping.set(toAbsolutePath(workspaceConfig, sourceFileName, cwd), toAbsolutePath(workspaceConfig, fileName, cwd));
|
|
2641
|
-
}
|
|
2642
|
-
return host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
2643
|
-
}, "writeFile");
|
|
2644
|
-
const emitResult = program.emit(void 0, writeFile3, void 0, emitOnlyDtsFiles, customTransformers);
|
|
2645
|
-
const diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
2646
|
-
const diagnosticMessages = [];
|
|
2647
|
-
diagnostics.forEach((diagnostic) => {
|
|
2648
|
-
if (diagnostic.file) {
|
|
2649
|
-
const { line, character } = _typescript2.default.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
|
|
2650
|
-
const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
2651
|
-
diagnosticMessages.push(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
|
2652
|
-
} else {
|
|
2653
|
-
const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
2654
|
-
diagnosticMessages.push(message);
|
|
2655
|
-
}
|
|
2656
|
-
});
|
|
2657
|
-
const diagnosticMessage = diagnosticMessages.join("\n");
|
|
2658
|
-
if (diagnosticMessage) {
|
|
2659
|
-
writeError(`Failed to emit declaration files.
|
|
2660
|
-
|
|
2661
|
-
${diagnosticMessage}`, workspaceConfig);
|
|
2662
|
-
throw new Error("TypeScript compilation failed");
|
|
2663
|
-
}
|
|
2664
|
-
return fileMapping;
|
|
2665
|
-
}
|
|
2666
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, emitDtsFiles, "emitDtsFiles");
|
|
2667
|
-
function emitDts(workspaceConfig, tsconfig, tsconfigRaw, emitOnlyDtsFiles = true, customTransformers) {
|
|
2668
|
-
const rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, workspaceConfig.workspaceRoot, tsconfig);
|
|
2669
|
-
if (!rawTsconfig) {
|
|
2670
|
-
throw new Error(`Unable to find ${tsconfig || "tsconfig.json"} in ${workspaceConfig.workspaceRoot}`);
|
|
2671
|
-
}
|
|
2672
|
-
const declarationDir = ensureTempDeclarationDir(workspaceConfig);
|
|
2673
|
-
const parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(_defu2.default.call(void 0, {
|
|
2674
|
-
compilerOptions: {
|
|
2675
|
-
// Enable declaration emit and disable javascript emit
|
|
2676
|
-
noEmit: false,
|
|
2677
|
-
declaration: true,
|
|
2678
|
-
declarationMap: true,
|
|
2679
|
-
declarationDir,
|
|
2680
|
-
emitDeclarationOnly: true
|
|
2681
|
-
}
|
|
2682
|
-
}, _nullishCoalesce(_optionalChain([tsconfigRaw, 'optionalAccess', _129 => _129.compilerOptions]), () => ( {})), _nullishCoalesce(rawTsconfig.data, () => ( {}))), _typescript2.default.sys, tsconfig ? _path.dirname.call(void 0, tsconfig) : "./");
|
|
2683
|
-
const options = parsedTsconfig.options;
|
|
2684
|
-
const host = _typescript2.default.createCompilerHost(options);
|
|
2685
|
-
const program = _typescript2.default.createProgram(parsedTsconfig.fileNames, options, host);
|
|
2686
|
-
const fileMapping = emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles, customTransformers);
|
|
2687
|
-
return getExports(workspaceConfig, program, fileMapping);
|
|
2688
|
-
}
|
|
2689
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, emitDts, "emitDts");
|
|
2690
|
-
|
|
2691
|
-
// ../esbuild/src/utilities/get-entry-points.ts
|
|
2692
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2693
|
-
|
|
2694
|
-
var getEntryPoints = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
2695
|
-
const workspaceRoot3 = config.workspaceRoot || findWorkspaceRoot();
|
|
2696
|
-
const entryPoints = [];
|
|
2697
|
-
if (entry) {
|
|
2698
|
-
if (typeof entry === "string") {
|
|
2699
|
-
entryPoints.push({
|
|
2700
|
-
in: entry,
|
|
2701
|
-
out: entry
|
|
2702
|
-
});
|
|
2703
|
-
} else if (Array.isArray(entry)) {
|
|
2704
|
-
entryPoints.push(...entry.map((entry2) => ({
|
|
2705
|
-
in: entry2,
|
|
2706
|
-
out: entry2
|
|
2707
|
-
})));
|
|
2708
|
-
} else {
|
|
2709
|
-
entryPoints.push(...Object.entries(entry).map(([key, value]) => {
|
|
2710
|
-
if (typeof value === "string") {
|
|
2711
|
-
return {
|
|
2712
|
-
in: value,
|
|
2713
|
-
out: key
|
|
2714
|
-
};
|
|
2715
|
-
} else {
|
|
2716
|
-
return {
|
|
2717
|
-
in: key,
|
|
2718
|
-
out: key
|
|
2719
|
-
};
|
|
2720
|
-
}
|
|
2721
|
-
}));
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2724
|
-
if (emitOnAll) {
|
|
2725
|
-
entryPoints.push({
|
|
2726
|
-
in: _chunkZOWG3HASjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"),
|
|
2727
|
-
out: _chunkZOWG3HASjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}")
|
|
2728
|
-
});
|
|
2729
|
-
}
|
|
2730
|
-
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
2731
|
-
const paths = [];
|
|
2732
|
-
if (entryPoint.in.includes("*")) {
|
|
2733
|
-
const files = await _glob.glob.call(void 0, entryPoint.in, {
|
|
2734
|
-
withFileTypes: true,
|
|
2735
|
-
ignore: [
|
|
2736
|
-
"**/node_modules/**"
|
|
2737
|
-
]
|
|
2738
|
-
});
|
|
2739
|
-
paths.push(...files.reduce((ret, filePath) => {
|
|
2740
|
-
const result = _chunkZOWG3HASjs.correctPaths.call(void 0, _chunkZOWG3HASjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkZOWG3HASjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkZOWG3HASjs.correctPaths.call(void 0, projectRoot), ""));
|
|
2741
|
-
if (result) {
|
|
2742
|
-
writeDebug(`Trying to add entry point ${result} at "${_chunkZOWG3HASjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
2743
|
-
if (!paths.some((p) => p.in === result)) {
|
|
2744
|
-
paths.push({
|
|
2745
|
-
in: result,
|
|
2746
|
-
out: entryPoint.out.replace(entryPoint.in, result)
|
|
2747
|
-
});
|
|
2748
|
-
}
|
|
2749
|
-
}
|
|
2750
|
-
return ret;
|
|
2751
|
-
}, []));
|
|
2752
|
-
} else {
|
|
2753
|
-
writeDebug(`Adding ESBuild entry point
|
|
2754
|
-
- Input: ${entryPoint.in}
|
|
2755
|
-
- Output: ${entryPoint.out}`, config);
|
|
2756
|
-
if (!paths.some((p) => p.out === entryPoint.out)) {
|
|
2757
|
-
paths.push(entryPoint);
|
|
2758
|
-
}
|
|
2759
|
-
}
|
|
2760
|
-
return paths;
|
|
2761
|
-
}));
|
|
2762
|
-
return results.filter(Boolean).reduce((ret, result) => {
|
|
2763
|
-
result.forEach((res) => {
|
|
2764
|
-
if (res && !ret.some((p) => p.in === res.in)) {
|
|
2765
|
-
ret.push(res);
|
|
2766
|
-
}
|
|
2767
|
-
});
|
|
2768
|
-
return ret;
|
|
2769
|
-
}, []);
|
|
2770
|
-
}, "getEntryPoints");
|
|
2771
|
-
|
|
2772
|
-
// ../esbuild/src/utilities/helpers.ts
|
|
2773
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
2774
|
-
function handleSync(fn) {
|
|
2775
|
-
try {
|
|
2776
|
-
return fn();
|
|
2777
|
-
} catch (error_) {
|
|
2778
|
-
return error_;
|
|
2779
|
-
}
|
|
2780
|
-
}
|
|
2781
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, handleSync, "handleSync");
|
|
2782
|
-
async function handleAsync(fn) {
|
|
2783
|
-
try {
|
|
2784
|
-
return await fn();
|
|
2785
|
-
} catch (error_) {
|
|
2786
|
-
return error_;
|
|
2787
|
-
}
|
|
2788
|
-
}
|
|
2789
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, handleAsync, "handleAsync");
|
|
2790
|
-
var handle = handleSync;
|
|
2791
|
-
handle.async = handleAsync;
|
|
2792
|
-
var skip = Symbol("skip");
|
|
2793
|
-
function transduceSync(list, transformer) {
|
|
2794
|
-
const transduced = [];
|
|
2795
|
-
for (const [i, element_] of list.entries()) {
|
|
2796
|
-
const transformed = transformer(element_, i);
|
|
2797
|
-
if (transformed !== skip) {
|
|
2798
|
-
transduced[transduced.length] = transformed;
|
|
2799
|
-
}
|
|
2800
|
-
}
|
|
2801
|
-
return transduced;
|
|
2802
|
-
}
|
|
2803
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, transduceSync, "transduceSync");
|
|
2804
|
-
async function transduceAsync(list, transformer) {
|
|
2805
|
-
const transduced = [];
|
|
2806
|
-
await Promise.all(list.entries().map(async ([i, element_]) => {
|
|
2807
|
-
const transformed = await transformer(element_, i);
|
|
2808
|
-
if (transformed !== skip) {
|
|
2809
|
-
transduced[transduced.length] = transformed;
|
|
2810
|
-
}
|
|
2811
|
-
}));
|
|
2812
|
-
return transduced;
|
|
2813
|
-
}
|
|
2814
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, transduceAsync, "transduceAsync");
|
|
2815
|
-
var transduce = transduceSync;
|
|
2816
|
-
transduce.async = transduceAsync;
|
|
2817
|
-
function pipeSync(fn, ...fns) {
|
|
2818
|
-
return (...args) => {
|
|
2819
|
-
let result = fn(...args);
|
|
2820
|
-
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2821
|
-
result = _optionalChain([fns, 'access', _130 => _130[i], 'optionalCall', _131 => _131(result)]);
|
|
2822
|
-
}
|
|
2823
|
-
return result;
|
|
2824
|
-
};
|
|
2825
|
-
}
|
|
2826
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, pipeSync, "pipeSync");
|
|
2827
|
-
function pipeAsync(fn, ...fns) {
|
|
2828
|
-
return async (...args) => {
|
|
2829
|
-
let result = await fn(...args);
|
|
2830
|
-
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2831
|
-
result = await _optionalChain([fns, 'access', _132 => _132[i], 'optionalCall', _133 => _133(result)]);
|
|
2832
|
-
}
|
|
2833
|
-
return result;
|
|
2834
|
-
};
|
|
2835
|
-
}
|
|
2836
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, pipeAsync, "pipeAsync");
|
|
2837
|
-
var pipe = pipeSync;
|
|
2838
|
-
pipe.async = pipeAsync;
|
|
2839
|
-
|
|
2840
2073
|
// ../esbuild/src/build.ts
|
|
2841
|
-
|
|
2074
|
+
async function resolveContext(userOptions) {
|
|
2842
2075
|
const projectRoot = userOptions.projectRoot;
|
|
2843
2076
|
const workspaceRoot3 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
|
|
2844
2077
|
if (!workspaceRoot3) {
|
|
2845
2078
|
throw new Error("Cannot find Nx workspace root");
|
|
2846
2079
|
}
|
|
2847
|
-
const
|
|
2848
|
-
|
|
2080
|
+
const workspaceConfig = await getWorkspaceConfig(true, {
|
|
2081
|
+
workspaceRoot: workspaceRoot3.dir
|
|
2082
|
+
});
|
|
2083
|
+
writeDebug(" \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
2849
2084
|
const stopwatch = getStopwatch("Build options resolution");
|
|
2850
2085
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
2851
2086
|
exitOnError: true
|
|
2852
2087
|
});
|
|
2853
|
-
const projectJsonPath =
|
|
2088
|
+
const projectJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
2854
2089
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2855
2090
|
throw new Error("Cannot find project.json configuration");
|
|
2856
2091
|
}
|
|
2857
2092
|
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
2858
2093
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2859
|
-
const projectName = projectJson.name;
|
|
2094
|
+
const projectName = projectJson.name || userOptions.name;
|
|
2860
2095
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2861
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2096
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _106 => _106.projects, 'optionalAccess', _107 => _107[projectName]])) {
|
|
2862
2097
|
throw new Error("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.");
|
|
2863
2098
|
}
|
|
2864
2099
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
2865
2100
|
options.name ??= `${projectName}-${options.format}`;
|
|
2866
2101
|
options.target ??= DEFAULT_TARGET;
|
|
2867
|
-
const packageJsonPath =
|
|
2102
|
+
const packageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
2868
2103
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2869
2104
|
throw new Error("Cannot find package.json configuration");
|
|
2870
2105
|
}
|
|
2871
2106
|
const env = getEnv("esbuild", options);
|
|
2872
|
-
const
|
|
2107
|
+
const resolvedOptions = {
|
|
2873
2108
|
...options,
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
] : [
|
|
2879
|
-
"browser",
|
|
2880
|
-
"module",
|
|
2881
|
-
"main"
|
|
2882
|
-
],
|
|
2109
|
+
tsconfig: _chunk44UHVCK5js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
2110
|
+
distDir: "dist",
|
|
2111
|
+
name: projectName,
|
|
2112
|
+
metafile: userOptions.mode === "development",
|
|
2883
2113
|
...userOptions,
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
outdir: userOptions.outputPath || _chunkZOWG3HASjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
2888
|
-
distDir: userOptions.distDir || "dist",
|
|
2889
|
-
plugins: [],
|
|
2890
|
-
name: userOptions.name || projectName,
|
|
2891
|
-
projectConfigurations,
|
|
2892
|
-
projectName,
|
|
2893
|
-
projectGraph,
|
|
2894
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkZOWG3HASjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
2895
|
-
minify: userOptions.minify || !userOptions.debug,
|
|
2896
|
-
verbose: userOptions.verbose || isVerbose() || userOptions.debug === true,
|
|
2897
|
-
includeSrc: userOptions.includeSrc === true,
|
|
2898
|
-
metafile: userOptions.metafile !== false,
|
|
2899
|
-
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
2900
|
-
clean: userOptions.clean !== false,
|
|
2901
|
-
assets: _nullishCoalesce(userOptions.assets, () => ( [])),
|
|
2902
|
-
injectShims: userOptions.injectShims !== true,
|
|
2903
|
-
bundle: userOptions.bundle !== false,
|
|
2904
|
-
keepNames: true,
|
|
2905
|
-
watch: userOptions.watch === true,
|
|
2906
|
-
footer: userOptions.footer,
|
|
2907
|
-
banner: {
|
|
2908
|
-
js: options.banner || DEFAULT_COMPILED_BANNER,
|
|
2909
|
-
css: options.banner || DEFAULT_COMPILED_BANNER
|
|
2910
|
-
},
|
|
2911
|
-
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
2912
|
-
treeShaking: options.format === "esm",
|
|
2114
|
+
clean: false,
|
|
2115
|
+
target: userOptions.target || options.target,
|
|
2116
|
+
splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
|
|
2913
2117
|
env,
|
|
2914
2118
|
define: {
|
|
2915
|
-
STORM_FORMAT: JSON.stringify(options.format
|
|
2916
|
-
...options.format === "cjs" && options.injectShims ? {
|
|
2917
|
-
"import.meta.url": "importMetaUrl"
|
|
2918
|
-
} : {},
|
|
2119
|
+
STORM_FORMAT: JSON.stringify(options.format),
|
|
2919
2120
|
...options.define,
|
|
2920
2121
|
...Object.keys(env || {}).reduce((res, key) => {
|
|
2921
2122
|
const value = JSON.stringify(env[key]);
|
|
@@ -2926,170 +2127,101 @@ var resolveOptions = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, async
|
|
|
2926
2127
|
[`import.meta.env.${safeKey}`]: value
|
|
2927
2128
|
};
|
|
2928
2129
|
}, {})
|
|
2929
|
-
}
|
|
2930
|
-
inject: [
|
|
2931
|
-
options.format === "cjs" && options.injectShims ? _chunkZOWG3HASjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : void 0,
|
|
2932
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkZOWG3HASjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : void 0
|
|
2933
|
-
].filter(Boolean)
|
|
2130
|
+
}
|
|
2934
2131
|
};
|
|
2935
|
-
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( getDefaultBuildPlugins(userOptions, result)));
|
|
2936
|
-
if (options.inject && Array.isArray(options.inject) && options.inject.length > 0) {
|
|
2937
|
-
result.inject = options.inject.reduce((ret, inj) => {
|
|
2938
|
-
if (inj && typeof inj === "string" && ret.includes(inj)) {
|
|
2939
|
-
ret.push(inj);
|
|
2940
|
-
}
|
|
2941
|
-
return ret;
|
|
2942
|
-
}, result.inject);
|
|
2943
|
-
}
|
|
2944
|
-
delete result.entry;
|
|
2945
|
-
delete result.outputPath;
|
|
2946
2132
|
stopwatch();
|
|
2947
|
-
return
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2133
|
+
return {
|
|
2134
|
+
options: resolvedOptions,
|
|
2135
|
+
clean: userOptions.clean !== false,
|
|
2136
|
+
workspaceConfig,
|
|
2137
|
+
projectConfigurations,
|
|
2138
|
+
projectName,
|
|
2139
|
+
projectGraph,
|
|
2140
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunk44UHVCK5js.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
2141
|
+
outputPath: resolvedOptions.outputPath || _chunk44UHVCK5js.joinPaths.call(void 0, workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
|
|
2142
|
+
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2143
|
+
};
|
|
2144
|
+
}
|
|
2145
|
+
_chunkBBEYLIXNjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
2146
|
+
async function generatePackageJson(context) {
|
|
2147
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
2148
|
+
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
2952
2149
|
const stopwatch = getStopwatch("Write package.json file");
|
|
2953
|
-
const packageJsonPath =
|
|
2150
|
+
const packageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, context.options.projectRoot, "project.json");
|
|
2954
2151
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2955
2152
|
throw new Error("Cannot find package.json configuration");
|
|
2956
2153
|
}
|
|
2957
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
2154
|
+
const packageJsonFile = await _promises2.default.readFile(_chunk44UHVCK5js.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
|
|
2958
2155
|
let packageJson = JSON.parse(packageJsonFile);
|
|
2959
2156
|
if (!packageJson) {
|
|
2960
2157
|
throw new Error("Cannot find package.json configuration file");
|
|
2961
2158
|
}
|
|
2962
|
-
packageJson = await addPackageDependencies(
|
|
2963
|
-
packageJson = await addWorkspacePackageJsonFields(
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2159
|
+
packageJson = await addPackageDependencies(context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
|
|
2160
|
+
packageJson = await addWorkspacePackageJsonFields(context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
|
|
2161
|
+
if (context.options.entry) {
|
|
2162
|
+
packageJson.exports ??= {};
|
|
2163
|
+
packageJson.exports["./package.json"] ??= "./package.json";
|
|
2164
|
+
packageJson.exports["."] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js`;
|
|
2165
|
+
const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
|
|
2166
|
+
for (const entryPoint of entryPoints) {
|
|
2167
|
+
if (context.options.entry[entryPoint]) {
|
|
2168
|
+
const entry = context.options.entry[entryPoint].replaceAll("\\", "/").replaceAll(/^(\.\/)*/g, "").replace(/\.([cm])?[jt]s(x)?$/g, "");
|
|
2169
|
+
packageJson.exports[`./${entry}`] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entry}.js`;
|
|
2170
|
+
}
|
|
2971
2171
|
}
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
packageJson.main = packageJson.type === "commonjs" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.cjs`;
|
|
2977
|
-
}
|
|
2978
|
-
packageJson.types = `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.d.ts`;
|
|
2979
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
2980
|
-
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
2981
|
-
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
2172
|
+
if (context.options.format === "esm") {
|
|
2173
|
+
packageJson.module = packageJson.type === "module" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.mjs`;
|
|
2174
|
+
} else {
|
|
2175
|
+
packageJson.main = packageJson.type === "commonjs" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.cjs`;
|
|
2982
2176
|
}
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2177
|
+
packageJson.types = `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.d.ts`;
|
|
2178
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
2179
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
2180
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
2181
|
+
}
|
|
2182
|
+
return ret;
|
|
2183
|
+
}, packageJson.exports);
|
|
2184
|
+
}
|
|
2185
|
+
await _devkit.writeJsonFile.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, context.outputPath, "package.json"), packageJson);
|
|
2986
2186
|
stopwatch();
|
|
2987
2187
|
}
|
|
2988
|
-
return
|
|
2989
|
-
}
|
|
2990
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
2991
|
-
async function createOptions(options) {
|
|
2992
|
-
return _estoolkit.flatten.call(void 0, await Promise.all(_compat.map.call(void 0, options, (opt) => [
|
|
2993
|
-
// we defer it so that we don't trigger glob immediately
|
|
2994
|
-
() => resolveOptions(opt)
|
|
2995
|
-
])));
|
|
2996
|
-
}
|
|
2997
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, createOptions, "createOptions");
|
|
2998
|
-
async function generateContext(getOptions) {
|
|
2999
|
-
const options = await getOptions();
|
|
3000
|
-
const rendererEngine = new RendererEngine([
|
|
3001
|
-
shebangRenderer,
|
|
3002
|
-
...options.renderers || []
|
|
3003
|
-
]);
|
|
3004
|
-
return {
|
|
3005
|
-
options,
|
|
3006
|
-
rendererEngine
|
|
3007
|
-
};
|
|
2188
|
+
return context;
|
|
3008
2189
|
}
|
|
3009
|
-
|
|
3010
|
-
async function
|
|
3011
|
-
writeDebug(` \u{1F680} Running ${
|
|
3012
|
-
const stopwatch = getStopwatch(`${
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
...context2.options
|
|
3019
|
-
};
|
|
3020
|
-
options.outdir = _chunkZOWG3HASjs.joinPaths.call(void 0, context2.options.outdir, context2.options.distDir);
|
|
3021
|
-
if (!options.inject || !Array.isArray(options.inject) || options.inject.length === 0 || // eslint-disable-next-line no-constant-binary-expression, @typescript-eslint/no-explicit-any
|
|
3022
|
-
options.inject === {}) {
|
|
3023
|
-
delete options.inject;
|
|
3024
|
-
}
|
|
3025
|
-
delete options.dts;
|
|
3026
|
-
delete options.env;
|
|
3027
|
-
delete options.name;
|
|
3028
|
-
delete options.assets;
|
|
3029
|
-
delete options.mode;
|
|
3030
|
-
delete options.orgName;
|
|
3031
|
-
delete options.watch;
|
|
3032
|
-
delete options.clean;
|
|
3033
|
-
delete options.debug;
|
|
3034
|
-
delete options.generatePackageJson;
|
|
3035
|
-
delete options.distDir;
|
|
3036
|
-
delete options.includeSrc;
|
|
3037
|
-
delete options.verbose;
|
|
3038
|
-
delete options.projectRoot;
|
|
3039
|
-
delete options.projectName;
|
|
3040
|
-
delete options.projectGraph;
|
|
3041
|
-
delete options.projectConfigurations;
|
|
3042
|
-
delete options.renderers;
|
|
3043
|
-
delete options.config;
|
|
3044
|
-
delete options.injectShims;
|
|
3045
|
-
delete options.external;
|
|
3046
|
-
writeTrace(`Run esbuild (${context2.options.name}) with the following options:
|
|
3047
|
-
${formatLogMessage({
|
|
3048
|
-
...options,
|
|
3049
|
-
define: "<Hidden>"
|
|
3050
|
-
})}`, context2.options.config);
|
|
3051
|
-
const result = await esbuild2.build(options);
|
|
3052
|
-
await esbuild2.stop();
|
|
3053
|
-
if (result.metafile) {
|
|
3054
|
-
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
|
3055
|
-
await _promises2.default.writeFile(metafilePath, JSON.stringify(result.metafile));
|
|
3056
|
-
}
|
|
2190
|
+
_chunkBBEYLIXNjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
2191
|
+
async function executeTsup(context) {
|
|
2192
|
+
writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
|
|
2193
|
+
const stopwatch = getStopwatch(`${context.options.name} build`);
|
|
2194
|
+
await _tsup.build.call(void 0, {
|
|
2195
|
+
...context.options,
|
|
2196
|
+
outDir: context.outputPath,
|
|
2197
|
+
workspaceConfig: context.workspaceConfig
|
|
2198
|
+
});
|
|
3057
2199
|
stopwatch();
|
|
3058
|
-
return
|
|
3059
|
-
}
|
|
3060
|
-
_chunkZG2OCU4Fjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
3061
|
-
async function executeTypescript(context2) {
|
|
3062
|
-
if (_optionalChain([context2, 'access', _136 => _136.result, 'optionalAccess', _137 => _137.errors, 'access', _138 => _138.length]) === 0 && context2.options.dts) {
|
|
3063
|
-
writeDebug(` \u{1F4CB} Running TypeScript Compiler for ${context2.options.name}`, context2.options.config);
|
|
3064
|
-
const stopwatch = getStopwatch(`${context2.options.name} asset copy`);
|
|
3065
|
-
await emitDts(context2.options.config, context2.options.tsconfig, context2.options.tsconfigRaw, true);
|
|
3066
|
-
stopwatch();
|
|
3067
|
-
}
|
|
3068
|
-
return context2;
|
|
2200
|
+
return context;
|
|
3069
2201
|
}
|
|
3070
|
-
|
|
3071
|
-
async function copyBuildAssets(
|
|
3072
|
-
if (_optionalChain([
|
|
3073
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${
|
|
3074
|
-
const stopwatch = getStopwatch(`${
|
|
3075
|
-
await copyAssets(
|
|
2202
|
+
_chunkBBEYLIXNjs.__name.call(void 0, executeTsup, "executeTsup");
|
|
2203
|
+
async function copyBuildAssets(context) {
|
|
2204
|
+
if (_optionalChain([context, 'access', _108 => _108.result, 'optionalAccess', _109 => _109.errors, 'access', _110 => _110.length]) === 0) {
|
|
2205
|
+
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
2206
|
+
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
2207
|
+
await copyAssets(context.workspaceConfig, _nullishCoalesce(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
3076
2208
|
stopwatch();
|
|
3077
2209
|
}
|
|
3078
|
-
return
|
|
2210
|
+
return context;
|
|
3079
2211
|
}
|
|
3080
|
-
|
|
3081
|
-
async function reportResults(
|
|
3082
|
-
if (_optionalChain([
|
|
3083
|
-
if (
|
|
3084
|
-
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${
|
|
2212
|
+
_chunkBBEYLIXNjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
2213
|
+
async function reportResults(context) {
|
|
2214
|
+
if (_optionalChain([context, 'access', _111 => _111.result, 'optionalAccess', _112 => _112.errors, 'access', _113 => _113.length]) === 0) {
|
|
2215
|
+
if (context.result.warnings.length > 0) {
|
|
2216
|
+
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
|
|
3085
2217
|
}
|
|
3086
|
-
writeSuccess(` \u{1F4E6} The ${
|
|
3087
|
-
} else if (_optionalChain([
|
|
3088
|
-
writeError(` \u274C The ${
|
|
3089
|
-
throw new Error(`The ${
|
|
2218
|
+
writeSuccess(` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
|
|
2219
|
+
} else if (_optionalChain([context, 'access', _114 => _114.result, 'optionalAccess', _115 => _115.errors]) && _optionalChain([context, 'access', _116 => _116.result, 'optionalAccess', _117 => _117.errors, 'access', _118 => _118.length]) > 0) {
|
|
2220
|
+
writeError(` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
|
|
2221
|
+
throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
|
|
3090
2222
|
}
|
|
3091
2223
|
}
|
|
3092
|
-
|
|
2224
|
+
_chunkBBEYLIXNjs.__name.call(void 0, reportResults, "reportResults");
|
|
3093
2225
|
async function dependencyCheck(options) {
|
|
3094
2226
|
if (process.env.DEV === "true") {
|
|
3095
2227
|
return void 0;
|
|
@@ -3097,7 +2229,7 @@ async function dependencyCheck(options) {
|
|
|
3097
2229
|
if (process.env.CI && !process.env.BUILDKITE) {
|
|
3098
2230
|
return void 0;
|
|
3099
2231
|
}
|
|
3100
|
-
const buildPromise =
|
|
2232
|
+
const buildPromise = esbuild.build({
|
|
3101
2233
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
3102
2234
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
3103
2235
|
ignore: [
|
|
@@ -3119,18 +2251,18 @@ async function dependencyCheck(options) {
|
|
|
3119
2251
|
});
|
|
3120
2252
|
return void 0;
|
|
3121
2253
|
}
|
|
3122
|
-
|
|
3123
|
-
async function cleanOutputPath(
|
|
3124
|
-
if (
|
|
3125
|
-
writeDebug(` \u{1F9F9} Cleaning ${
|
|
3126
|
-
const stopwatch = getStopwatch(`${
|
|
3127
|
-
await cleanDirectories(
|
|
2254
|
+
_chunkBBEYLIXNjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
2255
|
+
async function cleanOutputPath(context) {
|
|
2256
|
+
if (context.clean !== false && context.outputPath) {
|
|
2257
|
+
writeDebug(` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
|
|
2258
|
+
const stopwatch = getStopwatch(`${context.options.name} output clean`);
|
|
2259
|
+
await cleanDirectories(context.outputPath);
|
|
3128
2260
|
stopwatch();
|
|
3129
2261
|
}
|
|
3130
|
-
return
|
|
2262
|
+
return context;
|
|
3131
2263
|
}
|
|
3132
|
-
|
|
3133
|
-
async function
|
|
2264
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
2265
|
+
async function build2(options) {
|
|
3134
2266
|
writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
|
|
3135
2267
|
const stopwatch = getStopwatch("ESBuild pipeline");
|
|
3136
2268
|
try {
|
|
@@ -3140,8 +2272,15 @@ async function build3(options) {
|
|
|
3140
2272
|
if (opts.length === 0) {
|
|
3141
2273
|
throw new Error("No build options were provided");
|
|
3142
2274
|
}
|
|
3143
|
-
|
|
3144
|
-
await
|
|
2275
|
+
const context = await resolveContext(options);
|
|
2276
|
+
await cleanOutputPath(context);
|
|
2277
|
+
await Promise.all([
|
|
2278
|
+
dependencyCheck(context.options),
|
|
2279
|
+
generatePackageJson(context),
|
|
2280
|
+
copyBuildAssets(context),
|
|
2281
|
+
executeTsup(context)
|
|
2282
|
+
]);
|
|
2283
|
+
await reportResults(context);
|
|
3145
2284
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
3146
2285
|
} catch (error) {
|
|
3147
2286
|
writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
@@ -3150,47 +2289,19 @@ async function build3(options) {
|
|
|
3150
2289
|
stopwatch();
|
|
3151
2290
|
}
|
|
3152
2291
|
}
|
|
3153
|
-
|
|
3154
|
-
var watch = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (context2, options) => {
|
|
3155
|
-
if (!options.watch) {
|
|
3156
|
-
return context2;
|
|
3157
|
-
}
|
|
3158
|
-
const config = {
|
|
3159
|
-
ignoreInitial: true,
|
|
3160
|
-
useFsEvents: true,
|
|
3161
|
-
ignored: [
|
|
3162
|
-
"./src/__tests__/**/*",
|
|
3163
|
-
"./package.json"
|
|
3164
|
-
]
|
|
3165
|
-
};
|
|
3166
|
-
const changeWatcher = _chokidar.watch.call(void 0, [
|
|
3167
|
-
"./src/**/*"
|
|
3168
|
-
], config);
|
|
3169
|
-
const fastRebuild = _estoolkit.debounce.call(void 0, async () => {
|
|
3170
|
-
const timeBefore = Date.now();
|
|
3171
|
-
const rebuildResult = await handle.async(() => {
|
|
3172
|
-
return context2.rebuild();
|
|
3173
|
-
});
|
|
3174
|
-
if (rebuildResult instanceof Error) {
|
|
3175
|
-
writeError(rebuildResult.message);
|
|
3176
|
-
}
|
|
3177
|
-
writeTrace(`${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
3178
|
-
}, 10);
|
|
3179
|
-
changeWatcher.on("change", fastRebuild);
|
|
3180
|
-
return void 0;
|
|
3181
|
-
}, "watch");
|
|
2292
|
+
_chunkBBEYLIXNjs.__name.call(void 0, build2, "build");
|
|
3182
2293
|
|
|
3183
2294
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
3184
|
-
async function esbuildExecutorFn(options,
|
|
2295
|
+
async function esbuildExecutorFn(options, context, config) {
|
|
3185
2296
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
3186
|
-
if (!_optionalChain([
|
|
2297
|
+
if (!_optionalChain([context, 'access', _119 => _119.projectsConfigurations, 'optionalAccess', _120 => _120.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _121 => _121.projectsConfigurations, 'access', _122 => _122.projects, 'access', _123 => _123[context.projectName], 'optionalAccess', _124 => _124.root])) {
|
|
3187
2298
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
3188
2299
|
}
|
|
3189
|
-
await
|
|
2300
|
+
await build2({
|
|
3190
2301
|
...options,
|
|
3191
|
-
projectRoot: _optionalChain([
|
|
3192
|
-
|
|
3193
|
-
sourceRoot: _optionalChain([
|
|
2302
|
+
projectRoot: _optionalChain([context, 'access', _125 => _125.projectsConfigurations, 'access', _126 => _126.projects, 'optionalAccess', _127 => _127[context.projectName], 'access', _128 => _128.root]),
|
|
2303
|
+
name: context.projectName,
|
|
2304
|
+
sourceRoot: _optionalChain([context, 'access', _129 => _129.projectsConfigurations, 'access', _130 => _130.projects, 'optionalAccess', _131 => _131[context.projectName], 'optionalAccess', _132 => _132.sourceRoot]),
|
|
3194
2305
|
format: options.format,
|
|
3195
2306
|
platform: options.format
|
|
3196
2307
|
});
|
|
@@ -3198,11 +2309,11 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
3198
2309
|
success: true
|
|
3199
2310
|
};
|
|
3200
2311
|
}
|
|
3201
|
-
|
|
2312
|
+
_chunkBBEYLIXNjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
3202
2313
|
var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn, {
|
|
3203
2314
|
skipReadingConfig: false,
|
|
3204
2315
|
hooks: {
|
|
3205
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2316
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (options, config) => {
|
|
3206
2317
|
options.entry ??= [
|
|
3207
2318
|
"src/index.ts"
|
|
3208
2319
|
];
|
|
@@ -3214,57 +2325,57 @@ var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn
|
|
|
3214
2325
|
});
|
|
3215
2326
|
|
|
3216
2327
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
3217
|
-
|
|
2328
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3218
2329
|
|
|
3219
2330
|
|
|
3220
2331
|
|
|
3221
2332
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
3222
|
-
|
|
2333
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3223
2334
|
|
|
3224
2335
|
|
|
3225
2336
|
var _prettier = require('prettier');
|
|
3226
2337
|
var _readyamlfile = require('read-yaml-file'); var _readyamlfile2 = _interopRequireDefault(_readyamlfile);
|
|
3227
2338
|
|
|
3228
2339
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
3229
|
-
var
|
|
2340
|
+
var LARGE_BUFFER2 = 1024 * 1e6;
|
|
3230
2341
|
|
|
3231
2342
|
// ../workspace-tools/src/executors/size-limit/executor.ts
|
|
3232
|
-
|
|
2343
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3233
2344
|
|
|
3234
2345
|
var _esbuild2 = require('@size-limit/esbuild'); var _esbuild3 = _interopRequireDefault(_esbuild2);
|
|
3235
2346
|
var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _interopRequireDefault(_esbuildwhy);
|
|
3236
2347
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
3237
2348
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
3238
|
-
async function sizeLimitExecutorFn(options,
|
|
3239
|
-
if (!_optionalChain([
|
|
2349
|
+
async function sizeLimitExecutorFn(options, context, config) {
|
|
2350
|
+
if (!_optionalChain([context, 'optionalAccess', _133 => _133.projectName]) || !_optionalChain([context, 'access', _134 => _134.projectsConfigurations, 'optionalAccess', _135 => _135.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3240
2351
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
3241
2352
|
}
|
|
3242
|
-
writeInfo(`\u{1F4CF} Running Size-Limit on ${
|
|
2353
|
+
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
3243
2354
|
_sizelimit2.default.call(void 0, [
|
|
3244
2355
|
_file2.default,
|
|
3245
2356
|
_esbuild3.default,
|
|
3246
2357
|
_esbuildwhy2.default
|
|
3247
2358
|
], {
|
|
3248
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([
|
|
2359
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _136 => _136.projectsConfigurations, 'access', _137 => _137.projects, 'access', _138 => _138[context.projectName], 'optionalAccess', _139 => _139.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context, 'access', _140 => _140.projectsConfigurations, 'access', _141 => _141.projects, 'access', _142 => _142[context.projectName], 'optionalAccess', _143 => _143.root]), () => ( "./")), "src")))
|
|
3249
2360
|
}).then((result) => {
|
|
3250
|
-
writeInfo(`\u{1F4CF} ${
|
|
2361
|
+
writeInfo(`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
3251
2362
|
});
|
|
3252
2363
|
return {
|
|
3253
2364
|
success: true
|
|
3254
2365
|
};
|
|
3255
2366
|
}
|
|
3256
|
-
|
|
2367
|
+
_chunkBBEYLIXNjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
3257
2368
|
var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
3258
2369
|
skipReadingConfig: false,
|
|
3259
2370
|
hooks: {
|
|
3260
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2371
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3261
2372
|
return options;
|
|
3262
2373
|
}, "applyDefaultOptions")
|
|
3263
2374
|
}
|
|
3264
2375
|
});
|
|
3265
2376
|
|
|
3266
2377
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
3267
|
-
|
|
2378
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3268
2379
|
var _fsextra = require('fs-extra');
|
|
3269
2380
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
3270
2381
|
async function typiaExecutorFn(options, _, config) {
|
|
@@ -3284,11 +2395,11 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
3284
2395
|
success: true
|
|
3285
2396
|
};
|
|
3286
2397
|
}
|
|
3287
|
-
|
|
2398
|
+
_chunkBBEYLIXNjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
3288
2399
|
var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
|
|
3289
2400
|
skipReadingConfig: false,
|
|
3290
2401
|
hooks: {
|
|
3291
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2402
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3292
2403
|
options.entry ??= [
|
|
3293
2404
|
"{sourceRoot}/index.ts"
|
|
3294
2405
|
];
|
|
@@ -3301,35 +2412,35 @@ var executor_default8 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
3301
2412
|
});
|
|
3302
2413
|
|
|
3303
2414
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
3304
|
-
|
|
2415
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3305
2416
|
|
|
3306
2417
|
var _jiti = require('jiti');
|
|
3307
|
-
async function unbuildExecutorFn(options,
|
|
2418
|
+
async function unbuildExecutorFn(options, context, config) {
|
|
3308
2419
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
3309
|
-
if (!_optionalChain([
|
|
2420
|
+
if (!_optionalChain([context, 'access', _144 => _144.projectsConfigurations, 'optionalAccess', _145 => _145.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3310
2421
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
3311
2422
|
}
|
|
3312
|
-
if (!
|
|
2423
|
+
if (!context.projectsConfigurations.projects[context.projectName].root) {
|
|
3313
2424
|
throw new Error("The Build process failed because the project root is not valid. Please run this command from a workspace root directory.");
|
|
3314
2425
|
}
|
|
3315
|
-
if (!
|
|
2426
|
+
if (!context.projectsConfigurations.projects[context.projectName].sourceRoot) {
|
|
3316
2427
|
throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
|
|
3317
2428
|
}
|
|
3318
2429
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
3319
|
-
fsCache: config.skipCache ? false :
|
|
2430
|
+
fsCache: config.skipCache ? false : _chunk44UHVCK5js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
3320
2431
|
interopDefault: true
|
|
3321
2432
|
});
|
|
3322
2433
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
3323
2434
|
await stormUnbuild.build(_defu.defu.call(void 0, {
|
|
3324
2435
|
...options,
|
|
3325
|
-
projectRoot:
|
|
3326
|
-
projectName:
|
|
3327
|
-
sourceRoot:
|
|
2436
|
+
projectRoot: context.projectsConfigurations.projects[context.projectName].root,
|
|
2437
|
+
projectName: context.projectName,
|
|
2438
|
+
sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
|
|
3328
2439
|
platform: options.platform
|
|
3329
2440
|
}, {
|
|
3330
2441
|
stubOptions: {
|
|
3331
2442
|
jiti: {
|
|
3332
|
-
fsCache: config.skipCache ? false :
|
|
2443
|
+
fsCache: config.skipCache ? false : _chunk44UHVCK5js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
3333
2444
|
}
|
|
3334
2445
|
},
|
|
3335
2446
|
rollup: {
|
|
@@ -3352,11 +2463,11 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
3352
2463
|
success: true
|
|
3353
2464
|
};
|
|
3354
2465
|
}
|
|
3355
|
-
|
|
2466
|
+
_chunkBBEYLIXNjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
3356
2467
|
var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
|
|
3357
2468
|
skipReadingConfig: false,
|
|
3358
2469
|
hooks: {
|
|
3359
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2470
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (options, config) => {
|
|
3360
2471
|
options.debug ??= false;
|
|
3361
2472
|
options.treeShaking ??= true;
|
|
3362
2473
|
options.buildOnly ??= false;
|
|
@@ -3371,15 +2482,15 @@ var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecu
|
|
|
3371
2482
|
});
|
|
3372
2483
|
|
|
3373
2484
|
// ../workspace-tools/generators.ts
|
|
3374
|
-
|
|
2485
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3375
2486
|
|
|
3376
2487
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
3377
|
-
|
|
2488
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3378
2489
|
|
|
3379
2490
|
|
|
3380
2491
|
// ../workspace-tools/src/base/base-generator.ts
|
|
3381
|
-
|
|
3382
|
-
var withRunGenerator = /* @__PURE__ */
|
|
2492
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
2493
|
+
var withRunGenerator = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
3383
2494
|
skipReadingConfig: false
|
|
3384
2495
|
}) => async (tree, _options) => {
|
|
3385
2496
|
const stopwatch = getStopwatch(name);
|
|
@@ -3395,7 +2506,7 @@ var withRunGenerator = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (nam
|
|
|
3395
2506
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
3396
2507
|
config = await getConfig(workspaceRoot3);
|
|
3397
2508
|
}
|
|
3398
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2509
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _146 => _146.hooks, 'optionalAccess', _147 => _147.applyDefaultOptions])) {
|
|
3399
2510
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
3400
2511
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
3401
2512
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
@@ -3406,22 +2517,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
3406
2517
|
workspaceRoot: tree.root,
|
|
3407
2518
|
config
|
|
3408
2519
|
}, applyWorkspaceBaseTokens);
|
|
3409
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2520
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _148 => _148.hooks, 'optionalAccess', _149 => _149.preProcess])) {
|
|
3410
2521
|
writeDebug("Running the preProcess hook...", config);
|
|
3411
2522
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
3412
2523
|
writeDebug("Completed the preProcess hook", config);
|
|
3413
2524
|
}
|
|
3414
2525
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
3415
2526
|
if (result) {
|
|
3416
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
2527
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _150 => _150.error, 'optionalAccess', _151 => _151.message]) && typeof _optionalChain([result, 'optionalAccess', _152 => _152.error, 'optionalAccess', _153 => _153.message]) === "string" && _optionalChain([result, 'optionalAccess', _154 => _154.error, 'optionalAccess', _155 => _155.name]) && typeof _optionalChain([result, 'optionalAccess', _156 => _156.error, 'optionalAccess', _157 => _157.name]) === "string") {
|
|
3417
2528
|
throw new Error(`The ${name} generator failed to run`, {
|
|
3418
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
2529
|
+
cause: _optionalChain([result, 'optionalAccess', _158 => _158.error])
|
|
3419
2530
|
});
|
|
3420
2531
|
} else if (result.success && result.data) {
|
|
3421
2532
|
return result;
|
|
3422
2533
|
}
|
|
3423
2534
|
}
|
|
3424
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2535
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _159 => _159.hooks, 'optionalAccess', _160 => _160.postProcess])) {
|
|
3425
2536
|
writeDebug("Running the postProcess hook...", config);
|
|
3426
2537
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
3427
2538
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -3443,7 +2554,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
3443
2554
|
}, "withRunGenerator");
|
|
3444
2555
|
|
|
3445
2556
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
3446
|
-
|
|
2557
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3447
2558
|
|
|
3448
2559
|
var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
|
|
3449
2560
|
var _js = require('@nx/js');
|
|
@@ -3451,7 +2562,7 @@ var _init = require('@nx/js/src/generators/init/init'); var _init2 = _interopReq
|
|
|
3451
2562
|
var _generator = require('@nx/js/src/generators/setup-verdaccio/generator'); var _generator2 = _interopRequireDefault(_generator);
|
|
3452
2563
|
|
|
3453
2564
|
// ../workspace-tools/src/utils/project-tags.ts
|
|
3454
|
-
|
|
2565
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3455
2566
|
var ProjectTagConstants = {
|
|
3456
2567
|
Language: {
|
|
3457
2568
|
TAG_ID: "language",
|
|
@@ -3489,15 +2600,15 @@ var ProjectTagConstants = {
|
|
|
3489
2600
|
TAG_ID: "plugin"
|
|
3490
2601
|
}
|
|
3491
2602
|
};
|
|
3492
|
-
var formatProjectTag = /* @__PURE__ */
|
|
2603
|
+
var formatProjectTag = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (variant, value) => {
|
|
3493
2604
|
return `${variant}:${value}`;
|
|
3494
2605
|
}, "formatProjectTag");
|
|
3495
|
-
var hasProjectTag = /* @__PURE__ */
|
|
2606
|
+
var hasProjectTag = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (project, variant) => {
|
|
3496
2607
|
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
3497
2608
|
const prefix = formatProjectTag(variant, "");
|
|
3498
2609
|
return project.tags.some((tag) => tag.startsWith(prefix) && tag.length > prefix.length);
|
|
3499
2610
|
}, "hasProjectTag");
|
|
3500
|
-
var addProjectTag = /* @__PURE__ */
|
|
2611
|
+
var addProjectTag = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (project, variant, value, options = {
|
|
3501
2612
|
overwrite: false
|
|
3502
2613
|
}) => {
|
|
3503
2614
|
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
@@ -3508,7 +2619,7 @@ var addProjectTag = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (projec
|
|
|
3508
2619
|
}, "addProjectTag");
|
|
3509
2620
|
|
|
3510
2621
|
// ../workspace-tools/src/utils/versions.ts
|
|
3511
|
-
|
|
2622
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3512
2623
|
var typesNodeVersion = "20.9.0";
|
|
3513
2624
|
var nxVersion = "^18.0.4";
|
|
3514
2625
|
var nodeVersion = "20.11.0";
|
|
@@ -3538,7 +2649,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3538
2649
|
const projectConfig = {
|
|
3539
2650
|
root: normalized.directory,
|
|
3540
2651
|
projectType: "library",
|
|
3541
|
-
sourceRoot:
|
|
2652
|
+
sourceRoot: _chunk44UHVCK5js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
3542
2653
|
targets: {
|
|
3543
2654
|
build: {
|
|
3544
2655
|
executor: options.buildExecutor,
|
|
@@ -3547,11 +2658,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3547
2658
|
],
|
|
3548
2659
|
options: {
|
|
3549
2660
|
entry: [
|
|
3550
|
-
|
|
2661
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
3551
2662
|
],
|
|
3552
2663
|
outputPath: getOutputPath(normalized),
|
|
3553
|
-
tsconfig:
|
|
3554
|
-
project:
|
|
2664
|
+
tsconfig: _chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
2665
|
+
project: _chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
3555
2666
|
defaultConfiguration: "production",
|
|
3556
2667
|
platform: "neutral",
|
|
3557
2668
|
assets: [
|
|
@@ -3590,22 +2701,22 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3590
2701
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
3591
2702
|
let repository = {
|
|
3592
2703
|
type: "github",
|
|
3593
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
2704
|
+
url: _optionalChain([config, 'optionalAccess', _161 => _161.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _162 => _162.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _163 => _163.namespace]) || _optionalChain([config, 'optionalAccess', _164 => _164.name]) || "repository"}.git`
|
|
3594
2705
|
};
|
|
3595
2706
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
3596
2707
|
if (tree.exists("package.json")) {
|
|
3597
2708
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3598
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2709
|
+
if (_optionalChain([packageJson, 'optionalAccess', _165 => _165.repository])) {
|
|
3599
2710
|
repository = packageJson.repository;
|
|
3600
2711
|
}
|
|
3601
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2712
|
+
if (_optionalChain([packageJson, 'optionalAccess', _166 => _166.description])) {
|
|
3602
2713
|
description = packageJson.description;
|
|
3603
2714
|
}
|
|
3604
2715
|
}
|
|
3605
2716
|
if (!normalized.importPath) {
|
|
3606
2717
|
normalized.importPath = normalized.name;
|
|
3607
2718
|
}
|
|
3608
|
-
const packageJsonPath =
|
|
2719
|
+
const packageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
3609
2720
|
if (tree.exists(packageJsonPath)) {
|
|
3610
2721
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
3611
2722
|
if (!normalized.importPath) {
|
|
@@ -3653,30 +2764,30 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3653
2764
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
3654
2765
|
...json,
|
|
3655
2766
|
pnpm: {
|
|
3656
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2767
|
+
..._optionalChain([json, 'optionalAccess', _167 => _167.pnpm]),
|
|
3657
2768
|
overrides: {
|
|
3658
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2769
|
+
..._optionalChain([json, 'optionalAccess', _168 => _168.pnpm, 'optionalAccess', _169 => _169.overrides]),
|
|
3659
2770
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
3660
2771
|
}
|
|
3661
2772
|
}
|
|
3662
2773
|
}));
|
|
3663
2774
|
}
|
|
3664
2775
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
3665
|
-
|
|
2776
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
3666
2777
|
]);
|
|
3667
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
3668
|
-
|
|
2778
|
+
_js.addTsConfigPath.call(void 0, tree, _chunk44UHVCK5js.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2779
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
3669
2780
|
]);
|
|
3670
2781
|
if (tree.exists("package.json")) {
|
|
3671
2782
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3672
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2783
|
+
if (_optionalChain([packageJson, 'optionalAccess', _170 => _170.repository])) {
|
|
3673
2784
|
repository = packageJson.repository;
|
|
3674
2785
|
}
|
|
3675
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2786
|
+
if (_optionalChain([packageJson, 'optionalAccess', _171 => _171.description])) {
|
|
3676
2787
|
description = packageJson.description;
|
|
3677
2788
|
}
|
|
3678
2789
|
}
|
|
3679
|
-
const tsconfigPath =
|
|
2790
|
+
const tsconfigPath = _chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
3680
2791
|
if (tree.exists(tsconfigPath)) {
|
|
3681
2792
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
3682
2793
|
json.composite ??= true;
|
|
@@ -3704,7 +2815,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3704
2815
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3705
2816
|
return null;
|
|
3706
2817
|
}
|
|
3707
|
-
|
|
2818
|
+
_chunkBBEYLIXNjs.__name.call(void 0, typeScriptLibraryGeneratorFn, "typeScriptLibraryGeneratorFn");
|
|
3708
2819
|
function getOutputPath(options) {
|
|
3709
2820
|
const parts = [
|
|
3710
2821
|
"dist"
|
|
@@ -3714,42 +2825,42 @@ function getOutputPath(options) {
|
|
|
3714
2825
|
} else {
|
|
3715
2826
|
parts.push(options.projectRoot);
|
|
3716
2827
|
}
|
|
3717
|
-
return
|
|
2828
|
+
return _chunk44UHVCK5js.joinPaths.call(void 0, ...parts);
|
|
3718
2829
|
}
|
|
3719
|
-
|
|
2830
|
+
_chunkBBEYLIXNjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
3720
2831
|
function createProjectTsConfigJson(tree, options) {
|
|
3721
2832
|
const tsconfig = {
|
|
3722
2833
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
3723
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2834
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _172 => _172.tsconfigOptions]), () => ( {})),
|
|
3724
2835
|
compilerOptions: {
|
|
3725
2836
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
3726
|
-
outDir:
|
|
2837
|
+
outDir: _chunk44UHVCK5js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
3727
2838
|
noEmit: true,
|
|
3728
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2839
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _173 => _173.tsconfigOptions, 'optionalAccess', _174 => _174.compilerOptions]), () => ( {}))
|
|
3729
2840
|
},
|
|
3730
2841
|
files: [
|
|
3731
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2842
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _175 => _175.tsconfigOptions, 'optionalAccess', _176 => _176.files]), () => ( []))
|
|
3732
2843
|
],
|
|
3733
2844
|
include: [
|
|
3734
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2845
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _177 => _177.tsconfigOptions, 'optionalAccess', _178 => _178.include]), () => ( [])),
|
|
3735
2846
|
"src/**/*.ts",
|
|
3736
2847
|
"src/**/*.js",
|
|
3737
2848
|
"bin/**/*"
|
|
3738
2849
|
],
|
|
3739
2850
|
exclude: [
|
|
3740
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2851
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _179 => _179.tsconfigOptions, 'optionalAccess', _180 => _180.exclude]), () => ( [])),
|
|
3741
2852
|
"jest.config.ts",
|
|
3742
2853
|
"src/**/*.spec.ts",
|
|
3743
2854
|
"src/**/*.test.ts"
|
|
3744
2855
|
]
|
|
3745
2856
|
};
|
|
3746
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2857
|
+
_devkit.writeJson.call(void 0, tree, _chunk44UHVCK5js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
3747
2858
|
}
|
|
3748
|
-
|
|
2859
|
+
_chunkBBEYLIXNjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
3749
2860
|
async function normalizeOptions(tree, options, config) {
|
|
3750
2861
|
let importPath = options.importPath;
|
|
3751
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
3752
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
2862
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _181 => _181.namespace])) {
|
|
2863
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _182 => _182.namespace])}/${options.name}`;
|
|
3753
2864
|
}
|
|
3754
2865
|
if (options.publishable) {
|
|
3755
2866
|
if (!importPath) {
|
|
@@ -3799,11 +2910,11 @@ async function normalizeOptions(tree, options, config) {
|
|
|
3799
2910
|
shouldUseSwcJest: false
|
|
3800
2911
|
};
|
|
3801
2912
|
}
|
|
3802
|
-
|
|
2913
|
+
_chunkBBEYLIXNjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
3803
2914
|
|
|
3804
2915
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
3805
2916
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
3806
|
-
const filesDir =
|
|
2917
|
+
const filesDir = _chunk44UHVCK5js.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
|
|
3807
2918
|
const tsLibraryGeneratorOptions = {
|
|
3808
2919
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
3809
2920
|
platform: "browser",
|
|
@@ -3860,10 +2971,10 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
3860
2971
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3861
2972
|
return null;
|
|
3862
2973
|
}
|
|
3863
|
-
|
|
2974
|
+
_chunkBBEYLIXNjs.__name.call(void 0, browserLibraryGeneratorFn, "browserLibraryGeneratorFn");
|
|
3864
2975
|
var generator_default = withRunGenerator("TypeScript Library Creator (Browser Platform)", browserLibraryGeneratorFn, {
|
|
3865
2976
|
hooks: {
|
|
3866
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2977
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3867
2978
|
options.description ??= "A library used by Storm Software to support browser applications";
|
|
3868
2979
|
options.platform ??= "browser";
|
|
3869
2980
|
return options;
|
|
@@ -3872,7 +2983,7 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
3872
2983
|
});
|
|
3873
2984
|
|
|
3874
2985
|
// ../workspace-tools/src/generators/config-schema/generator.ts
|
|
3875
|
-
|
|
2986
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3876
2987
|
|
|
3877
2988
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
3878
2989
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
@@ -3882,7 +2993,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3882
2993
|
name: "StormWorkspaceConfiguration"
|
|
3883
2994
|
});
|
|
3884
2995
|
writeTrace(jsonSchema, config);
|
|
3885
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
2996
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _183 => _183.workspaceRoot]), () => ( findWorkspaceRoot())), _optionalChain([options, 'access', _184 => _184.outputFile, 'optionalAccess', _185 => _185.startsWith, 'call', _186 => _186("./")]) ? "" : "./");
|
|
3886
2997
|
writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
3887
2998
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
3888
2999
|
spaces: 2
|
|
@@ -3893,10 +3004,10 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3893
3004
|
success: true
|
|
3894
3005
|
};
|
|
3895
3006
|
}
|
|
3896
|
-
|
|
3007
|
+
_chunkBBEYLIXNjs.__name.call(void 0, configSchemaGeneratorFn, "configSchemaGeneratorFn");
|
|
3897
3008
|
var generator_default2 = withRunGenerator("Configuration Schema Creator", configSchemaGeneratorFn, {
|
|
3898
3009
|
hooks: {
|
|
3899
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
3010
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3900
3011
|
options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
|
|
3901
3012
|
return options;
|
|
3902
3013
|
}, "applyDefaultOptions")
|
|
@@ -3904,7 +3015,7 @@ var generator_default2 = withRunGenerator("Configuration Schema Creator", config
|
|
|
3904
3015
|
});
|
|
3905
3016
|
|
|
3906
3017
|
// ../workspace-tools/src/generators/init/init.ts
|
|
3907
|
-
|
|
3018
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3908
3019
|
|
|
3909
3020
|
async function initGenerator(tree, schema) {
|
|
3910
3021
|
const task = _devkit.addDependenciesToPackageJson.call(void 0, tree, {
|
|
@@ -3923,13 +3034,13 @@ async function initGenerator(tree, schema) {
|
|
|
3923
3034
|
}
|
|
3924
3035
|
return task;
|
|
3925
3036
|
}
|
|
3926
|
-
|
|
3037
|
+
_chunkBBEYLIXNjs.__name.call(void 0, initGenerator, "initGenerator");
|
|
3927
3038
|
|
|
3928
3039
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
3929
|
-
|
|
3040
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3930
3041
|
|
|
3931
3042
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
3932
|
-
const filesDir =
|
|
3043
|
+
const filesDir = _chunk44UHVCK5js.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
|
|
3933
3044
|
const tsLibraryGeneratorOptions = {
|
|
3934
3045
|
...schema,
|
|
3935
3046
|
platform: "neutral",
|
|
@@ -3958,10 +3069,10 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
3958
3069
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3959
3070
|
return null;
|
|
3960
3071
|
}
|
|
3961
|
-
|
|
3072
|
+
_chunkBBEYLIXNjs.__name.call(void 0, neutralLibraryGeneratorFn, "neutralLibraryGeneratorFn");
|
|
3962
3073
|
var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral Platform)", neutralLibraryGeneratorFn, {
|
|
3963
3074
|
hooks: {
|
|
3964
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
3075
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3965
3076
|
options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
|
|
3966
3077
|
options.platform = "neutral";
|
|
3967
3078
|
return options;
|
|
@@ -3970,10 +3081,10 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
3970
3081
|
});
|
|
3971
3082
|
|
|
3972
3083
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
3973
|
-
|
|
3084
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3974
3085
|
|
|
3975
3086
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
3976
|
-
const filesDir =
|
|
3087
|
+
const filesDir = _chunk44UHVCK5js.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
|
|
3977
3088
|
const tsLibraryGeneratorOptions = {
|
|
3978
3089
|
platform: "node",
|
|
3979
3090
|
devDependencies: {
|
|
@@ -4006,10 +3117,10 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
|
4006
3117
|
await _devkit.formatFiles.call(void 0, tree);
|
|
4007
3118
|
return null;
|
|
4008
3119
|
}
|
|
4009
|
-
|
|
3120
|
+
_chunkBBEYLIXNjs.__name.call(void 0, nodeLibraryGeneratorFn, "nodeLibraryGeneratorFn");
|
|
4010
3121
|
var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Platform)", nodeLibraryGeneratorFn, {
|
|
4011
3122
|
hooks: {
|
|
4012
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
3123
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
4013
3124
|
options.description ??= "A library used by Storm Software to support NodeJs applications";
|
|
4014
3125
|
options.platform ??= "node";
|
|
4015
3126
|
return options;
|
|
@@ -4018,7 +3129,7 @@ var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Pl
|
|
|
4018
3129
|
});
|
|
4019
3130
|
|
|
4020
3131
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
4021
|
-
|
|
3132
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4022
3133
|
|
|
4023
3134
|
|
|
4024
3135
|
async function presetGeneratorFn(tree, options) {
|
|
@@ -4168,7 +3279,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
4168
3279
|
};
|
|
4169
3280
|
return json;
|
|
4170
3281
|
});
|
|
4171
|
-
_devkit.generateFiles.call(void 0, tree,
|
|
3282
|
+
_devkit.generateFiles.call(void 0, tree, path3.join(__dirname, "files"), projectRoot, {
|
|
4172
3283
|
...options,
|
|
4173
3284
|
pnpmVersion,
|
|
4174
3285
|
nodeVersion
|
|
@@ -4237,23 +3348,23 @@ async function presetGeneratorFn(tree, options) {
|
|
|
4237
3348
|
await Promise.resolve(_devkit.addDependenciesToPackageJson.call(void 0, tree, dependencies, {}, _devkit.joinPathFragments.call(void 0, projectRoot, "package.json")));
|
|
4238
3349
|
return null;
|
|
4239
3350
|
}
|
|
4240
|
-
|
|
3351
|
+
_chunkBBEYLIXNjs.__name.call(void 0, presetGeneratorFn, "presetGeneratorFn");
|
|
4241
3352
|
var generator_default5 = withRunGenerator("Storm Workspace Preset Generator", presetGeneratorFn);
|
|
4242
3353
|
|
|
4243
3354
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
4244
|
-
|
|
3355
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4245
3356
|
|
|
4246
3357
|
var _resolvelocalpackagedependencies = require('@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies');
|
|
4247
3358
|
var _updatelockfile = require('@nx/js/src/release/utils/update-lock-file');
|
|
4248
3359
|
|
|
4249
3360
|
// ../git-tools/src/index.ts
|
|
4250
|
-
|
|
3361
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4251
3362
|
|
|
4252
3363
|
// ../git-tools/src/commit/config.ts
|
|
4253
|
-
|
|
3364
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4254
3365
|
|
|
4255
3366
|
// ../git-tools/src/types.ts
|
|
4256
|
-
|
|
3367
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4257
3368
|
var DEFAULT_COMMIT_TYPES = {
|
|
4258
3369
|
/* --- Bumps version when selected --- */
|
|
4259
3370
|
chore: {
|
|
@@ -4428,7 +3539,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
4428
3539
|
type: "input",
|
|
4429
3540
|
title: "Breaking Changes (Details)",
|
|
4430
3541
|
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
4431
|
-
when: /* @__PURE__ */
|
|
3542
|
+
when: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (answers) => answers.isBreaking === true, "when"),
|
|
4432
3543
|
maxLength: 600,
|
|
4433
3544
|
minLength: 3
|
|
4434
3545
|
},
|
|
@@ -4442,7 +3553,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
4442
3553
|
type: "input",
|
|
4443
3554
|
title: "Open Issue Affected (Details)",
|
|
4444
3555
|
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
4445
|
-
when: /* @__PURE__ */
|
|
3556
|
+
when: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (answers) => answers.isIssueAffected === true, "when"),
|
|
4446
3557
|
maxLength: 600,
|
|
4447
3558
|
minLength: 3
|
|
4448
3559
|
}
|
|
@@ -4455,7 +3566,7 @@ var RuleConfigSeverity;
|
|
|
4455
3566
|
})(RuleConfigSeverity || (RuleConfigSeverity = {}));
|
|
4456
3567
|
|
|
4457
3568
|
// ../git-tools/src/release/config.ts
|
|
4458
|
-
|
|
3569
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4459
3570
|
|
|
4460
3571
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
4461
3572
|
|
|
@@ -4469,10 +3580,10 @@ var _utils = require('nx/src/tasks-runner/utils');
|
|
|
4469
3580
|
var _semver3 = require('semver');
|
|
4470
3581
|
|
|
4471
3582
|
// ../workspace-tools/src/base/index.ts
|
|
4472
|
-
|
|
3583
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4473
3584
|
|
|
4474
3585
|
// ../workspace-tools/src/base/base-executor.untyped.ts
|
|
4475
|
-
|
|
3586
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4476
3587
|
var _untyped = require('untyped');
|
|
4477
3588
|
var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4478
3589
|
$schema: {
|
|
@@ -4492,7 +3603,7 @@ var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
|
4492
3603
|
});
|
|
4493
3604
|
|
|
4494
3605
|
// ../workspace-tools/src/base/base-generator.untyped.ts
|
|
4495
|
-
|
|
3606
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4496
3607
|
|
|
4497
3608
|
var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4498
3609
|
$schema: {
|
|
@@ -4510,7 +3621,7 @@ var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
|
4510
3621
|
});
|
|
4511
3622
|
|
|
4512
3623
|
// ../workspace-tools/src/base/cargo-base-executor.untyped.ts
|
|
4513
|
-
|
|
3624
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4514
3625
|
|
|
4515
3626
|
var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4516
3627
|
...base_executor_untyped_default,
|
|
@@ -4597,7 +3708,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
4597
3708
|
});
|
|
4598
3709
|
|
|
4599
3710
|
// ../workspace-tools/src/base/typescript-build-executor.untyped.ts
|
|
4600
|
-
|
|
3711
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4601
3712
|
|
|
4602
3713
|
var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4603
3714
|
...base_executor_untyped_default,
|
|
@@ -4702,7 +3813,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4702
3813
|
]
|
|
4703
3814
|
},
|
|
4704
3815
|
$default: "esnext",
|
|
4705
|
-
$resolve: /* @__PURE__ */
|
|
3816
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = "esnext") => val.toLowerCase(), "$resolve")
|
|
4706
3817
|
},
|
|
4707
3818
|
format: {
|
|
4708
3819
|
$schema: {
|
|
@@ -4718,7 +3829,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4718
3829
|
]
|
|
4719
3830
|
}
|
|
4720
3831
|
},
|
|
4721
|
-
$resolve: /* @__PURE__ */
|
|
3832
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = [
|
|
4722
3833
|
"cjs",
|
|
4723
3834
|
"esm"
|
|
4724
3835
|
]) => [].concat(val), "$resolve")
|
|
@@ -4742,7 +3853,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4742
3853
|
type: "array",
|
|
4743
3854
|
description: "The external dependencies"
|
|
4744
3855
|
},
|
|
4745
|
-
$resolve: /* @__PURE__ */
|
|
3856
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = []) => [].concat(val), "$resolve")
|
|
4746
3857
|
},
|
|
4747
3858
|
define: {
|
|
4748
3859
|
$schema: {
|
|
@@ -4751,7 +3862,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4751
3862
|
tsType: "Record<string, string>",
|
|
4752
3863
|
description: "The define values"
|
|
4753
3864
|
},
|
|
4754
|
-
$resolve: /* @__PURE__ */
|
|
3865
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = {}) => val, "$resolve"),
|
|
4755
3866
|
$default: {}
|
|
4756
3867
|
},
|
|
4757
3868
|
env: {
|
|
@@ -4761,13 +3872,13 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4761
3872
|
tsType: "Record<string, string>",
|
|
4762
3873
|
description: "The environment variable values"
|
|
4763
3874
|
},
|
|
4764
|
-
$resolve: /* @__PURE__ */
|
|
3875
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = {}) => val, "$resolve"),
|
|
4765
3876
|
$default: {}
|
|
4766
3877
|
}
|
|
4767
3878
|
});
|
|
4768
3879
|
|
|
4769
3880
|
// ../workspace-tools/src/base/typescript-library-generator.untyped.ts
|
|
4770
|
-
|
|
3881
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4771
3882
|
|
|
4772
3883
|
var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4773
3884
|
...base_generator_untyped_default,
|
|
@@ -4888,24 +3999,24 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4888
3999
|
});
|
|
4889
4000
|
|
|
4890
4001
|
// ../workspace-tools/src/types.ts
|
|
4891
|
-
|
|
4002
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4892
4003
|
|
|
4893
4004
|
// ../workspace-tools/src/utils/index.ts
|
|
4894
|
-
|
|
4005
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4895
4006
|
|
|
4896
4007
|
// ../workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
4897
|
-
|
|
4008
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4898
4009
|
|
|
4899
4010
|
// ../workspace-tools/src/utils/create-cli-options.ts
|
|
4900
|
-
|
|
4011
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4901
4012
|
|
|
4902
4013
|
|
|
4903
4014
|
// ../workspace-tools/src/utils/get-project-configurations.ts
|
|
4904
|
-
|
|
4015
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4905
4016
|
var _retrieveworkspacefiles = require('nx/src/project-graph/utils/retrieve-workspace-files');
|
|
4906
4017
|
|
|
4907
4018
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
4908
|
-
|
|
4019
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4909
4020
|
|
|
4910
4021
|
|
|
4911
4022
|
|
|
@@ -4920,19 +4031,19 @@ var NPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, NPM_LOCK_FILE
|
|
|
4920
4031
|
var PNPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, PNPM_LOCK_FILE);
|
|
4921
4032
|
|
|
4922
4033
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
4923
|
-
|
|
4034
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4924
4035
|
|
|
4925
4036
|
|
|
4926
4037
|
|
|
4927
4038
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4928
|
-
|
|
4039
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4929
4040
|
|
|
4930
4041
|
|
|
4931
4042
|
|
|
4932
4043
|
|
|
4933
4044
|
|
|
4934
4045
|
// ../workspace-tools/src/utils/typia-transform.ts
|
|
4935
|
-
|
|
4046
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4936
4047
|
var _transform = require('typia/lib/transform'); var _transform2 = _interopRequireDefault(_transform);
|
|
4937
4048
|
|
|
4938
4049
|
// src/generators/init/generator.ts
|
|
@@ -4944,7 +4055,7 @@ async function initGeneratorFn(tree, options, config) {
|
|
|
4944
4055
|
}
|
|
4945
4056
|
return task;
|
|
4946
4057
|
}
|
|
4947
|
-
|
|
4058
|
+
_chunkBBEYLIXNjs.__name.call(void 0, initGeneratorFn, "initGeneratorFn");
|
|
4948
4059
|
var generator_default6 = withRunGenerator("Initialize Storm Projen workspace", initGeneratorFn);
|
|
4949
4060
|
function addProjenDeps(tree, options) {
|
|
4950
4061
|
return () => {
|
|
@@ -4955,7 +4066,7 @@ function addProjenDeps(tree, options) {
|
|
|
4955
4066
|
}
|
|
4956
4067
|
};
|
|
4957
4068
|
}
|
|
4958
|
-
|
|
4069
|
+
_chunkBBEYLIXNjs.__name.call(void 0, addProjenDeps, "addProjenDeps");
|
|
4959
4070
|
|
|
4960
4071
|
|
|
4961
4072
|
|