@storm-software/projen 0.9.56 → 0.9.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -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-ZG2OCU4F.js → chunk-BBEYLIXN.js} +2 -2
- package/dist/{chunk-L5O7P2JV.mjs → chunk-C24G3GOI.mjs} +1 -1
- package/dist/{chunk-Q7YWQALM.mjs → chunk-GPWOJMS2.mjs} +218 -1098
- package/dist/{chunk-3WPO62ST.js → chunk-NMWCKTG6.js} +472 -1352
- 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.d.mts +2 -1
- package/dist/generators.d.ts +2 -1
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- 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.d.mts +3 -1291
- package/dist/src/generators/init/generator.d.ts +3 -1291
- 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 +9 -6
- 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,29 @@ ${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__ */
|
|
1793
|
-
|
|
1775
|
+
var addPackageDependencies = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (workspaceRoot3, projectRoot, projectName, packageJson) => {
|
|
1776
|
+
let projectGraph;
|
|
1777
|
+
try {
|
|
1778
|
+
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
1779
|
+
} catch (e2) {
|
|
1780
|
+
await _projectgraph.createProjectGraphAsync.call(void 0, );
|
|
1781
|
+
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
1782
|
+
}
|
|
1783
|
+
if (!projectGraph) {
|
|
1784
|
+
throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
|
|
1785
|
+
}
|
|
1794
1786
|
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
1787
|
const localPackages = [];
|
|
1796
1788
|
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
1789
|
const projectNode = project.node;
|
|
1798
1790
|
if (projectNode.data.root) {
|
|
1799
|
-
const projectPackageJsonPath =
|
|
1791
|
+
const projectPackageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
1800
1792
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
1801
1793
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
1802
1794
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -1808,7 +1800,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0
|
|
|
1808
1800
|
}
|
|
1809
1801
|
if (localPackages.length > 0) {
|
|
1810
1802
|
writeTrace(`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
1811
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
1803
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
1812
1804
|
const projectJson = JSON.parse(projectJsonFile);
|
|
1813
1805
|
const projectName2 = projectJson.name;
|
|
1814
1806
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -1817,7 +1809,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0
|
|
|
1817
1809
|
}
|
|
1818
1810
|
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
1811
|
if (_optionalChain([projectConfigurations, 'access', _96 => _96.projects, 'optionalAccess', _97 => _97[dep]])) {
|
|
1820
|
-
const depPackageJsonPath =
|
|
1812
|
+
const depPackageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
|
|
1821
1813
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
1822
1814
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
1823
1815
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -1845,9 +1837,9 @@ var addPackageDependencies = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0
|
|
|
1845
1837
|
}
|
|
1846
1838
|
return packageJson;
|
|
1847
1839
|
}, "addPackageDependencies");
|
|
1848
|
-
var addWorkspacePackageJsonFields = /* @__PURE__ */
|
|
1849
|
-
const workspaceRoot3 =
|
|
1850
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
1840
|
+
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
1841
|
+
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
|
|
1842
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
1851
1843
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
1852
1844
|
packageJson.type ??= "module";
|
|
1853
1845
|
packageJson.sideEffects ??= false;
|
|
@@ -1856,7 +1848,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call
|
|
|
1856
1848
|
if (distSrc.startsWith("/")) {
|
|
1857
1849
|
distSrc = distSrc.substring(1);
|
|
1858
1850
|
}
|
|
1859
|
-
packageJson.source ??= `${
|
|
1851
|
+
packageJson.source ??= `${_chunk44UHVCK5js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
1860
1852
|
}
|
|
1861
1853
|
packageJson.files ??= [
|
|
1862
1854
|
"dist/**/*"
|
|
@@ -1887,17 +1879,17 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call
|
|
|
1887
1879
|
];
|
|
1888
1880
|
}
|
|
1889
1881
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
1890
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
1882
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk44UHVCK5js.joinPaths.call(void 0, "packages", projectName);
|
|
1891
1883
|
return packageJson;
|
|
1892
1884
|
}, "addWorkspacePackageJsonFields");
|
|
1893
1885
|
|
|
1894
1886
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
1895
|
-
|
|
1887
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1896
1888
|
|
|
1897
1889
|
|
|
1898
1890
|
// ../build-tools/src/utilities/get-env.ts
|
|
1899
|
-
|
|
1900
|
-
var getEnv = /* @__PURE__ */
|
|
1891
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1892
|
+
var getEnv = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (builder, options) => {
|
|
1901
1893
|
return {
|
|
1902
1894
|
STORM_BUILD: builder,
|
|
1903
1895
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
@@ -1911,507 +1903,64 @@ var getEnv = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (builder, opti
|
|
|
1911
1903
|
}, "getEnv");
|
|
1912
1904
|
|
|
1913
1905
|
// ../build-tools/src/utilities/get-file-banner.ts
|
|
1914
|
-
|
|
1906
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1915
1907
|
|
|
1916
1908
|
// ../build-tools/src/utilities/get-out-extension.ts
|
|
1917
|
-
|
|
1909
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1918
1910
|
|
|
1919
1911
|
// ../build-tools/src/utilities/get-project-deps.ts
|
|
1920
|
-
|
|
1912
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1921
1913
|
|
|
1922
1914
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
1923
|
-
|
|
1915
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1924
1916
|
|
|
1925
1917
|
|
|
1926
1918
|
|
|
1927
1919
|
// ../build-tools/src/utilities/task-graph.ts
|
|
1928
|
-
|
|
1920
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
1929
1921
|
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
1930
1922
|
|
|
1931
1923
|
// ../esbuild/src/build.ts
|
|
1932
1924
|
var _chokidar = require('chokidar');
|
|
1933
1925
|
|
|
1934
1926
|
var _estoolkit = require('es-toolkit');
|
|
1935
|
-
var
|
|
1936
|
-
var _esbuild = require('esbuild'); var esbuild2 = _interopRequireWildcard(_esbuild); var esbuild = _interopRequireWildcard(_esbuild);
|
|
1927
|
+
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
1937
1928
|
var _globby = require('globby');
|
|
1938
1929
|
|
|
1939
1930
|
|
|
1940
1931
|
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
|
-
};
|
|
1932
|
+
var _tsup = require('tsup');
|
|
2084
1933
|
|
|
2085
1934
|
// ../esbuild/src/clean.ts
|
|
2086
|
-
|
|
1935
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
2087
1936
|
|
|
2088
|
-
async function cleanDirectories(
|
|
1937
|
+
async function cleanDirectories(directory) {
|
|
2089
1938
|
await _promises.rm.call(void 0, directory, {
|
|
2090
1939
|
recursive: true,
|
|
2091
1940
|
force: true
|
|
2092
1941
|
});
|
|
2093
1942
|
}
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
// ../esbuild/src/config.ts
|
|
2097
|
-
_chunkZG2OCU4Fjs.init_cjs_shims.call(void 0, );
|
|
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");
|
|
1943
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
2376
1944
|
|
|
2377
1945
|
// ../esbuild/src/config.ts
|
|
2378
|
-
|
|
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");
|
|
1946
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
2387
1947
|
var DEFAULT_BUILD_OPTIONS = {
|
|
1948
|
+
assets: [],
|
|
2388
1949
|
platform: "node",
|
|
2389
|
-
target:
|
|
1950
|
+
target: [
|
|
1951
|
+
"esnext"
|
|
1952
|
+
],
|
|
2390
1953
|
format: "esm",
|
|
2391
|
-
external: [],
|
|
2392
|
-
logLevel: "error",
|
|
2393
1954
|
tsconfig: "tsconfig.json",
|
|
2394
1955
|
mode: "production",
|
|
1956
|
+
generatePackageJson: true,
|
|
1957
|
+
includeSrc: false,
|
|
2395
1958
|
keepNames: true,
|
|
2396
|
-
metafile:
|
|
2397
|
-
|
|
2398
|
-
|
|
1959
|
+
metafile: false,
|
|
1960
|
+
treeshake: true,
|
|
1961
|
+
shims: false,
|
|
2399
1962
|
watch: false,
|
|
2400
1963
|
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
1964
|
loader: {
|
|
2416
1965
|
".aac": "file",
|
|
2417
1966
|
".css": "file",
|
|
@@ -2433,11 +1982,14 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
2433
1982
|
".woff": "file",
|
|
2434
1983
|
".woff2": "file"
|
|
2435
1984
|
},
|
|
2436
|
-
banner:
|
|
1985
|
+
banner: {
|
|
1986
|
+
js: DEFAULT_COMPILED_BANNER,
|
|
1987
|
+
css: DEFAULT_COMPILED_BANNER
|
|
1988
|
+
}
|
|
2437
1989
|
};
|
|
2438
1990
|
|
|
2439
1991
|
// ../esbuild/src/plugins/deps-check.ts
|
|
2440
|
-
|
|
1992
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
2441
1993
|
|
|
2442
1994
|
|
|
2443
1995
|
var unusedIgnore = [
|
|
@@ -2469,11 +2021,11 @@ var missingIgnore = [
|
|
|
2469
2021
|
"@prisma/client",
|
|
2470
2022
|
"ts-toolbelt"
|
|
2471
2023
|
];
|
|
2472
|
-
var depsCheckPlugin = /* @__PURE__ */
|
|
2024
|
+
var depsCheckPlugin = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (bundle) => ({
|
|
2473
2025
|
name: "storm:deps-check",
|
|
2474
|
-
setup(
|
|
2475
|
-
const pkgJsonPath =
|
|
2476
|
-
const pkgContents =
|
|
2026
|
+
setup(build3) {
|
|
2027
|
+
const pkgJsonPath = path3.default.join(process.cwd(), "package.json");
|
|
2028
|
+
const pkgContents = _chunkBBEYLIXNjs.__require.call(void 0, pkgJsonPath);
|
|
2477
2029
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
2478
2030
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
2479
2031
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -2483,7 +2035,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (bund
|
|
|
2483
2035
|
];
|
|
2484
2036
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2485
2037
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2486
|
-
|
|
2038
|
+
build3.onResolve({
|
|
2487
2039
|
filter: onlyPackages
|
|
2488
2040
|
}, (args) => {
|
|
2489
2041
|
if (args.importer.includes(process.cwd())) {
|
|
@@ -2499,7 +2051,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (bund
|
|
|
2499
2051
|
external: true
|
|
2500
2052
|
};
|
|
2501
2053
|
});
|
|
2502
|
-
|
|
2054
|
+
build3.onEnd(() => {
|
|
2503
2055
|
const unusedDependencies = [
|
|
2504
2056
|
...dependencies
|
|
2505
2057
|
].filter((dep) => {
|
|
@@ -2527,395 +2079,53 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
2527
2079
|
}
|
|
2528
2080
|
}), "depsCheckPlugin");
|
|
2529
2081
|
|
|
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
2082
|
// ../esbuild/src/build.ts
|
|
2841
|
-
|
|
2083
|
+
async function resolveContext(userOptions) {
|
|
2842
2084
|
const projectRoot = userOptions.projectRoot;
|
|
2843
2085
|
const workspaceRoot3 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
|
|
2844
2086
|
if (!workspaceRoot3) {
|
|
2845
2087
|
throw new Error("Cannot find Nx workspace root");
|
|
2846
2088
|
}
|
|
2847
|
-
const
|
|
2848
|
-
|
|
2089
|
+
const workspaceConfig = await getWorkspaceConfig(true, {
|
|
2090
|
+
workspaceRoot: workspaceRoot3.dir
|
|
2091
|
+
});
|
|
2092
|
+
writeDebug(" \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
2849
2093
|
const stopwatch = getStopwatch("Build options resolution");
|
|
2850
2094
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
2851
2095
|
exitOnError: true
|
|
2852
2096
|
});
|
|
2853
|
-
const projectJsonPath =
|
|
2097
|
+
const projectJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
2854
2098
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2855
2099
|
throw new Error("Cannot find project.json configuration");
|
|
2856
2100
|
}
|
|
2857
2101
|
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
2858
2102
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2859
|
-
const projectName = projectJson.name;
|
|
2103
|
+
const projectName = projectJson.name || userOptions.name;
|
|
2860
2104
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2861
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2105
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _106 => _106.projects, 'optionalAccess', _107 => _107[projectName]])) {
|
|
2862
2106
|
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
2107
|
}
|
|
2864
2108
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
2865
2109
|
options.name ??= `${projectName}-${options.format}`;
|
|
2866
2110
|
options.target ??= DEFAULT_TARGET;
|
|
2867
|
-
const packageJsonPath =
|
|
2111
|
+
const packageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
2868
2112
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2869
2113
|
throw new Error("Cannot find package.json configuration");
|
|
2870
2114
|
}
|
|
2871
2115
|
const env = getEnv("esbuild", options);
|
|
2872
|
-
const
|
|
2116
|
+
const resolvedOptions = {
|
|
2873
2117
|
...options,
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
] : [
|
|
2879
|
-
"browser",
|
|
2880
|
-
"module",
|
|
2881
|
-
"main"
|
|
2882
|
-
],
|
|
2118
|
+
tsconfig: _chunk44UHVCK5js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
2119
|
+
distDir: "dist",
|
|
2120
|
+
name: projectName,
|
|
2121
|
+
metafile: userOptions.mode === "development",
|
|
2883
2122
|
...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",
|
|
2123
|
+
clean: false,
|
|
2124
|
+
target: userOptions.target || options.target,
|
|
2125
|
+
splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
|
|
2913
2126
|
env,
|
|
2914
2127
|
define: {
|
|
2915
|
-
STORM_FORMAT: JSON.stringify(options.format
|
|
2916
|
-
...options.format === "cjs" && options.injectShims ? {
|
|
2917
|
-
"import.meta.url": "importMetaUrl"
|
|
2918
|
-
} : {},
|
|
2128
|
+
STORM_FORMAT: JSON.stringify(options.format),
|
|
2919
2129
|
...options.define,
|
|
2920
2130
|
...Object.keys(env || {}).reduce((res, key) => {
|
|
2921
2131
|
const value = JSON.stringify(env[key]);
|
|
@@ -2926,170 +2136,101 @@ var resolveOptions = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, async
|
|
|
2926
2136
|
[`import.meta.env.${safeKey}`]: value
|
|
2927
2137
|
};
|
|
2928
2138
|
}, {})
|
|
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)
|
|
2139
|
+
}
|
|
2934
2140
|
};
|
|
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
2141
|
stopwatch();
|
|
2947
|
-
return
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2142
|
+
return {
|
|
2143
|
+
options: resolvedOptions,
|
|
2144
|
+
clean: userOptions.clean !== false,
|
|
2145
|
+
workspaceConfig,
|
|
2146
|
+
projectConfigurations,
|
|
2147
|
+
projectName,
|
|
2148
|
+
projectGraph,
|
|
2149
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunk44UHVCK5js.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
2150
|
+
outputPath: resolvedOptions.outputPath || _chunk44UHVCK5js.joinPaths.call(void 0, workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
|
|
2151
|
+
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2152
|
+
};
|
|
2153
|
+
}
|
|
2154
|
+
_chunkBBEYLIXNjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
2155
|
+
async function generatePackageJson(context) {
|
|
2156
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
2157
|
+
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
2952
2158
|
const stopwatch = getStopwatch("Write package.json file");
|
|
2953
|
-
const packageJsonPath =
|
|
2159
|
+
const packageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, context.options.projectRoot, "project.json");
|
|
2954
2160
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2955
2161
|
throw new Error("Cannot find package.json configuration");
|
|
2956
2162
|
}
|
|
2957
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
2163
|
+
const packageJsonFile = await _promises2.default.readFile(_chunk44UHVCK5js.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
|
|
2958
2164
|
let packageJson = JSON.parse(packageJsonFile);
|
|
2959
2165
|
if (!packageJson) {
|
|
2960
2166
|
throw new Error("Cannot find package.json configuration file");
|
|
2961
2167
|
}
|
|
2962
|
-
packageJson = await addPackageDependencies(
|
|
2963
|
-
packageJson = await addWorkspacePackageJsonFields(
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2168
|
+
packageJson = await addPackageDependencies(context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
|
|
2169
|
+
packageJson = await addWorkspacePackageJsonFields(context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
|
|
2170
|
+
if (context.options.entry) {
|
|
2171
|
+
packageJson.exports ??= {};
|
|
2172
|
+
packageJson.exports["./package.json"] ??= "./package.json";
|
|
2173
|
+
packageJson.exports["."] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js`;
|
|
2174
|
+
const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
|
|
2175
|
+
for (const entryPoint of entryPoints) {
|
|
2176
|
+
if (context.options.entry[entryPoint]) {
|
|
2177
|
+
const entry = context.options.entry[entryPoint].replaceAll("\\", "/").replaceAll(/^(\.\/)*/g, "").replace(/\.([cm])?[jt]s(x)?$/g, "");
|
|
2178
|
+
packageJson.exports[`./${entry}`] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entry}.js`;
|
|
2179
|
+
}
|
|
2971
2180
|
}
|
|
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];
|
|
2181
|
+
if (context.options.format === "esm") {
|
|
2182
|
+
packageJson.module = packageJson.type === "module" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.mjs`;
|
|
2183
|
+
} else {
|
|
2184
|
+
packageJson.main = packageJson.type === "commonjs" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.cjs`;
|
|
2982
2185
|
}
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2186
|
+
packageJson.types = `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.d.ts`;
|
|
2187
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
2188
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
2189
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
2190
|
+
}
|
|
2191
|
+
return ret;
|
|
2192
|
+
}, packageJson.exports);
|
|
2193
|
+
}
|
|
2194
|
+
await _devkit.writeJsonFile.call(void 0, _chunk44UHVCK5js.joinPaths.call(void 0, context.outputPath, "package.json"), packageJson);
|
|
2986
2195
|
stopwatch();
|
|
2987
2196
|
}
|
|
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
|
-
};
|
|
2197
|
+
return context;
|
|
3008
2198
|
}
|
|
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
|
-
}
|
|
2199
|
+
_chunkBBEYLIXNjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
2200
|
+
async function executeTsup(context) {
|
|
2201
|
+
writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
|
|
2202
|
+
const stopwatch = getStopwatch(`${context.options.name} build`);
|
|
2203
|
+
await _tsup.build.call(void 0, {
|
|
2204
|
+
...context.options,
|
|
2205
|
+
outDir: context.outputPath,
|
|
2206
|
+
workspaceConfig: context.workspaceConfig
|
|
2207
|
+
});
|
|
3057
2208
|
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;
|
|
2209
|
+
return context;
|
|
3069
2210
|
}
|
|
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(
|
|
2211
|
+
_chunkBBEYLIXNjs.__name.call(void 0, executeTsup, "executeTsup");
|
|
2212
|
+
async function copyBuildAssets(context) {
|
|
2213
|
+
if (_optionalChain([context, 'access', _108 => _108.result, 'optionalAccess', _109 => _109.errors, 'access', _110 => _110.length]) === 0) {
|
|
2214
|
+
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
2215
|
+
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
2216
|
+
await copyAssets(context.workspaceConfig, _nullishCoalesce(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
3076
2217
|
stopwatch();
|
|
3077
2218
|
}
|
|
3078
|
-
return
|
|
2219
|
+
return context;
|
|
3079
2220
|
}
|
|
3080
|
-
|
|
3081
|
-
async function reportResults(
|
|
3082
|
-
if (_optionalChain([
|
|
3083
|
-
if (
|
|
3084
|
-
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${
|
|
2221
|
+
_chunkBBEYLIXNjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
2222
|
+
async function reportResults(context) {
|
|
2223
|
+
if (_optionalChain([context, 'access', _111 => _111.result, 'optionalAccess', _112 => _112.errors, 'access', _113 => _113.length]) === 0) {
|
|
2224
|
+
if (context.result.warnings.length > 0) {
|
|
2225
|
+
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
|
|
3085
2226
|
}
|
|
3086
|
-
writeSuccess(` \u{1F4E6} The ${
|
|
3087
|
-
} else if (_optionalChain([
|
|
3088
|
-
writeError(` \u274C The ${
|
|
3089
|
-
throw new Error(`The ${
|
|
2227
|
+
writeSuccess(` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
|
|
2228
|
+
} 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) {
|
|
2229
|
+
writeError(` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
|
|
2230
|
+
throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
|
|
3090
2231
|
}
|
|
3091
2232
|
}
|
|
3092
|
-
|
|
2233
|
+
_chunkBBEYLIXNjs.__name.call(void 0, reportResults, "reportResults");
|
|
3093
2234
|
async function dependencyCheck(options) {
|
|
3094
2235
|
if (process.env.DEV === "true") {
|
|
3095
2236
|
return void 0;
|
|
@@ -3097,7 +2238,7 @@ async function dependencyCheck(options) {
|
|
|
3097
2238
|
if (process.env.CI && !process.env.BUILDKITE) {
|
|
3098
2239
|
return void 0;
|
|
3099
2240
|
}
|
|
3100
|
-
const buildPromise =
|
|
2241
|
+
const buildPromise = esbuild.build({
|
|
3101
2242
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
3102
2243
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
3103
2244
|
ignore: [
|
|
@@ -3119,18 +2260,18 @@ async function dependencyCheck(options) {
|
|
|
3119
2260
|
});
|
|
3120
2261
|
return void 0;
|
|
3121
2262
|
}
|
|
3122
|
-
|
|
3123
|
-
async function cleanOutputPath(
|
|
3124
|
-
if (
|
|
3125
|
-
writeDebug(` \u{1F9F9} Cleaning ${
|
|
3126
|
-
const stopwatch = getStopwatch(`${
|
|
3127
|
-
await cleanDirectories(
|
|
2263
|
+
_chunkBBEYLIXNjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
2264
|
+
async function cleanOutputPath(context) {
|
|
2265
|
+
if (context.clean !== false && context.outputPath) {
|
|
2266
|
+
writeDebug(` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
|
|
2267
|
+
const stopwatch = getStopwatch(`${context.options.name} output clean`);
|
|
2268
|
+
await cleanDirectories(context.outputPath);
|
|
3128
2269
|
stopwatch();
|
|
3129
2270
|
}
|
|
3130
|
-
return
|
|
2271
|
+
return context;
|
|
3131
2272
|
}
|
|
3132
|
-
|
|
3133
|
-
async function
|
|
2273
|
+
_chunkBBEYLIXNjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
2274
|
+
async function build2(options) {
|
|
3134
2275
|
writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
|
|
3135
2276
|
const stopwatch = getStopwatch("ESBuild pipeline");
|
|
3136
2277
|
try {
|
|
@@ -3140,8 +2281,15 @@ async function build3(options) {
|
|
|
3140
2281
|
if (opts.length === 0) {
|
|
3141
2282
|
throw new Error("No build options were provided");
|
|
3142
2283
|
}
|
|
3143
|
-
|
|
3144
|
-
await
|
|
2284
|
+
const context = await resolveContext(options);
|
|
2285
|
+
await cleanOutputPath(context);
|
|
2286
|
+
await Promise.all([
|
|
2287
|
+
dependencyCheck(context.options),
|
|
2288
|
+
generatePackageJson(context),
|
|
2289
|
+
copyBuildAssets(context),
|
|
2290
|
+
executeTsup(context)
|
|
2291
|
+
]);
|
|
2292
|
+
await reportResults(context);
|
|
3145
2293
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
3146
2294
|
} catch (error) {
|
|
3147
2295
|
writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
@@ -3150,47 +2298,19 @@ async function build3(options) {
|
|
|
3150
2298
|
stopwatch();
|
|
3151
2299
|
}
|
|
3152
2300
|
}
|
|
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");
|
|
2301
|
+
_chunkBBEYLIXNjs.__name.call(void 0, build2, "build");
|
|
3182
2302
|
|
|
3183
2303
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
3184
|
-
async function esbuildExecutorFn(options,
|
|
2304
|
+
async function esbuildExecutorFn(options, context, config) {
|
|
3185
2305
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
3186
|
-
if (!_optionalChain([
|
|
2306
|
+
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
2307
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
3188
2308
|
}
|
|
3189
|
-
await
|
|
2309
|
+
await build2({
|
|
3190
2310
|
...options,
|
|
3191
|
-
projectRoot: _optionalChain([
|
|
3192
|
-
|
|
3193
|
-
sourceRoot: _optionalChain([
|
|
2311
|
+
projectRoot: _optionalChain([context, 'access', _125 => _125.projectsConfigurations, 'access', _126 => _126.projects, 'optionalAccess', _127 => _127[context.projectName], 'access', _128 => _128.root]),
|
|
2312
|
+
name: context.projectName,
|
|
2313
|
+
sourceRoot: _optionalChain([context, 'access', _129 => _129.projectsConfigurations, 'access', _130 => _130.projects, 'optionalAccess', _131 => _131[context.projectName], 'optionalAccess', _132 => _132.sourceRoot]),
|
|
3194
2314
|
format: options.format,
|
|
3195
2315
|
platform: options.format
|
|
3196
2316
|
});
|
|
@@ -3198,11 +2318,11 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
3198
2318
|
success: true
|
|
3199
2319
|
};
|
|
3200
2320
|
}
|
|
3201
|
-
|
|
2321
|
+
_chunkBBEYLIXNjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
3202
2322
|
var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn, {
|
|
3203
2323
|
skipReadingConfig: false,
|
|
3204
2324
|
hooks: {
|
|
3205
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2325
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (options, config) => {
|
|
3206
2326
|
options.entry ??= [
|
|
3207
2327
|
"src/index.ts"
|
|
3208
2328
|
];
|
|
@@ -3214,57 +2334,57 @@ var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn
|
|
|
3214
2334
|
});
|
|
3215
2335
|
|
|
3216
2336
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
3217
|
-
|
|
2337
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3218
2338
|
|
|
3219
2339
|
|
|
3220
2340
|
|
|
3221
2341
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
3222
|
-
|
|
2342
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3223
2343
|
|
|
3224
2344
|
|
|
3225
2345
|
var _prettier = require('prettier');
|
|
3226
2346
|
var _readyamlfile = require('read-yaml-file'); var _readyamlfile2 = _interopRequireDefault(_readyamlfile);
|
|
3227
2347
|
|
|
3228
2348
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
3229
|
-
var
|
|
2349
|
+
var LARGE_BUFFER2 = 1024 * 1e6;
|
|
3230
2350
|
|
|
3231
2351
|
// ../workspace-tools/src/executors/size-limit/executor.ts
|
|
3232
|
-
|
|
2352
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3233
2353
|
|
|
3234
2354
|
var _esbuild2 = require('@size-limit/esbuild'); var _esbuild3 = _interopRequireDefault(_esbuild2);
|
|
3235
2355
|
var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _interopRequireDefault(_esbuildwhy);
|
|
3236
2356
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
3237
2357
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
3238
|
-
async function sizeLimitExecutorFn(options,
|
|
3239
|
-
if (!_optionalChain([
|
|
2358
|
+
async function sizeLimitExecutorFn(options, context, config) {
|
|
2359
|
+
if (!_optionalChain([context, 'optionalAccess', _133 => _133.projectName]) || !_optionalChain([context, 'access', _134 => _134.projectsConfigurations, 'optionalAccess', _135 => _135.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3240
2360
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
3241
2361
|
}
|
|
3242
|
-
writeInfo(`\u{1F4CF} Running Size-Limit on ${
|
|
2362
|
+
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
3243
2363
|
_sizelimit2.default.call(void 0, [
|
|
3244
2364
|
_file2.default,
|
|
3245
2365
|
_esbuild3.default,
|
|
3246
2366
|
_esbuildwhy2.default
|
|
3247
2367
|
], {
|
|
3248
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([
|
|
2368
|
+
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
2369
|
}).then((result) => {
|
|
3250
|
-
writeInfo(`\u{1F4CF} ${
|
|
2370
|
+
writeInfo(`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
3251
2371
|
});
|
|
3252
2372
|
return {
|
|
3253
2373
|
success: true
|
|
3254
2374
|
};
|
|
3255
2375
|
}
|
|
3256
|
-
|
|
2376
|
+
_chunkBBEYLIXNjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
3257
2377
|
var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
3258
2378
|
skipReadingConfig: false,
|
|
3259
2379
|
hooks: {
|
|
3260
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2380
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3261
2381
|
return options;
|
|
3262
2382
|
}, "applyDefaultOptions")
|
|
3263
2383
|
}
|
|
3264
2384
|
});
|
|
3265
2385
|
|
|
3266
2386
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
3267
|
-
|
|
2387
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3268
2388
|
var _fsextra = require('fs-extra');
|
|
3269
2389
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
3270
2390
|
async function typiaExecutorFn(options, _, config) {
|
|
@@ -3284,11 +2404,11 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
3284
2404
|
success: true
|
|
3285
2405
|
};
|
|
3286
2406
|
}
|
|
3287
|
-
|
|
2407
|
+
_chunkBBEYLIXNjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
3288
2408
|
var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
|
|
3289
2409
|
skipReadingConfig: false,
|
|
3290
2410
|
hooks: {
|
|
3291
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2411
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3292
2412
|
options.entry ??= [
|
|
3293
2413
|
"{sourceRoot}/index.ts"
|
|
3294
2414
|
];
|
|
@@ -3301,35 +2421,35 @@ var executor_default8 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
3301
2421
|
});
|
|
3302
2422
|
|
|
3303
2423
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
3304
|
-
|
|
2424
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3305
2425
|
|
|
3306
2426
|
var _jiti = require('jiti');
|
|
3307
|
-
async function unbuildExecutorFn(options,
|
|
2427
|
+
async function unbuildExecutorFn(options, context, config) {
|
|
3308
2428
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
3309
|
-
if (!_optionalChain([
|
|
2429
|
+
if (!_optionalChain([context, 'access', _144 => _144.projectsConfigurations, 'optionalAccess', _145 => _145.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3310
2430
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
3311
2431
|
}
|
|
3312
|
-
if (!
|
|
2432
|
+
if (!context.projectsConfigurations.projects[context.projectName].root) {
|
|
3313
2433
|
throw new Error("The Build process failed because the project root is not valid. Please run this command from a workspace root directory.");
|
|
3314
2434
|
}
|
|
3315
|
-
if (!
|
|
2435
|
+
if (!context.projectsConfigurations.projects[context.projectName].sourceRoot) {
|
|
3316
2436
|
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
2437
|
}
|
|
3318
2438
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
3319
|
-
fsCache: config.skipCache ? false :
|
|
2439
|
+
fsCache: config.skipCache ? false : _chunk44UHVCK5js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
3320
2440
|
interopDefault: true
|
|
3321
2441
|
});
|
|
3322
2442
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
3323
2443
|
await stormUnbuild.build(_defu.defu.call(void 0, {
|
|
3324
2444
|
...options,
|
|
3325
|
-
projectRoot:
|
|
3326
|
-
projectName:
|
|
3327
|
-
sourceRoot:
|
|
2445
|
+
projectRoot: context.projectsConfigurations.projects[context.projectName].root,
|
|
2446
|
+
projectName: context.projectName,
|
|
2447
|
+
sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
|
|
3328
2448
|
platform: options.platform
|
|
3329
2449
|
}, {
|
|
3330
2450
|
stubOptions: {
|
|
3331
2451
|
jiti: {
|
|
3332
|
-
fsCache: config.skipCache ? false :
|
|
2452
|
+
fsCache: config.skipCache ? false : _chunk44UHVCK5js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
3333
2453
|
}
|
|
3334
2454
|
},
|
|
3335
2455
|
rollup: {
|
|
@@ -3352,11 +2472,11 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
3352
2472
|
success: true
|
|
3353
2473
|
};
|
|
3354
2474
|
}
|
|
3355
|
-
|
|
2475
|
+
_chunkBBEYLIXNjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
3356
2476
|
var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
|
|
3357
2477
|
skipReadingConfig: false,
|
|
3358
2478
|
hooks: {
|
|
3359
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2479
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, async (options, config) => {
|
|
3360
2480
|
options.debug ??= false;
|
|
3361
2481
|
options.treeShaking ??= true;
|
|
3362
2482
|
options.buildOnly ??= false;
|
|
@@ -3371,15 +2491,15 @@ var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecu
|
|
|
3371
2491
|
});
|
|
3372
2492
|
|
|
3373
2493
|
// ../workspace-tools/generators.ts
|
|
3374
|
-
|
|
2494
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3375
2495
|
|
|
3376
2496
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
3377
|
-
|
|
2497
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3378
2498
|
|
|
3379
2499
|
|
|
3380
2500
|
// ../workspace-tools/src/base/base-generator.ts
|
|
3381
|
-
|
|
3382
|
-
var withRunGenerator = /* @__PURE__ */
|
|
2501
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
2502
|
+
var withRunGenerator = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
3383
2503
|
skipReadingConfig: false
|
|
3384
2504
|
}) => async (tree, _options) => {
|
|
3385
2505
|
const stopwatch = getStopwatch(name);
|
|
@@ -3395,7 +2515,7 @@ var withRunGenerator = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (nam
|
|
|
3395
2515
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
3396
2516
|
config = await getConfig(workspaceRoot3);
|
|
3397
2517
|
}
|
|
3398
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2518
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _146 => _146.hooks, 'optionalAccess', _147 => _147.applyDefaultOptions])) {
|
|
3399
2519
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
3400
2520
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
3401
2521
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
@@ -3406,22 +2526,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
3406
2526
|
workspaceRoot: tree.root,
|
|
3407
2527
|
config
|
|
3408
2528
|
}, applyWorkspaceBaseTokens);
|
|
3409
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2529
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _148 => _148.hooks, 'optionalAccess', _149 => _149.preProcess])) {
|
|
3410
2530
|
writeDebug("Running the preProcess hook...", config);
|
|
3411
2531
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
3412
2532
|
writeDebug("Completed the preProcess hook", config);
|
|
3413
2533
|
}
|
|
3414
2534
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
3415
2535
|
if (result) {
|
|
3416
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
2536
|
+
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
2537
|
throw new Error(`The ${name} generator failed to run`, {
|
|
3418
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
2538
|
+
cause: _optionalChain([result, 'optionalAccess', _158 => _158.error])
|
|
3419
2539
|
});
|
|
3420
2540
|
} else if (result.success && result.data) {
|
|
3421
2541
|
return result;
|
|
3422
2542
|
}
|
|
3423
2543
|
}
|
|
3424
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2544
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _159 => _159.hooks, 'optionalAccess', _160 => _160.postProcess])) {
|
|
3425
2545
|
writeDebug("Running the postProcess hook...", config);
|
|
3426
2546
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
3427
2547
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -3443,7 +2563,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
3443
2563
|
}, "withRunGenerator");
|
|
3444
2564
|
|
|
3445
2565
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
3446
|
-
|
|
2566
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3447
2567
|
|
|
3448
2568
|
var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
|
|
3449
2569
|
var _js = require('@nx/js');
|
|
@@ -3451,7 +2571,7 @@ var _init = require('@nx/js/src/generators/init/init'); var _init2 = _interopReq
|
|
|
3451
2571
|
var _generator = require('@nx/js/src/generators/setup-verdaccio/generator'); var _generator2 = _interopRequireDefault(_generator);
|
|
3452
2572
|
|
|
3453
2573
|
// ../workspace-tools/src/utils/project-tags.ts
|
|
3454
|
-
|
|
2574
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3455
2575
|
var ProjectTagConstants = {
|
|
3456
2576
|
Language: {
|
|
3457
2577
|
TAG_ID: "language",
|
|
@@ -3489,15 +2609,15 @@ var ProjectTagConstants = {
|
|
|
3489
2609
|
TAG_ID: "plugin"
|
|
3490
2610
|
}
|
|
3491
2611
|
};
|
|
3492
|
-
var formatProjectTag = /* @__PURE__ */
|
|
2612
|
+
var formatProjectTag = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (variant, value) => {
|
|
3493
2613
|
return `${variant}:${value}`;
|
|
3494
2614
|
}, "formatProjectTag");
|
|
3495
|
-
var hasProjectTag = /* @__PURE__ */
|
|
2615
|
+
var hasProjectTag = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (project, variant) => {
|
|
3496
2616
|
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
3497
2617
|
const prefix = formatProjectTag(variant, "");
|
|
3498
2618
|
return project.tags.some((tag) => tag.startsWith(prefix) && tag.length > prefix.length);
|
|
3499
2619
|
}, "hasProjectTag");
|
|
3500
|
-
var addProjectTag = /* @__PURE__ */
|
|
2620
|
+
var addProjectTag = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (project, variant, value, options = {
|
|
3501
2621
|
overwrite: false
|
|
3502
2622
|
}) => {
|
|
3503
2623
|
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
@@ -3508,7 +2628,7 @@ var addProjectTag = /* @__PURE__ */ _chunkZG2OCU4Fjs.__name.call(void 0, (projec
|
|
|
3508
2628
|
}, "addProjectTag");
|
|
3509
2629
|
|
|
3510
2630
|
// ../workspace-tools/src/utils/versions.ts
|
|
3511
|
-
|
|
2631
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3512
2632
|
var typesNodeVersion = "20.9.0";
|
|
3513
2633
|
var nxVersion = "^18.0.4";
|
|
3514
2634
|
var nodeVersion = "20.11.0";
|
|
@@ -3538,7 +2658,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3538
2658
|
const projectConfig = {
|
|
3539
2659
|
root: normalized.directory,
|
|
3540
2660
|
projectType: "library",
|
|
3541
|
-
sourceRoot:
|
|
2661
|
+
sourceRoot: _chunk44UHVCK5js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
3542
2662
|
targets: {
|
|
3543
2663
|
build: {
|
|
3544
2664
|
executor: options.buildExecutor,
|
|
@@ -3547,11 +2667,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3547
2667
|
],
|
|
3548
2668
|
options: {
|
|
3549
2669
|
entry: [
|
|
3550
|
-
|
|
2670
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
3551
2671
|
],
|
|
3552
2672
|
outputPath: getOutputPath(normalized),
|
|
3553
|
-
tsconfig:
|
|
3554
|
-
project:
|
|
2673
|
+
tsconfig: _chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
2674
|
+
project: _chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
3555
2675
|
defaultConfiguration: "production",
|
|
3556
2676
|
platform: "neutral",
|
|
3557
2677
|
assets: [
|
|
@@ -3590,22 +2710,22 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3590
2710
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
3591
2711
|
let repository = {
|
|
3592
2712
|
type: "github",
|
|
3593
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
2713
|
+
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
2714
|
};
|
|
3595
2715
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
3596
2716
|
if (tree.exists("package.json")) {
|
|
3597
2717
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3598
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2718
|
+
if (_optionalChain([packageJson, 'optionalAccess', _165 => _165.repository])) {
|
|
3599
2719
|
repository = packageJson.repository;
|
|
3600
2720
|
}
|
|
3601
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2721
|
+
if (_optionalChain([packageJson, 'optionalAccess', _166 => _166.description])) {
|
|
3602
2722
|
description = packageJson.description;
|
|
3603
2723
|
}
|
|
3604
2724
|
}
|
|
3605
2725
|
if (!normalized.importPath) {
|
|
3606
2726
|
normalized.importPath = normalized.name;
|
|
3607
2727
|
}
|
|
3608
|
-
const packageJsonPath =
|
|
2728
|
+
const packageJsonPath = _chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
3609
2729
|
if (tree.exists(packageJsonPath)) {
|
|
3610
2730
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
3611
2731
|
if (!normalized.importPath) {
|
|
@@ -3653,30 +2773,30 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3653
2773
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
3654
2774
|
...json,
|
|
3655
2775
|
pnpm: {
|
|
3656
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2776
|
+
..._optionalChain([json, 'optionalAccess', _167 => _167.pnpm]),
|
|
3657
2777
|
overrides: {
|
|
3658
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2778
|
+
..._optionalChain([json, 'optionalAccess', _168 => _168.pnpm, 'optionalAccess', _169 => _169.overrides]),
|
|
3659
2779
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
3660
2780
|
}
|
|
3661
2781
|
}
|
|
3662
2782
|
}));
|
|
3663
2783
|
}
|
|
3664
2784
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
3665
|
-
|
|
2785
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
3666
2786
|
]);
|
|
3667
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
3668
|
-
|
|
2787
|
+
_js.addTsConfigPath.call(void 0, tree, _chunk44UHVCK5js.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2788
|
+
_chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
3669
2789
|
]);
|
|
3670
2790
|
if (tree.exists("package.json")) {
|
|
3671
2791
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3672
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2792
|
+
if (_optionalChain([packageJson, 'optionalAccess', _170 => _170.repository])) {
|
|
3673
2793
|
repository = packageJson.repository;
|
|
3674
2794
|
}
|
|
3675
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2795
|
+
if (_optionalChain([packageJson, 'optionalAccess', _171 => _171.description])) {
|
|
3676
2796
|
description = packageJson.description;
|
|
3677
2797
|
}
|
|
3678
2798
|
}
|
|
3679
|
-
const tsconfigPath =
|
|
2799
|
+
const tsconfigPath = _chunk44UHVCK5js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
3680
2800
|
if (tree.exists(tsconfigPath)) {
|
|
3681
2801
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
3682
2802
|
json.composite ??= true;
|
|
@@ -3704,7 +2824,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3704
2824
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3705
2825
|
return null;
|
|
3706
2826
|
}
|
|
3707
|
-
|
|
2827
|
+
_chunkBBEYLIXNjs.__name.call(void 0, typeScriptLibraryGeneratorFn, "typeScriptLibraryGeneratorFn");
|
|
3708
2828
|
function getOutputPath(options) {
|
|
3709
2829
|
const parts = [
|
|
3710
2830
|
"dist"
|
|
@@ -3714,42 +2834,42 @@ function getOutputPath(options) {
|
|
|
3714
2834
|
} else {
|
|
3715
2835
|
parts.push(options.projectRoot);
|
|
3716
2836
|
}
|
|
3717
|
-
return
|
|
2837
|
+
return _chunk44UHVCK5js.joinPaths.call(void 0, ...parts);
|
|
3718
2838
|
}
|
|
3719
|
-
|
|
2839
|
+
_chunkBBEYLIXNjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
3720
2840
|
function createProjectTsConfigJson(tree, options) {
|
|
3721
2841
|
const tsconfig = {
|
|
3722
2842
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
3723
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2843
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _172 => _172.tsconfigOptions]), () => ( {})),
|
|
3724
2844
|
compilerOptions: {
|
|
3725
2845
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
3726
|
-
outDir:
|
|
2846
|
+
outDir: _chunk44UHVCK5js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
3727
2847
|
noEmit: true,
|
|
3728
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2848
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _173 => _173.tsconfigOptions, 'optionalAccess', _174 => _174.compilerOptions]), () => ( {}))
|
|
3729
2849
|
},
|
|
3730
2850
|
files: [
|
|
3731
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2851
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _175 => _175.tsconfigOptions, 'optionalAccess', _176 => _176.files]), () => ( []))
|
|
3732
2852
|
],
|
|
3733
2853
|
include: [
|
|
3734
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2854
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _177 => _177.tsconfigOptions, 'optionalAccess', _178 => _178.include]), () => ( [])),
|
|
3735
2855
|
"src/**/*.ts",
|
|
3736
2856
|
"src/**/*.js",
|
|
3737
2857
|
"bin/**/*"
|
|
3738
2858
|
],
|
|
3739
2859
|
exclude: [
|
|
3740
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2860
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _179 => _179.tsconfigOptions, 'optionalAccess', _180 => _180.exclude]), () => ( [])),
|
|
3741
2861
|
"jest.config.ts",
|
|
3742
2862
|
"src/**/*.spec.ts",
|
|
3743
2863
|
"src/**/*.test.ts"
|
|
3744
2864
|
]
|
|
3745
2865
|
};
|
|
3746
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2866
|
+
_devkit.writeJson.call(void 0, tree, _chunk44UHVCK5js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
3747
2867
|
}
|
|
3748
|
-
|
|
2868
|
+
_chunkBBEYLIXNjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
3749
2869
|
async function normalizeOptions(tree, options, config) {
|
|
3750
2870
|
let importPath = options.importPath;
|
|
3751
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
3752
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
2871
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _181 => _181.namespace])) {
|
|
2872
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _182 => _182.namespace])}/${options.name}`;
|
|
3753
2873
|
}
|
|
3754
2874
|
if (options.publishable) {
|
|
3755
2875
|
if (!importPath) {
|
|
@@ -3799,11 +2919,11 @@ async function normalizeOptions(tree, options, config) {
|
|
|
3799
2919
|
shouldUseSwcJest: false
|
|
3800
2920
|
};
|
|
3801
2921
|
}
|
|
3802
|
-
|
|
2922
|
+
_chunkBBEYLIXNjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
3803
2923
|
|
|
3804
2924
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
3805
2925
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
3806
|
-
const filesDir =
|
|
2926
|
+
const filesDir = _chunk44UHVCK5js.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
|
|
3807
2927
|
const tsLibraryGeneratorOptions = {
|
|
3808
2928
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
3809
2929
|
platform: "browser",
|
|
@@ -3860,10 +2980,10 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
3860
2980
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3861
2981
|
return null;
|
|
3862
2982
|
}
|
|
3863
|
-
|
|
2983
|
+
_chunkBBEYLIXNjs.__name.call(void 0, browserLibraryGeneratorFn, "browserLibraryGeneratorFn");
|
|
3864
2984
|
var generator_default = withRunGenerator("TypeScript Library Creator (Browser Platform)", browserLibraryGeneratorFn, {
|
|
3865
2985
|
hooks: {
|
|
3866
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
2986
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3867
2987
|
options.description ??= "A library used by Storm Software to support browser applications";
|
|
3868
2988
|
options.platform ??= "browser";
|
|
3869
2989
|
return options;
|
|
@@ -3872,7 +2992,7 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
3872
2992
|
});
|
|
3873
2993
|
|
|
3874
2994
|
// ../workspace-tools/src/generators/config-schema/generator.ts
|
|
3875
|
-
|
|
2995
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3876
2996
|
|
|
3877
2997
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
3878
2998
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
@@ -3882,7 +3002,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3882
3002
|
name: "StormWorkspaceConfiguration"
|
|
3883
3003
|
});
|
|
3884
3004
|
writeTrace(jsonSchema, config);
|
|
3885
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
3005
|
+
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
3006
|
writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
3887
3007
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
3888
3008
|
spaces: 2
|
|
@@ -3893,10 +3013,10 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3893
3013
|
success: true
|
|
3894
3014
|
};
|
|
3895
3015
|
}
|
|
3896
|
-
|
|
3016
|
+
_chunkBBEYLIXNjs.__name.call(void 0, configSchemaGeneratorFn, "configSchemaGeneratorFn");
|
|
3897
3017
|
var generator_default2 = withRunGenerator("Configuration Schema Creator", configSchemaGeneratorFn, {
|
|
3898
3018
|
hooks: {
|
|
3899
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
3019
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3900
3020
|
options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
|
|
3901
3021
|
return options;
|
|
3902
3022
|
}, "applyDefaultOptions")
|
|
@@ -3904,7 +3024,7 @@ var generator_default2 = withRunGenerator("Configuration Schema Creator", config
|
|
|
3904
3024
|
});
|
|
3905
3025
|
|
|
3906
3026
|
// ../workspace-tools/src/generators/init/init.ts
|
|
3907
|
-
|
|
3027
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3908
3028
|
|
|
3909
3029
|
async function initGenerator(tree, schema) {
|
|
3910
3030
|
const task = _devkit.addDependenciesToPackageJson.call(void 0, tree, {
|
|
@@ -3923,13 +3043,13 @@ async function initGenerator(tree, schema) {
|
|
|
3923
3043
|
}
|
|
3924
3044
|
return task;
|
|
3925
3045
|
}
|
|
3926
|
-
|
|
3046
|
+
_chunkBBEYLIXNjs.__name.call(void 0, initGenerator, "initGenerator");
|
|
3927
3047
|
|
|
3928
3048
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
3929
|
-
|
|
3049
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3930
3050
|
|
|
3931
3051
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
3932
|
-
const filesDir =
|
|
3052
|
+
const filesDir = _chunk44UHVCK5js.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
|
|
3933
3053
|
const tsLibraryGeneratorOptions = {
|
|
3934
3054
|
...schema,
|
|
3935
3055
|
platform: "neutral",
|
|
@@ -3958,10 +3078,10 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
3958
3078
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3959
3079
|
return null;
|
|
3960
3080
|
}
|
|
3961
|
-
|
|
3081
|
+
_chunkBBEYLIXNjs.__name.call(void 0, neutralLibraryGeneratorFn, "neutralLibraryGeneratorFn");
|
|
3962
3082
|
var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral Platform)", neutralLibraryGeneratorFn, {
|
|
3963
3083
|
hooks: {
|
|
3964
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
3084
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
3965
3085
|
options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
|
|
3966
3086
|
options.platform = "neutral";
|
|
3967
3087
|
return options;
|
|
@@ -3970,10 +3090,10 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
3970
3090
|
});
|
|
3971
3091
|
|
|
3972
3092
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
3973
|
-
|
|
3093
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
3974
3094
|
|
|
3975
3095
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
3976
|
-
const filesDir =
|
|
3096
|
+
const filesDir = _chunk44UHVCK5js.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
|
|
3977
3097
|
const tsLibraryGeneratorOptions = {
|
|
3978
3098
|
platform: "node",
|
|
3979
3099
|
devDependencies: {
|
|
@@ -4006,10 +3126,10 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
|
4006
3126
|
await _devkit.formatFiles.call(void 0, tree);
|
|
4007
3127
|
return null;
|
|
4008
3128
|
}
|
|
4009
|
-
|
|
3129
|
+
_chunkBBEYLIXNjs.__name.call(void 0, nodeLibraryGeneratorFn, "nodeLibraryGeneratorFn");
|
|
4010
3130
|
var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Platform)", nodeLibraryGeneratorFn, {
|
|
4011
3131
|
hooks: {
|
|
4012
|
-
applyDefaultOptions: /* @__PURE__ */
|
|
3132
|
+
applyDefaultOptions: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (options) => {
|
|
4013
3133
|
options.description ??= "A library used by Storm Software to support NodeJs applications";
|
|
4014
3134
|
options.platform ??= "node";
|
|
4015
3135
|
return options;
|
|
@@ -4018,7 +3138,7 @@ var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Pl
|
|
|
4018
3138
|
});
|
|
4019
3139
|
|
|
4020
3140
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
4021
|
-
|
|
3141
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4022
3142
|
|
|
4023
3143
|
|
|
4024
3144
|
async function presetGeneratorFn(tree, options) {
|
|
@@ -4168,7 +3288,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
4168
3288
|
};
|
|
4169
3289
|
return json;
|
|
4170
3290
|
});
|
|
4171
|
-
_devkit.generateFiles.call(void 0, tree,
|
|
3291
|
+
_devkit.generateFiles.call(void 0, tree, path3.join(__dirname, "files"), projectRoot, {
|
|
4172
3292
|
...options,
|
|
4173
3293
|
pnpmVersion,
|
|
4174
3294
|
nodeVersion
|
|
@@ -4237,23 +3357,23 @@ async function presetGeneratorFn(tree, options) {
|
|
|
4237
3357
|
await Promise.resolve(_devkit.addDependenciesToPackageJson.call(void 0, tree, dependencies, {}, _devkit.joinPathFragments.call(void 0, projectRoot, "package.json")));
|
|
4238
3358
|
return null;
|
|
4239
3359
|
}
|
|
4240
|
-
|
|
3360
|
+
_chunkBBEYLIXNjs.__name.call(void 0, presetGeneratorFn, "presetGeneratorFn");
|
|
4241
3361
|
var generator_default5 = withRunGenerator("Storm Workspace Preset Generator", presetGeneratorFn);
|
|
4242
3362
|
|
|
4243
3363
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
4244
|
-
|
|
3364
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4245
3365
|
|
|
4246
3366
|
var _resolvelocalpackagedependencies = require('@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies');
|
|
4247
3367
|
var _updatelockfile = require('@nx/js/src/release/utils/update-lock-file');
|
|
4248
3368
|
|
|
4249
3369
|
// ../git-tools/src/index.ts
|
|
4250
|
-
|
|
3370
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4251
3371
|
|
|
4252
3372
|
// ../git-tools/src/commit/config.ts
|
|
4253
|
-
|
|
3373
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4254
3374
|
|
|
4255
3375
|
// ../git-tools/src/types.ts
|
|
4256
|
-
|
|
3376
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4257
3377
|
var DEFAULT_COMMIT_TYPES = {
|
|
4258
3378
|
/* --- Bumps version when selected --- */
|
|
4259
3379
|
chore: {
|
|
@@ -4428,7 +3548,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
4428
3548
|
type: "input",
|
|
4429
3549
|
title: "Breaking Changes (Details)",
|
|
4430
3550
|
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
4431
|
-
when: /* @__PURE__ */
|
|
3551
|
+
when: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (answers) => answers.isBreaking === true, "when"),
|
|
4432
3552
|
maxLength: 600,
|
|
4433
3553
|
minLength: 3
|
|
4434
3554
|
},
|
|
@@ -4442,7 +3562,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
4442
3562
|
type: "input",
|
|
4443
3563
|
title: "Open Issue Affected (Details)",
|
|
4444
3564
|
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
4445
|
-
when: /* @__PURE__ */
|
|
3565
|
+
when: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (answers) => answers.isIssueAffected === true, "when"),
|
|
4446
3566
|
maxLength: 600,
|
|
4447
3567
|
minLength: 3
|
|
4448
3568
|
}
|
|
@@ -4455,7 +3575,7 @@ var RuleConfigSeverity;
|
|
|
4455
3575
|
})(RuleConfigSeverity || (RuleConfigSeverity = {}));
|
|
4456
3576
|
|
|
4457
3577
|
// ../git-tools/src/release/config.ts
|
|
4458
|
-
|
|
3578
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4459
3579
|
|
|
4460
3580
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
4461
3581
|
|
|
@@ -4469,10 +3589,10 @@ var _utils = require('nx/src/tasks-runner/utils');
|
|
|
4469
3589
|
var _semver3 = require('semver');
|
|
4470
3590
|
|
|
4471
3591
|
// ../workspace-tools/src/base/index.ts
|
|
4472
|
-
|
|
3592
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4473
3593
|
|
|
4474
3594
|
// ../workspace-tools/src/base/base-executor.untyped.ts
|
|
4475
|
-
|
|
3595
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4476
3596
|
var _untyped = require('untyped');
|
|
4477
3597
|
var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4478
3598
|
$schema: {
|
|
@@ -4492,7 +3612,7 @@ var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
|
4492
3612
|
});
|
|
4493
3613
|
|
|
4494
3614
|
// ../workspace-tools/src/base/base-generator.untyped.ts
|
|
4495
|
-
|
|
3615
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4496
3616
|
|
|
4497
3617
|
var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4498
3618
|
$schema: {
|
|
@@ -4510,7 +3630,7 @@ var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
|
4510
3630
|
});
|
|
4511
3631
|
|
|
4512
3632
|
// ../workspace-tools/src/base/cargo-base-executor.untyped.ts
|
|
4513
|
-
|
|
3633
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4514
3634
|
|
|
4515
3635
|
var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4516
3636
|
...base_executor_untyped_default,
|
|
@@ -4597,7 +3717,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
4597
3717
|
});
|
|
4598
3718
|
|
|
4599
3719
|
// ../workspace-tools/src/base/typescript-build-executor.untyped.ts
|
|
4600
|
-
|
|
3720
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4601
3721
|
|
|
4602
3722
|
var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4603
3723
|
...base_executor_untyped_default,
|
|
@@ -4702,7 +3822,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4702
3822
|
]
|
|
4703
3823
|
},
|
|
4704
3824
|
$default: "esnext",
|
|
4705
|
-
$resolve: /* @__PURE__ */
|
|
3825
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = "esnext") => val.toLowerCase(), "$resolve")
|
|
4706
3826
|
},
|
|
4707
3827
|
format: {
|
|
4708
3828
|
$schema: {
|
|
@@ -4718,7 +3838,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4718
3838
|
]
|
|
4719
3839
|
}
|
|
4720
3840
|
},
|
|
4721
|
-
$resolve: /* @__PURE__ */
|
|
3841
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = [
|
|
4722
3842
|
"cjs",
|
|
4723
3843
|
"esm"
|
|
4724
3844
|
]) => [].concat(val), "$resolve")
|
|
@@ -4742,7 +3862,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4742
3862
|
type: "array",
|
|
4743
3863
|
description: "The external dependencies"
|
|
4744
3864
|
},
|
|
4745
|
-
$resolve: /* @__PURE__ */
|
|
3865
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = []) => [].concat(val), "$resolve")
|
|
4746
3866
|
},
|
|
4747
3867
|
define: {
|
|
4748
3868
|
$schema: {
|
|
@@ -4751,7 +3871,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4751
3871
|
tsType: "Record<string, string>",
|
|
4752
3872
|
description: "The define values"
|
|
4753
3873
|
},
|
|
4754
|
-
$resolve: /* @__PURE__ */
|
|
3874
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = {}) => val, "$resolve"),
|
|
4755
3875
|
$default: {}
|
|
4756
3876
|
},
|
|
4757
3877
|
env: {
|
|
@@ -4761,13 +3881,13 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4761
3881
|
tsType: "Record<string, string>",
|
|
4762
3882
|
description: "The environment variable values"
|
|
4763
3883
|
},
|
|
4764
|
-
$resolve: /* @__PURE__ */
|
|
3884
|
+
$resolve: /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, (val = {}) => val, "$resolve"),
|
|
4765
3885
|
$default: {}
|
|
4766
3886
|
}
|
|
4767
3887
|
});
|
|
4768
3888
|
|
|
4769
3889
|
// ../workspace-tools/src/base/typescript-library-generator.untyped.ts
|
|
4770
|
-
|
|
3890
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4771
3891
|
|
|
4772
3892
|
var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4773
3893
|
...base_generator_untyped_default,
|
|
@@ -4888,24 +4008,24 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4888
4008
|
});
|
|
4889
4009
|
|
|
4890
4010
|
// ../workspace-tools/src/types.ts
|
|
4891
|
-
|
|
4011
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4892
4012
|
|
|
4893
4013
|
// ../workspace-tools/src/utils/index.ts
|
|
4894
|
-
|
|
4014
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4895
4015
|
|
|
4896
4016
|
// ../workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
4897
|
-
|
|
4017
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4898
4018
|
|
|
4899
4019
|
// ../workspace-tools/src/utils/create-cli-options.ts
|
|
4900
|
-
|
|
4020
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4901
4021
|
|
|
4902
4022
|
|
|
4903
4023
|
// ../workspace-tools/src/utils/get-project-configurations.ts
|
|
4904
|
-
|
|
4024
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4905
4025
|
var _retrieveworkspacefiles = require('nx/src/project-graph/utils/retrieve-workspace-files');
|
|
4906
4026
|
|
|
4907
4027
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
4908
|
-
|
|
4028
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4909
4029
|
|
|
4910
4030
|
|
|
4911
4031
|
|
|
@@ -4920,19 +4040,19 @@ var NPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, NPM_LOCK_FILE
|
|
|
4920
4040
|
var PNPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, PNPM_LOCK_FILE);
|
|
4921
4041
|
|
|
4922
4042
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
4923
|
-
|
|
4043
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4924
4044
|
|
|
4925
4045
|
|
|
4926
4046
|
|
|
4927
4047
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4928
|
-
|
|
4048
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4929
4049
|
|
|
4930
4050
|
|
|
4931
4051
|
|
|
4932
4052
|
|
|
4933
4053
|
|
|
4934
4054
|
// ../workspace-tools/src/utils/typia-transform.ts
|
|
4935
|
-
|
|
4055
|
+
_chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
|
|
4936
4056
|
var _transform = require('typia/lib/transform'); var _transform2 = _interopRequireDefault(_transform);
|
|
4937
4057
|
|
|
4938
4058
|
// src/generators/init/generator.ts
|
|
@@ -4944,7 +4064,7 @@ async function initGeneratorFn(tree, options, config) {
|
|
|
4944
4064
|
}
|
|
4945
4065
|
return task;
|
|
4946
4066
|
}
|
|
4947
|
-
|
|
4067
|
+
_chunkBBEYLIXNjs.__name.call(void 0, initGeneratorFn, "initGeneratorFn");
|
|
4948
4068
|
var generator_default6 = withRunGenerator("Initialize Storm Projen workspace", initGeneratorFn);
|
|
4949
4069
|
function addProjenDeps(tree, options) {
|
|
4950
4070
|
return () => {
|
|
@@ -4955,7 +4075,7 @@ function addProjenDeps(tree, options) {
|
|
|
4955
4075
|
}
|
|
4956
4076
|
};
|
|
4957
4077
|
}
|
|
4958
|
-
|
|
4078
|
+
_chunkBBEYLIXNjs.__name.call(void 0, addProjenDeps, "addProjenDeps");
|
|
4959
4079
|
|
|
4960
4080
|
|
|
4961
4081
|
|