@storm-software/pulumi-tools 0.13.7 → 0.13.9
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 +12 -0
- package/README.md +1 -1
- package/dist/{chunk-LZN2NZ7M.js → chunk-33RWEXKH.js} +2 -2
- package/dist/{chunk-3DJ44M2X.mjs → chunk-67Y2BBIR.mjs} +1 -1
- package/dist/{chunk-75RE5W2I.mjs → chunk-AYJTBMXU.mjs} +1 -1
- package/dist/{chunk-NPN2DABW.mjs → chunk-GEKTVJZV.mjs} +1 -1
- package/dist/{chunk-YTX7SXUV.mjs → chunk-JFAX5K54.mjs} +1 -1
- package/dist/{chunk-HFLZB64V.mjs → chunk-JXPRDWSH.mjs} +1 -1
- package/dist/{chunk-PQIHSZEB.mjs → chunk-L5HGBZFW.mjs} +69 -19
- package/dist/{chunk-TIV4DYZT.mjs → chunk-NRUOPIYJ.mjs} +1 -1
- package/dist/{chunk-7A4FO6Q5.js → chunk-PJCZEEED.js} +132 -82
- package/dist/{chunk-X3FJVRKM.js → chunk-PPZ4CG4Z.js} +2 -2
- package/dist/{chunk-T2MT263A.js → chunk-PYWDLR2J.js} +3 -3
- package/dist/{chunk-JZAEYOBB.js → chunk-TNX3FEU3.js} +2 -2
- package/dist/{chunk-UJEJIE53.mjs → chunk-U7E5TSXL.mjs} +1 -1
- package/dist/{chunk-Z4G4HEYH.js → chunk-VKFKFXRT.js} +2 -2
- package/dist/{chunk-37RYOORY.js → chunk-WIV3N6RZ.js} +5 -5
- package/dist/{chunk-FZPGAOD3.mjs → chunk-XMWBUAZG.mjs} +1 -1
- package/dist/{chunk-TN5TXK6U.js → chunk-YQF3CW5V.js} +2 -2
- package/dist/executors.js +7 -7
- package/dist/executors.mjs +8 -8
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +9 -9
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +3 -3
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +3 -3
- package/dist/src/base/providers.mjs +1 -1
- package/dist/src/executors/config/executor.js +4 -4
- package/dist/src/executors/config/executor.mjs +4 -4
- package/dist/src/executors/import/executor.js +4 -4
- package/dist/src/executors/import/executor.mjs +4 -4
- package/dist/src/executors/preview/executor.js +4 -4
- package/dist/src/executors/preview/executor.mjs +4 -4
- package/dist/src/executors/refresh/executor.js +4 -4
- package/dist/src/executors/refresh/executor.mjs +4 -4
- package/dist/src/executors/up/executor.js +4 -4
- package/dist/src/executors/up/executor.mjs +4 -4
- package/dist/src/generators/init/generator.js +3 -3
- package/dist/src/generators/init/generator.mjs +3 -3
- package/dist/tsup.config.mjs +1 -1
- package/package.json +1 -1
|
@@ -50,10 +50,10 @@ var LogLevelLabel = {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
// ../config/src/constants.ts
|
|
53
|
-
var STORM_DEFAULT_DOCS = "https://
|
|
53
|
+
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
54
54
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
55
55
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
56
|
-
var STORM_DEFAULT_LICENSING = "https://
|
|
56
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
57
57
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
58
58
|
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
59
59
|
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
@@ -227,10 +227,13 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
227
227
|
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
228
228
|
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
229
229
|
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
230
|
-
homepage: _zod2.default.string().trim().url().
|
|
231
|
-
docs: _zod2.default.string().trim().url().
|
|
232
|
-
licensing: _zod2.default.string().trim().url().
|
|
233
|
-
contact: _zod2.default.string().trim().url().
|
|
230
|
+
homepage: _zod2.default.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
231
|
+
docs: _zod2.default.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
232
|
+
licensing: _zod2.default.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
233
|
+
contact: _zod2.default.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
234
|
+
support: _zod2.default.string().trim().url().optional().describe(
|
|
235
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
236
|
+
),
|
|
234
237
|
branch: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
|
|
235
238
|
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
236
239
|
owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
@@ -551,9 +554,10 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
551
554
|
negative: "#dc2626"
|
|
552
555
|
}
|
|
553
556
|
};
|
|
554
|
-
|
|
557
|
+
async function getPackageJsonConfig(root) {
|
|
555
558
|
let license = STORM_DEFAULT_LICENSE;
|
|
556
|
-
let homepage =
|
|
559
|
+
let homepage = void 0;
|
|
560
|
+
let support = void 0;
|
|
557
561
|
let name = void 0;
|
|
558
562
|
let namespace = void 0;
|
|
559
563
|
let repository = void 0;
|
|
@@ -584,6 +588,13 @@ var getDefaultConfig = async (root) => {
|
|
|
584
588
|
if (packageJson.homepage) {
|
|
585
589
|
homepage = packageJson.homepage;
|
|
586
590
|
}
|
|
591
|
+
if (packageJson.bugs) {
|
|
592
|
+
if (typeof packageJson.bugs === "string") {
|
|
593
|
+
support = packageJson.bugs;
|
|
594
|
+
} else if (packageJson.bugs.url) {
|
|
595
|
+
support = packageJson.bugs.url;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
587
598
|
}
|
|
588
599
|
}
|
|
589
600
|
return {
|
|
@@ -593,13 +604,38 @@ var getDefaultConfig = async (root) => {
|
|
|
593
604
|
repository,
|
|
594
605
|
license,
|
|
595
606
|
homepage,
|
|
596
|
-
|
|
597
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
598
|
-
error: {
|
|
599
|
-
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
600
|
-
}
|
|
607
|
+
support
|
|
601
608
|
};
|
|
602
|
-
}
|
|
609
|
+
}
|
|
610
|
+
function applyDefaultConfig(config) {
|
|
611
|
+
if (!config.support && config.contact) {
|
|
612
|
+
config.support = config.contact;
|
|
613
|
+
}
|
|
614
|
+
if (!config.contact && config.support) {
|
|
615
|
+
config.contact = config.support;
|
|
616
|
+
}
|
|
617
|
+
if (config.homepage) {
|
|
618
|
+
if (!config.docs) {
|
|
619
|
+
config.docs = `${config.homepage}/docs`;
|
|
620
|
+
}
|
|
621
|
+
if (!config.license) {
|
|
622
|
+
config.license = `${config.homepage}/license`;
|
|
623
|
+
}
|
|
624
|
+
if (!config.support) {
|
|
625
|
+
config.support = `${config.homepage}/support`;
|
|
626
|
+
}
|
|
627
|
+
if (!config.contact) {
|
|
628
|
+
config.contact = `${config.homepage}/contact`;
|
|
629
|
+
}
|
|
630
|
+
if (!_optionalChain([config, 'access', _2 => _2.error, 'optionalAccess', _3 => _3.codesFile]) || !_optionalChain([config, 'optionalAccess', _4 => _4.error, 'optionalAccess', _5 => _5.url])) {
|
|
631
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
632
|
+
if (config.homepage) {
|
|
633
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return config;
|
|
638
|
+
}
|
|
603
639
|
|
|
604
640
|
// ../config-tools/src/logger/chalk.ts
|
|
605
641
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
@@ -624,7 +660,7 @@ var chalkDefault = {
|
|
|
624
660
|
};
|
|
625
661
|
var getChalk = () => {
|
|
626
662
|
let _chalk = _chalk3.default;
|
|
627
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
663
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright])) {
|
|
628
664
|
_chalk = chalkDefault;
|
|
629
665
|
}
|
|
630
666
|
return _chalk;
|
|
@@ -712,7 +748,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
712
748
|
|
|
713
749
|
// ../config-tools/src/logger/console.ts
|
|
714
750
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
715
|
-
const colors = !_optionalChain([config, 'access',
|
|
751
|
+
const colors = !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12.dark]) && !_optionalChain([config, 'access', _13 => _13.colors, 'optionalAccess', _14 => _14["base"]]) && !_optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16["base"], 'optionalAccess', _17 => _17.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _18 => _18.colors, 'optionalAccess', _19 => _19.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"], 'optionalAccess', _22 => _22.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24["base"]]) ? _optionalChain([config, 'access', _25 => _25.colors, 'optionalAccess', _26 => _26["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
716
752
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
717
753
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
718
754
|
return (_) => {
|
|
@@ -828,7 +864,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
|
828
864
|
};
|
|
829
865
|
var _isFunction = (value) => {
|
|
830
866
|
try {
|
|
831
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
867
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _27 => _27.constructor]) && _optionalChain([value, 'optionalAccess', _28 => _28.call]) && _optionalChain([value, 'optionalAccess', _29 => _29.apply]));
|
|
832
868
|
} catch (e) {
|
|
833
869
|
return false;
|
|
834
870
|
}
|
|
@@ -847,7 +883,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
847
883
|
if (result.includes(`{${optionKey}}`)) {
|
|
848
884
|
result = result.replaceAll(
|
|
849
885
|
`{${optionKey}}`,
|
|
850
|
-
_optionalChain([tokenParams, 'optionalAccess',
|
|
886
|
+
_optionalChain([tokenParams, 'optionalAccess', _30 => _30[optionKey]]) || ""
|
|
851
887
|
);
|
|
852
888
|
}
|
|
853
889
|
}
|
|
@@ -869,7 +905,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
869
905
|
if (result.includes("{workspaceRoot}")) {
|
|
870
906
|
result = result.replaceAll(
|
|
871
907
|
"{workspaceRoot}",
|
|
872
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access',
|
|
908
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _31 => _31.config, 'optionalAccess', _32 => _32.workspaceRoot]))), () => ( findWorkspaceRoot()))
|
|
873
909
|
);
|
|
874
910
|
}
|
|
875
911
|
return result;
|
|
@@ -914,7 +950,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
914
950
|
cwd: workspacePath,
|
|
915
951
|
packageJson: true,
|
|
916
952
|
name: fileName,
|
|
917
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
953
|
+
envName: _optionalChain([fileName, 'optionalAccess', _33 => _33.toUpperCase, 'call', _34 => _34()]),
|
|
918
954
|
jitiOptions: {
|
|
919
955
|
debug: false,
|
|
920
956
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
@@ -928,7 +964,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
928
964
|
cwd: workspacePath,
|
|
929
965
|
packageJson: true,
|
|
930
966
|
name: fileName,
|
|
931
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
967
|
+
envName: _optionalChain([fileName, 'optionalAccess', _35 => _35.toUpperCase, 'call', _36 => _36()]),
|
|
932
968
|
jitiOptions: {
|
|
933
969
|
debug: false,
|
|
934
970
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
@@ -962,7 +998,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
962
998
|
)
|
|
963
999
|
);
|
|
964
1000
|
for (const result2 of results) {
|
|
965
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
1001
|
+
if (_optionalChain([result2, 'optionalAccess', _37 => _37.config]) && _optionalChain([result2, 'optionalAccess', _38 => _38.configFile]) && Object.keys(result2.config).length > 0) {
|
|
966
1002
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
967
1003
|
writeTrace(
|
|
968
1004
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
@@ -1033,6 +1069,7 @@ var getConfigEnv = () => {
|
|
|
1033
1069
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
1034
1070
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
1035
1071
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
1072
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1036
1073
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1037
1074
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1038
1075
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -1164,16 +1201,16 @@ var getBaseThemeColorConfigEnv = (prefix) => {
|
|
|
1164
1201
|
var setExtensionEnv = (extensionName, extension) => {
|
|
1165
1202
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
1166
1203
|
if (extension[key]) {
|
|
1167
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
1204
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _39 => _39.replace, 'call', _40 => _40(
|
|
1168
1205
|
/([A-Z])+/g,
|
|
1169
|
-
(input) => input ? _optionalChain([input, 'access',
|
|
1170
|
-
), 'access',
|
|
1206
|
+
(input) => input ? _optionalChain([input, 'access', _41 => _41[0], 'optionalAccess', _42 => _42.toUpperCase, 'call', _43 => _43()]) + input.slice(1) : ""
|
|
1207
|
+
), 'access', _44 => _44.split, 'call', _45 => _45(/(?=[A-Z])|[.\-\s_]/), 'access', _46 => _46.map, 'call', _47 => _47((x) => x.toLowerCase())]), () => ( []));
|
|
1171
1208
|
let extensionKey;
|
|
1172
1209
|
if (result.length === 0) {
|
|
1173
1210
|
return;
|
|
1174
1211
|
}
|
|
1175
1212
|
if (result.length === 1) {
|
|
1176
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
1213
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _48 => _48[0], 'optionalAccess', _49 => _49.toUpperCase, 'call', _50 => _50()]), () => ( ""));
|
|
1177
1214
|
} else {
|
|
1178
1215
|
extensionKey = result.reduce((ret, part) => {
|
|
1179
1216
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -1251,6 +1288,9 @@ var setConfigEnv = (config) => {
|
|
|
1251
1288
|
if (config.contact) {
|
|
1252
1289
|
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1253
1290
|
}
|
|
1291
|
+
if (config.support) {
|
|
1292
|
+
process.env[`${prefix}SUPPORT`] = config.support;
|
|
1293
|
+
}
|
|
1254
1294
|
if (config.timezone) {
|
|
1255
1295
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
1256
1296
|
process.env.TZ = config.timezone;
|
|
@@ -1314,7 +1354,7 @@ var setConfigEnv = (config) => {
|
|
|
1314
1354
|
process.env.NODE_ENV = config.mode;
|
|
1315
1355
|
process.env.ENVIRONMENT = config.mode;
|
|
1316
1356
|
}
|
|
1317
|
-
if (_optionalChain([config, 'access',
|
|
1357
|
+
if (_optionalChain([config, 'access', _51 => _51.colors, 'optionalAccess', _52 => _52.base, 'optionalAccess', _53 => _53.light]) || _optionalChain([config, 'access', _54 => _54.colors, 'optionalAccess', _55 => _55.base, 'optionalAccess', _56 => _56.dark])) {
|
|
1318
1358
|
for (const key of Object.keys(config.colors)) {
|
|
1319
1359
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1320
1360
|
}
|
|
@@ -1380,7 +1420,7 @@ var setConfigEnv = (config) => {
|
|
|
1380
1420
|
}
|
|
1381
1421
|
};
|
|
1382
1422
|
var setThemeColorConfigEnv = (prefix, config) => {
|
|
1383
|
-
return _optionalChain([config, 'optionalAccess',
|
|
1423
|
+
return _optionalChain([config, 'optionalAccess', _57 => _57.light, 'optionalAccess', _58 => _58.brand]) || _optionalChain([config, 'optionalAccess', _59 => _59.dark, 'optionalAccess', _60 => _60.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
1384
1424
|
};
|
|
1385
1425
|
var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
1386
1426
|
if (config.dark) {
|
|
@@ -1482,7 +1522,7 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
|
1482
1522
|
var _static_cache = void 0;
|
|
1483
1523
|
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot3, skipLogs = false, useDefault = true) => {
|
|
1484
1524
|
let result;
|
|
1485
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
1525
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _61 => _61.data]) || !_optionalChain([_static_cache, 'optionalAccess', _62 => _62.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1486
1526
|
let _workspaceRoot = workspaceRoot3;
|
|
1487
1527
|
if (!_workspaceRoot) {
|
|
1488
1528
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -1500,9 +1540,11 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot3, s
|
|
|
1500
1540
|
return void 0;
|
|
1501
1541
|
}
|
|
1502
1542
|
}
|
|
1503
|
-
const defaultConfig = await
|
|
1504
|
-
result =
|
|
1505
|
-
|
|
1543
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
1544
|
+
result = applyDefaultConfig(
|
|
1545
|
+
await stormWorkspaceConfigSchema.parseAsync(
|
|
1546
|
+
_defu2.default.call(void 0, configEnv, configFile, defaultConfig)
|
|
1547
|
+
)
|
|
1506
1548
|
);
|
|
1507
1549
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1508
1550
|
} else {
|
|
@@ -1570,7 +1612,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
1570
1612
|
let options = _options;
|
|
1571
1613
|
let config = {};
|
|
1572
1614
|
try {
|
|
1573
|
-
if (!_optionalChain([context, 'access',
|
|
1615
|
+
if (!_optionalChain([context, 'access', _63 => _63.projectsConfigurations, 'optionalAccess', _64 => _64.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1574
1616
|
throw new Error(
|
|
1575
1617
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
1576
1618
|
);
|
|
@@ -1593,7 +1635,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
1593
1635
|
);
|
|
1594
1636
|
config = await getConfig(workspaceRoot3);
|
|
1595
1637
|
}
|
|
1596
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
1638
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _65 => _65.hooks, 'optionalAccess', _66 => _66.applyDefaultOptions])) {
|
|
1597
1639
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
1598
1640
|
options = await Promise.resolve(
|
|
1599
1641
|
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
@@ -1621,7 +1663,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1621
1663
|
`,
|
|
1622
1664
|
config
|
|
1623
1665
|
);
|
|
1624
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
1666
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _67 => _67.hooks, 'optionalAccess', _68 => _68.preProcess])) {
|
|
1625
1667
|
writeDebug("Running the preProcess hook...", config);
|
|
1626
1668
|
await Promise.resolve(
|
|
1627
1669
|
executorOptions.hooks.preProcess(tokenized, config)
|
|
@@ -1629,7 +1671,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1629
1671
|
writeDebug("Completed the preProcess hook", config);
|
|
1630
1672
|
}
|
|
1631
1673
|
const ret = executorFn(tokenized, context, config);
|
|
1632
|
-
if (_isFunction2(_optionalChain([ret, 'optionalAccess',
|
|
1674
|
+
if (_isFunction2(_optionalChain([ret, 'optionalAccess', _69 => _69.next]))) {
|
|
1633
1675
|
const asyncGen = ret;
|
|
1634
1676
|
for await (const iter of asyncGen) {
|
|
1635
1677
|
void iter;
|
|
@@ -1638,7 +1680,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1638
1680
|
const result = await Promise.resolve(
|
|
1639
1681
|
ret
|
|
1640
1682
|
);
|
|
1641
|
-
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess',
|
|
1683
|
+
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _70 => _70.error, 'optionalAccess', _71 => _71.message]) && typeof _optionalChain([result, 'optionalAccess', _72 => _72.error, 'optionalAccess', _73 => _73.message]) === "string" && _optionalChain([result, 'optionalAccess', _74 => _74.error, 'optionalAccess', _75 => _75.name]) && typeof _optionalChain([result, 'optionalAccess', _76 => _76.error, 'optionalAccess', _77 => _77.name]) === "string")) {
|
|
1642
1684
|
writeTrace(
|
|
1643
1685
|
`Failure determined by the ${name} executor
|
|
1644
1686
|
${formatLogMessage(result)}`,
|
|
@@ -1646,10 +1688,10 @@ ${formatLogMessage(result)}`,
|
|
|
1646
1688
|
);
|
|
1647
1689
|
console.error(result);
|
|
1648
1690
|
throw new Error(`The ${name} executor failed to run`, {
|
|
1649
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
1691
|
+
cause: _optionalChain([result, 'optionalAccess', _78 => _78.error])
|
|
1650
1692
|
});
|
|
1651
1693
|
}
|
|
1652
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
1694
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _79 => _79.hooks, 'optionalAccess', _80 => _80.postProcess])) {
|
|
1653
1695
|
writeDebug("Running the postProcess hook...", config);
|
|
1654
1696
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
1655
1697
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -1679,7 +1721,7 @@ ${formatLogMessage(result)}`,
|
|
|
1679
1721
|
};
|
|
1680
1722
|
var _isFunction2 = (value) => {
|
|
1681
1723
|
try {
|
|
1682
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
1724
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _81 => _81.constructor]) && _optionalChain([value, 'optionalAccess', _82 => _82.call]) && _optionalChain([value, 'optionalAccess', _83 => _83.apply]));
|
|
1683
1725
|
} catch (e) {
|
|
1684
1726
|
return false;
|
|
1685
1727
|
}
|
|
@@ -1705,7 +1747,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
1705
1747
|
);
|
|
1706
1748
|
config = await getConfig(workspaceRoot3);
|
|
1707
1749
|
}
|
|
1708
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1750
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _84 => _84.hooks, 'optionalAccess', _85 => _85.applyDefaultOptions])) {
|
|
1709
1751
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
1710
1752
|
options = await Promise.resolve(
|
|
1711
1753
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
@@ -1722,7 +1764,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1722
1764
|
{ workspaceRoot: tree.root, config },
|
|
1723
1765
|
applyWorkspaceBaseTokens
|
|
1724
1766
|
);
|
|
1725
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1767
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _86 => _86.hooks, 'optionalAccess', _87 => _87.preProcess])) {
|
|
1726
1768
|
writeDebug("Running the preProcess hook...", config);
|
|
1727
1769
|
await Promise.resolve(
|
|
1728
1770
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
@@ -1733,15 +1775,15 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1733
1775
|
generatorFn(tree, tokenized, config)
|
|
1734
1776
|
);
|
|
1735
1777
|
if (result) {
|
|
1736
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
1778
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _88 => _88.error, 'optionalAccess', _89 => _89.message]) && typeof _optionalChain([result, 'optionalAccess', _90 => _90.error, 'optionalAccess', _91 => _91.message]) === "string" && _optionalChain([result, 'optionalAccess', _92 => _92.error, 'optionalAccess', _93 => _93.name]) && typeof _optionalChain([result, 'optionalAccess', _94 => _94.error, 'optionalAccess', _95 => _95.name]) === "string") {
|
|
1737
1779
|
throw new Error(`The ${name} generator failed to run`, {
|
|
1738
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
1780
|
+
cause: _optionalChain([result, 'optionalAccess', _96 => _96.error])
|
|
1739
1781
|
});
|
|
1740
1782
|
} else if (result.success && result.data) {
|
|
1741
1783
|
return result;
|
|
1742
1784
|
}
|
|
1743
1785
|
}
|
|
1744
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1786
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _97 => _97.hooks, 'optionalAccess', _98 => _98.postProcess])) {
|
|
1745
1787
|
writeDebug("Running the postProcess hook...", config);
|
|
1746
1788
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1747
1789
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -1856,10 +1898,10 @@ async function cargoCommand(...args) {
|
|
|
1856
1898
|
}
|
|
1857
1899
|
function cargoCommandSync(args = "", options) {
|
|
1858
1900
|
const normalizedOptions = {
|
|
1859
|
-
stdio: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1901
|
+
stdio: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _99 => _99.stdio]), () => ( "inherit")),
|
|
1860
1902
|
env: {
|
|
1861
1903
|
...process.env,
|
|
1862
|
-
..._optionalChain([options, 'optionalAccess',
|
|
1904
|
+
..._optionalChain([options, 'optionalAccess', _100 => _100.env])
|
|
1863
1905
|
}
|
|
1864
1906
|
};
|
|
1865
1907
|
try {
|
|
@@ -1892,7 +1934,7 @@ function cargoMetadata() {
|
|
|
1892
1934
|
}
|
|
1893
1935
|
function runProcess(processCmd, ...args) {
|
|
1894
1936
|
const metadata = cargoMetadata();
|
|
1895
|
-
const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess',
|
|
1937
|
+
const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _101 => _101.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, _devkit.workspaceRoot, "dist")));
|
|
1896
1938
|
return new Promise((resolve) => {
|
|
1897
1939
|
if (process.env.VERCEL) {
|
|
1898
1940
|
return resolve({ success: true });
|
|
@@ -2159,7 +2201,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
2159
2201
|
);
|
|
2160
2202
|
const localPackages = [];
|
|
2161
2203
|
for (const project of projectDependencies.dependencies.filter(
|
|
2162
|
-
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access',
|
|
2204
|
+
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _102 => _102.node, 'access', _103 => _103.data, 'optionalAccess', _104 => _104.root]) !== projectRoot && _optionalChain([dep, 'access', _105 => _105.node, 'access', _106 => _106.data, 'optionalAccess', _107 => _107.root]) !== workspaceRoot3
|
|
2163
2205
|
)) {
|
|
2164
2206
|
const projectNode = project.node;
|
|
2165
2207
|
if (projectNode.data.root) {
|
|
@@ -2191,13 +2233,13 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
2191
2233
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2192
2234
|
const projectName2 = projectJson.name;
|
|
2193
2235
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2194
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2236
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _108 => _108.projects, 'optionalAccess', _109 => _109[projectName2]])) {
|
|
2195
2237
|
throw new Error(
|
|
2196
2238
|
"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."
|
|
2197
2239
|
);
|
|
2198
2240
|
}
|
|
2199
|
-
const implicitDependencies = _optionalChain([projectConfigurations, 'access',
|
|
2200
|
-
if (_optionalChain([projectConfigurations, 'access',
|
|
2241
|
+
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _110 => _110.projects, 'optionalAccess', _111 => _111[projectName2], 'access', _112 => _112.implicitDependencies, 'optionalAccess', _113 => _113.reduce, 'call', _114 => _114((ret, dep) => {
|
|
2242
|
+
if (_optionalChain([projectConfigurations, 'access', _115 => _115.projects, 'optionalAccess', _116 => _116[dep]])) {
|
|
2201
2243
|
const depPackageJsonPath = joinPaths(
|
|
2202
2244
|
workspaceRoot3,
|
|
2203
2245
|
projectConfigurations.projects[dep].root,
|
|
@@ -2217,13 +2259,13 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
2217
2259
|
return ret;
|
|
2218
2260
|
}, [])]);
|
|
2219
2261
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
2220
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess',
|
|
2262
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _117 => _117.includes, 'call', _118 => _118(localPackage.name)]) && _optionalChain([packageJson, 'access', _119 => _119.devDependencies, 'optionalAccess', _120 => _120[localPackage.name]]) === void 0) {
|
|
2221
2263
|
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
2222
2264
|
}
|
|
2223
2265
|
return ret;
|
|
2224
2266
|
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
2225
2267
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
2226
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess',
|
|
2268
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _121 => _121.includes, 'call', _122 => _122(localPackage.name)]) && _optionalChain([packageJson, 'access', _123 => _123.dependencies, 'optionalAccess', _124 => _124[localPackage.name]]) === void 0) {
|
|
2227
2269
|
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
2228
2270
|
}
|
|
2229
2271
|
return ret;
|
|
@@ -2305,7 +2347,7 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
2305
2347
|
|
|
2306
2348
|
// ../esbuild/src/assets.ts
|
|
2307
2349
|
async function copyBuildAssets(context) {
|
|
2308
|
-
if (_optionalChain([context, 'access',
|
|
2350
|
+
if (_optionalChain([context, 'access', _125 => _125.result, 'optionalAccess', _126 => _126.errors, 'access', _127 => _127.length]) === 0) {
|
|
2309
2351
|
writeDebug(
|
|
2310
2352
|
` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
|
|
2311
2353
|
context.workspaceConfig
|
|
@@ -2413,7 +2455,7 @@ async function resolveContext(userOptions) {
|
|
|
2413
2455
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2414
2456
|
const projectName = projectJson.name || userOptions.name;
|
|
2415
2457
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2416
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2458
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _128 => _128.projects, 'optionalAccess', _129 => _129[projectName]])) {
|
|
2417
2459
|
throw new Error(
|
|
2418
2460
|
"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."
|
|
2419
2461
|
);
|
|
@@ -2466,6 +2508,14 @@ async function resolveContext(userOptions) {
|
|
|
2466
2508
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2467
2509
|
};
|
|
2468
2510
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
2511
|
+
if (context.options.verbose) {
|
|
2512
|
+
writeDebug(
|
|
2513
|
+
` \u2699\uFE0F Build options resolved:
|
|
2514
|
+
|
|
2515
|
+
${formatLogMessage(context.options)}`,
|
|
2516
|
+
workspaceConfig
|
|
2517
|
+
);
|
|
2518
|
+
}
|
|
2469
2519
|
return context;
|
|
2470
2520
|
}
|
|
2471
2521
|
|
|
@@ -2700,7 +2750,7 @@ async function executeTsup(context) {
|
|
|
2700
2750
|
|
|
2701
2751
|
// ../esbuild/src/build.ts
|
|
2702
2752
|
async function reportResults(context) {
|
|
2703
|
-
if (_optionalChain([context, 'access',
|
|
2753
|
+
if (_optionalChain([context, 'access', _130 => _130.result, 'optionalAccess', _131 => _131.errors, 'access', _132 => _132.length]) === 0) {
|
|
2704
2754
|
if (context.result.warnings.length > 0) {
|
|
2705
2755
|
writeWarning(
|
|
2706
2756
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
@@ -2711,7 +2761,7 @@ async function reportResults(context) {
|
|
|
2711
2761
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
2712
2762
|
context.workspaceConfig
|
|
2713
2763
|
);
|
|
2714
|
-
} else if (_optionalChain([context, 'access',
|
|
2764
|
+
} else if (_optionalChain([context, 'access', _133 => _133.result, 'optionalAccess', _134 => _134.errors]) && _optionalChain([context, 'access', _135 => _135.result, 'optionalAccess', _136 => _136.errors, 'access', _137 => _137.length]) > 0) {
|
|
2715
2765
|
writeError(
|
|
2716
2766
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
2717
2767
|
context.workspaceConfig
|
|
@@ -2790,16 +2840,16 @@ async function build2(options) {
|
|
|
2790
2840
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
2791
2841
|
async function esbuildExecutorFn(options, context, config) {
|
|
2792
2842
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
2793
|
-
if (!_optionalChain([context, 'access',
|
|
2843
|
+
if (!_optionalChain([context, 'access', _138 => _138.projectsConfigurations, 'optionalAccess', _139 => _139.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _140 => _140.projectsConfigurations, 'access', _141 => _141.projects, 'access', _142 => _142[context.projectName], 'optionalAccess', _143 => _143.root])) {
|
|
2794
2844
|
throw new Error(
|
|
2795
2845
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
2796
2846
|
);
|
|
2797
2847
|
}
|
|
2798
2848
|
await build2({
|
|
2799
2849
|
...options,
|
|
2800
|
-
projectRoot: _optionalChain([context, 'access',
|
|
2850
|
+
projectRoot: _optionalChain([context, 'access', _144 => _144.projectsConfigurations, 'access', _145 => _145.projects, 'optionalAccess', _146 => _146[context.projectName], 'access', _147 => _147.root]),
|
|
2801
2851
|
name: context.projectName,
|
|
2802
|
-
sourceRoot: _optionalChain([context, 'access',
|
|
2852
|
+
sourceRoot: _optionalChain([context, 'access', _148 => _148.projectsConfigurations, 'access', _149 => _149.projects, 'optionalAccess', _150 => _150[context.projectName], 'optionalAccess', _151 => _151.sourceRoot]),
|
|
2803
2853
|
format: options.format,
|
|
2804
2854
|
platform: options.format
|
|
2805
2855
|
});
|
|
@@ -2848,15 +2898,15 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
2848
2898
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
2849
2899
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
2850
2900
|
async function sizeLimitExecutorFn(options, context, config) {
|
|
2851
|
-
if (!_optionalChain([context, 'optionalAccess',
|
|
2901
|
+
if (!_optionalChain([context, 'optionalAccess', _152 => _152.projectName]) || !_optionalChain([context, 'access', _153 => _153.projectsConfigurations, 'optionalAccess', _154 => _154.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2852
2902
|
throw new Error(
|
|
2853
2903
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
2854
2904
|
);
|
|
2855
2905
|
}
|
|
2856
2906
|
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
2857
2907
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild3.default, _esbuildwhy2.default], {
|
|
2858
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access',
|
|
2859
|
-
_nullishCoalesce(_optionalChain([context, 'access',
|
|
2908
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _155 => _155.projectsConfigurations, 'access', _156 => _156.projects, 'access', _157 => _157[context.projectName], 'optionalAccess', _158 => _158.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
2909
|
+
_nullishCoalesce(_optionalChain([context, 'access', _159 => _159.projectsConfigurations, 'access', _160 => _160.projects, 'access', _161 => _161[context.projectName], 'optionalAccess', _162 => _162.root]), () => ( "./")),
|
|
2860
2910
|
"src"
|
|
2861
2911
|
)))
|
|
2862
2912
|
}).then((result) => {
|
|
@@ -2926,7 +2976,7 @@ var executor_default8 = withRunExecutor(
|
|
|
2926
2976
|
var _jiti = require('jiti');
|
|
2927
2977
|
async function unbuildExecutorFn(options, context, config) {
|
|
2928
2978
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2929
|
-
if (!_optionalChain([context, 'access',
|
|
2979
|
+
if (!_optionalChain([context, 'access', _163 => _163.projectsConfigurations, 'optionalAccess', _164 => _164.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2930
2980
|
throw new Error(
|
|
2931
2981
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
2932
2982
|
);
|
|
@@ -3185,15 +3235,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3185
3235
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
3186
3236
|
let repository = {
|
|
3187
3237
|
type: "github",
|
|
3188
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
3238
|
+
url: _optionalChain([config, 'optionalAccess', _165 => _165.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _166 => _166.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _167 => _167.namespace]) || _optionalChain([config, 'optionalAccess', _168 => _168.name]) || "repository"}.git`
|
|
3189
3239
|
};
|
|
3190
3240
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
3191
3241
|
if (tree.exists("package.json")) {
|
|
3192
3242
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3193
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3243
|
+
if (_optionalChain([packageJson, 'optionalAccess', _169 => _169.repository])) {
|
|
3194
3244
|
repository = packageJson.repository;
|
|
3195
3245
|
}
|
|
3196
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3246
|
+
if (_optionalChain([packageJson, 'optionalAccess', _170 => _170.description])) {
|
|
3197
3247
|
description = packageJson.description;
|
|
3198
3248
|
}
|
|
3199
3249
|
}
|
|
@@ -3248,9 +3298,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3248
3298
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
3249
3299
|
...json,
|
|
3250
3300
|
pnpm: {
|
|
3251
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3301
|
+
..._optionalChain([json, 'optionalAccess', _171 => _171.pnpm]),
|
|
3252
3302
|
overrides: {
|
|
3253
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3303
|
+
..._optionalChain([json, 'optionalAccess', _172 => _172.pnpm, 'optionalAccess', _173 => _173.overrides]),
|
|
3254
3304
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
3255
3305
|
}
|
|
3256
3306
|
}
|
|
@@ -3268,10 +3318,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3268
3318
|
]);
|
|
3269
3319
|
if (tree.exists("package.json")) {
|
|
3270
3320
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3271
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3321
|
+
if (_optionalChain([packageJson, 'optionalAccess', _174 => _174.repository])) {
|
|
3272
3322
|
repository = packageJson.repository;
|
|
3273
3323
|
}
|
|
3274
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3324
|
+
if (_optionalChain([packageJson, 'optionalAccess', _175 => _175.description])) {
|
|
3275
3325
|
description = packageJson.description;
|
|
3276
3326
|
}
|
|
3277
3327
|
}
|
|
@@ -3308,22 +3358,22 @@ function getOutputPath(options) {
|
|
|
3308
3358
|
function createProjectTsConfigJson(tree, options) {
|
|
3309
3359
|
const tsconfig = {
|
|
3310
3360
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
3311
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3361
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _176 => _176.tsconfigOptions]), () => ( {})),
|
|
3312
3362
|
compilerOptions: {
|
|
3313
3363
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
3314
3364
|
outDir: joinPaths(_devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
3315
3365
|
noEmit: true,
|
|
3316
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3366
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _177 => _177.tsconfigOptions, 'optionalAccess', _178 => _178.compilerOptions]), () => ( {}))
|
|
3317
3367
|
},
|
|
3318
|
-
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3368
|
+
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _179 => _179.tsconfigOptions, 'optionalAccess', _180 => _180.files]), () => ( []))],
|
|
3319
3369
|
include: [
|
|
3320
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3370
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _181 => _181.tsconfigOptions, 'optionalAccess', _182 => _182.include]), () => ( [])),
|
|
3321
3371
|
"src/**/*.ts",
|
|
3322
3372
|
"src/**/*.js",
|
|
3323
3373
|
"bin/**/*"
|
|
3324
3374
|
],
|
|
3325
3375
|
exclude: [
|
|
3326
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3376
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _183 => _183.tsconfigOptions, 'optionalAccess', _184 => _184.exclude]), () => ( [])),
|
|
3327
3377
|
"jest.config.ts",
|
|
3328
3378
|
"src/**/*.spec.ts",
|
|
3329
3379
|
"src/**/*.test.ts"
|
|
@@ -3333,8 +3383,8 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
3333
3383
|
}
|
|
3334
3384
|
async function normalizeOptions(tree, options, config) {
|
|
3335
3385
|
let importPath = options.importPath;
|
|
3336
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
3337
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
3386
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _185 => _185.namespace])) {
|
|
3387
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _186 => _186.namespace])}/${options.name}`;
|
|
3338
3388
|
}
|
|
3339
3389
|
if (options.publishable) {
|
|
3340
3390
|
if (!importPath) {
|
|
@@ -3490,8 +3540,8 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3490
3540
|
});
|
|
3491
3541
|
writeTrace(jsonSchema, config);
|
|
3492
3542
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
3493
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
3494
|
-
_optionalChain([options, 'access',
|
|
3543
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _187 => _187.workspaceRoot]), () => ( findWorkspaceRoot())),
|
|
3544
|
+
_optionalChain([options, 'access', _188 => _188.outputFile, 'optionalAccess', _189 => _189.startsWith, 'call', _190 => _190("./")]) ? "" : "./"
|
|
3495
3545
|
);
|
|
3496
3546
|
writeTrace(
|
|
3497
3547
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
@@ -4313,7 +4363,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
4313
4363
|
]
|
|
4314
4364
|
},
|
|
4315
4365
|
$default: "esnext",
|
|
4316
|
-
$resolve: (val = "esnext") => val.toLowerCase()
|
|
4366
|
+
$resolve: (val = "esnext") => typeof val === "string" ? val.toLowerCase() : val
|
|
4317
4367
|
},
|
|
4318
4368
|
format: {
|
|
4319
4369
|
$schema: {
|