@storm-software/projen 0.21.269 → 0.21.273
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 +48 -0
- package/README.md +1 -1
- package/dist/chunk-4A3WQDKD.js +6 -0
- package/dist/{chunk-CWD3OJVD.mjs → chunk-5D7MNJJG.mjs} +1 -1
- package/dist/{chunk-IY3EWB5H.mjs → chunk-B55HWXHA.mjs} +1 -1
- package/dist/{chunk-N2K4KUKN.mjs → chunk-LDQSXIL7.mjs} +1 -1
- package/dist/{chunk-EX3A5QWC.mjs → chunk-PEAVGRTD.mjs} +2 -2
- package/dist/{chunk-SDALA244.js → chunk-PTF6IW2S.js} +3 -3
- package/dist/{chunk-LU3B233Q.js → chunk-QQOQQB3L.js} +600 -1001
- package/dist/{chunk-ALUW6Z4U.mjs → chunk-V6EDXEZM.mjs} +622 -1023
- package/dist/{chunk-ADYJENQF.js → chunk-YPZC3HAQ.js} +2 -2
- package/dist/{chunk-3276F5F6.js → chunk-YWHLDYZ3.js} +2 -2
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +10 -10
- package/dist/index.mjs +5 -5
- package/dist/src/components/index.js +3 -3
- package/dist/src/components/index.mjs +2 -2
- package/dist/src/components/nx-workspace.js +4 -4
- package/dist/src/components/nx-workspace.mjs +2 -2
- package/dist/src/generators/init/generator.js +4 -4
- package/dist/src/generators/init/generator.mjs +3 -3
- package/dist/tsup.config.js +2 -2
- package/dist/tsup.config.mjs +1 -1
- package/package.json +6 -6
- package/dist/chunk-WCA2GR6U.js +0 -6
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkYWHLDYZ3js = require('./chunk-YWHLDYZ3.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkYPZC3HAQjs = require('./chunk-YPZC3HAQ.js');
|
|
10
10
|
|
|
11
11
|
// src/generators/init/generator.ts
|
|
12
|
-
|
|
12
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -18,28 +18,28 @@ _chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
|
18
18
|
var _devkit = require('@nx/devkit');
|
|
19
19
|
|
|
20
20
|
// ../workspace-tools/index.ts
|
|
21
|
-
|
|
21
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
22
22
|
|
|
23
23
|
// ../workspace-tools/executors.ts
|
|
24
|
-
|
|
24
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
25
25
|
|
|
26
26
|
// ../workspace-tools/src/executors/cargo-build/executor.ts
|
|
27
|
-
|
|
27
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
28
28
|
|
|
29
29
|
// ../workspace-tools/src/base/base-executor.ts
|
|
30
|
-
|
|
30
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
31
31
|
|
|
32
32
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
33
|
-
|
|
33
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
34
34
|
var _c12 = require('c12');
|
|
35
35
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
36
36
|
|
|
37
37
|
// ../config-tools/src/logger/console.ts
|
|
38
|
-
|
|
38
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
39
39
|
var _formatDistanceToNow = require('date-fns/formatDistanceToNow');
|
|
40
40
|
|
|
41
41
|
// ../config-tools/src/types.ts
|
|
42
|
-
|
|
42
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
43
43
|
var LogLevel = {
|
|
44
44
|
SILENT: 0,
|
|
45
45
|
FATAL: 10,
|
|
@@ -66,7 +66,7 @@ var LogLevelLabel = {
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
// ../config-tools/src/utilities/colors.ts
|
|
69
|
-
|
|
69
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
70
70
|
var DEFAULT_COLOR_CONFIG = {
|
|
71
71
|
light: {
|
|
72
72
|
background: "#fafafa",
|
|
@@ -136,7 +136,7 @@ function getColor(key, config) {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
// ../config-tools/src/logger/chalk.ts
|
|
139
|
-
|
|
139
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
140
140
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
141
141
|
var chalkDefault = {
|
|
142
142
|
hex: (_) => (message) => message,
|
|
@@ -170,10 +170,10 @@ var getChalk = () => {
|
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
// ../config-tools/src/logger/console-icons.ts
|
|
173
|
-
|
|
173
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
174
174
|
|
|
175
175
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
176
|
-
|
|
176
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
177
177
|
function isUnicodeSupported() {
|
|
178
178
|
if (process.platform !== "win32") {
|
|
179
179
|
return process.env.TERM !== "linux";
|
|
@@ -199,13 +199,13 @@ var CONSOLE_ICONS = {
|
|
|
199
199
|
};
|
|
200
200
|
|
|
201
201
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
202
|
-
|
|
202
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
203
203
|
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
204
204
|
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
207
|
// ../config-tools/src/logger/get-log-level.ts
|
|
208
|
-
|
|
208
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
209
209
|
var getLogLevel = (label) => {
|
|
210
210
|
switch (label) {
|
|
211
211
|
case "all":
|
|
@@ -432,13 +432,13 @@ var _isFunction = (value) => {
|
|
|
432
432
|
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
|
|
433
433
|
|
|
434
434
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
435
|
-
|
|
435
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
436
436
|
|
|
437
437
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
438
|
-
|
|
438
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
439
439
|
|
|
440
440
|
// ../config-tools/src/utilities/find-up.ts
|
|
441
|
-
|
|
441
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
442
442
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
443
443
|
var _path = require('path'); var path2 = _interopRequireWildcard(_path);
|
|
444
444
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -505,11 +505,11 @@ var rootDirectories = [
|
|
|
505
505
|
];
|
|
506
506
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
507
507
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
508
|
-
return
|
|
508
|
+
return _chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
509
509
|
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
510
510
|
);
|
|
511
511
|
}
|
|
512
|
-
return
|
|
512
|
+
return _chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
513
513
|
findFolderUp(
|
|
514
514
|
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
515
515
|
rootFiles,
|
|
@@ -604,13 +604,13 @@ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
|
604
604
|
};
|
|
605
605
|
|
|
606
606
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
607
|
-
|
|
607
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
608
608
|
|
|
609
609
|
// ../config/src/index.ts
|
|
610
|
-
|
|
610
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
611
611
|
|
|
612
612
|
// ../config/src/constants.ts
|
|
613
|
-
|
|
613
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
614
614
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
615
615
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
616
616
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
@@ -629,10 +629,10 @@ var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
|
629
629
|
var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
|
|
630
630
|
|
|
631
631
|
// ../config/src/define-config.ts
|
|
632
|
-
|
|
632
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
633
633
|
|
|
634
634
|
// ../config/src/schema.ts
|
|
635
|
-
|
|
635
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
636
636
|
var _mini = require('zod/v4/mini'); var z = _interopRequireWildcard(_mini);
|
|
637
637
|
var schemaRegistry = z.registry();
|
|
638
638
|
var colorSchema = z.string().check(
|
|
@@ -1202,7 +1202,7 @@ schemaRegistry.add(extensionsSchema, {
|
|
|
1202
1202
|
});
|
|
1203
1203
|
|
|
1204
1204
|
// ../config/src/types.ts
|
|
1205
|
-
|
|
1205
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
1206
1206
|
var COLOR_KEYS = [
|
|
1207
1207
|
"dark",
|
|
1208
1208
|
"light",
|
|
@@ -1236,7 +1236,7 @@ async function getPackageJsonConfig(root) {
|
|
|
1236
1236
|
const workspaceRoot2 = findWorkspaceRoot(root);
|
|
1237
1237
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot2, "package.json"))) {
|
|
1238
1238
|
const file = await _promises.readFile.call(void 0,
|
|
1239
|
-
|
|
1239
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
1240
1240
|
"utf8"
|
|
1241
1241
|
);
|
|
1242
1242
|
if (file) {
|
|
@@ -1310,7 +1310,7 @@ function applyDefaultConfig(config) {
|
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
1312
|
// ../config-tools/src/utilities/toml.ts
|
|
1313
|
-
|
|
1313
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
1314
1314
|
var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
|
|
1315
1315
|
function parseCargoToml(cargoString) {
|
|
1316
1316
|
if (!cargoString) {
|
|
@@ -1332,7 +1332,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
1332
1332
|
envName: _optionalChain([fileName, 'optionalAccess', _38 => _38.toUpperCase, 'call', _39 => _39()]),
|
|
1333
1333
|
jitiOptions: {
|
|
1334
1334
|
debug: false,
|
|
1335
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
1335
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
1336
1336
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
1337
1337
|
"jiti"
|
|
1338
1338
|
)
|
|
@@ -1346,7 +1346,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
1346
1346
|
envName: _optionalChain([fileName, 'optionalAccess', _40 => _40.toUpperCase, 'call', _41 => _41()]),
|
|
1347
1347
|
jitiOptions: {
|
|
1348
1348
|
debug: false,
|
|
1349
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
1349
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
1350
1350
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
1351
1351
|
"jiti"
|
|
1352
1352
|
)
|
|
@@ -1398,12 +1398,12 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1398
1398
|
};
|
|
1399
1399
|
|
|
1400
1400
|
// ../config-tools/src/create-storm-config.ts
|
|
1401
|
-
|
|
1401
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
1402
1402
|
|
|
1403
1403
|
|
|
1404
1404
|
|
|
1405
1405
|
// ../config-tools/src/env/get-env.ts
|
|
1406
|
-
|
|
1406
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
1407
1407
|
var getExtensionEnv = (extensionName) => {
|
|
1408
1408
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
1409
1409
|
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
@@ -1465,15 +1465,15 @@ var getConfigEnv = () => {
|
|
|
1465
1465
|
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1466
1466
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1467
1467
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1468
|
-
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ?
|
|
1469
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
1468
|
+
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
1469
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
1470
1470
|
directories: {
|
|
1471
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
1472
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
1473
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
1474
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
1475
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
1476
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
1471
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
1472
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
1473
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
1474
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
1475
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
1476
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkYWHLDYZ3js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
1477
1477
|
},
|
|
1478
1478
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
1479
1479
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -1620,7 +1620,7 @@ var getBaseThemeColorsEnv = (prefix) => {
|
|
|
1620
1620
|
};
|
|
1621
1621
|
|
|
1622
1622
|
// ../config-tools/src/env/set-env.ts
|
|
1623
|
-
|
|
1623
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
1624
1624
|
var setExtensionEnv = (extensionName, extension) => {
|
|
1625
1625
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
1626
1626
|
if (extension[key]) {
|
|
@@ -1768,42 +1768,42 @@ var setConfigEnv = (config) => {
|
|
|
1768
1768
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1769
1769
|
}
|
|
1770
1770
|
if (config.configFile) {
|
|
1771
|
-
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] =
|
|
1771
|
+
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
1772
1772
|
config.configFile
|
|
1773
1773
|
);
|
|
1774
1774
|
}
|
|
1775
1775
|
if (config.workspaceRoot) {
|
|
1776
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
1777
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
1778
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
1776
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkYWHLDYZ3js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1777
|
+
process.env.NX_WORKSPACE_ROOT = _chunkYWHLDYZ3js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1778
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkYWHLDYZ3js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1779
1779
|
}
|
|
1780
1780
|
if (config.directories) {
|
|
1781
1781
|
if (!config.skipCache && config.directories.cache) {
|
|
1782
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
1782
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
1783
1783
|
config.directories.cache
|
|
1784
1784
|
);
|
|
1785
1785
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1786
1786
|
}
|
|
1787
1787
|
if (config.directories.data) {
|
|
1788
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
1788
|
+
process.env[`${prefix}DATA_DIR`] = _chunkYWHLDYZ3js.correctPaths.call(void 0, config.directories.data);
|
|
1789
1789
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1790
1790
|
}
|
|
1791
1791
|
if (config.directories.config) {
|
|
1792
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
1792
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
1793
1793
|
config.directories.config
|
|
1794
1794
|
);
|
|
1795
1795
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1796
1796
|
}
|
|
1797
1797
|
if (config.directories.temp) {
|
|
1798
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
1798
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkYWHLDYZ3js.correctPaths.call(void 0, config.directories.temp);
|
|
1799
1799
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1800
1800
|
}
|
|
1801
1801
|
if (config.directories.log) {
|
|
1802
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
1802
|
+
process.env[`${prefix}LOG_DIR`] = _chunkYWHLDYZ3js.correctPaths.call(void 0, config.directories.log);
|
|
1803
1803
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1804
1804
|
}
|
|
1805
1805
|
if (config.directories.build) {
|
|
1806
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
1806
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
1807
1807
|
config.directories.build
|
|
1808
1808
|
);
|
|
1809
1809
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -2031,7 +2031,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot2, s
|
|
|
2031
2031
|
defaultConfig
|
|
2032
2032
|
);
|
|
2033
2033
|
if (!configInput.variant) {
|
|
2034
|
-
configInput.variant = _fs.existsSync.call(void 0,
|
|
2034
|
+
configInput.variant = _fs.existsSync.call(void 0, _chunkYWHLDYZ3js.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunkYWHLDYZ3js.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunkYWHLDYZ3js.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunkYWHLDYZ3js.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
|
|
2035
2035
|
}
|
|
2036
2036
|
try {
|
|
2037
2037
|
const parseResult = await Promise.resolve(
|
|
@@ -2101,7 +2101,7 @@ ${formatLogMessage(config)}`,
|
|
|
2101
2101
|
};
|
|
2102
2102
|
|
|
2103
2103
|
// ../config-tools/src/get-config.ts
|
|
2104
|
-
|
|
2104
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2105
2105
|
function getConfig(workspaceRoot2, skipLogs = false) {
|
|
2106
2106
|
return loadStormWorkspaceConfig(workspaceRoot2, skipLogs);
|
|
2107
2107
|
}
|
|
@@ -2239,7 +2239,7 @@ var _isFunction2 = (value) => {
|
|
|
2239
2239
|
};
|
|
2240
2240
|
|
|
2241
2241
|
// ../workspace-tools/src/utils/cargo.ts
|
|
2242
|
-
|
|
2242
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2243
2243
|
|
|
2244
2244
|
|
|
2245
2245
|
|
|
@@ -2389,7 +2389,7 @@ var executor_default = withRunExecutor(
|
|
|
2389
2389
|
);
|
|
2390
2390
|
|
|
2391
2391
|
// ../workspace-tools/src/executors/cargo-check/executor.ts
|
|
2392
|
-
|
|
2392
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2393
2393
|
async function cargoCheckExecutor(options, context) {
|
|
2394
2394
|
const command = buildCargoCommand("check", options, context);
|
|
2395
2395
|
return await cargoCommand(context.root, ...command);
|
|
@@ -2409,7 +2409,7 @@ var executor_default2 = withRunExecutor(
|
|
|
2409
2409
|
);
|
|
2410
2410
|
|
|
2411
2411
|
// ../workspace-tools/src/executors/cargo-clippy/executor.ts
|
|
2412
|
-
|
|
2412
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2413
2413
|
async function cargoClippyExecutor(options, context) {
|
|
2414
2414
|
const command = buildCargoCommand("clippy", options, context);
|
|
2415
2415
|
return await cargoCommand(context.root, ...command);
|
|
@@ -2430,7 +2430,7 @@ var executor_default3 = withRunExecutor(
|
|
|
2430
2430
|
);
|
|
2431
2431
|
|
|
2432
2432
|
// ../workspace-tools/src/executors/cargo-doc/executor.ts
|
|
2433
|
-
|
|
2433
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2434
2434
|
async function cargoDocExecutor(options, context) {
|
|
2435
2435
|
const opts = { ...options };
|
|
2436
2436
|
opts["no-deps"] = opts.noDeps;
|
|
@@ -2460,7 +2460,7 @@ var executor_default4 = withRunExecutor(
|
|
|
2460
2460
|
);
|
|
2461
2461
|
|
|
2462
2462
|
// ../workspace-tools/src/executors/cargo-format/executor.ts
|
|
2463
|
-
|
|
2463
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2464
2464
|
async function cargoFormatExecutor(options, context) {
|
|
2465
2465
|
const command = buildCargoCommand("fmt", options, context);
|
|
2466
2466
|
return await cargoCommand(context.root, ...command);
|
|
@@ -2481,7 +2481,7 @@ var executor_default5 = withRunExecutor(
|
|
|
2481
2481
|
);
|
|
2482
2482
|
|
|
2483
2483
|
// ../workspace-tools/src/executors/cargo-publish/executor.ts
|
|
2484
|
-
|
|
2484
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2485
2485
|
|
|
2486
2486
|
|
|
2487
2487
|
|
|
@@ -2489,767 +2489,32 @@ var _https = require('https'); var _https2 = _interopRequireDefault(_https);
|
|
|
2489
2489
|
var LARGE_BUFFER = 1024 * 1e6;
|
|
2490
2490
|
|
|
2491
2491
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
// ../esbuild/src/build.ts
|
|
2495
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2496
|
-
|
|
2497
|
-
// ../esbuild/src/assets.ts
|
|
2498
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2499
|
-
|
|
2500
|
-
// ../build-tools/src/index.ts
|
|
2501
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2502
|
-
|
|
2503
|
-
// ../build-tools/src/config.ts
|
|
2504
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2505
|
-
var DEFAULT_JS_BANNER = `
|
|
2506
|
-
// ---------------------------------------
|
|
2507
|
-
// \u{1F5F2} Built by Storm Software
|
|
2508
|
-
// ---------------------------------------
|
|
2509
|
-
`;
|
|
2510
|
-
var DEFAULT_CSS_BANNER = `
|
|
2511
|
-
/* ---------------------------------------
|
|
2512
|
-
\u{1F5F2} Built by Storm Software
|
|
2513
|
-
--------------------------------------- */
|
|
2514
|
-
`;
|
|
2515
|
-
var DEFAULT_ENVIRONMENT = "production";
|
|
2516
|
-
var DEFAULT_TARGET = "esnext";
|
|
2517
|
-
var DEFAULT_ORGANIZATION = "storm-software";
|
|
2518
|
-
|
|
2519
|
-
// ../build-tools/src/plugins/index.ts
|
|
2520
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2521
|
-
|
|
2522
|
-
// ../build-tools/src/plugins/analyze.ts
|
|
2523
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2524
|
-
|
|
2525
|
-
// ../build-tools/src/plugins/swc.ts
|
|
2526
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2527
|
-
var _core = require('@swc/core');
|
|
2528
|
-
|
|
2529
|
-
// ../build-tools/src/plugins/ts-resolve.ts
|
|
2530
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2531
|
-
|
|
2532
|
-
var _module = require('module');
|
|
2533
|
-
|
|
2534
|
-
var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
|
|
2535
|
-
|
|
2536
|
-
// ../build-tools/src/plugins/type-definitions.ts
|
|
2537
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
// ../build-tools/src/types.ts
|
|
2542
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2543
|
-
|
|
2544
|
-
// ../build-tools/src/utilities/index.ts
|
|
2545
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2546
|
-
|
|
2547
|
-
// ../build-tools/src/utilities/copy-assets.ts
|
|
2548
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2549
|
-
var _internal = require('@nx/js/internal');
|
|
2550
|
-
var _glob = require('glob');
|
|
2551
|
-
|
|
2552
|
-
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
2553
|
-
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
2554
|
-
pendingAssets.push({
|
|
2555
|
-
input: projectRoot,
|
|
2556
|
-
glob: "*.md",
|
|
2557
|
-
output: "."
|
|
2558
|
-
});
|
|
2559
|
-
pendingAssets.push({
|
|
2560
|
-
input: ".",
|
|
2561
|
-
glob: "LICENSE",
|
|
2562
|
-
output: "."
|
|
2563
|
-
});
|
|
2564
|
-
if (generatePackageJson3 === false) {
|
|
2565
|
-
pendingAssets.push({
|
|
2566
|
-
input: projectRoot,
|
|
2567
|
-
glob: "package.json",
|
|
2568
|
-
output: "."
|
|
2569
|
-
});
|
|
2570
|
-
}
|
|
2571
|
-
if (includeSrc === true) {
|
|
2572
|
-
pendingAssets.push({
|
|
2573
|
-
input: sourceRoot,
|
|
2574
|
-
glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
|
|
2575
|
-
output: "src/"
|
|
2576
|
-
});
|
|
2577
|
-
}
|
|
2578
|
-
writeTrace(
|
|
2579
|
-
`\u{1F4DD} Copying the following assets to the output directory:
|
|
2580
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk3276F5F6js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
2581
|
-
config
|
|
2582
|
-
);
|
|
2583
|
-
const assetHandler = new (0, _internal.CopyAssetsHandler)({
|
|
2584
|
-
projectDir: projectRoot,
|
|
2585
|
-
rootDir: config.workspaceRoot,
|
|
2586
|
-
outputDir: outputPath,
|
|
2587
|
-
assets: pendingAssets
|
|
2588
|
-
});
|
|
2589
|
-
await assetHandler.processAllAssetsOnce();
|
|
2590
|
-
writeTrace("Completed copying assets to the output directory", config);
|
|
2591
|
-
if (includeSrc === true) {
|
|
2592
|
-
writeDebug(
|
|
2593
|
-
`\u{1F4DD} Adding banner and writing source files: ${_chunk3276F5F6js.joinPaths.call(void 0,
|
|
2594
|
-
outputPath,
|
|
2595
|
-
"src"
|
|
2596
|
-
)}`,
|
|
2597
|
-
config
|
|
2598
|
-
);
|
|
2599
|
-
const files = await _glob.glob.call(void 0, [
|
|
2600
|
-
_chunk3276F5F6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
2601
|
-
_chunk3276F5F6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
2602
|
-
_chunk3276F5F6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
2603
|
-
_chunk3276F5F6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
2604
|
-
]);
|
|
2605
|
-
await Promise.allSettled(
|
|
2606
|
-
files.map(
|
|
2607
|
-
async (file) => _promises.writeFile.call(void 0,
|
|
2608
|
-
file,
|
|
2609
|
-
`${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
2610
|
-
|
|
2611
|
-
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
2612
|
-
|
|
2613
|
-
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
2614
|
-
)
|
|
2615
|
-
)
|
|
2616
|
-
);
|
|
2617
|
-
}
|
|
2618
|
-
};
|
|
2619
|
-
|
|
2620
|
-
// ../build-tools/src/utilities/generate-package-json.ts
|
|
2621
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
2631
|
-
var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, packageJson) => {
|
|
2632
|
-
let projectGraph;
|
|
2633
|
-
try {
|
|
2634
|
-
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
2635
|
-
} catch (e3) {
|
|
2636
|
-
await _projectgraph.createProjectGraphAsync.call(void 0, );
|
|
2637
|
-
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
2638
|
-
}
|
|
2639
|
-
if (!projectGraph) {
|
|
2640
|
-
throw new Error(
|
|
2641
|
-
"The Build process failed because the project graph is not available. Please run the build command again."
|
|
2642
|
-
);
|
|
2643
|
-
}
|
|
2644
|
-
const projectDependencies = _internal.calculateProjectBuildableDependencies.call(void 0,
|
|
2645
|
-
void 0,
|
|
2646
|
-
projectGraph,
|
|
2647
|
-
workspaceRoot2,
|
|
2648
|
-
projectName,
|
|
2649
|
-
process.env.NX_TASK_TARGET_TARGET || "build",
|
|
2650
|
-
process.env.NX_TASK_TARGET_CONFIGURATION || "production",
|
|
2651
|
-
true
|
|
2652
|
-
);
|
|
2653
|
-
const localPackages = [];
|
|
2654
|
-
for (const project of projectDependencies.dependencies.filter(
|
|
2655
|
-
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _108 => _108.node, 'access', _109 => _109.data, 'optionalAccess', _110 => _110.root]) !== projectRoot && _optionalChain([dep, 'access', _111 => _111.node, 'access', _112 => _112.data, 'optionalAccess', _113 => _113.root]) !== workspaceRoot2
|
|
2656
|
-
)) {
|
|
2657
|
-
const projectNode = project.node;
|
|
2658
|
-
if (projectNode.data.root) {
|
|
2659
|
-
const projectPackageJsonPath = _chunk3276F5F6js.joinPaths.call(void 0,
|
|
2660
|
-
workspaceRoot2,
|
|
2661
|
-
projectNode.data.root,
|
|
2662
|
-
"package.json"
|
|
2663
|
-
);
|
|
2664
|
-
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
2665
|
-
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
2666
|
-
projectPackageJsonPath,
|
|
2667
|
-
"utf8"
|
|
2668
|
-
);
|
|
2669
|
-
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
2670
|
-
if (projectPackageJson.private !== true) {
|
|
2671
|
-
localPackages.push(projectPackageJson);
|
|
2672
|
-
}
|
|
2673
|
-
}
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
if (localPackages.length > 0) {
|
|
2677
|
-
writeTrace(
|
|
2678
|
-
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
2679
|
-
);
|
|
2680
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
2681
|
-
_chunk3276F5F6js.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
2682
|
-
"utf8"
|
|
2683
|
-
);
|
|
2684
|
-
const projectJson = JSON.parse(projectJsonFile);
|
|
2685
|
-
const projectName2 = projectJson.name;
|
|
2686
|
-
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2687
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _114 => _114.projects, 'optionalAccess', _115 => _115[projectName2]])) {
|
|
2688
|
-
throw new Error(
|
|
2689
|
-
"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."
|
|
2690
|
-
);
|
|
2691
|
-
}
|
|
2692
|
-
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _116 => _116.projects, 'optionalAccess', _117 => _117[projectName2], 'access', _118 => _118.implicitDependencies, 'optionalAccess', _119 => _119.reduce, 'call', _120 => _120((ret, dep) => {
|
|
2693
|
-
if (_optionalChain([projectConfigurations, 'access', _121 => _121.projects, 'optionalAccess', _122 => _122[dep]])) {
|
|
2694
|
-
const depPackageJsonPath = _chunk3276F5F6js.joinPaths.call(void 0,
|
|
2695
|
-
workspaceRoot2,
|
|
2696
|
-
projectConfigurations.projects[dep].root,
|
|
2697
|
-
"package.json"
|
|
2698
|
-
);
|
|
2699
|
-
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
2700
|
-
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
2701
|
-
depPackageJsonPath,
|
|
2702
|
-
"utf8"
|
|
2703
|
-
);
|
|
2704
|
-
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
2705
|
-
if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
|
|
2706
|
-
ret.push(depPackageJson.name);
|
|
2707
|
-
}
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
return ret;
|
|
2711
|
-
}, [])]);
|
|
2712
|
-
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
2713
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _123 => _123.includes, 'call', _124 => _124(localPackage.name)]) && _optionalChain([packageJson, 'access', _125 => _125.devDependencies, 'optionalAccess', _126 => _126[localPackage.name]]) === void 0) {
|
|
2714
|
-
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
2715
|
-
}
|
|
2716
|
-
return ret;
|
|
2717
|
-
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
2718
|
-
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
2719
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _127 => _127.includes, 'call', _128 => _128(localPackage.name)]) && _optionalChain([packageJson, 'access', _129 => _129.dependencies, 'optionalAccess', _130 => _130[localPackage.name]]) === void 0) {
|
|
2720
|
-
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
2721
|
-
}
|
|
2722
|
-
return ret;
|
|
2723
|
-
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
2724
|
-
} else {
|
|
2725
|
-
writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
|
|
2726
|
-
}
|
|
2727
|
-
return packageJson;
|
|
2728
|
-
};
|
|
2729
|
-
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
2730
|
-
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
|
|
2731
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
2732
|
-
_chunk3276F5F6js.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
2733
|
-
"utf8"
|
|
2734
|
-
);
|
|
2735
|
-
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
2736
|
-
packageJson.type ??= "module";
|
|
2737
|
-
packageJson.sideEffects ??= false;
|
|
2738
|
-
if (includeSrc === true) {
|
|
2739
|
-
let distSrc = sourceRoot.replace(projectRoot, "");
|
|
2740
|
-
if (distSrc.startsWith("/")) {
|
|
2741
|
-
distSrc = distSrc.substring(1);
|
|
2742
|
-
}
|
|
2743
|
-
packageJson.source ??= `${_chunk3276F5F6js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
2744
|
-
}
|
|
2745
|
-
packageJson.files ??= ["dist/**/*"];
|
|
2746
|
-
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
2747
|
-
packageJson.files.push("src/**/*");
|
|
2748
|
-
}
|
|
2749
|
-
packageJson.publishConfig ??= {
|
|
2750
|
-
access: "public"
|
|
2751
|
-
};
|
|
2752
|
-
packageJson.description ??= workspacePackageJson.description;
|
|
2753
|
-
packageJson.homepage ??= workspacePackageJson.homepage;
|
|
2754
|
-
packageJson.bugs ??= workspacePackageJson.bugs;
|
|
2755
|
-
packageJson.license ??= workspacePackageJson.license;
|
|
2756
|
-
packageJson.keywords ??= workspacePackageJson.keywords;
|
|
2757
|
-
packageJson.funding ??= workspacePackageJson.funding;
|
|
2758
|
-
packageJson.author ??= workspacePackageJson.author;
|
|
2759
|
-
packageJson.maintainers ??= workspacePackageJson.maintainers;
|
|
2760
|
-
if (!packageJson.maintainers && packageJson.author) {
|
|
2761
|
-
packageJson.maintainers = [packageJson.author];
|
|
2762
|
-
}
|
|
2763
|
-
packageJson.contributors ??= workspacePackageJson.contributors;
|
|
2764
|
-
if (!packageJson.contributors && packageJson.author) {
|
|
2765
|
-
packageJson.contributors = [packageJson.author];
|
|
2766
|
-
}
|
|
2767
|
-
packageJson.repository ??= workspacePackageJson.repository;
|
|
2768
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk3276F5F6js.joinPaths.call(void 0, "packages", projectName);
|
|
2769
|
-
return packageJson;
|
|
2770
|
-
};
|
|
2771
|
-
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
2772
|
-
let entry = file.replaceAll("\\", "/");
|
|
2773
|
-
if (sourceRoot) {
|
|
2774
|
-
entry = entry.replace(sourceRoot, "");
|
|
2775
|
-
}
|
|
2776
|
-
return {
|
|
2777
|
-
import: {
|
|
2778
|
-
types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
|
|
2779
|
-
default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
|
|
2780
|
-
},
|
|
2781
|
-
require: {
|
|
2782
|
-
types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
|
|
2783
|
-
default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
|
|
2784
|
-
},
|
|
2785
|
-
default: {
|
|
2786
|
-
types: `./dist/${entry}.d.${type !== "fixed" ? "ts" : "mts"}`,
|
|
2787
|
-
default: `./dist/${entry}.${type !== "fixed" ? "js" : "mjs"}`
|
|
2788
|
-
}
|
|
2789
|
-
};
|
|
2790
|
-
};
|
|
2791
|
-
|
|
2792
|
-
// ../build-tools/src/utilities/get-entry-points.ts
|
|
2793
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
// ../build-tools/src/utilities/get-env.ts
|
|
2797
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2798
|
-
var getEnv = (builder, options) => {
|
|
2799
|
-
return {
|
|
2800
|
-
STORM_BUILD: builder,
|
|
2801
|
-
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
2802
|
-
STORM_NAME: options.name,
|
|
2803
|
-
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
2804
|
-
STORM_PLATFORM: options.platform,
|
|
2805
|
-
STORM_FORMAT: JSON.stringify(options.format),
|
|
2806
|
-
STORM_TARGET: JSON.stringify(options.target),
|
|
2807
|
-
...options.env
|
|
2808
|
-
};
|
|
2809
|
-
};
|
|
2810
|
-
|
|
2811
|
-
// ../build-tools/src/utilities/get-file-banner.ts
|
|
2812
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2813
|
-
|
|
2814
|
-
// ../build-tools/src/utilities/get-out-extension.ts
|
|
2815
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2816
|
-
|
|
2817
|
-
// ../build-tools/src/utilities/get-project-deps.ts
|
|
2818
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2819
|
-
|
|
2820
|
-
// ../build-tools/src/utilities/read-nx-config.ts
|
|
2821
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
// ../build-tools/src/utilities/task-graph.ts
|
|
2826
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
2831
|
-
|
|
2832
|
-
// ../esbuild/src/assets.ts
|
|
2833
|
-
async function copyBuildAssets(context) {
|
|
2834
|
-
if (!_optionalChain([context, 'access', _131 => _131.result, 'optionalAccess', _132 => _132.errors, 'access', _133 => _133.length]) && _optionalChain([context, 'access', _134 => _134.options, 'access', _135 => _135.assets, 'optionalAccess', _136 => _136.length])) {
|
|
2835
|
-
writeDebug(
|
|
2836
|
-
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
2837
|
-
context.workspaceConfig
|
|
2838
|
-
);
|
|
2839
|
-
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
2840
|
-
await copyAssets(
|
|
2841
|
-
context.workspaceConfig,
|
|
2842
|
-
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
2843
|
-
context.outputPath,
|
|
2844
|
-
context.options.projectRoot,
|
|
2845
|
-
context.sourceRoot,
|
|
2846
|
-
true,
|
|
2847
|
-
false
|
|
2848
|
-
);
|
|
2849
|
-
stopwatch();
|
|
2850
|
-
}
|
|
2851
|
-
return context;
|
|
2852
|
-
}
|
|
2853
|
-
|
|
2854
|
-
// ../esbuild/src/clean.ts
|
|
2855
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2856
|
-
|
|
2857
|
-
async function cleanDirectories(directory) {
|
|
2858
|
-
await _promises.rm.call(void 0, directory, { recursive: true, force: true });
|
|
2859
|
-
}
|
|
2860
|
-
|
|
2861
|
-
// ../esbuild/src/context.ts
|
|
2862
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
2871
|
-
|
|
2872
|
-
// ../esbuild/src/config.ts
|
|
2873
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
2874
|
-
var DEFAULT_BUILD_OPTIONS = {
|
|
2875
|
-
platform: "node",
|
|
2876
|
-
target: "node22",
|
|
2877
|
-
format: "esm",
|
|
2878
|
-
mode: "production",
|
|
2879
|
-
generatePackageJson: true,
|
|
2880
|
-
includeSrc: false,
|
|
2881
|
-
keepNames: true,
|
|
2882
|
-
metafile: false,
|
|
2883
|
-
treeshake: true,
|
|
2884
|
-
splitting: true,
|
|
2885
|
-
shims: false,
|
|
2886
|
-
watch: false,
|
|
2887
|
-
bundle: true,
|
|
2888
|
-
distDir: "dist",
|
|
2889
|
-
loader: {
|
|
2890
|
-
".aac": "file",
|
|
2891
|
-
".css": "file",
|
|
2892
|
-
".eot": "file",
|
|
2893
|
-
".flac": "file",
|
|
2894
|
-
".gif": "file",
|
|
2895
|
-
".jpeg": "file",
|
|
2896
|
-
".jpg": "file",
|
|
2897
|
-
".mp3": "file",
|
|
2898
|
-
".mp4": "file",
|
|
2899
|
-
".ogg": "file",
|
|
2900
|
-
".otf": "file",
|
|
2901
|
-
".png": "file",
|
|
2902
|
-
".svg": "file",
|
|
2903
|
-
".ttf": "file",
|
|
2904
|
-
".wav": "file",
|
|
2905
|
-
".webm": "file",
|
|
2906
|
-
".webp": "file",
|
|
2907
|
-
".woff": "file",
|
|
2908
|
-
".woff2": "file"
|
|
2909
|
-
},
|
|
2910
|
-
banner: {
|
|
2911
|
-
js: DEFAULT_JS_BANNER,
|
|
2912
|
-
css: DEFAULT_CSS_BANNER
|
|
2913
|
-
}
|
|
2914
|
-
};
|
|
2915
|
-
|
|
2916
|
-
// ../esbuild/src/context.ts
|
|
2917
|
-
async function resolveContext(userOptions) {
|
|
2918
|
-
const projectRoot = userOptions.projectRoot;
|
|
2919
|
-
const workspaceRoot2 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
|
|
2920
|
-
if (!workspaceRoot2) {
|
|
2921
|
-
throw new Error("Cannot find Nx workspace root");
|
|
2922
|
-
}
|
|
2923
|
-
const workspaceConfig = await getWorkspaceConfig(true, {
|
|
2924
|
-
workspaceRoot: workspaceRoot2.dir
|
|
2925
|
-
});
|
|
2926
|
-
writeDebug(" \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
2927
|
-
const stopwatch = getStopwatch("Build options resolution");
|
|
2928
|
-
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
2929
|
-
exitOnError: true
|
|
2930
|
-
});
|
|
2931
|
-
const projectJsonPath = _chunk3276F5F6js.joinPaths.call(void 0,
|
|
2932
|
-
workspaceRoot2.dir,
|
|
2933
|
-
projectRoot,
|
|
2934
|
-
"project.json"
|
|
2935
|
-
);
|
|
2936
|
-
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2937
|
-
throw new Error("Cannot find project.json configuration");
|
|
2938
|
-
}
|
|
2939
|
-
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
2940
|
-
const projectJson = JSON.parse(projectJsonFile);
|
|
2941
|
-
const projectName = projectJson.name || userOptions.name;
|
|
2942
|
-
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2943
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _137 => _137.projects, 'optionalAccess', _138 => _138[projectName]])) {
|
|
2944
|
-
throw new Error(
|
|
2945
|
-
"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."
|
|
2946
|
-
);
|
|
2947
|
-
}
|
|
2948
|
-
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
2949
|
-
options.name ??= projectName;
|
|
2950
|
-
const packageJsonPath = _chunk3276F5F6js.joinPaths.call(void 0,
|
|
2951
|
-
workspaceRoot2.dir,
|
|
2952
|
-
options.projectRoot,
|
|
2953
|
-
"package.json"
|
|
2954
|
-
);
|
|
2955
|
-
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2956
|
-
throw new Error("Cannot find package.json configuration");
|
|
2957
|
-
}
|
|
2958
|
-
const env = getEnv("esbuild", options);
|
|
2959
|
-
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
2960
|
-
const resolvedOptions = {
|
|
2961
|
-
...options,
|
|
2962
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunk3276F5F6js.joinPaths.call(void 0, workspaceRoot2.dir, projectRoot, "tsconfig.json"),
|
|
2963
|
-
metafile: userOptions.mode === "development",
|
|
2964
|
-
clean: false,
|
|
2965
|
-
env,
|
|
2966
|
-
define: {
|
|
2967
|
-
STORM_FORMAT: JSON.stringify(options.format),
|
|
2968
|
-
...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
|
|
2969
|
-
const value = JSON.stringify(define[key]);
|
|
2970
|
-
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
2971
|
-
return {
|
|
2972
|
-
...res,
|
|
2973
|
-
[`process.env.${safeKey}`]: value,
|
|
2974
|
-
[`import.meta.env.${safeKey}`]: value
|
|
2975
|
-
};
|
|
2976
|
-
}, {})
|
|
2977
|
-
}
|
|
2978
|
-
};
|
|
2979
|
-
stopwatch();
|
|
2980
|
-
const context = {
|
|
2981
|
-
options: resolvedOptions,
|
|
2982
|
-
clean: userOptions.clean !== false,
|
|
2983
|
-
workspaceConfig,
|
|
2984
|
-
projectConfigurations,
|
|
2985
|
-
projectName,
|
|
2986
|
-
projectGraph,
|
|
2987
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunk3276F5F6js.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
2988
|
-
outputPath: resolvedOptions.outputPath || _chunk3276F5F6js.joinPaths.call(void 0,
|
|
2989
|
-
workspaceConfig.workspaceRoot,
|
|
2990
|
-
"dist",
|
|
2991
|
-
resolvedOptions.projectRoot
|
|
2992
|
-
),
|
|
2993
|
-
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2994
|
-
};
|
|
2995
|
-
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
2996
|
-
if (context.options.verbose) {
|
|
2997
|
-
writeDebug(
|
|
2998
|
-
` \u2699\uFE0F Build options resolved:
|
|
2999
|
-
|
|
3000
|
-
${formatLogMessage(context.options)}`,
|
|
3001
|
-
workspaceConfig
|
|
3002
|
-
);
|
|
3003
|
-
}
|
|
3004
|
-
return context;
|
|
3005
|
-
}
|
|
3006
|
-
|
|
3007
|
-
// ../esbuild/src/package-json.ts
|
|
3008
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
async function generatePackageJson(context) {
|
|
3013
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk3276F5F6js.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
3014
|
-
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
3015
|
-
const stopwatch = getStopwatch("Write package.json file");
|
|
3016
|
-
const packageJsonPath = _chunk3276F5F6js.joinPaths.call(void 0,
|
|
3017
|
-
context.options.projectRoot,
|
|
3018
|
-
"project.json"
|
|
3019
|
-
);
|
|
3020
|
-
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
3021
|
-
throw new Error("Cannot find package.json configuration");
|
|
3022
|
-
}
|
|
3023
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
3024
|
-
_chunk3276F5F6js.joinPaths.call(void 0,
|
|
3025
|
-
context.workspaceConfig.workspaceRoot,
|
|
3026
|
-
context.options.projectRoot,
|
|
3027
|
-
"package.json"
|
|
3028
|
-
),
|
|
3029
|
-
"utf8"
|
|
3030
|
-
);
|
|
3031
|
-
let packageJson = JSON.parse(packageJsonFile);
|
|
3032
|
-
if (!packageJson) {
|
|
3033
|
-
throw new Error("Cannot find package.json configuration file");
|
|
3034
|
-
}
|
|
3035
|
-
packageJson = await addPackageDependencies(
|
|
3036
|
-
context.workspaceConfig.workspaceRoot,
|
|
3037
|
-
context.options.projectRoot,
|
|
3038
|
-
context.projectName,
|
|
3039
|
-
packageJson
|
|
3040
|
-
);
|
|
3041
|
-
packageJson = await addWorkspacePackageJsonFields(
|
|
3042
|
-
context.workspaceConfig,
|
|
3043
|
-
context.options.projectRoot,
|
|
3044
|
-
context.sourceRoot,
|
|
3045
|
-
context.projectName,
|
|
3046
|
-
false,
|
|
3047
|
-
packageJson
|
|
3048
|
-
);
|
|
3049
|
-
if (context.options.entry) {
|
|
3050
|
-
packageJson.exports ??= {};
|
|
3051
|
-
packageJson.exports["./package.json"] ??= "./package.json";
|
|
3052
|
-
const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
|
|
3053
|
-
if (entryPoints.length > 0) {
|
|
3054
|
-
const defaultEntry = entryPoints.includes("index") ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entryPoints[0]}`;
|
|
3055
|
-
const isEsm = Array.isArray(context.options.format) ? context.options.format.includes("esm") : context.options.format === "esm";
|
|
3056
|
-
const isCjs = Array.isArray(context.options.format) ? context.options.format.includes("cjs") : context.options.format === "cjs";
|
|
3057
|
-
const isDts = context.options.dts || context.options.experimentalDts;
|
|
3058
|
-
packageJson.exports["."] ??= `${defaultEntry}.${isEsm ? "mjs" : isCjs ? "cjs" : "js"}`;
|
|
3059
|
-
for (const entryPoint of entryPoints) {
|
|
3060
|
-
packageJson.exports[`./${entryPoint}`] ??= {};
|
|
3061
|
-
if (isEsm) {
|
|
3062
|
-
if (isDts) {
|
|
3063
|
-
packageJson.exports[`./${entryPoint}`].import = {
|
|
3064
|
-
types: `./dist/${entryPoint}.d.mts`,
|
|
3065
|
-
default: `./dist/${entryPoint}.mjs`
|
|
3066
|
-
};
|
|
3067
|
-
} else {
|
|
3068
|
-
packageJson.exports[`./${entryPoint}`].import = `./dist/${entryPoint}.mjs`;
|
|
3069
|
-
}
|
|
3070
|
-
if (isDts) {
|
|
3071
|
-
packageJson.exports[`./${entryPoint}`].default = {
|
|
3072
|
-
types: `./dist/${entryPoint}.d.mts`,
|
|
3073
|
-
default: `./dist/${entryPoint}.mjs`
|
|
3074
|
-
};
|
|
3075
|
-
} else {
|
|
3076
|
-
packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.mjs`;
|
|
3077
|
-
}
|
|
3078
|
-
}
|
|
3079
|
-
if (isCjs) {
|
|
3080
|
-
if (isDts) {
|
|
3081
|
-
packageJson.exports[`./${entryPoint}`].require = {
|
|
3082
|
-
types: `./dist/${entryPoint}.d.cts`,
|
|
3083
|
-
default: `./dist/${entryPoint}.cjs`
|
|
3084
|
-
};
|
|
3085
|
-
} else {
|
|
3086
|
-
packageJson.exports[`./${entryPoint}`].require = `./dist/${entryPoint}.cjs`;
|
|
3087
|
-
}
|
|
3088
|
-
if (!isEsm) {
|
|
3089
|
-
if (isDts) {
|
|
3090
|
-
packageJson.exports[`./${entryPoint}`].default = {
|
|
3091
|
-
types: `./dist/${entryPoint}.d.cts`,
|
|
3092
|
-
default: `./dist/${entryPoint}.cjs`
|
|
3093
|
-
};
|
|
3094
|
-
} else {
|
|
3095
|
-
packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.cjs`;
|
|
3096
|
-
}
|
|
3097
|
-
}
|
|
3098
|
-
}
|
|
3099
|
-
if (!isEsm && !isCjs) {
|
|
3100
|
-
if (isDts) {
|
|
3101
|
-
packageJson.exports[`./${entryPoint}`].default = {
|
|
3102
|
-
types: `./dist/${entryPoint}.d.ts`,
|
|
3103
|
-
default: `./dist/${entryPoint}.js`
|
|
3104
|
-
};
|
|
3105
|
-
} else {
|
|
3106
|
-
packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.js`;
|
|
3107
|
-
}
|
|
3108
|
-
}
|
|
3109
|
-
}
|
|
3110
|
-
if (isEsm) {
|
|
3111
|
-
packageJson.module = `${defaultEntry}.mjs`;
|
|
3112
|
-
} else {
|
|
3113
|
-
packageJson.main = `${defaultEntry}.cjs`;
|
|
3114
|
-
}
|
|
3115
|
-
if (isDts) {
|
|
3116
|
-
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
3117
|
-
}
|
|
3118
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
3119
|
-
(ret, key) => {
|
|
3120
|
-
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
3121
|
-
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
3122
|
-
}
|
|
3123
|
-
return ret;
|
|
3124
|
-
},
|
|
3125
|
-
packageJson.exports
|
|
3126
|
-
);
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
3130
|
-
_chunk3276F5F6js.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
3131
|
-
packageJson
|
|
3132
|
-
);
|
|
3133
|
-
stopwatch();
|
|
3134
|
-
}
|
|
3135
|
-
return context;
|
|
3136
|
-
}
|
|
3137
|
-
|
|
3138
|
-
// ../esbuild/src/tsup.ts
|
|
3139
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
3140
|
-
|
|
3141
|
-
// ../tsup/src/index.ts
|
|
3142
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
3143
|
-
var _tsup = require('tsup');
|
|
3144
|
-
async function build(options) {
|
|
3145
|
-
if (!options.silent) {
|
|
3146
|
-
writeDebug(
|
|
3147
|
-
` \u{1F680} Running ${options.name || "tsup"} build`,
|
|
3148
|
-
options.workspaceConfig
|
|
3149
|
-
);
|
|
3150
|
-
}
|
|
3151
|
-
const stopwatch = getStopwatch(`${options.name || "tsup"} build`);
|
|
3152
|
-
await _tsup.build.call(void 0, options);
|
|
3153
|
-
if (!options.silent) {
|
|
3154
|
-
stopwatch();
|
|
3155
|
-
}
|
|
3156
|
-
}
|
|
3157
|
-
|
|
3158
|
-
// ../esbuild/src/tsup.ts
|
|
3159
|
-
async function executeTsup(context) {
|
|
3160
|
-
writeDebug(
|
|
3161
|
-
` \u{1F680} Running ${context.options.name} build`,
|
|
3162
|
-
context.workspaceConfig
|
|
3163
|
-
);
|
|
3164
|
-
const stopwatch = getStopwatch(`${context.options.name} build`);
|
|
3165
|
-
await build({
|
|
3166
|
-
...context.options,
|
|
3167
|
-
outDir: context.options.distDir ? _chunk3276F5F6js.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
3168
|
-
workspaceConfig: context.workspaceConfig
|
|
3169
|
-
});
|
|
3170
|
-
stopwatch();
|
|
3171
|
-
return context;
|
|
3172
|
-
}
|
|
3173
|
-
|
|
3174
|
-
// ../esbuild/src/build.ts
|
|
3175
|
-
async function reportResults(context) {
|
|
3176
|
-
if (_optionalChain([context, 'access', _139 => _139.result, 'optionalAccess', _140 => _140.errors, 'access', _141 => _141.length]) === 0) {
|
|
3177
|
-
if (context.result.warnings.length > 0) {
|
|
3178
|
-
writeWarning(
|
|
3179
|
-
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
3180
|
-
context.workspaceConfig
|
|
3181
|
-
);
|
|
3182
|
-
}
|
|
3183
|
-
writeSuccess(
|
|
3184
|
-
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
3185
|
-
context.workspaceConfig
|
|
3186
|
-
);
|
|
3187
|
-
} else if (_optionalChain([context, 'access', _142 => _142.result, 'optionalAccess', _143 => _143.errors]) && _optionalChain([context, 'access', _144 => _144.result, 'optionalAccess', _145 => _145.errors, 'access', _146 => _146.length]) > 0) {
|
|
3188
|
-
writeError(
|
|
3189
|
-
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
3190
|
-
context.workspaceConfig
|
|
3191
|
-
);
|
|
3192
|
-
throw new Error(
|
|
3193
|
-
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
3194
|
-
);
|
|
3195
|
-
}
|
|
3196
|
-
}
|
|
3197
|
-
async function cleanOutputPath(context) {
|
|
3198
|
-
if (context.clean !== false && context.outputPath) {
|
|
3199
|
-
writeDebug(
|
|
3200
|
-
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
3201
|
-
context.workspaceConfig
|
|
3202
|
-
);
|
|
3203
|
-
const stopwatch = getStopwatch(`${context.options.name} output clean`);
|
|
3204
|
-
await cleanDirectories(context.outputPath);
|
|
3205
|
-
stopwatch();
|
|
3206
|
-
}
|
|
3207
|
-
return context;
|
|
3208
|
-
}
|
|
3209
|
-
async function build2(options) {
|
|
3210
|
-
writeDebug(` ${brandIcon()} Executing Storm ESBuild pipeline`);
|
|
3211
|
-
const stopwatch = getStopwatch("ESBuild pipeline");
|
|
3212
|
-
try {
|
|
3213
|
-
const opts = Array.isArray(options) ? options : [options];
|
|
3214
|
-
if (opts.length === 0) {
|
|
3215
|
-
throw new Error("No build options were provided");
|
|
3216
|
-
}
|
|
3217
|
-
const context = await resolveContext(options);
|
|
3218
|
-
await cleanOutputPath(context);
|
|
3219
|
-
await Promise.all([
|
|
3220
|
-
// dependencyCheck(context.options),
|
|
3221
|
-
generatePackageJson(context),
|
|
3222
|
-
copyBuildAssets(context),
|
|
3223
|
-
executeTsup(context)
|
|
3224
|
-
]);
|
|
3225
|
-
await reportResults(context);
|
|
3226
|
-
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
3227
|
-
} catch (error) {
|
|
3228
|
-
writeFatal(
|
|
3229
|
-
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
3230
|
-
);
|
|
3231
|
-
throw error;
|
|
3232
|
-
} finally {
|
|
3233
|
-
stopwatch();
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
|
|
3237
|
-
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
2492
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2493
|
+
var _jiti = require('jiti');
|
|
3238
2494
|
async function esbuildExecutorFn(options, context, config) {
|
|
3239
2495
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
3240
|
-
if (!_optionalChain([context, 'access',
|
|
2496
|
+
if (!_optionalChain([context, 'access', _108 => _108.projectsConfigurations, 'optionalAccess', _109 => _109.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _110 => _110.projectsConfigurations, 'access', _111 => _111.projects, 'access', _112 => _112[context.projectName], 'optionalAccess', _113 => _113.root])) {
|
|
3241
2497
|
throw new Error(
|
|
3242
2498
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
3243
2499
|
);
|
|
3244
2500
|
}
|
|
2501
|
+
const jiti = _jiti.createJiti.call(void 0, _optionalChain([config, 'optionalAccess', _114 => _114.workspaceRoot]) || process.cwd(), {
|
|
2502
|
+
fsCache: _optionalChain([config, 'optionalAccess', _115 => _115.skipCache]) ? false : _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
2503
|
+
_optionalChain([config, 'optionalAccess', _116 => _116.workspaceRoot]) || process.cwd(),
|
|
2504
|
+
_optionalChain([config, 'optionalAccess', _117 => _117.directories, 'optionalAccess', _118 => _118.cache]) || "node_modules/.cache/storm",
|
|
2505
|
+
"jiti"
|
|
2506
|
+
),
|
|
2507
|
+
interopDefault: true
|
|
2508
|
+
});
|
|
2509
|
+
const { build: build2 } = await jiti.import(jiti.esmResolve("@storm-software/esbuild"));
|
|
3245
2510
|
await build2({
|
|
3246
2511
|
...options,
|
|
3247
2512
|
projectRoot: (
|
|
3248
2513
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3249
|
-
_optionalChain([context, 'access',
|
|
2514
|
+
_optionalChain([context, 'access', _119 => _119.projectsConfigurations, 'access', _120 => _120.projects, 'optionalAccess', _121 => _121[context.projectName], 'access', _122 => _122.root])
|
|
3250
2515
|
),
|
|
3251
2516
|
name: context.projectName,
|
|
3252
|
-
sourceRoot: _optionalChain([context, 'access',
|
|
2517
|
+
sourceRoot: _optionalChain([context, 'access', _123 => _123.projectsConfigurations, 'access', _124 => _124.projects, 'optionalAccess', _125 => _125[context.projectName], 'optionalAccess', _126 => _126.sourceRoot]),
|
|
3253
2518
|
format: options.format,
|
|
3254
2519
|
platform: options.platform
|
|
3255
2520
|
});
|
|
@@ -3274,12 +2539,12 @@ var executor_default6 = withRunExecutor(
|
|
|
3274
2539
|
);
|
|
3275
2540
|
|
|
3276
2541
|
// ../workspace-tools/src/executors/napi/executor.ts
|
|
3277
|
-
|
|
3278
|
-
|
|
2542
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2543
|
+
|
|
3279
2544
|
var _fileutils = require('nx/src/utils/fileutils');
|
|
3280
2545
|
async function napiExecutor(options, context, config) {
|
|
3281
2546
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
3282
|
-
fsCache: config.skipCache ? false :
|
|
2547
|
+
fsCache: config.skipCache ? false : _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
3283
2548
|
config.workspaceRoot,
|
|
3284
2549
|
config.directories.cache || "node_modules/.cache/storm",
|
|
3285
2550
|
"jiti"
|
|
@@ -3289,58 +2554,58 @@ async function napiExecutor(options, context, config) {
|
|
|
3289
2554
|
const { NapiCli } = await jiti.import(
|
|
3290
2555
|
jiti.esmResolve("@napi-rs/cli")
|
|
3291
2556
|
);
|
|
3292
|
-
if (!_optionalChain([context, 'access',
|
|
2557
|
+
if (!_optionalChain([context, 'access', _127 => _127.projectGraph, 'optionalAccess', _128 => _128.nodes, 'access', _129 => _129[_nullishCoalesce(context.projectName, () => ( ""))]])) {
|
|
3293
2558
|
throw new Error(
|
|
3294
2559
|
"The Napi Build process failed because the project could not be found in the project graph. Please run this command from a workspace root directory."
|
|
3295
2560
|
);
|
|
3296
2561
|
}
|
|
3297
|
-
const projectRoot = _optionalChain([context, 'access',
|
|
3298
|
-
const packageJson =
|
|
2562
|
+
const projectRoot = _optionalChain([context, 'access', _130 => _130.projectGraph, 'optionalAccess', _131 => _131.nodes, 'access', _132 => _132[_nullishCoalesce(context.projectName, () => ( ""))], 'optionalAccess', _133 => _133.data, 'access', _134 => _134.root]);
|
|
2563
|
+
const packageJson = _chunkYWHLDYZ3js.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
|
|
3299
2564
|
if (!_fileutils.fileExists.call(void 0, packageJson)) {
|
|
3300
2565
|
throw new Error(`Could not find package.json at ${packageJson}`);
|
|
3301
2566
|
}
|
|
3302
2567
|
const napi = new NapiCli();
|
|
3303
2568
|
const normalizedOptions = { ...options };
|
|
3304
2569
|
const metadata = cargoMetadata();
|
|
3305
|
-
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess',
|
|
2570
|
+
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _135 => _135.target_directory]) || _chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
|
|
3306
2571
|
normalizedOptions.outputDir = options.outputPath;
|
|
3307
2572
|
normalizedOptions.packageJsonPath ??= packageJson;
|
|
3308
2573
|
if (options.cwd) {
|
|
3309
|
-
normalizedOptions.cwd =
|
|
2574
|
+
normalizedOptions.cwd = _chunkYWHLDYZ3js.correctPaths.call(void 0, options.cwd);
|
|
3310
2575
|
} else {
|
|
3311
|
-
const absoluteProjectRoot =
|
|
3312
|
-
|
|
2576
|
+
const absoluteProjectRoot = _chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
2577
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, projectRoot || ".")
|
|
3313
2578
|
);
|
|
3314
2579
|
normalizedOptions.cwd = absoluteProjectRoot;
|
|
3315
2580
|
if (normalizedOptions.outputDir) {
|
|
3316
|
-
normalizedOptions.outputDir =
|
|
2581
|
+
normalizedOptions.outputDir = _chunkYWHLDYZ3js.relative.call(void 0,
|
|
3317
2582
|
normalizedOptions.cwd,
|
|
3318
|
-
|
|
3319
|
-
|
|
2583
|
+
_chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
2584
|
+
_chunkYWHLDYZ3js.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.outputDir)
|
|
3320
2585
|
)
|
|
3321
2586
|
);
|
|
3322
2587
|
}
|
|
3323
2588
|
if (normalizedOptions.packageJsonPath) {
|
|
3324
|
-
normalizedOptions.packageJsonPath =
|
|
2589
|
+
normalizedOptions.packageJsonPath = _chunkYWHLDYZ3js.relative.call(void 0,
|
|
3325
2590
|
normalizedOptions.cwd,
|
|
3326
|
-
|
|
3327
|
-
|
|
2591
|
+
_chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
2592
|
+
_chunkYWHLDYZ3js.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.packageJsonPath)
|
|
3328
2593
|
)
|
|
3329
2594
|
);
|
|
3330
2595
|
}
|
|
3331
2596
|
if (normalizedOptions.configPath) {
|
|
3332
|
-
normalizedOptions.configPath =
|
|
2597
|
+
normalizedOptions.configPath = _chunkYWHLDYZ3js.relative.call(void 0,
|
|
3333
2598
|
normalizedOptions.cwd,
|
|
3334
|
-
|
|
3335
|
-
|
|
2599
|
+
_chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
2600
|
+
_chunkYWHLDYZ3js.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.configPath)
|
|
3336
2601
|
)
|
|
3337
2602
|
);
|
|
3338
2603
|
}
|
|
3339
2604
|
if (normalizedOptions.manifestPath) {
|
|
3340
|
-
normalizedOptions.manifestPath =
|
|
2605
|
+
normalizedOptions.manifestPath = _chunkYWHLDYZ3js.relative.call(void 0,
|
|
3341
2606
|
normalizedOptions.cwd,
|
|
3342
|
-
|
|
3343
|
-
|
|
2607
|
+
_chunkYWHLDYZ3js.correctPaths.call(void 0,
|
|
2608
|
+
_chunkYWHLDYZ3js.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.manifestPath)
|
|
3344
2609
|
)
|
|
3345
2610
|
);
|
|
3346
2611
|
}
|
|
@@ -3383,57 +2648,67 @@ var executor_default7 = withRunExecutor(
|
|
|
3383
2648
|
);
|
|
3384
2649
|
|
|
3385
2650
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
3386
|
-
|
|
2651
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3387
2652
|
|
|
3388
|
-
// ../
|
|
3389
|
-
|
|
2653
|
+
// ../pnpm-tools/src/index.ts
|
|
2654
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2655
|
+
|
|
2656
|
+
// ../pnpm-tools/src/helpers/index.ts
|
|
2657
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3390
2658
|
|
|
2659
|
+
// ../pnpm-tools/src/helpers/catalog.ts
|
|
2660
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3391
2661
|
|
|
3392
2662
|
// ../npm-tools/src/constants.ts
|
|
3393
|
-
|
|
2663
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3394
2664
|
|
|
3395
|
-
// ../
|
|
3396
|
-
|
|
2665
|
+
// ../npm-tools/src/helpers/get-version.ts
|
|
2666
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3397
2667
|
|
|
2668
|
+
var _semver = require('semver');
|
|
2669
|
+
var _stripansi = require('strip-ansi'); var _stripansi2 = _interopRequireDefault(_stripansi);
|
|
3398
2670
|
|
|
2671
|
+
// ../npm-tools/src/helpers/get-registry.ts
|
|
2672
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3399
2673
|
|
|
3400
2674
|
|
|
2675
|
+
// ../pnpm-tools/src/helpers/catalog.ts
|
|
3401
2676
|
|
|
3402
2677
|
|
|
3403
|
-
|
|
2678
|
+
// ../pnpm-tools/src/helpers/format.ts
|
|
2679
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3404
2680
|
|
|
3405
|
-
// ../pnpm-tools/src/helpers/
|
|
3406
|
-
|
|
2681
|
+
// ../pnpm-tools/src/helpers/pnpm-workspace.ts
|
|
2682
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3407
2683
|
|
|
3408
|
-
// ../npm-tools/src/helpers/get-version.ts
|
|
3409
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
3410
2684
|
|
|
3411
|
-
var
|
|
3412
|
-
var _stripansi = require('strip-ansi'); var _stripansi2 = _interopRequireDefault(_stripansi);
|
|
2685
|
+
var _yaml = require('yaml');
|
|
3413
2686
|
|
|
3414
|
-
// ../pnpm-tools/src/helpers/
|
|
2687
|
+
// ../pnpm-tools/src/helpers/replace-deps-aliases.ts
|
|
2688
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3415
2689
|
|
|
3416
2690
|
|
|
3417
|
-
// ../pnpm-tools/src/helpers/format.ts
|
|
3418
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
3419
2691
|
|
|
3420
|
-
// ../pnpm-tools/src/helpers/pnpm-workspace.ts
|
|
3421
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
3422
2692
|
|
|
3423
2693
|
|
|
3424
|
-
|
|
2694
|
+
|
|
2695
|
+
var _prettier = require('prettier');
|
|
2696
|
+
|
|
2697
|
+
// ../pnpm-tools/src/types.ts
|
|
2698
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3425
2699
|
|
|
3426
2700
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
3427
2701
|
|
|
3428
2702
|
|
|
3429
2703
|
|
|
3430
2704
|
|
|
2705
|
+
|
|
3431
2706
|
// ../workspace-tools/src/utils/github.ts
|
|
3432
|
-
|
|
2707
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3433
2708
|
|
|
3434
2709
|
|
|
3435
2710
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
3436
|
-
|
|
2711
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3437
2712
|
|
|
3438
2713
|
|
|
3439
2714
|
|
|
@@ -3445,10 +2720,10 @@ _chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
|
3445
2720
|
|
|
3446
2721
|
|
|
3447
2722
|
// ../workspace-tools/src/utils/project-tags.ts
|
|
3448
|
-
|
|
2723
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3449
2724
|
|
|
3450
2725
|
// ../package-constants/src/tags.ts
|
|
3451
|
-
|
|
2726
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3452
2727
|
var ProjectTagConstants = {
|
|
3453
2728
|
Language: {
|
|
3454
2729
|
TAG_ID: "language",
|
|
@@ -3508,90 +2783,414 @@ var hasProjectTag = (project, variant) => {
|
|
|
3508
2783
|
return project.tags.some(
|
|
3509
2784
|
(tag) => tag.startsWith(prefix) && tag.length > prefix.length
|
|
3510
2785
|
);
|
|
3511
|
-
};
|
|
2786
|
+
};
|
|
2787
|
+
|
|
2788
|
+
// ../workspace-tools/src/utils/project-tags.ts
|
|
2789
|
+
var addProjectTag = (project, variant, value, options = {
|
|
2790
|
+
overwrite: false
|
|
2791
|
+
}) => {
|
|
2792
|
+
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
2793
|
+
if (options.overwrite || !hasProjectTag(project, variant)) {
|
|
2794
|
+
project.tags = project.tags.filter(
|
|
2795
|
+
(tag) => !tag.startsWith(formatProjectTag(variant, ""))
|
|
2796
|
+
);
|
|
2797
|
+
project.tags.push(formatProjectTag(variant, value));
|
|
2798
|
+
}
|
|
2799
|
+
};
|
|
2800
|
+
|
|
2801
|
+
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
2802
|
+
var LARGE_BUFFER2 = 1024 * 1e6;
|
|
2803
|
+
|
|
2804
|
+
// ../workspace-tools/src/executors/size-limit/executor.ts
|
|
2805
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2806
|
+
|
|
2807
|
+
var _esbuild = require('@size-limit/esbuild'); var _esbuild2 = _interopRequireDefault(_esbuild);
|
|
2808
|
+
var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _interopRequireDefault(_esbuildwhy);
|
|
2809
|
+
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
2810
|
+
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
2811
|
+
async function sizeLimitExecutorFn(options, context, config) {
|
|
2812
|
+
if (!_optionalChain([context, 'optionalAccess', _136 => _136.projectName]) || !_optionalChain([context, 'access', _137 => _137.projectsConfigurations, 'optionalAccess', _138 => _138.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2813
|
+
throw new Error(
|
|
2814
|
+
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
2815
|
+
);
|
|
2816
|
+
}
|
|
2817
|
+
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
2818
|
+
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
2819
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _139 => _139.projectsConfigurations, 'access', _140 => _140.projects, 'access', _141 => _141[context.projectName], 'optionalAccess', _142 => _142.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
2820
|
+
_nullishCoalesce(_optionalChain([context, 'access', _143 => _143.projectsConfigurations, 'access', _144 => _144.projects, 'access', _145 => _145[context.projectName], 'optionalAccess', _146 => _146.root]), () => ( "./")),
|
|
2821
|
+
"src"
|
|
2822
|
+
)))
|
|
2823
|
+
}).then((result) => {
|
|
2824
|
+
writeInfo(
|
|
2825
|
+
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
2826
|
+
config
|
|
2827
|
+
);
|
|
2828
|
+
});
|
|
2829
|
+
return {
|
|
2830
|
+
success: true
|
|
2831
|
+
};
|
|
2832
|
+
}
|
|
2833
|
+
var executor_default8 = withRunExecutor(
|
|
2834
|
+
"Size-Limit Performance Test Executor",
|
|
2835
|
+
sizeLimitExecutorFn,
|
|
2836
|
+
{
|
|
2837
|
+
skipReadingConfig: false,
|
|
2838
|
+
hooks: {
|
|
2839
|
+
applyDefaultOptions: (options) => {
|
|
2840
|
+
return options;
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
);
|
|
2845
|
+
|
|
2846
|
+
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
2847
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2848
|
+
|
|
2849
|
+
// ../tsdown/src/build.ts
|
|
2850
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2851
|
+
|
|
2852
|
+
|
|
2853
|
+
|
|
2854
|
+
|
|
2855
|
+
|
|
2856
|
+
|
|
2857
|
+
// ../build-tools/src/index.ts
|
|
2858
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2859
|
+
|
|
2860
|
+
// ../build-tools/src/config.ts
|
|
2861
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2862
|
+
var DEFAULT_ENVIRONMENT = "production";
|
|
2863
|
+
var DEFAULT_TARGET = "esnext";
|
|
2864
|
+
var DEFAULT_ORGANIZATION = "storm-software";
|
|
2865
|
+
|
|
2866
|
+
// ../build-tools/src/plugins/index.ts
|
|
2867
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2868
|
+
|
|
2869
|
+
// ../build-tools/src/plugins/analyze.ts
|
|
2870
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2871
|
+
|
|
2872
|
+
// ../build-tools/src/plugins/swc.ts
|
|
2873
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2874
|
+
var _core = require('@swc/core');
|
|
2875
|
+
|
|
2876
|
+
// ../build-tools/src/plugins/ts-resolve.ts
|
|
2877
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2878
|
+
|
|
2879
|
+
var _module = require('module');
|
|
2880
|
+
|
|
2881
|
+
var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
|
|
2882
|
+
|
|
2883
|
+
// ../build-tools/src/plugins/type-definitions.ts
|
|
2884
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2885
|
+
|
|
2886
|
+
|
|
2887
|
+
|
|
2888
|
+
// ../build-tools/src/types.ts
|
|
2889
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2890
|
+
|
|
2891
|
+
// ../build-tools/src/utilities/index.ts
|
|
2892
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2893
|
+
|
|
2894
|
+
// ../build-tools/src/utilities/copy-assets.ts
|
|
2895
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
2896
|
+
var _internal = require('@nx/js/internal');
|
|
2897
|
+
var _glob = require('glob');
|
|
2898
|
+
|
|
2899
|
+
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
2900
|
+
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
2901
|
+
pendingAssets.push({
|
|
2902
|
+
input: projectRoot,
|
|
2903
|
+
glob: "*.md",
|
|
2904
|
+
output: "."
|
|
2905
|
+
});
|
|
2906
|
+
pendingAssets.push({
|
|
2907
|
+
input: ".",
|
|
2908
|
+
glob: "LICENSE",
|
|
2909
|
+
output: "."
|
|
2910
|
+
});
|
|
2911
|
+
if (generatePackageJson2 === false) {
|
|
2912
|
+
pendingAssets.push({
|
|
2913
|
+
input: projectRoot,
|
|
2914
|
+
glob: "package.json",
|
|
2915
|
+
output: "."
|
|
2916
|
+
});
|
|
2917
|
+
}
|
|
2918
|
+
if (includeSrc === true) {
|
|
2919
|
+
pendingAssets.push({
|
|
2920
|
+
input: sourceRoot,
|
|
2921
|
+
glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
|
|
2922
|
+
output: "src/"
|
|
2923
|
+
});
|
|
2924
|
+
}
|
|
2925
|
+
writeTrace(
|
|
2926
|
+
`\u{1F4DD} Copying the following assets to the output directory:
|
|
2927
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkYWHLDYZ3js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
2928
|
+
config
|
|
2929
|
+
);
|
|
2930
|
+
const assetHandler = new (0, _internal.CopyAssetsHandler)({
|
|
2931
|
+
projectDir: projectRoot,
|
|
2932
|
+
rootDir: config.workspaceRoot,
|
|
2933
|
+
outputDir: outputPath,
|
|
2934
|
+
assets: pendingAssets
|
|
2935
|
+
});
|
|
2936
|
+
await assetHandler.processAllAssetsOnce();
|
|
2937
|
+
writeTrace("Completed copying assets to the output directory", config);
|
|
2938
|
+
if (includeSrc === true) {
|
|
2939
|
+
writeDebug(
|
|
2940
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
2941
|
+
outputPath,
|
|
2942
|
+
"src"
|
|
2943
|
+
)}`,
|
|
2944
|
+
config
|
|
2945
|
+
);
|
|
2946
|
+
const files = await _glob.glob.call(void 0, [
|
|
2947
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
2948
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
2949
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
2950
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
2951
|
+
]);
|
|
2952
|
+
await Promise.allSettled(
|
|
2953
|
+
files.map(
|
|
2954
|
+
async (file) => _promises.writeFile.call(void 0,
|
|
2955
|
+
file,
|
|
2956
|
+
`${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
3512
2957
|
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
if (options.overwrite || !hasProjectTag(project, variant)) {
|
|
3519
|
-
project.tags = project.tags.filter(
|
|
3520
|
-
(tag) => !tag.startsWith(formatProjectTag(variant, ""))
|
|
2958
|
+
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
2959
|
+
|
|
2960
|
+
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
2961
|
+
)
|
|
2962
|
+
)
|
|
3521
2963
|
);
|
|
3522
|
-
project.tags.push(formatProjectTag(variant, value));
|
|
3523
2964
|
}
|
|
3524
2965
|
};
|
|
3525
2966
|
|
|
3526
|
-
// ../
|
|
3527
|
-
|
|
2967
|
+
// ../build-tools/src/utilities/generate-package-json.ts
|
|
2968
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3528
2969
|
|
|
3529
|
-
// ../workspace-tools/src/executors/size-limit/executor.ts
|
|
3530
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
3531
2970
|
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
|
|
2974
|
+
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
2978
|
+
var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, packageJson) => {
|
|
2979
|
+
let projectGraph;
|
|
2980
|
+
try {
|
|
2981
|
+
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
2982
|
+
} catch (e3) {
|
|
2983
|
+
await _projectgraph.createProjectGraphAsync.call(void 0, );
|
|
2984
|
+
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
2985
|
+
}
|
|
2986
|
+
if (!projectGraph) {
|
|
3538
2987
|
throw new Error(
|
|
3539
|
-
"The
|
|
2988
|
+
"The Build process failed because the project graph is not available. Please run the build command again."
|
|
3540
2989
|
);
|
|
3541
2990
|
}
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
2991
|
+
const projectDependencies = _internal.calculateProjectBuildableDependencies.call(void 0,
|
|
2992
|
+
void 0,
|
|
2993
|
+
projectGraph,
|
|
2994
|
+
workspaceRoot2,
|
|
2995
|
+
projectName,
|
|
2996
|
+
process.env.NX_TASK_TARGET_TARGET || "build",
|
|
2997
|
+
process.env.NX_TASK_TARGET_CONFIGURATION || "production",
|
|
2998
|
+
true
|
|
2999
|
+
);
|
|
3000
|
+
const localPackages = [];
|
|
3001
|
+
for (const project of projectDependencies.dependencies.filter(
|
|
3002
|
+
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _147 => _147.node, 'access', _148 => _148.data, 'optionalAccess', _149 => _149.root]) !== projectRoot && _optionalChain([dep, 'access', _150 => _150.node, 'access', _151 => _151.data, 'optionalAccess', _152 => _152.root]) !== workspaceRoot2
|
|
3003
|
+
)) {
|
|
3004
|
+
const projectNode = project.node;
|
|
3005
|
+
if (projectNode.data.root) {
|
|
3006
|
+
const projectPackageJsonPath = _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
3007
|
+
workspaceRoot2,
|
|
3008
|
+
projectNode.data.root,
|
|
3009
|
+
"package.json"
|
|
3010
|
+
);
|
|
3011
|
+
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
3012
|
+
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
3013
|
+
projectPackageJsonPath,
|
|
3014
|
+
"utf8"
|
|
3015
|
+
);
|
|
3016
|
+
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
3017
|
+
if (projectPackageJson.private !== true) {
|
|
3018
|
+
localPackages.push(projectPackageJson);
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
if (localPackages.length > 0) {
|
|
3024
|
+
writeTrace(
|
|
3025
|
+
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
3552
3026
|
);
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3027
|
+
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
3028
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
3029
|
+
"utf8"
|
|
3030
|
+
);
|
|
3031
|
+
const projectJson = JSON.parse(projectJsonFile);
|
|
3032
|
+
const projectName2 = projectJson.name;
|
|
3033
|
+
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
3034
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _153 => _153.projects, 'optionalAccess', _154 => _154[projectName2]])) {
|
|
3035
|
+
throw new Error(
|
|
3036
|
+
"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."
|
|
3037
|
+
);
|
|
3038
|
+
}
|
|
3039
|
+
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _155 => _155.projects, 'optionalAccess', _156 => _156[projectName2], 'access', _157 => _157.implicitDependencies, 'optionalAccess', _158 => _158.reduce, 'call', _159 => _159((ret, dep) => {
|
|
3040
|
+
if (_optionalChain([projectConfigurations, 'access', _160 => _160.projects, 'optionalAccess', _161 => _161[dep]])) {
|
|
3041
|
+
const depPackageJsonPath = _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
3042
|
+
workspaceRoot2,
|
|
3043
|
+
projectConfigurations.projects[dep].root,
|
|
3044
|
+
"package.json"
|
|
3045
|
+
);
|
|
3046
|
+
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
3047
|
+
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
3048
|
+
depPackageJsonPath,
|
|
3049
|
+
"utf8"
|
|
3050
|
+
);
|
|
3051
|
+
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
3052
|
+
if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
|
|
3053
|
+
ret.push(depPackageJson.name);
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
return ret;
|
|
3058
|
+
}, [])]);
|
|
3059
|
+
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
3060
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _162 => _162.includes, 'call', _163 => _163(localPackage.name)]) && _optionalChain([packageJson, 'access', _164 => _164.devDependencies, 'optionalAccess', _165 => _165[localPackage.name]]) === void 0) {
|
|
3061
|
+
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
3062
|
+
}
|
|
3063
|
+
return ret;
|
|
3064
|
+
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
3065
|
+
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
3066
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _166 => _166.includes, 'call', _167 => _167(localPackage.name)]) && _optionalChain([packageJson, 'access', _168 => _168.dependencies, 'optionalAccess', _169 => _169[localPackage.name]]) === void 0) {
|
|
3067
|
+
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
3566
3068
|
}
|
|
3069
|
+
return ret;
|
|
3070
|
+
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
3071
|
+
} else {
|
|
3072
|
+
writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
|
|
3073
|
+
}
|
|
3074
|
+
return packageJson;
|
|
3075
|
+
};
|
|
3076
|
+
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
3077
|
+
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
|
|
3078
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
3079
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
3080
|
+
"utf8"
|
|
3081
|
+
);
|
|
3082
|
+
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
3083
|
+
packageJson.type ??= "module";
|
|
3084
|
+
packageJson.sideEffects ??= false;
|
|
3085
|
+
if (includeSrc === true) {
|
|
3086
|
+
let distSrc = sourceRoot.replace(projectRoot, "");
|
|
3087
|
+
if (distSrc.startsWith("/")) {
|
|
3088
|
+
distSrc = distSrc.substring(1);
|
|
3567
3089
|
}
|
|
3090
|
+
packageJson.source ??= `${_chunkYWHLDYZ3js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
3568
3091
|
}
|
|
3569
|
-
|
|
3092
|
+
packageJson.files ??= ["dist/**/*"];
|
|
3093
|
+
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
3094
|
+
packageJson.files.push("src/**/*");
|
|
3095
|
+
}
|
|
3096
|
+
packageJson.publishConfig ??= {
|
|
3097
|
+
access: "public"
|
|
3098
|
+
};
|
|
3099
|
+
packageJson.description ??= workspacePackageJson.description;
|
|
3100
|
+
packageJson.homepage ??= workspacePackageJson.homepage;
|
|
3101
|
+
packageJson.bugs ??= workspacePackageJson.bugs;
|
|
3102
|
+
packageJson.license ??= workspacePackageJson.license;
|
|
3103
|
+
packageJson.keywords ??= workspacePackageJson.keywords;
|
|
3104
|
+
packageJson.funding ??= workspacePackageJson.funding;
|
|
3105
|
+
packageJson.author ??= workspacePackageJson.author;
|
|
3106
|
+
packageJson.maintainers ??= workspacePackageJson.maintainers;
|
|
3107
|
+
if (!packageJson.maintainers && packageJson.author) {
|
|
3108
|
+
packageJson.maintainers = [packageJson.author];
|
|
3109
|
+
}
|
|
3110
|
+
packageJson.contributors ??= workspacePackageJson.contributors;
|
|
3111
|
+
if (!packageJson.contributors && packageJson.author) {
|
|
3112
|
+
packageJson.contributors = [packageJson.author];
|
|
3113
|
+
}
|
|
3114
|
+
packageJson.repository ??= workspacePackageJson.repository;
|
|
3115
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkYWHLDYZ3js.joinPaths.call(void 0, "packages", projectName);
|
|
3116
|
+
return packageJson;
|
|
3117
|
+
};
|
|
3118
|
+
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
3119
|
+
let entry = file.replaceAll("\\", "/");
|
|
3120
|
+
if (sourceRoot) {
|
|
3121
|
+
entry = entry.replace(sourceRoot, "");
|
|
3122
|
+
}
|
|
3123
|
+
return {
|
|
3124
|
+
import: {
|
|
3125
|
+
types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
|
|
3126
|
+
default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
|
|
3127
|
+
},
|
|
3128
|
+
require: {
|
|
3129
|
+
types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
|
|
3130
|
+
default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
|
|
3131
|
+
},
|
|
3132
|
+
default: {
|
|
3133
|
+
types: `./dist/${entry}.d.${type !== "fixed" ? "ts" : "mts"}`,
|
|
3134
|
+
default: `./dist/${entry}.${type !== "fixed" ? "js" : "mjs"}`
|
|
3135
|
+
}
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
3570
3138
|
|
|
3571
|
-
// ../
|
|
3572
|
-
|
|
3139
|
+
// ../build-tools/src/utilities/get-entry-points.ts
|
|
3140
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3141
|
+
|
|
3142
|
+
|
|
3143
|
+
// ../build-tools/src/utilities/get-env.ts
|
|
3144
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3145
|
+
var getEnv = (builder, options) => {
|
|
3146
|
+
return {
|
|
3147
|
+
STORM_BUILD: builder,
|
|
3148
|
+
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
3149
|
+
STORM_NAME: options.name,
|
|
3150
|
+
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
3151
|
+
STORM_PLATFORM: options.platform,
|
|
3152
|
+
STORM_FORMAT: JSON.stringify(options.format),
|
|
3153
|
+
STORM_TARGET: JSON.stringify(options.target),
|
|
3154
|
+
...options.env
|
|
3155
|
+
};
|
|
3156
|
+
};
|
|
3157
|
+
|
|
3158
|
+
// ../build-tools/src/utilities/get-file-banner.ts
|
|
3159
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3160
|
+
|
|
3161
|
+
// ../build-tools/src/utilities/get-out-extension.ts
|
|
3162
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3163
|
+
|
|
3164
|
+
// ../build-tools/src/utilities/get-project-deps.ts
|
|
3165
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3166
|
+
|
|
3167
|
+
// ../build-tools/src/utilities/read-nx-config.ts
|
|
3168
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3573
3169
|
|
|
3574
|
-
// ../tsdown/src/build.ts
|
|
3575
|
-
_chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
3576
3170
|
|
|
3577
3171
|
|
|
3172
|
+
// ../build-tools/src/utilities/task-graph.ts
|
|
3173
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3174
|
+
|
|
3578
3175
|
|
|
3579
3176
|
|
|
3177
|
+
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
3580
3178
|
|
|
3179
|
+
// ../tsdown/src/build.ts
|
|
3581
3180
|
|
|
3582
3181
|
|
|
3583
3182
|
|
|
3584
3183
|
var _tsdown = require('tsdown');
|
|
3585
3184
|
|
|
3586
3185
|
// ../tsdown/src/clean.ts
|
|
3587
|
-
|
|
3186
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3588
3187
|
|
|
3589
|
-
async function
|
|
3188
|
+
async function cleanDirectories(name = "TSDown", directory, config) {
|
|
3590
3189
|
await _promises.rm.call(void 0, directory, { recursive: true, force: true });
|
|
3591
3190
|
}
|
|
3592
3191
|
|
|
3593
3192
|
// ../tsdown/src/config.ts
|
|
3594
|
-
|
|
3193
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3595
3194
|
function getDefaultOptions(config) {
|
|
3596
3195
|
return {
|
|
3597
3196
|
entry: ["./src/*.ts"],
|
|
@@ -3634,7 +3233,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
3634
3233
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
3635
3234
|
exitOnError: true
|
|
3636
3235
|
});
|
|
3637
|
-
const projectJsonPath =
|
|
3236
|
+
const projectJsonPath = _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
3638
3237
|
workspaceRoot2,
|
|
3639
3238
|
options.projectRoot,
|
|
3640
3239
|
"project.json"
|
|
@@ -3646,12 +3245,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
3646
3245
|
const projectJson = JSON.parse(projectJsonFile);
|
|
3647
3246
|
const projectName = projectJson.name;
|
|
3648
3247
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
3649
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
3248
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _170 => _170.projects, 'optionalAccess', _171 => _171[projectName]])) {
|
|
3650
3249
|
throw new Error(
|
|
3651
3250
|
"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."
|
|
3652
3251
|
);
|
|
3653
3252
|
}
|
|
3654
|
-
const packageJsonPath =
|
|
3253
|
+
const packageJsonPath = _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
3655
3254
|
workspaceRoot2,
|
|
3656
3255
|
options.projectRoot,
|
|
3657
3256
|
"package.json"
|
|
@@ -3660,13 +3259,13 @@ var resolveOptions = async (userOptions) => {
|
|
|
3660
3259
|
throw new Error("Cannot find package.json configuration");
|
|
3661
3260
|
}
|
|
3662
3261
|
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
3663
|
-
const sourceRoot = projectJson.sourceRoot ||
|
|
3262
|
+
const sourceRoot = projectJson.sourceRoot || _chunkYWHLDYZ3js.joinPaths.call(void 0, options.projectRoot, "src");
|
|
3664
3263
|
const result = {
|
|
3665
3264
|
name: projectName,
|
|
3666
3265
|
mode: "production",
|
|
3667
3266
|
target: DEFAULT_TARGET,
|
|
3668
3267
|
generatePackageJson: true,
|
|
3669
|
-
outDir:
|
|
3268
|
+
outDir: _chunkYWHLDYZ3js.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
3670
3269
|
minify: !debug,
|
|
3671
3270
|
plugins: [],
|
|
3672
3271
|
assets: [],
|
|
@@ -3677,12 +3276,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
3677
3276
|
clean: false,
|
|
3678
3277
|
fixedExtension: true,
|
|
3679
3278
|
nodeProtocol: true,
|
|
3680
|
-
tsconfig:
|
|
3279
|
+
tsconfig: _chunkYWHLDYZ3js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
3681
3280
|
debug,
|
|
3682
3281
|
sourceRoot,
|
|
3683
3282
|
cwd: workspaceConfig.workspaceRoot,
|
|
3684
3283
|
entry: {
|
|
3685
|
-
["index"]:
|
|
3284
|
+
["index"]: _chunkYWHLDYZ3js.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
3686
3285
|
},
|
|
3687
3286
|
workspace: true,
|
|
3688
3287
|
...options,
|
|
@@ -3700,16 +3299,16 @@ var resolveOptions = async (userOptions) => {
|
|
|
3700
3299
|
stopwatch();
|
|
3701
3300
|
return result;
|
|
3702
3301
|
};
|
|
3703
|
-
async function
|
|
3704
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
3302
|
+
async function generatePackageJson(options) {
|
|
3303
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkYWHLDYZ3js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
3705
3304
|
writeDebug(" \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
3706
3305
|
const stopwatch = getStopwatch("Write package.json file");
|
|
3707
|
-
const packageJsonPath =
|
|
3306
|
+
const packageJsonPath = _chunkYWHLDYZ3js.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
3708
3307
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
3709
3308
|
throw new Error("Cannot find package.json configuration");
|
|
3710
3309
|
}
|
|
3711
3310
|
const packageJsonFile = await _promises2.default.readFile(
|
|
3712
|
-
|
|
3311
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
3713
3312
|
options.workspaceConfig.workspaceRoot,
|
|
3714
3313
|
options.projectRoot,
|
|
3715
3314
|
"package.json"
|
|
@@ -3771,7 +3370,7 @@ async function generatePackageJson2(options) {
|
|
|
3771
3370
|
},
|
|
3772
3371
|
packageJson.exports
|
|
3773
3372
|
);
|
|
3774
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
3373
|
+
await _devkit.writeJsonFile.call(void 0, _chunkYWHLDYZ3js.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
3775
3374
|
stopwatch();
|
|
3776
3375
|
}
|
|
3777
3376
|
return options;
|
|
@@ -3787,7 +3386,7 @@ async function executeTSDown(options) {
|
|
|
3787
3386
|
stopwatch();
|
|
3788
3387
|
return options;
|
|
3789
3388
|
}
|
|
3790
|
-
async function
|
|
3389
|
+
async function copyBuildAssets(options) {
|
|
3791
3390
|
writeDebug(
|
|
3792
3391
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
3793
3392
|
options.workspaceConfig
|
|
@@ -3805,20 +3404,20 @@ async function copyBuildAssets2(options) {
|
|
|
3805
3404
|
stopwatch();
|
|
3806
3405
|
return options;
|
|
3807
3406
|
}
|
|
3808
|
-
async function
|
|
3407
|
+
async function reportResults(options) {
|
|
3809
3408
|
writeSuccess(
|
|
3810
3409
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
3811
3410
|
options.workspaceConfig
|
|
3812
3411
|
);
|
|
3813
3412
|
}
|
|
3814
|
-
async function
|
|
3413
|
+
async function cleanOutputPath(options) {
|
|
3815
3414
|
if (options.clean !== false && options.workspaceConfig) {
|
|
3816
3415
|
writeDebug(
|
|
3817
3416
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
3818
3417
|
options.workspaceConfig
|
|
3819
3418
|
);
|
|
3820
3419
|
const stopwatch = getStopwatch(`${options.name} output clean`);
|
|
3821
|
-
await
|
|
3420
|
+
await cleanDirectories(
|
|
3822
3421
|
options.name,
|
|
3823
3422
|
options.outDir,
|
|
3824
3423
|
options.workspaceConfig
|
|
@@ -3827,7 +3426,7 @@ async function cleanOutputPath2(options) {
|
|
|
3827
3426
|
}
|
|
3828
3427
|
return options;
|
|
3829
3428
|
}
|
|
3830
|
-
async function
|
|
3429
|
+
async function build(options) {
|
|
3831
3430
|
writeDebug(` ${brandIcon()} Executing Storm TSDown pipeline`);
|
|
3832
3431
|
const stopwatch = getStopwatch("TSDown pipeline");
|
|
3833
3432
|
try {
|
|
@@ -3839,13 +3438,13 @@ async function build3(options) {
|
|
|
3839
3438
|
opts.map(async (opt) => await resolveOptions(opt))
|
|
3840
3439
|
);
|
|
3841
3440
|
if (resolved.length > 0) {
|
|
3842
|
-
await
|
|
3843
|
-
await
|
|
3441
|
+
await cleanOutputPath(resolved[0]);
|
|
3442
|
+
await generatePackageJson(resolved[0]);
|
|
3844
3443
|
await Promise.all(
|
|
3845
3444
|
resolved.map(async (opt) => {
|
|
3846
3445
|
await executeTSDown(opt);
|
|
3847
|
-
await
|
|
3848
|
-
await
|
|
3446
|
+
await copyBuildAssets(opt);
|
|
3447
|
+
await reportResults(opt);
|
|
3849
3448
|
})
|
|
3850
3449
|
);
|
|
3851
3450
|
} else {
|
|
@@ -3867,19 +3466,19 @@ async function build3(options) {
|
|
|
3867
3466
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
3868
3467
|
async function tsdownExecutorFn(options, context, config) {
|
|
3869
3468
|
writeInfo("\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
3870
|
-
if (!_optionalChain([context, 'access',
|
|
3469
|
+
if (!_optionalChain([context, 'access', _172 => _172.projectsConfigurations, 'optionalAccess', _173 => _173.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _174 => _174.projectsConfigurations, 'access', _175 => _175.projects, 'access', _176 => _176[context.projectName], 'optionalAccess', _177 => _177.root])) {
|
|
3871
3470
|
throw new Error(
|
|
3872
3471
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
3873
3472
|
);
|
|
3874
3473
|
}
|
|
3875
|
-
await
|
|
3474
|
+
await build({
|
|
3876
3475
|
...options,
|
|
3877
3476
|
projectRoot: (
|
|
3878
3477
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3879
|
-
_optionalChain([context, 'access',
|
|
3478
|
+
_optionalChain([context, 'access', _178 => _178.projectsConfigurations, 'access', _179 => _179.projects, 'optionalAccess', _180 => _180[context.projectName], 'access', _181 => _181.root])
|
|
3880
3479
|
),
|
|
3881
3480
|
name: context.projectName,
|
|
3882
|
-
sourceRoot: _optionalChain([context, 'access',
|
|
3481
|
+
sourceRoot: _optionalChain([context, 'access', _182 => _182.projectsConfigurations, 'access', _183 => _183.projects, 'optionalAccess', _184 => _184[context.projectName], 'optionalAccess', _185 => _185.sourceRoot]),
|
|
3883
3482
|
format: options.format,
|
|
3884
3483
|
platform: options.platform
|
|
3885
3484
|
});
|
|
@@ -3904,7 +3503,7 @@ var executor_default9 = withRunExecutor(
|
|
|
3904
3503
|
);
|
|
3905
3504
|
|
|
3906
3505
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
3907
|
-
|
|
3506
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3908
3507
|
var _fsextra = require('fs-extra');
|
|
3909
3508
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
3910
3509
|
async function typiaExecutorFn(options, _, config) {
|
|
@@ -3944,12 +3543,12 @@ var executor_default10 = withRunExecutor(
|
|
|
3944
3543
|
);
|
|
3945
3544
|
|
|
3946
3545
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
3947
|
-
|
|
3546
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
3948
3547
|
|
|
3949
3548
|
|
|
3950
3549
|
async function unbuildExecutorFn(options, context, config) {
|
|
3951
3550
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
3952
|
-
if (!_optionalChain([context, 'access',
|
|
3551
|
+
if (!_optionalChain([context, 'access', _186 => _186.projectsConfigurations, 'optionalAccess', _187 => _187.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3953
3552
|
throw new Error(
|
|
3954
3553
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
3955
3554
|
);
|
|
@@ -3965,7 +3564,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
3965
3564
|
);
|
|
3966
3565
|
}
|
|
3967
3566
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
3968
|
-
fsCache: config.skipCache ? false :
|
|
3567
|
+
fsCache: config.skipCache ? false : _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
3969
3568
|
config.workspaceRoot,
|
|
3970
3569
|
config.directories.cache || "node_modules/.cache/storm",
|
|
3971
3570
|
"jiti"
|
|
@@ -3987,7 +3586,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
3987
3586
|
{
|
|
3988
3587
|
stubOptions: {
|
|
3989
3588
|
jiti: {
|
|
3990
|
-
fsCache: config.skipCache ? false :
|
|
3589
|
+
fsCache: config.skipCache ? false : _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
3991
3590
|
config.workspaceRoot,
|
|
3992
3591
|
config.directories.cache || "node_modules/.cache/storm",
|
|
3993
3592
|
"jiti"
|
|
@@ -4036,10 +3635,10 @@ var executor_default11 = withRunExecutor(
|
|
|
4036
3635
|
);
|
|
4037
3636
|
|
|
4038
3637
|
// ../workspace-tools/generators.ts
|
|
4039
|
-
|
|
3638
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4040
3639
|
|
|
4041
3640
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
4042
|
-
|
|
3641
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4043
3642
|
|
|
4044
3643
|
|
|
4045
3644
|
|
|
@@ -4048,7 +3647,7 @@ _chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
|
4048
3647
|
|
|
4049
3648
|
|
|
4050
3649
|
// ../workspace-tools/src/base/base-generator.ts
|
|
4051
|
-
|
|
3650
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4052
3651
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
4053
3652
|
skipReadingConfig: false
|
|
4054
3653
|
}) => async (tree, _options) => {
|
|
@@ -4071,7 +3670,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
4071
3670
|
);
|
|
4072
3671
|
config = await getConfig(workspaceRoot2);
|
|
4073
3672
|
}
|
|
4074
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3673
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _188 => _188.hooks, 'optionalAccess', _189 => _189.applyDefaultOptions])) {
|
|
4075
3674
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
4076
3675
|
options = await Promise.resolve(
|
|
4077
3676
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
@@ -4088,7 +3687,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
4088
3687
|
{ workspaceRoot: tree.root, config },
|
|
4089
3688
|
applyWorkspaceBaseTokens
|
|
4090
3689
|
);
|
|
4091
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3690
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _190 => _190.hooks, 'optionalAccess', _191 => _191.preProcess])) {
|
|
4092
3691
|
writeDebug("Running the preProcess hook...", config);
|
|
4093
3692
|
await Promise.resolve(
|
|
4094
3693
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
@@ -4099,15 +3698,15 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
4099
3698
|
generatorFn(tree, tokenized, config)
|
|
4100
3699
|
);
|
|
4101
3700
|
if (result) {
|
|
4102
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
3701
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _192 => _192.error, 'optionalAccess', _193 => _193.message]) && typeof _optionalChain([result, 'optionalAccess', _194 => _194.error, 'optionalAccess', _195 => _195.message]) === "string" && _optionalChain([result, 'optionalAccess', _196 => _196.error, 'optionalAccess', _197 => _197.name]) && typeof _optionalChain([result, 'optionalAccess', _198 => _198.error, 'optionalAccess', _199 => _199.name]) === "string") {
|
|
4103
3702
|
throw new Error(`The ${name} generator failed to run`, {
|
|
4104
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
3703
|
+
cause: _optionalChain([result, 'optionalAccess', _200 => _200.error])
|
|
4105
3704
|
});
|
|
4106
3705
|
} else if (result.success && result.data) {
|
|
4107
3706
|
return result;
|
|
4108
3707
|
}
|
|
4109
3708
|
}
|
|
4110
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3709
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _201 => _201.hooks, 'optionalAccess', _202 => _202.postProcess])) {
|
|
4111
3710
|
writeDebug("Running the postProcess hook...", config);
|
|
4112
3711
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
4113
3712
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -4135,7 +3734,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
4135
3734
|
};
|
|
4136
3735
|
|
|
4137
3736
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
4138
|
-
|
|
3737
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4139
3738
|
|
|
4140
3739
|
|
|
4141
3740
|
|
|
@@ -4155,7 +3754,7 @@ var _internal3 = require('@nx/devkit/internal');
|
|
|
4155
3754
|
var _js = require('@nx/js');
|
|
4156
3755
|
|
|
4157
3756
|
// ../workspace-tools/src/utils/versions.ts
|
|
4158
|
-
|
|
3757
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4159
3758
|
var typesNodeVersion = "20.9.0";
|
|
4160
3759
|
var nxVersion = "^18.0.4";
|
|
4161
3760
|
var nodeVersion = "20.11.0";
|
|
@@ -4179,16 +3778,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
4179
3778
|
const projectConfig = {
|
|
4180
3779
|
root: normalized.directory,
|
|
4181
3780
|
projectType: "library",
|
|
4182
|
-
sourceRoot:
|
|
3781
|
+
sourceRoot: _chunkYWHLDYZ3js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
4183
3782
|
targets: {
|
|
4184
3783
|
build: {
|
|
4185
3784
|
executor: options.buildExecutor,
|
|
4186
3785
|
outputs: ["{options.outputPath}"],
|
|
4187
3786
|
options: {
|
|
4188
|
-
entry: [
|
|
3787
|
+
entry: [_chunkYWHLDYZ3js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
4189
3788
|
outputPath: getOutputPath(normalized),
|
|
4190
|
-
tsconfig:
|
|
4191
|
-
project:
|
|
3789
|
+
tsconfig: _chunkYWHLDYZ3js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
3790
|
+
project: _chunkYWHLDYZ3js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
4192
3791
|
defaultConfiguration: "production",
|
|
4193
3792
|
platform: "neutral",
|
|
4194
3793
|
assets: [
|
|
@@ -4230,22 +3829,22 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
4230
3829
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
4231
3830
|
let repository = {
|
|
4232
3831
|
type: "github",
|
|
4233
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
3832
|
+
url: _optionalChain([config, 'optionalAccess', _203 => _203.repository]) || `https://github.com/${(typeof _optionalChain([config, 'optionalAccess', _204 => _204.organization]) === "string" ? _optionalChain([config, 'optionalAccess', _205 => _205.organization]) : _optionalChain([config, 'optionalAccess', _206 => _206.organization, 'optionalAccess', _207 => _207.name])) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _208 => _208.namespace]) || _optionalChain([config, 'optionalAccess', _209 => _209.name]) || "repository"}.git`
|
|
4234
3833
|
};
|
|
4235
3834
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
4236
3835
|
if (tree.exists("package.json")) {
|
|
4237
3836
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
4238
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3837
|
+
if (_optionalChain([packageJson, 'optionalAccess', _210 => _210.repository])) {
|
|
4239
3838
|
repository = packageJson.repository;
|
|
4240
3839
|
}
|
|
4241
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3840
|
+
if (_optionalChain([packageJson, 'optionalAccess', _211 => _211.description])) {
|
|
4242
3841
|
description = packageJson.description;
|
|
4243
3842
|
}
|
|
4244
3843
|
}
|
|
4245
3844
|
if (!normalized.importPath) {
|
|
4246
3845
|
normalized.importPath = normalized.name;
|
|
4247
3846
|
}
|
|
4248
|
-
const packageJsonPath =
|
|
3847
|
+
const packageJsonPath = _chunkYWHLDYZ3js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
4249
3848
|
if (tree.exists(packageJsonPath)) {
|
|
4250
3849
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
4251
3850
|
if (!normalized.importPath) {
|
|
@@ -4293,34 +3892,34 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
4293
3892
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
4294
3893
|
...json,
|
|
4295
3894
|
pnpm: {
|
|
4296
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3895
|
+
..._optionalChain([json, 'optionalAccess', _212 => _212.pnpm]),
|
|
4297
3896
|
overrides: {
|
|
4298
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3897
|
+
..._optionalChain([json, 'optionalAccess', _213 => _213.pnpm, 'optionalAccess', _214 => _214.overrides]),
|
|
4299
3898
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
4300
3899
|
}
|
|
4301
3900
|
}
|
|
4302
3901
|
}));
|
|
4303
3902
|
}
|
|
4304
3903
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
4305
|
-
|
|
3904
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
4306
3905
|
normalized.projectRoot,
|
|
4307
3906
|
"./src",
|
|
4308
3907
|
`index.${normalized.js ? "js" : "ts"}`
|
|
4309
3908
|
)
|
|
4310
3909
|
]);
|
|
4311
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
4312
|
-
|
|
3910
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkYWHLDYZ3js.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
3911
|
+
_chunkYWHLDYZ3js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
4313
3912
|
]);
|
|
4314
3913
|
if (tree.exists("package.json")) {
|
|
4315
3914
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
4316
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3915
|
+
if (_optionalChain([packageJson, 'optionalAccess', _215 => _215.repository])) {
|
|
4317
3916
|
repository = packageJson.repository;
|
|
4318
3917
|
}
|
|
4319
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3918
|
+
if (_optionalChain([packageJson, 'optionalAccess', _216 => _216.description])) {
|
|
4320
3919
|
description = packageJson.description;
|
|
4321
3920
|
}
|
|
4322
3921
|
}
|
|
4323
|
-
const tsconfigPath =
|
|
3922
|
+
const tsconfigPath = _chunkYWHLDYZ3js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
4324
3923
|
if (tree.exists(tsconfigPath)) {
|
|
4325
3924
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
4326
3925
|
json.composite ??= true;
|
|
@@ -4348,38 +3947,38 @@ function getOutputPath(options) {
|
|
|
4348
3947
|
} else {
|
|
4349
3948
|
parts.push(options.projectRoot);
|
|
4350
3949
|
}
|
|
4351
|
-
return
|
|
3950
|
+
return _chunkYWHLDYZ3js.joinPaths.call(void 0, ...parts);
|
|
4352
3951
|
}
|
|
4353
3952
|
function createProjectTsConfigJson(tree, options) {
|
|
4354
3953
|
const tsconfig = {
|
|
4355
3954
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
4356
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3955
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _217 => _217.tsconfigOptions]), () => ( {})),
|
|
4357
3956
|
compilerOptions: {
|
|
4358
3957
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
4359
|
-
outDir:
|
|
3958
|
+
outDir: _chunkYWHLDYZ3js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
4360
3959
|
noEmit: true,
|
|
4361
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3960
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _218 => _218.tsconfigOptions, 'optionalAccess', _219 => _219.compilerOptions]), () => ( {}))
|
|
4362
3961
|
},
|
|
4363
|
-
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3962
|
+
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _220 => _220.tsconfigOptions, 'optionalAccess', _221 => _221.files]), () => ( []))],
|
|
4364
3963
|
include: [
|
|
4365
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3964
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _222 => _222.tsconfigOptions, 'optionalAccess', _223 => _223.include]), () => ( [])),
|
|
4366
3965
|
"src/**/*.ts",
|
|
4367
3966
|
"src/**/*.js",
|
|
4368
3967
|
"bin/**/*"
|
|
4369
3968
|
],
|
|
4370
3969
|
exclude: [
|
|
4371
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3970
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _224 => _224.tsconfigOptions, 'optionalAccess', _225 => _225.exclude]), () => ( [])),
|
|
4372
3971
|
"jest.config.ts",
|
|
4373
3972
|
"src/**/*.spec.ts",
|
|
4374
3973
|
"src/**/*.test.ts"
|
|
4375
3974
|
]
|
|
4376
3975
|
};
|
|
4377
|
-
_devkit.writeJson.call(void 0, tree,
|
|
3976
|
+
_devkit.writeJson.call(void 0, tree, _chunkYWHLDYZ3js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
4378
3977
|
}
|
|
4379
3978
|
async function normalizeOptions(tree, options, config) {
|
|
4380
3979
|
let importPath = options.importPath;
|
|
4381
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
4382
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
3980
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _226 => _226.namespace])) {
|
|
3981
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _227 => _227.namespace])}/${options.name}`;
|
|
4383
3982
|
}
|
|
4384
3983
|
if (options.publishable) {
|
|
4385
3984
|
if (!importPath) {
|
|
@@ -4439,7 +4038,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
4439
4038
|
|
|
4440
4039
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
4441
4040
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
4442
|
-
const filesDir =
|
|
4041
|
+
const filesDir = _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
4443
4042
|
__dirname,
|
|
4444
4043
|
"src",
|
|
4445
4044
|
"generators",
|
|
@@ -4519,7 +4118,7 @@ var generator_default = withRunGenerator(
|
|
|
4519
4118
|
);
|
|
4520
4119
|
|
|
4521
4120
|
// ../workspace-tools/src/generators/config-schema/generator.ts
|
|
4522
|
-
|
|
4121
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4523
4122
|
|
|
4524
4123
|
var _zod2 = require('zod'); var z2 = _interopRequireWildcard(_zod2);
|
|
4525
4124
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
@@ -4545,7 +4144,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
4545
4144
|
);
|
|
4546
4145
|
}
|
|
4547
4146
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
4548
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
4147
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _228 => _228.workspaceRoot]), () => ( findWorkspaceRoot())),
|
|
4549
4148
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
4550
4149
|
);
|
|
4551
4150
|
writeTrace(
|
|
@@ -4576,7 +4175,7 @@ var generator_default2 = withRunGenerator(
|
|
|
4576
4175
|
);
|
|
4577
4176
|
|
|
4578
4177
|
// ../workspace-tools/src/generators/init/init.ts
|
|
4579
|
-
|
|
4178
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4580
4179
|
|
|
4581
4180
|
|
|
4582
4181
|
|
|
@@ -4604,7 +4203,7 @@ async function initGenerator(tree, schema) {
|
|
|
4604
4203
|
}
|
|
4605
4204
|
|
|
4606
4205
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
4607
|
-
|
|
4206
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4608
4207
|
|
|
4609
4208
|
|
|
4610
4209
|
|
|
@@ -4612,7 +4211,7 @@ _chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
|
4612
4211
|
|
|
4613
4212
|
|
|
4614
4213
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
4615
|
-
const filesDir =
|
|
4214
|
+
const filesDir = _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
4616
4215
|
__dirname,
|
|
4617
4216
|
"src",
|
|
4618
4217
|
"generators",
|
|
@@ -4664,7 +4263,7 @@ var generator_default3 = withRunGenerator(
|
|
|
4664
4263
|
);
|
|
4665
4264
|
|
|
4666
4265
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
4667
|
-
|
|
4266
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4668
4267
|
|
|
4669
4268
|
|
|
4670
4269
|
|
|
@@ -4672,7 +4271,7 @@ _chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
|
4672
4271
|
|
|
4673
4272
|
|
|
4674
4273
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
4675
|
-
const filesDir =
|
|
4274
|
+
const filesDir = _chunkYWHLDYZ3js.joinPaths.call(void 0,
|
|
4676
4275
|
__dirname,
|
|
4677
4276
|
"src",
|
|
4678
4277
|
"generators",
|
|
@@ -4726,7 +4325,7 @@ var generator_default4 = withRunGenerator(
|
|
|
4726
4325
|
);
|
|
4727
4326
|
|
|
4728
4327
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
4729
|
-
|
|
4328
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4730
4329
|
|
|
4731
4330
|
|
|
4732
4331
|
|
|
@@ -4965,10 +4564,10 @@ var generator_default5 = withRunGenerator(
|
|
|
4965
4564
|
);
|
|
4966
4565
|
|
|
4967
4566
|
// ../workspace-tools/src/base/index.ts
|
|
4968
|
-
|
|
4567
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4969
4568
|
|
|
4970
4569
|
// ../workspace-tools/src/base/base-executor.untyped.ts
|
|
4971
|
-
|
|
4570
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4972
4571
|
var _untyped = require('untyped');
|
|
4973
4572
|
var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4974
4573
|
$schema: {
|
|
@@ -4987,7 +4586,7 @@ var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
|
4987
4586
|
});
|
|
4988
4587
|
|
|
4989
4588
|
// ../workspace-tools/src/base/base-generator.untyped.ts
|
|
4990
|
-
|
|
4589
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
4991
4590
|
|
|
4992
4591
|
var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
4993
4592
|
$schema: {
|
|
@@ -5005,7 +4604,7 @@ var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
|
5005
4604
|
});
|
|
5006
4605
|
|
|
5007
4606
|
// ../workspace-tools/src/base/cargo-base-executor.untyped.ts
|
|
5008
|
-
|
|
4607
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5009
4608
|
|
|
5010
4609
|
var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
5011
4610
|
...base_executor_untyped_default,
|
|
@@ -5078,7 +4677,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
5078
4677
|
});
|
|
5079
4678
|
|
|
5080
4679
|
// ../workspace-tools/src/base/typescript-build-executor.untyped.ts
|
|
5081
|
-
|
|
4680
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5082
4681
|
|
|
5083
4682
|
var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
5084
4683
|
...base_executor_untyped_default,
|
|
@@ -5230,7 +4829,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
5230
4829
|
});
|
|
5231
4830
|
|
|
5232
4831
|
// ../workspace-tools/src/base/typescript-library-generator.untyped.ts
|
|
5233
|
-
|
|
4832
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5234
4833
|
|
|
5235
4834
|
var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
5236
4835
|
...base_generator_untyped_default,
|
|
@@ -5336,45 +4935,45 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
5336
4935
|
});
|
|
5337
4936
|
|
|
5338
4937
|
// ../workspace-tools/src/release/index.ts
|
|
5339
|
-
|
|
4938
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5340
4939
|
|
|
5341
4940
|
// ../workspace-tools/src/release/js-version-actions.ts
|
|
5342
|
-
|
|
4941
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5343
4942
|
var _versionactions = require('@nx/js/src/release/version-actions'); var _versionactions2 = _interopRequireDefault(_versionactions);
|
|
5344
4943
|
|
|
5345
4944
|
// ../workspace-tools/src/release/rust-version-actions.ts
|
|
5346
|
-
|
|
4945
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5347
4946
|
|
|
5348
4947
|
|
|
5349
4948
|
|
|
5350
4949
|
var _release = require('nx/release');
|
|
5351
4950
|
|
|
5352
4951
|
// ../workspace-tools/src/utils/registry-helpers.ts
|
|
5353
|
-
|
|
4952
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5354
4953
|
|
|
5355
4954
|
|
|
5356
4955
|
// ../workspace-tools/src/types.ts
|
|
5357
|
-
|
|
4956
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5358
4957
|
|
|
5359
4958
|
// ../package-constants/src/types.ts
|
|
5360
|
-
|
|
4959
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5361
4960
|
|
|
5362
4961
|
// ../workspace-tools/src/utils/index.ts
|
|
5363
|
-
|
|
4962
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5364
4963
|
|
|
5365
4964
|
// ../workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
5366
|
-
|
|
4965
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5367
4966
|
|
|
5368
4967
|
// ../workspace-tools/src/utils/create-cli-options.ts
|
|
5369
|
-
|
|
4968
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5370
4969
|
|
|
5371
4970
|
|
|
5372
4971
|
// ../workspace-tools/src/utils/get-project-configurations.ts
|
|
5373
|
-
|
|
4972
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5374
4973
|
var _retrieveworkspacefiles = require('nx/src/project-graph/utils/retrieve-workspace-files');
|
|
5375
4974
|
|
|
5376
4975
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
5377
|
-
|
|
4976
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5378
4977
|
|
|
5379
4978
|
|
|
5380
4979
|
|
|
@@ -5402,7 +5001,7 @@ var NPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, NPM_LOCK_FILE
|
|
|
5402
5001
|
var PNPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, PNPM_LOCK_FILE);
|
|
5403
5002
|
|
|
5404
5003
|
// ../workspace-tools/src/utils/nx-json.ts
|
|
5405
|
-
|
|
5004
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5406
5005
|
|
|
5407
5006
|
// ../workspace-tools/config/recommended.json
|
|
5408
5007
|
var recommended_default = {
|
|
@@ -5649,7 +5248,7 @@ var NAMED_INPUTS = {
|
|
|
5649
5248
|
var RELEASE = recommended_default.release;
|
|
5650
5249
|
|
|
5651
5250
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
5652
|
-
|
|
5251
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5653
5252
|
|
|
5654
5253
|
|
|
5655
5254
|
|
|
@@ -5658,7 +5257,7 @@ _chunkADYJENQFjs.init_cjs_shims.call(void 0, );
|
|
|
5658
5257
|
|
|
5659
5258
|
|
|
5660
5259
|
// ../workspace-tools/src/utils/typia-transform.ts
|
|
5661
|
-
|
|
5260
|
+
_chunkYPZC3HAQjs.init_cjs_shims.call(void 0, );
|
|
5662
5261
|
var _transform = require('typia/lib/transform'); var _transform2 = _interopRequireDefault(_transform);
|
|
5663
5262
|
|
|
5664
5263
|
// src/generators/init/generator.ts
|