@storm-software/pulumi-tools 0.7.33 → 0.7.35
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 +99 -40
- package/README.md +7 -7
- package/dist/{chunk-R7DU2APC.mjs → chunk-2BPV2XV2.mjs} +1 -1
- package/dist/{chunk-5H6VSOGJ.mjs → chunk-4IQTGKLU.mjs} +1 -1
- package/dist/{chunk-NX3OSK42.mjs → chunk-5EAXI5VS.mjs} +2 -2
- package/dist/{chunk-J67CDMJQ.js → chunk-BFQTJ7I3.js} +444 -459
- package/dist/{chunk-2X56VZF4.mjs → chunk-BHPF3Z2K.mjs} +1 -1
- package/dist/{chunk-CCTQVQPZ.js → chunk-DWPTI4FZ.js} +2 -2
- package/dist/{chunk-DXMUEDWS.js → chunk-GN2FDH3O.js} +2 -2
- package/dist/{chunk-V6HZK3HQ.mjs → chunk-IGLU7MRU.mjs} +1 -1
- package/dist/{chunk-DMZH2LTU.js → chunk-J4J2DP62.js} +3 -3
- package/dist/{chunk-UZDQXNWJ.js → chunk-LF7AM2SN.js} +2 -2
- package/dist/{chunk-A5P4P7EM.js → chunk-NWUENBI4.js} +2 -2
- package/dist/{chunk-VQTLM4TK.mjs → chunk-TLK5O377.mjs} +413 -428
- package/dist/{chunk-6Q5RPJFO.mjs → chunk-TP5PC7K5.mjs} +3 -3
- package/dist/{chunk-YLBLU7WG.mjs → chunk-TUJHGWNG.mjs} +1 -1
- package/dist/{chunk-QPASYUSE.mjs → chunk-UF7ZCXHA.mjs} +1 -1
- package/dist/{chunk-PTCFM37L.js → chunk-Y6K5MKSO.js} +2 -2
- package/dist/{chunk-NHWCRKCE.mjs → chunk-YH7Y5GNY.mjs} +1 -1
- package/dist/{chunk-5FEXVTSH.js → chunk-YMB64S2H.js} +5 -5
- package/dist/executors.d.mts +1 -1
- package/dist/executors.d.ts +1 -1
- package/dist/executors.js +7 -7
- package/dist/executors.mjs +8 -8
- package/dist/{generators-BqtVID0f.d.ts → generators-Bua4nMog.d.ts} +1 -1
- package/dist/{generators-9HIDBCUE.d.mts → generators-CrZPZKBW.d.mts} +1 -1
- package/dist/generators.d.mts +2 -2
- package/dist/generators.d.ts +2 -2
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +4 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/dist/index.mjs +10 -10
- package/dist/src/base/base-executor.d.mts +1 -1
- package/dist/src/base/base-executor.d.ts +1 -1
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +3 -3
- package/dist/src/base/index.d.mts +1 -1
- package/dist/src/base/index.d.ts +1 -1
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +4 -4
- package/dist/src/base/providers.mjs +2 -2
- package/dist/src/executors/config/executor.d.mts +1 -1
- package/dist/src/executors/config/executor.d.ts +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.d.mts +1 -1
- package/dist/src/executors/import/executor.d.ts +1 -1
- package/dist/src/executors/import/executor.js +4 -4
- package/dist/src/executors/import/executor.mjs +4 -4
- package/dist/src/executors/preview/executor.d.mts +1 -1
- package/dist/src/executors/preview/executor.d.ts +1 -1
- package/dist/src/executors/preview/executor.js +4 -4
- package/dist/src/executors/preview/executor.mjs +4 -4
- package/dist/src/executors/refresh/executor.d.mts +1 -1
- package/dist/src/executors/refresh/executor.d.ts +1 -1
- package/dist/src/executors/refresh/executor.js +4 -4
- package/dist/src/executors/refresh/executor.mjs +4 -4
- package/dist/src/executors/up/executor.d.mts +1 -1
- package/dist/src/executors/up/executor.d.ts +1 -1
- package/dist/src/executors/up/executor.js +4 -4
- package/dist/src/executors/up/executor.mjs +4 -4
- package/dist/src/generators/init/generator.d.mts +2 -2
- package/dist/src/generators/init/generator.d.ts +2 -2
- package/dist/src/generators/init/generator.js +3 -3
- package/dist/src/generators/init/generator.mjs +4 -4
- package/dist/tsup.config.mjs +1 -1
- package/dist/{types-HiZpltUX.d.mts → types-BXfk4hPO.d.mts} +67 -3
- package/dist/{types-HiZpltUX.d.ts → types-BXfk4hPO.d.ts} +67 -3
- package/package.json +6 -6
|
@@ -53,8 +53,23 @@ var LogLevelLabel = {
|
|
|
53
53
|
// ../config/src/constants.ts
|
|
54
54
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
55
55
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
56
|
+
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
56
57
|
var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
|
|
57
58
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
59
|
+
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
60
|
+
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
61
|
+
var STORM_DEFAULT_ACCOUNT_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
62
|
+
var STORM_DEFAULT_ACCOUNT_TELEGRAM = "https://t.me/storm_software";
|
|
63
|
+
var STORM_DEFAULT_ACCOUNT_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
64
|
+
var STORM_DEFAULT_ACCOUNT_MEDIUM = "https://medium.com/storm-software";
|
|
65
|
+
var STORM_DEFAULT_ACCOUNT_GITHUB = "https://github.com/storm-software";
|
|
66
|
+
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
67
|
+
Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
68
|
+
|
|
69
|
+
Join us on [Discord](${STORM_DEFAULT_ACCOUNT_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
70
|
+
|
|
71
|
+
If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${STORM_DEFAULT_CONTACT}) or join our [Slack](${STORM_DEFAULT_ACCOUNT_SLACK}) channel!
|
|
72
|
+
`;
|
|
58
73
|
|
|
59
74
|
// ../config/src/schema.ts
|
|
60
75
|
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
@@ -142,9 +157,22 @@ var ColorConfigMapSchema = _zod2.default.union([
|
|
|
142
157
|
var ExtendsItemSchema = _zod2.default.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
143
158
|
var ExtendsSchema = ExtendsItemSchema.or(_zod2.default.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
144
159
|
var WorkspaceBotConfigSchema = _zod2.default.object({
|
|
145
|
-
name: _zod2.default.string().trim().default("
|
|
160
|
+
name: _zod2.default.string().trim().default("stormie-bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
146
161
|
email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
147
162
|
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
163
|
+
var WorkspaceReleaseConfigSchema = _zod2.default.object({
|
|
164
|
+
banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("A URL to a banner image used to display the workspace's release"),
|
|
165
|
+
header: _zod2.default.string().trim().optional().describe("A header message appended to the start of the workspace's release notes"),
|
|
166
|
+
footer: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe("A footer message appended to the end of the workspace's release notes")
|
|
167
|
+
}).describe("The workspace's release config used during the release process");
|
|
168
|
+
var WorkspaceAccountConfigSchema = _zod2.default.object({
|
|
169
|
+
twitter: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
170
|
+
discord: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
171
|
+
telegram: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
172
|
+
slack: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
|
|
173
|
+
medium: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
174
|
+
github: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
175
|
+
}).describe("The workspace's account config used to store various social media links");
|
|
148
176
|
var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
149
177
|
cache: _zod2.default.string().trim().optional().describe("The directory used to store the environment's cached file data"),
|
|
150
178
|
data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
@@ -164,15 +192,18 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
164
192
|
homepage: _zod2.default.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
165
193
|
docs: _zod2.default.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
166
194
|
licensing: _zod2.default.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
195
|
+
contact: _zod2.default.string().trim().url().default(STORM_DEFAULT_CONTACT).describe("The base contact site for the workspace"),
|
|
167
196
|
branch: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
|
|
168
197
|
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
169
198
|
owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
170
199
|
bot: WorkspaceBotConfigSchema,
|
|
171
|
-
|
|
200
|
+
release: WorkspaceReleaseConfigSchema,
|
|
201
|
+
account: WorkspaceAccountConfigSchema,
|
|
202
|
+
mode: _zod2.default.enum([
|
|
172
203
|
"development",
|
|
173
204
|
"staging",
|
|
174
205
|
"production"
|
|
175
|
-
]).default("production").describe("The current runtime environment
|
|
206
|
+
]).default("production").describe("The current runtime environment mode for the package"),
|
|
176
207
|
workspaceRoot: _zod2.default.string().trim().default("").describe("The root directory of the workspace"),
|
|
177
208
|
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
178
209
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
@@ -539,17 +570,14 @@ var getChalk = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
|
539
570
|
}, "getChalk");
|
|
540
571
|
|
|
541
572
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
542
|
-
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
543
573
|
function isUnicodeSupported() {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
552
|
-
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
574
|
+
if (process.platform !== "win32") {
|
|
575
|
+
return process.env.TERM !== "linux";
|
|
576
|
+
}
|
|
577
|
+
return Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
578
|
+
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
579
|
+
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
580
|
+
process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
553
581
|
}
|
|
554
582
|
_chunk3GQAWCBQjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
|
|
555
583
|
|
|
@@ -637,7 +665,7 @@ var getLogFn = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel =
|
|
|
637
665
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
638
666
|
return (message) => {
|
|
639
667
|
console.error(`
|
|
640
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]}
|
|
668
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
641
669
|
`);
|
|
642
670
|
};
|
|
643
671
|
}
|
|
@@ -868,12 +896,26 @@ var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
|
868
896
|
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
869
897
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
870
898
|
},
|
|
899
|
+
release: {
|
|
900
|
+
banner: process.env[`${prefix}RELEASE_BANNER`] || void 0,
|
|
901
|
+
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
902
|
+
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
903
|
+
},
|
|
904
|
+
account: {
|
|
905
|
+
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
906
|
+
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
907
|
+
telegram: process.env[`${prefix}ACCOUNT_TELEGRAM`] || void 0,
|
|
908
|
+
slack: process.env[`${prefix}ACCOUNT_SLACK`] || void 0,
|
|
909
|
+
medium: process.env[`${prefix}ACCOUNT_MEDIUM`] || void 0,
|
|
910
|
+
github: process.env[`${prefix}ACCOUNT_GITHUB`] || void 0
|
|
911
|
+
},
|
|
871
912
|
organization: process.env[`${prefix}ORGANIZATION`] || void 0,
|
|
872
913
|
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
873
914
|
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
874
915
|
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
875
916
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
876
917
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
918
|
+
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
877
919
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
878
920
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
879
921
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -887,7 +929,7 @@ var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
|
887
929
|
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
888
930
|
},
|
|
889
931
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
890
|
-
|
|
932
|
+
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
891
933
|
// ci:
|
|
892
934
|
// process.env[`${prefix}CI`] !== undefined
|
|
893
935
|
// ? Boolean(
|
|
@@ -1032,6 +1074,31 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1032
1074
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
1033
1075
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
1034
1076
|
}
|
|
1077
|
+
if (config.release) {
|
|
1078
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1079
|
+
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
1080
|
+
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
1081
|
+
}
|
|
1082
|
+
if (config.account) {
|
|
1083
|
+
if (config.account.twitter) {
|
|
1084
|
+
process.env[`${prefix}ACCOUNT_TWITTER`] = config.account.twitter;
|
|
1085
|
+
}
|
|
1086
|
+
if (config.account.discord) {
|
|
1087
|
+
process.env[`${prefix}ACCOUNT_DISCORD`] = config.account.discord;
|
|
1088
|
+
}
|
|
1089
|
+
if (config.account.telegram) {
|
|
1090
|
+
process.env[`${prefix}ACCOUNT_TELEGRAM`] = config.account.telegram;
|
|
1091
|
+
}
|
|
1092
|
+
if (config.account.slack) {
|
|
1093
|
+
process.env[`${prefix}ACCOUNT_SLACK`] = config.account.slack;
|
|
1094
|
+
}
|
|
1095
|
+
if (config.account.medium) {
|
|
1096
|
+
process.env[`${prefix}ACCOUNT_MEDIUM`] = config.account.medium;
|
|
1097
|
+
}
|
|
1098
|
+
if (config.account.github) {
|
|
1099
|
+
process.env[`${prefix}ACCOUNT_GITHUB`] = config.account.github;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1035
1102
|
if (config.organization) {
|
|
1036
1103
|
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
1037
1104
|
}
|
|
@@ -1050,6 +1117,9 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1050
1117
|
if (config.licensing) {
|
|
1051
1118
|
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
1052
1119
|
}
|
|
1120
|
+
if (config.contact) {
|
|
1121
|
+
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1122
|
+
}
|
|
1053
1123
|
if (config.timezone) {
|
|
1054
1124
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
1055
1125
|
process.env.TZ = config.timezone;
|
|
@@ -1096,10 +1166,10 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1096
1166
|
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
1097
1167
|
}
|
|
1098
1168
|
}
|
|
1099
|
-
if (config.
|
|
1100
|
-
process.env[`${prefix}
|
|
1101
|
-
process.env.NODE_ENV = config.
|
|
1102
|
-
process.env.ENVIRONMENT = config.
|
|
1169
|
+
if (config.mode) {
|
|
1170
|
+
process.env[`${prefix}MODE`] = config.mode;
|
|
1171
|
+
process.env.NODE_ENV = config.mode;
|
|
1172
|
+
process.env.ENVIRONMENT = config.mode;
|
|
1103
1173
|
}
|
|
1104
1174
|
if (_optionalChain([config, 'access', _47 => _47.colors, 'optionalAccess', _48 => _48.base, 'optionalAccess', _49 => _49.light]) || _optionalChain([config, 'access', _50 => _50.colors, 'optionalAccess', _51 => _51.base, 'optionalAccess', _52 => _52.dark])) {
|
|
1105
1175
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -1148,7 +1218,9 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1148
1218
|
}
|
|
1149
1219
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1150
1220
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
1151
|
-
config.extensions[key] && Object.keys(config.extensions[key])
|
|
1221
|
+
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
1222
|
+
setExtensionEnv(key, config.extensions[key]);
|
|
1223
|
+
}
|
|
1152
1224
|
}
|
|
1153
1225
|
}, "setConfigEnv");
|
|
1154
1226
|
var setThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (prefix, config) => {
|
|
@@ -1729,11 +1801,11 @@ var LARGE_BUFFER2 = 1024 * 1e6;
|
|
|
1729
1801
|
|
|
1730
1802
|
|
|
1731
1803
|
// ../build-tools/src/config.ts
|
|
1732
|
-
var DEFAULT_COMPILED_BANNER =
|
|
1733
|
-
|
|
1804
|
+
var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
1805
|
+
*
|
|
1734
1806
|
* \u26A1 Built by Storm Software
|
|
1735
|
-
|
|
1736
|
-
|
|
1807
|
+
*
|
|
1808
|
+
*****************************************/
|
|
1737
1809
|
`;
|
|
1738
1810
|
var DEFAULT_ENVIRONMENT = "production";
|
|
1739
1811
|
var DEFAULT_TARGET = "esnext";
|
|
@@ -1756,7 +1828,7 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
|
|
|
1756
1828
|
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
1757
1829
|
var _glob = require('glob');
|
|
1758
1830
|
|
|
1759
|
-
var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot,
|
|
1831
|
+
var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
1760
1832
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
1761
1833
|
pendingAssets.push({
|
|
1762
1834
|
input: projectRoot,
|
|
@@ -1768,7 +1840,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
1768
1840
|
glob: "LICENSE",
|
|
1769
1841
|
output: "."
|
|
1770
1842
|
});
|
|
1771
|
-
if (
|
|
1843
|
+
if (generatePackageJson2 === false) {
|
|
1772
1844
|
pendingAssets.push({
|
|
1773
1845
|
input: projectRoot,
|
|
1774
1846
|
glob: "package.json",
|
|
@@ -1817,7 +1889,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
1817
1889
|
const projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
1818
1890
|
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
1819
1891
|
const localPackages = [];
|
|
1820
|
-
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
1892
|
+
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _98 => _98.node, 'access', _99 => _99.data, 'optionalAccess', _100 => _100.root]) !== projectRoot && _optionalChain([dep, 'access', _101 => _101.node, 'access', _102 => _102.data, 'optionalAccess', _103 => _103.root]) !== workspaceRoot3)) {
|
|
1821
1893
|
const projectNode = project.node;
|
|
1822
1894
|
if (projectNode.data.root) {
|
|
1823
1895
|
const projectPackageJsonPath = joinPaths(workspaceRoot3, projectNode.data.root, "package.json");
|
|
@@ -1836,11 +1908,11 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
1836
1908
|
const projectJson = JSON.parse(projectJsonFile);
|
|
1837
1909
|
const projectName2 = projectJson.name;
|
|
1838
1910
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1839
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
1911
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _104 => _104.projects, 'optionalAccess', _105 => _105[projectName2]])) {
|
|
1840
1912
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
1841
1913
|
}
|
|
1842
|
-
const implicitDependencies = _optionalChain([projectConfigurations, 'access',
|
|
1843
|
-
if (_optionalChain([projectConfigurations, 'access',
|
|
1914
|
+
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _106 => _106.projects, 'optionalAccess', _107 => _107[projectName2], 'access', _108 => _108.implicitDependencies, 'optionalAccess', _109 => _109.reduce, 'call', _110 => _110((ret, dep) => {
|
|
1915
|
+
if (_optionalChain([projectConfigurations, 'access', _111 => _111.projects, 'optionalAccess', _112 => _112[dep]])) {
|
|
1844
1916
|
const depPackageJsonPath = joinPaths(workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
|
|
1845
1917
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
1846
1918
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
@@ -1853,13 +1925,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
1853
1925
|
return ret;
|
|
1854
1926
|
}, [])]);
|
|
1855
1927
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
1856
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess',
|
|
1928
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _113 => _113.includes, 'call', _114 => _114(localPackage.name)])) {
|
|
1857
1929
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
1858
1930
|
}
|
|
1859
1931
|
return ret;
|
|
1860
1932
|
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
1861
1933
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
1862
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess',
|
|
1934
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _115 => _115.includes, 'call', _116 => _116(localPackage.name)])) {
|
|
1863
1935
|
ret[localPackage.name] = localPackage.version || "0.0.1";
|
|
1864
1936
|
}
|
|
1865
1937
|
return ret;
|
|
@@ -1914,37 +1986,17 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
1914
1986
|
packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
|
|
1915
1987
|
return packageJson;
|
|
1916
1988
|
}, "addWorkspacePackageJsonFields");
|
|
1917
|
-
var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
1918
|
-
let entry = file.replaceAll("\\", "/");
|
|
1919
|
-
if (sourceRoot) {
|
|
1920
|
-
entry = entry.replace(sourceRoot, "");
|
|
1921
|
-
}
|
|
1922
|
-
return {
|
|
1923
|
-
import: {
|
|
1924
|
-
types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
|
|
1925
|
-
default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
|
|
1926
|
-
},
|
|
1927
|
-
require: {
|
|
1928
|
-
types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
|
|
1929
|
-
default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
|
|
1930
|
-
},
|
|
1931
|
-
default: {
|
|
1932
|
-
types: `./dist/${entry}.d.ts`,
|
|
1933
|
-
default: `./dist/${entry}.js`
|
|
1934
|
-
}
|
|
1935
|
-
};
|
|
1936
|
-
}, "addPackageJsonExport");
|
|
1937
1989
|
|
|
1938
1990
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
1939
1991
|
|
|
1940
1992
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
1941
|
-
const workspaceRoot3 = config.workspaceRoot
|
|
1993
|
+
const workspaceRoot3 = config.workspaceRoot || findWorkspaceRoot();
|
|
1942
1994
|
const entryPoints = [];
|
|
1943
1995
|
if (entry) {
|
|
1944
|
-
if (
|
|
1945
|
-
entryPoints.push(...entry);
|
|
1946
|
-
} else if (typeof entry === "string") {
|
|
1996
|
+
if (typeof entry === "string") {
|
|
1947
1997
|
entryPoints.push(entry);
|
|
1998
|
+
} else if (Array.isArray(entry)) {
|
|
1999
|
+
entryPoints.push(...entry);
|
|
1948
2000
|
} else {
|
|
1949
2001
|
entryPoints.push(...Object.values(entry));
|
|
1950
2002
|
}
|
|
@@ -1952,27 +2004,38 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1952
2004
|
if (emitOnAll) {
|
|
1953
2005
|
entryPoints.push(joinPaths(workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
1954
2006
|
}
|
|
1955
|
-
const results =
|
|
1956
|
-
|
|
2007
|
+
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
2008
|
+
const paths = [];
|
|
1957
2009
|
if (entryPoint.includes("*")) {
|
|
1958
2010
|
const files = await _glob.glob.call(void 0, entryPoint, {
|
|
1959
|
-
withFileTypes: true
|
|
2011
|
+
withFileTypes: true,
|
|
2012
|
+
ignore: [
|
|
2013
|
+
"**/node_modules/**"
|
|
2014
|
+
]
|
|
1960
2015
|
});
|
|
1961
|
-
|
|
2016
|
+
paths.push(...files.reduce((ret, filePath) => {
|
|
1962
2017
|
const result = correctPaths(joinPaths(filePath.path, filePath.name).replaceAll(correctPaths(workspaceRoot3), "").replaceAll(correctPaths(projectRoot), ""));
|
|
1963
2018
|
if (result) {
|
|
1964
2019
|
writeDebug(`Trying to add entry point ${result} at "${joinPaths(filePath.path, filePath.name)}"`, config);
|
|
1965
|
-
if (!
|
|
1966
|
-
|
|
2020
|
+
if (!paths.includes(result)) {
|
|
2021
|
+
paths.push(result);
|
|
1967
2022
|
}
|
|
1968
2023
|
}
|
|
1969
2024
|
return ret;
|
|
1970
2025
|
}, []));
|
|
1971
2026
|
} else {
|
|
1972
|
-
|
|
2027
|
+
paths.push(entryPoint);
|
|
1973
2028
|
}
|
|
1974
|
-
|
|
1975
|
-
|
|
2029
|
+
return paths;
|
|
2030
|
+
}));
|
|
2031
|
+
return results.filter(Boolean).reduce((ret, result) => {
|
|
2032
|
+
result.forEach((res) => {
|
|
2033
|
+
if (res && !ret.includes(res)) {
|
|
2034
|
+
ret.push(res);
|
|
2035
|
+
}
|
|
2036
|
+
});
|
|
2037
|
+
return ret;
|
|
2038
|
+
}, []);
|
|
1976
2039
|
}, "getEntryPoints");
|
|
1977
2040
|
|
|
1978
2041
|
// ../build-tools/src/utilities/get-env.ts
|
|
@@ -1981,7 +2044,7 @@ var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, opti
|
|
|
1981
2044
|
STORM_BUILD: builder,
|
|
1982
2045
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
1983
2046
|
STORM_NAME: options.name,
|
|
1984
|
-
|
|
2047
|
+
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
1985
2048
|
STORM_PLATFORM: options.platform,
|
|
1986
2049
|
STORM_FORMAT: JSON.stringify(options.format),
|
|
1987
2050
|
STORM_TARGET: JSON.stringify(options.target),
|
|
@@ -1989,28 +2052,6 @@ var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, opti
|
|
|
1989
2052
|
};
|
|
1990
2053
|
}, "getEnv");
|
|
1991
2054
|
|
|
1992
|
-
// ../build-tools/src/utilities/get-out-extension.ts
|
|
1993
|
-
function getOutExtension(format2, pkgType) {
|
|
1994
|
-
let jsExtension = ".js";
|
|
1995
|
-
let dtsExtension = ".d.ts";
|
|
1996
|
-
if (pkgType === "module" && format2 === "cjs") {
|
|
1997
|
-
jsExtension = ".cjs";
|
|
1998
|
-
dtsExtension = ".d.cts";
|
|
1999
|
-
}
|
|
2000
|
-
if (pkgType !== "module" && format2 === "esm") {
|
|
2001
|
-
jsExtension = ".mjs";
|
|
2002
|
-
dtsExtension = ".d.mts";
|
|
2003
|
-
}
|
|
2004
|
-
if (format2 === "iife") {
|
|
2005
|
-
jsExtension = ".global.js";
|
|
2006
|
-
}
|
|
2007
|
-
return {
|
|
2008
|
-
js: jsExtension,
|
|
2009
|
-
dts: dtsExtension
|
|
2010
|
-
};
|
|
2011
|
-
}
|
|
2012
|
-
_chunk3GQAWCBQjs.__name.call(void 0, getOutExtension, "getOutExtension");
|
|
2013
|
-
|
|
2014
2055
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
2015
2056
|
|
|
2016
2057
|
|
|
@@ -2095,15 +2136,15 @@ var RendererEngine = class {
|
|
|
2095
2136
|
if (!relativePath.startsWith("\\\\?\\")) {
|
|
2096
2137
|
relativePath = relativePath.replace(/\\/g, "/");
|
|
2097
2138
|
}
|
|
2098
|
-
const meta = _optionalChain([metafile, 'optionalAccess',
|
|
2139
|
+
const meta = _optionalChain([metafile, 'optionalAccess', _117 => _117.outputs, 'access', _118 => _118[relativePath]]);
|
|
2099
2140
|
return {
|
|
2100
2141
|
type: "chunk",
|
|
2101
2142
|
path: file.path,
|
|
2102
2143
|
code: file.text,
|
|
2103
|
-
map: _optionalChain([outputFiles, 'access',
|
|
2104
|
-
entryPoint: _optionalChain([meta, 'optionalAccess',
|
|
2105
|
-
exports: _optionalChain([meta, 'optionalAccess',
|
|
2106
|
-
imports: _optionalChain([meta, 'optionalAccess',
|
|
2144
|
+
map: _optionalChain([outputFiles, 'access', _119 => _119.find, 'call', _120 => _120((f) => f.path === `${file.path}.map`), 'optionalAccess', _121 => _121.text]),
|
|
2145
|
+
entryPoint: _optionalChain([meta, 'optionalAccess', _122 => _122.entryPoint]),
|
|
2146
|
+
exports: _optionalChain([meta, 'optionalAccess', _123 => _123.exports]),
|
|
2147
|
+
imports: _optionalChain([meta, 'optionalAccess', _124 => _124.imports])
|
|
2107
2148
|
};
|
|
2108
2149
|
} else {
|
|
2109
2150
|
return {
|
|
@@ -2184,9 +2225,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
|
2184
2225
|
|
|
2185
2226
|
var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2186
2227
|
name: "storm:esm-split-code-to-cjs",
|
|
2187
|
-
setup(
|
|
2188
|
-
|
|
2189
|
-
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access',
|
|
2228
|
+
setup(build4) {
|
|
2229
|
+
build4.onEnd(async (result) => {
|
|
2230
|
+
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _125 => _125.metafile, 'optionalAccess', _126 => _126.outputs]), () => ( {})));
|
|
2190
2231
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
2191
2232
|
await esbuild.build({
|
|
2192
2233
|
outdir: resolvedOptions.outdir,
|
|
@@ -2203,15 +2244,15 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
2203
2244
|
// ../esbuild/src/plugins/fix-imports.ts
|
|
2204
2245
|
var fixImportsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2205
2246
|
name: "storm:fix-imports",
|
|
2206
|
-
setup(
|
|
2207
|
-
|
|
2247
|
+
setup(build4) {
|
|
2248
|
+
build4.onResolve({
|
|
2208
2249
|
filter: /^spdx-exceptions/
|
|
2209
2250
|
}, () => {
|
|
2210
2251
|
return {
|
|
2211
2252
|
path: _chunk3GQAWCBQjs.__require.resolve("spdx-exceptions")
|
|
2212
2253
|
};
|
|
2213
2254
|
});
|
|
2214
|
-
|
|
2255
|
+
build4.onResolve({
|
|
2215
2256
|
filter: /^spdx-license-ids/
|
|
2216
2257
|
}, () => {
|
|
2217
2258
|
return {
|
|
@@ -2226,8 +2267,8 @@ var fixImportsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (opt
|
|
|
2226
2267
|
var nativeNodeModulesPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => {
|
|
2227
2268
|
return {
|
|
2228
2269
|
name: "native-node-modules",
|
|
2229
|
-
setup(
|
|
2230
|
-
|
|
2270
|
+
setup(build4) {
|
|
2271
|
+
build4.onResolve({
|
|
2231
2272
|
filter: /\.node$/,
|
|
2232
2273
|
namespace: "file"
|
|
2233
2274
|
}, (args) => {
|
|
@@ -2246,7 +2287,7 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
2246
2287
|
path: resolvedId
|
|
2247
2288
|
};
|
|
2248
2289
|
});
|
|
2249
|
-
|
|
2290
|
+
build4.onLoad({
|
|
2250
2291
|
filter: /.*/,
|
|
2251
2292
|
namespace: "node-file"
|
|
2252
2293
|
}, (args) => {
|
|
@@ -2259,14 +2300,14 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
2259
2300
|
resolveDir: _path.dirname.call(void 0, args.path)
|
|
2260
2301
|
};
|
|
2261
2302
|
});
|
|
2262
|
-
|
|
2303
|
+
build4.onResolve({
|
|
2263
2304
|
filter: /\.node$/,
|
|
2264
2305
|
namespace: "node-file"
|
|
2265
2306
|
}, (args) => ({
|
|
2266
2307
|
path: args.path,
|
|
2267
2308
|
namespace: "file"
|
|
2268
2309
|
}));
|
|
2269
|
-
const opts =
|
|
2310
|
+
const opts = build4.initialOptions;
|
|
2270
2311
|
opts.loader = opts.loader || {};
|
|
2271
2312
|
opts.loader[".node"] = "file";
|
|
2272
2313
|
}
|
|
@@ -2292,8 +2333,8 @@ var nodeProtocolPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
2292
2333
|
// ../esbuild/src/plugins/on-error.ts
|
|
2293
2334
|
var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2294
2335
|
name: "storm:on-error",
|
|
2295
|
-
setup(
|
|
2296
|
-
|
|
2336
|
+
setup(build4) {
|
|
2337
|
+
build4.onEnd((result) => {
|
|
2297
2338
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
2298
2339
|
writeError(`The following errors occurred during the build:
|
|
2299
2340
|
${result.errors.map((error) => error.text).join("\n")}
|
|
@@ -2308,7 +2349,7 @@ ${result.errors.map((error) => error.text).join("\n")}
|
|
|
2308
2349
|
// ../esbuild/src/plugins/resolve-paths.ts
|
|
2309
2350
|
|
|
2310
2351
|
function resolvePathsConfig(options, cwd) {
|
|
2311
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
2352
|
+
if (_optionalChain([options, 'optionalAccess', _127 => _127.compilerOptions, 'optionalAccess', _128 => _128.paths])) {
|
|
2312
2353
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
2313
2354
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
2314
2355
|
return [
|
|
@@ -2329,14 +2370,14 @@ function resolvePathsConfig(options, cwd) {
|
|
|
2329
2370
|
_chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
2330
2371
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2331
2372
|
name: "storm:resolve-paths",
|
|
2332
|
-
setup(
|
|
2333
|
-
const parentTsConfig =
|
|
2373
|
+
setup(build4) {
|
|
2374
|
+
const parentTsConfig = build4.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, joinPaths(resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
2334
2375
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
2335
2376
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
2336
|
-
|
|
2377
|
+
build4.onResolve({
|
|
2337
2378
|
filter: packagesRegex
|
|
2338
2379
|
}, (args) => {
|
|
2339
|
-
if (_optionalChain([
|
|
2380
|
+
if (_optionalChain([build4, 'access', _129 => _129.initialOptions, 'access', _130 => _130.external, 'optionalAccess', _131 => _131.includes, 'call', _132 => _132(args.path)])) {
|
|
2340
2381
|
return {
|
|
2341
2382
|
path: args.path,
|
|
2342
2383
|
external: true
|
|
@@ -2384,6 +2425,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
2384
2425
|
overrideTsconfig: {
|
|
2385
2426
|
compilerOptions: {
|
|
2386
2427
|
paths: {}
|
|
2428
|
+
// bug with api extract + paths
|
|
2387
2429
|
}
|
|
2388
2430
|
}
|
|
2389
2431
|
},
|
|
@@ -2410,11 +2452,11 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
2410
2452
|
_chunk3GQAWCBQjs.__name.call(void 0, bundleTypeDefinitions, "bundleTypeDefinitions");
|
|
2411
2453
|
var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
2412
2454
|
name: "storm:tsc",
|
|
2413
|
-
setup(
|
|
2455
|
+
setup(build4) {
|
|
2414
2456
|
if (options.emitTypes === false) {
|
|
2415
2457
|
return;
|
|
2416
2458
|
}
|
|
2417
|
-
|
|
2459
|
+
build4.onStart(async () => {
|
|
2418
2460
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
2419
2461
|
await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
2420
2462
|
}
|
|
@@ -2429,7 +2471,7 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
2429
2471
|
} else if (_fs.existsSync.call(void 0, joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
2430
2472
|
dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
2431
2473
|
}
|
|
2432
|
-
const ext = resolvedOptions.
|
|
2474
|
+
const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
2433
2475
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
2434
2476
|
bundleTypeDefinitions(dtsPath, bundlePath, _nullishCoalesce(resolvedOptions.external, () => ( [])), resolvedOptions);
|
|
2435
2477
|
const dtsContents = await _promises2.default.readFile(`${bundlePath}.d.ts`, "utf8");
|
|
@@ -2444,16 +2486,13 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
2444
2486
|
function getTypeDependencyPackageName(npmPackage) {
|
|
2445
2487
|
if (npmPackage.startsWith("@")) {
|
|
2446
2488
|
const [scope, name] = npmPackage.split("/");
|
|
2447
|
-
return `@types/${_optionalChain([scope, 'optionalAccess',
|
|
2489
|
+
return `@types/${_optionalChain([scope, 'optionalAccess', _133 => _133.slice, 'call', _134 => _134(1)])}__${name}`;
|
|
2448
2490
|
}
|
|
2449
2491
|
return `@types/${npmPackage}`;
|
|
2450
2492
|
}
|
|
2451
2493
|
_chunk3GQAWCBQjs.__name.call(void 0, getTypeDependencyPackageName, "getTypeDependencyPackageName");
|
|
2452
2494
|
|
|
2453
2495
|
// ../esbuild/src/config.ts
|
|
2454
|
-
var getOutputExtensionMap = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, pkgType) => {
|
|
2455
|
-
return options.outExtension ? options.outExtension(options.format, pkgType) : getOutExtension(options.format, pkgType);
|
|
2456
|
-
}, "getOutputExtensionMap");
|
|
2457
2496
|
var getDefaultBuildPlugins = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => [
|
|
2458
2497
|
nodeProtocolPlugin(options, resolvedOptions),
|
|
2459
2498
|
resolvePathsPlugin(options, resolvedOptions),
|
|
@@ -2470,7 +2509,7 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
2470
2509
|
external: [],
|
|
2471
2510
|
logLevel: "error",
|
|
2472
2511
|
tsconfig: "tsconfig.json",
|
|
2473
|
-
|
|
2512
|
+
mode: "production",
|
|
2474
2513
|
keepNames: true,
|
|
2475
2514
|
metafile: true,
|
|
2476
2515
|
injectShims: true,
|
|
@@ -2479,6 +2518,18 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
2479
2518
|
bundle: true,
|
|
2480
2519
|
clean: true,
|
|
2481
2520
|
debug: false,
|
|
2521
|
+
resolveExtensions: [
|
|
2522
|
+
".tsx",
|
|
2523
|
+
".ts",
|
|
2524
|
+
".cts",
|
|
2525
|
+
".mts",
|
|
2526
|
+
".jsx",
|
|
2527
|
+
".js",
|
|
2528
|
+
".cjs",
|
|
2529
|
+
".mjs",
|
|
2530
|
+
".css",
|
|
2531
|
+
".json"
|
|
2532
|
+
],
|
|
2482
2533
|
loader: {
|
|
2483
2534
|
".aac": "file",
|
|
2484
2535
|
".css": "file",
|
|
@@ -2537,7 +2588,7 @@ var missingIgnore = [
|
|
|
2537
2588
|
];
|
|
2538
2589
|
var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bundle) => ({
|
|
2539
2590
|
name: "storm:deps-check",
|
|
2540
|
-
setup(
|
|
2591
|
+
setup(build4) {
|
|
2541
2592
|
const pkgJsonPath = path6.default.join(process.cwd(), "package.json");
|
|
2542
2593
|
const pkgContents = _chunk3GQAWCBQjs.__require.call(void 0, pkgJsonPath);
|
|
2543
2594
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
@@ -2549,7 +2600,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
2549
2600
|
];
|
|
2550
2601
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2551
2602
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2552
|
-
|
|
2603
|
+
build4.onResolve({
|
|
2553
2604
|
filter: onlyPackages
|
|
2554
2605
|
}, (args) => {
|
|
2555
2606
|
if (args.importer.includes(process.cwd())) {
|
|
@@ -2565,7 +2616,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
2565
2616
|
external: true
|
|
2566
2617
|
};
|
|
2567
2618
|
});
|
|
2568
|
-
|
|
2619
|
+
build4.onEnd(() => {
|
|
2569
2620
|
const unusedDependencies = [
|
|
2570
2621
|
...dependencies
|
|
2571
2622
|
].filter((dep) => {
|
|
@@ -2651,7 +2702,7 @@ function pipeSync(fn, ...fns) {
|
|
|
2651
2702
|
return (...args) => {
|
|
2652
2703
|
let result = fn(...args);
|
|
2653
2704
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2654
|
-
result = _optionalChain([fns, 'access',
|
|
2705
|
+
result = _optionalChain([fns, 'access', _135 => _135[i], 'optionalCall', _136 => _136(result)]);
|
|
2655
2706
|
}
|
|
2656
2707
|
return result;
|
|
2657
2708
|
};
|
|
@@ -2661,7 +2712,7 @@ function pipeAsync(fn, ...fns) {
|
|
|
2661
2712
|
return async (...args) => {
|
|
2662
2713
|
let result = await fn(...args);
|
|
2663
2714
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2664
|
-
result = await _optionalChain([fns, 'access',
|
|
2715
|
+
result = await _optionalChain([fns, 'access', _137 => _137[i], 'optionalCall', _138 => _138(result)]);
|
|
2665
2716
|
}
|
|
2666
2717
|
return result;
|
|
2667
2718
|
};
|
|
@@ -2691,7 +2742,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2691
2742
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2692
2743
|
const projectName = projectJson.name;
|
|
2693
2744
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2694
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2745
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _139 => _139.projects, 'optionalAccess', _140 => _140[projectName]])) {
|
|
2695
2746
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
2696
2747
|
}
|
|
2697
2748
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
@@ -2701,9 +2752,6 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2701
2752
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2702
2753
|
throw new Error("Cannot find package.json configuration");
|
|
2703
2754
|
}
|
|
2704
|
-
const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
|
|
2705
|
-
const packageJson = JSON.parse(packageJsonFile);
|
|
2706
|
-
const outExtension = getOutputExtensionMap(options, packageJson.type);
|
|
2707
2755
|
const env = getEnv("esbuild", options);
|
|
2708
2756
|
const result = {
|
|
2709
2757
|
...options,
|
|
@@ -2716,18 +2764,12 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2716
2764
|
"module",
|
|
2717
2765
|
"main"
|
|
2718
2766
|
],
|
|
2719
|
-
resolveExtensions: [
|
|
2720
|
-
".ts",
|
|
2721
|
-
".js",
|
|
2722
|
-
".node"
|
|
2723
|
-
],
|
|
2724
2767
|
...userOptions,
|
|
2725
2768
|
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
2726
2769
|
format: options.format || "cjs",
|
|
2727
|
-
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry
|
|
2728
|
-
"./src/index.ts"
|
|
2729
|
-
], userOptions.emitOnAll),
|
|
2770
|
+
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), userOptions.emitOnAll === true),
|
|
2730
2771
|
outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
|
|
2772
|
+
distDir: userOptions.distDir || "dist",
|
|
2731
2773
|
plugins: [],
|
|
2732
2774
|
name: userOptions.name || projectName,
|
|
2733
2775
|
projectConfigurations,
|
|
@@ -2746,7 +2788,6 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2746
2788
|
bundle: userOptions.bundle !== false,
|
|
2747
2789
|
keepNames: true,
|
|
2748
2790
|
watch: userOptions.watch === true,
|
|
2749
|
-
outExtension,
|
|
2750
2791
|
footer: userOptions.footer,
|
|
2751
2792
|
banner: {
|
|
2752
2793
|
js: options.banner || DEFAULT_COMPILED_BANNER,
|
|
@@ -2763,20 +2804,22 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2763
2804
|
...options.define,
|
|
2764
2805
|
...Object.keys(env || {}).reduce((res, key) => {
|
|
2765
2806
|
const value = JSON.stringify(env[key]);
|
|
2807
|
+
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
2766
2808
|
return {
|
|
2767
2809
|
...res,
|
|
2768
|
-
[`process.env.${
|
|
2769
|
-
[`import.meta.env.${
|
|
2810
|
+
[`process.env.${safeKey}`]: value,
|
|
2811
|
+
[`import.meta.env.${safeKey}`]: value
|
|
2770
2812
|
};
|
|
2771
2813
|
}, {})
|
|
2772
2814
|
},
|
|
2773
|
-
inject: [
|
|
2815
|
+
inject: _defu2.default.call(void 0, [
|
|
2774
2816
|
options.format === "cjs" && options.injectShims ? joinPaths(__dirname, "../assets/cjs_shims.js") : "",
|
|
2775
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ? joinPaths(__dirname, "../assets/esm_shims.js") : ""
|
|
2776
|
-
|
|
2777
|
-
].filter(Boolean)
|
|
2817
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? joinPaths(__dirname, "../assets/esm_shims.js") : ""
|
|
2818
|
+
], _nullishCoalesce(options.inject, () => ( []))).filter(Boolean)
|
|
2778
2819
|
};
|
|
2779
2820
|
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( getDefaultBuildPlugins(userOptions, result)));
|
|
2821
|
+
delete result.entry;
|
|
2822
|
+
delete result.outputPath;
|
|
2780
2823
|
stopwatch();
|
|
2781
2824
|
return result;
|
|
2782
2825
|
}, "resolveOptions");
|
|
@@ -2797,7 +2840,7 @@ async function generatePackageJson(context2) {
|
|
|
2797
2840
|
packageJson = await addWorkspacePackageJsonFields(context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
2798
2841
|
packageJson.exports ??= {};
|
|
2799
2842
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
2800
|
-
packageJson.exports["."] ??=
|
|
2843
|
+
packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
|
|
2801
2844
|
let entryPoints = [
|
|
2802
2845
|
{
|
|
2803
2846
|
in: "./src/index.ts",
|
|
@@ -2815,12 +2858,15 @@ async function generatePackageJson(context2) {
|
|
|
2815
2858
|
const split = entryPoint.out.split(".");
|
|
2816
2859
|
split.pop();
|
|
2817
2860
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
2818
|
-
packageJson.exports[`./${entry}`] ??=
|
|
2861
|
+
packageJson.exports[`./${entry}`] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/${entry}.js`;
|
|
2819
2862
|
}
|
|
2820
2863
|
}
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2864
|
+
if (context2.options.format === "esm") {
|
|
2865
|
+
packageJson.module = packageJson.type === "module" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.mjs`;
|
|
2866
|
+
} else {
|
|
2867
|
+
packageJson.main = packageJson.type === "commonjs" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.cjs`;
|
|
2868
|
+
}
|
|
2869
|
+
packageJson.types = `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.d.ts`;
|
|
2824
2870
|
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
2825
2871
|
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
2826
2872
|
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
@@ -2855,11 +2901,38 @@ _chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
|
2855
2901
|
async function executeEsBuild(context2) {
|
|
2856
2902
|
writeDebug(` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
2857
2903
|
const stopwatch = getStopwatch(`${context2.options.name} build`);
|
|
2858
|
-
if (process.env.
|
|
2904
|
+
if (process.env.STORM_WATCH) {
|
|
2859
2905
|
const ctx = await esbuild2.context(context2.options);
|
|
2860
2906
|
watch(ctx, context2.options);
|
|
2861
2907
|
}
|
|
2862
|
-
const
|
|
2908
|
+
const options = {
|
|
2909
|
+
...context2.options
|
|
2910
|
+
};
|
|
2911
|
+
options.outdir = joinPaths(context2.options.outdir, context2.options.distDir);
|
|
2912
|
+
delete options.env;
|
|
2913
|
+
delete options.name;
|
|
2914
|
+
delete options.assets;
|
|
2915
|
+
delete options.mode;
|
|
2916
|
+
delete options.orgName;
|
|
2917
|
+
delete options.watch;
|
|
2918
|
+
delete options.clean;
|
|
2919
|
+
delete options.debug;
|
|
2920
|
+
delete options.generatePackageJson;
|
|
2921
|
+
delete options.emitOnAll;
|
|
2922
|
+
delete options.distDir;
|
|
2923
|
+
delete options.includeSrc;
|
|
2924
|
+
delete options.verbose;
|
|
2925
|
+
delete options.projectRoot;
|
|
2926
|
+
delete options.projectName;
|
|
2927
|
+
delete options.projectGraph;
|
|
2928
|
+
delete options.projectConfigurations;
|
|
2929
|
+
delete options.renderers;
|
|
2930
|
+
delete options.config;
|
|
2931
|
+
delete options.injectShims;
|
|
2932
|
+
writeTrace(`Run esbuild (${context2.options.name}) with the following options:
|
|
2933
|
+
${formatLogMessage(options)}`, context2.options.config);
|
|
2934
|
+
const result = await esbuild2.build(options);
|
|
2935
|
+
await esbuild2.stop();
|
|
2863
2936
|
if (result.metafile) {
|
|
2864
2937
|
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
|
2865
2938
|
await _promises2.default.writeFile(metafilePath, JSON.stringify(result.metafile));
|
|
@@ -2869,7 +2942,7 @@ async function executeEsBuild(context2) {
|
|
|
2869
2942
|
}
|
|
2870
2943
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
2871
2944
|
async function copyBuildAssets(context2) {
|
|
2872
|
-
if (_optionalChain([context2, 'access',
|
|
2945
|
+
if (_optionalChain([context2, 'access', _141 => _141.result, 'optionalAccess', _142 => _142.errors, 'access', _143 => _143.length]) === 0) {
|
|
2873
2946
|
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
2874
2947
|
const stopwatch = getStopwatch(`${context2.options.name} asset copy`);
|
|
2875
2948
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
@@ -2879,7 +2952,7 @@ async function copyBuildAssets(context2) {
|
|
|
2879
2952
|
}
|
|
2880
2953
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
2881
2954
|
async function reportResults(context2) {
|
|
2882
|
-
if (_optionalChain([context2, 'access',
|
|
2955
|
+
if (_optionalChain([context2, 'access', _144 => _144.result, 'optionalAccess', _145 => _145.errors, 'access', _146 => _146.length]) === 0) {
|
|
2883
2956
|
if (context2.result.warnings.length > 0) {
|
|
2884
2957
|
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
2885
2958
|
}
|
|
@@ -2941,7 +3014,7 @@ async function build3(options) {
|
|
|
2941
3014
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
2942
3015
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
2943
3016
|
} catch (error) {
|
|
2944
|
-
writeFatal("
|
|
3017
|
+
writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
2945
3018
|
throw error;
|
|
2946
3019
|
} finally {
|
|
2947
3020
|
stopwatch();
|
|
@@ -2980,14 +3053,14 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
2980
3053
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
2981
3054
|
async function esbuildExecutorFn(options, context2, config) {
|
|
2982
3055
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
2983
|
-
if (!_optionalChain([context2, 'access',
|
|
3056
|
+
if (!_optionalChain([context2, 'access', _147 => _147.projectsConfigurations, 'optionalAccess', _148 => _148.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _149 => _149.projectsConfigurations, 'access', _150 => _150.projects, 'access', _151 => _151[context2.projectName], 'optionalAccess', _152 => _152.root])) {
|
|
2984
3057
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2985
3058
|
}
|
|
2986
3059
|
await build3({
|
|
2987
3060
|
...options,
|
|
2988
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
3061
|
+
projectRoot: _optionalChain([context2, 'access', _153 => _153.projectsConfigurations, 'access', _154 => _154.projects, 'optionalAccess', _155 => _155[context2.projectName], 'access', _156 => _156.root]),
|
|
2989
3062
|
projectName: context2.projectName,
|
|
2990
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
3063
|
+
sourceRoot: _optionalChain([context2, 'access', _157 => _157.projectsConfigurations, 'access', _158 => _158.projects, 'optionalAccess', _159 => _159[context2.projectName], 'optionalAccess', _160 => _160.sourceRoot]),
|
|
2991
3064
|
format: options.format,
|
|
2992
3065
|
platform: options.format
|
|
2993
3066
|
});
|
|
@@ -3030,7 +3103,7 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
3030
3103
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
3031
3104
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
3032
3105
|
async function sizeLimitExecutorFn(options, context2, config) {
|
|
3033
|
-
if (!_optionalChain([context2, 'optionalAccess',
|
|
3106
|
+
if (!_optionalChain([context2, 'optionalAccess', _161 => _161.projectName]) || !_optionalChain([context2, 'access', _162 => _162.projectsConfigurations, 'optionalAccess', _163 => _163.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
3034
3107
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
3035
3108
|
}
|
|
3036
3109
|
writeInfo(`\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
@@ -3039,7 +3112,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
3039
3112
|
_esbuild3.default,
|
|
3040
3113
|
_esbuildwhy2.default
|
|
3041
3114
|
], {
|
|
3042
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access',
|
|
3115
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _164 => _164.projectsConfigurations, 'access', _165 => _165.projects, 'access', _166 => _166[context2.projectName], 'optionalAccess', _167 => _167.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _168 => _168.projectsConfigurations, 'access', _169 => _169.projects, 'access', _170 => _170[context2.projectName], 'optionalAccess', _171 => _171.root]), () => ( "./")), "src")))
|
|
3043
3116
|
}).then((result) => {
|
|
3044
3117
|
writeInfo(`\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
3045
3118
|
});
|
|
@@ -3057,281 +3130,6 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
|
|
|
3057
3130
|
}
|
|
3058
3131
|
});
|
|
3059
3132
|
|
|
3060
|
-
// ../tsdown/src/build.ts
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
var _tsdown = require('tsdown');
|
|
3067
|
-
|
|
3068
|
-
// ../tsdown/src/clean.ts
|
|
3069
|
-
|
|
3070
|
-
async function cleanDirectories2(name = "TSDown", directory, config) {
|
|
3071
|
-
await _promises.rm.call(void 0, directory, {
|
|
3072
|
-
recursive: true,
|
|
3073
|
-
force: true
|
|
3074
|
-
});
|
|
3075
|
-
}
|
|
3076
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories2, "cleanDirectories");
|
|
3077
|
-
|
|
3078
|
-
// ../tsdown/src/config.ts
|
|
3079
|
-
var DEFAULT_BUILD_OPTIONS2 = {
|
|
3080
|
-
platform: "node",
|
|
3081
|
-
target: "node22",
|
|
3082
|
-
format: [
|
|
3083
|
-
"esm",
|
|
3084
|
-
"cjs"
|
|
3085
|
-
],
|
|
3086
|
-
tsconfig: "tsconfig.json",
|
|
3087
|
-
envName: "production",
|
|
3088
|
-
globalName: "globalThis",
|
|
3089
|
-
unused: {
|
|
3090
|
-
level: "error"
|
|
3091
|
-
},
|
|
3092
|
-
injectShims: true,
|
|
3093
|
-
watch: false,
|
|
3094
|
-
bundle: true,
|
|
3095
|
-
treeshake: true,
|
|
3096
|
-
clean: true,
|
|
3097
|
-
debug: false
|
|
3098
|
-
};
|
|
3099
|
-
|
|
3100
|
-
// ../tsdown/src/build.ts
|
|
3101
|
-
var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (userOptions) => {
|
|
3102
|
-
const projectRoot = userOptions.projectRoot;
|
|
3103
|
-
const workspaceRoot3 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
|
|
3104
|
-
if (!workspaceRoot3) {
|
|
3105
|
-
throw new Error("Cannot find Nx workspace root");
|
|
3106
|
-
}
|
|
3107
|
-
const config = await getConfig(workspaceRoot3.dir);
|
|
3108
|
-
writeDebug(" \u2699\uFE0F Resolving build options", config);
|
|
3109
|
-
const stopwatch = getStopwatch("Build options resolution");
|
|
3110
|
-
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
3111
|
-
exitOnError: true
|
|
3112
|
-
});
|
|
3113
|
-
const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
|
|
3114
|
-
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
3115
|
-
throw new Error("Cannot find project.json configuration");
|
|
3116
|
-
}
|
|
3117
|
-
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
3118
|
-
const projectJson = JSON.parse(projectJsonFile);
|
|
3119
|
-
const projectName = projectJson.name;
|
|
3120
|
-
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
3121
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _166 => _166.projects, 'optionalAccess', _167 => _167[projectName]])) {
|
|
3122
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
3123
|
-
}
|
|
3124
|
-
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
3125
|
-
options.name ??= `${projectName}-${options.format}`;
|
|
3126
|
-
options.target ??= DEFAULT_TARGET;
|
|
3127
|
-
const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
3128
|
-
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
3129
|
-
throw new Error("Cannot find package.json configuration");
|
|
3130
|
-
}
|
|
3131
|
-
const env = getEnv("tsdown", options);
|
|
3132
|
-
const result = {
|
|
3133
|
-
...options,
|
|
3134
|
-
config,
|
|
3135
|
-
...userOptions,
|
|
3136
|
-
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
3137
|
-
format: options.format || "cjs",
|
|
3138
|
-
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
3139
|
-
"./src/index.ts"
|
|
3140
|
-
], userOptions.emitOnAll),
|
|
3141
|
-
outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
|
|
3142
|
-
plugins: [],
|
|
3143
|
-
name: userOptions.name || projectName,
|
|
3144
|
-
projectConfigurations,
|
|
3145
|
-
projectName,
|
|
3146
|
-
projectGraph,
|
|
3147
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || joinPaths(projectRoot, "src"),
|
|
3148
|
-
minify: userOptions.minify || !userOptions.debug,
|
|
3149
|
-
verbose: userOptions.verbose || isVerbose() || userOptions.debug === true,
|
|
3150
|
-
includeSrc: userOptions.includeSrc === true,
|
|
3151
|
-
metafile: userOptions.metafile !== false,
|
|
3152
|
-
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
3153
|
-
clean: userOptions.clean !== false,
|
|
3154
|
-
emitOnAll: userOptions.emitOnAll === true,
|
|
3155
|
-
dts: userOptions.emitTypes === true ? {
|
|
3156
|
-
transformer: "oxc"
|
|
3157
|
-
} : userOptions.emitTypes,
|
|
3158
|
-
bundleDts: userOptions.emitTypes,
|
|
3159
|
-
assets: _nullishCoalesce(userOptions.assets, () => ( [])),
|
|
3160
|
-
shims: userOptions.injectShims !== true,
|
|
3161
|
-
bundle: userOptions.bundle !== false,
|
|
3162
|
-
watch: userOptions.watch === true,
|
|
3163
|
-
define: {
|
|
3164
|
-
STORM_FORMAT: JSON.stringify(options.format || "cjs"),
|
|
3165
|
-
...options.format === "cjs" && options.injectShims ? {
|
|
3166
|
-
"import.meta.url": "importMetaUrl"
|
|
3167
|
-
} : {},
|
|
3168
|
-
...Object.keys(env || {}).reduce((res, key) => {
|
|
3169
|
-
const value = JSON.stringify(env[key]);
|
|
3170
|
-
return {
|
|
3171
|
-
...res,
|
|
3172
|
-
[`process.env.${key}`]: value,
|
|
3173
|
-
[`import.meta.env.${key}`]: value
|
|
3174
|
-
};
|
|
3175
|
-
}, {}),
|
|
3176
|
-
...options.define
|
|
3177
|
-
}
|
|
3178
|
-
};
|
|
3179
|
-
stopwatch();
|
|
3180
|
-
return result;
|
|
3181
|
-
}, "resolveOptions");
|
|
3182
|
-
async function generatePackageJson2(options) {
|
|
3183
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, joinPaths(options.projectRoot, "package.json"))) {
|
|
3184
|
-
writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
|
|
3185
|
-
const stopwatch = getStopwatch("Write package.json file");
|
|
3186
|
-
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
3187
|
-
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
3188
|
-
throw new Error("Cannot find package.json configuration");
|
|
3189
|
-
}
|
|
3190
|
-
const packageJsonFile = await _promises2.default.readFile(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
3191
|
-
if (!packageJsonFile) {
|
|
3192
|
-
throw new Error("Cannot find package.json configuration file");
|
|
3193
|
-
}
|
|
3194
|
-
let packageJson = JSON.parse(packageJsonFile);
|
|
3195
|
-
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
3196
|
-
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
3197
|
-
packageJson.exports ??= {};
|
|
3198
|
-
packageJson.exports["./package.json"] ??= "./package.json";
|
|
3199
|
-
packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot);
|
|
3200
|
-
let entryPoints = [
|
|
3201
|
-
{
|
|
3202
|
-
in: "./src/index.ts",
|
|
3203
|
-
out: "./src/index.ts"
|
|
3204
|
-
}
|
|
3205
|
-
];
|
|
3206
|
-
if (options.entryPoints) {
|
|
3207
|
-
if (Array.isArray(options.entryPoints)) {
|
|
3208
|
-
entryPoints = options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
|
|
3209
|
-
in: entryPoint,
|
|
3210
|
-
out: entryPoint
|
|
3211
|
-
} : entryPoint);
|
|
3212
|
-
}
|
|
3213
|
-
for (const entryPoint of entryPoints) {
|
|
3214
|
-
const split = entryPoint.out.split(".");
|
|
3215
|
-
split.pop();
|
|
3216
|
-
const entry = split.join(".").replaceAll("\\", "/");
|
|
3217
|
-
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
|
|
3218
|
-
}
|
|
3219
|
-
}
|
|
3220
|
-
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
3221
|
-
packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
|
|
3222
|
-
packageJson.types = "./dist/index.d.ts";
|
|
3223
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
3224
|
-
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
3225
|
-
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
3226
|
-
}
|
|
3227
|
-
return ret;
|
|
3228
|
-
}, packageJson.exports);
|
|
3229
|
-
await _devkit.writeJsonFile.call(void 0, joinPaths(options.outdir, "package.json"), packageJson);
|
|
3230
|
-
stopwatch();
|
|
3231
|
-
}
|
|
3232
|
-
return options;
|
|
3233
|
-
}
|
|
3234
|
-
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
3235
|
-
async function executeTSDown(options) {
|
|
3236
|
-
writeDebug(` \u{1F680} Running ${options.name} build`, options.config);
|
|
3237
|
-
const stopwatch = getStopwatch(`${options.name} build`);
|
|
3238
|
-
await _tsdown.build.call(void 0, {
|
|
3239
|
-
...options,
|
|
3240
|
-
entry: options.entryPoints,
|
|
3241
|
-
outDir: options.outdir,
|
|
3242
|
-
config: false
|
|
3243
|
-
});
|
|
3244
|
-
stopwatch();
|
|
3245
|
-
return options;
|
|
3246
|
-
}
|
|
3247
|
-
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
3248
|
-
async function copyBuildAssets2(options) {
|
|
3249
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
3250
|
-
const stopwatch = getStopwatch(`${options.name} asset copy`);
|
|
3251
|
-
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
3252
|
-
stopwatch();
|
|
3253
|
-
return options;
|
|
3254
|
-
}
|
|
3255
|
-
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
3256
|
-
async function reportResults2(options) {
|
|
3257
|
-
writeSuccess(` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
3258
|
-
}
|
|
3259
|
-
_chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
|
|
3260
|
-
async function cleanOutputPath2(options) {
|
|
3261
|
-
if (options.clean !== false && options.outdir) {
|
|
3262
|
-
writeDebug(` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
3263
|
-
const stopwatch = getStopwatch(`${options.name} output clean`);
|
|
3264
|
-
await cleanDirectories2(options.name, options.outdir, options.config);
|
|
3265
|
-
stopwatch();
|
|
3266
|
-
}
|
|
3267
|
-
return options;
|
|
3268
|
-
}
|
|
3269
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
3270
|
-
async function build4(options) {
|
|
3271
|
-
writeDebug(` \u26A1 Executing Storm TSDown pipeline`);
|
|
3272
|
-
const stopwatch = getStopwatch("TSDown pipeline");
|
|
3273
|
-
try {
|
|
3274
|
-
const opts = Array.isArray(options) ? options : [
|
|
3275
|
-
options
|
|
3276
|
-
];
|
|
3277
|
-
if (opts.length === 0) {
|
|
3278
|
-
throw new Error("No build options were provided");
|
|
3279
|
-
}
|
|
3280
|
-
const resolved = await Promise.all(opts.map(async (opt) => await resolveOptions2(opt)));
|
|
3281
|
-
if (resolved.length > 0) {
|
|
3282
|
-
await cleanOutputPath2(resolved[0]);
|
|
3283
|
-
await generatePackageJson2(resolved[0]);
|
|
3284
|
-
await Promise.all(resolved.map(async (opt) => {
|
|
3285
|
-
await executeTSDown(opt);
|
|
3286
|
-
await copyBuildAssets2(opt);
|
|
3287
|
-
await reportResults2(opt);
|
|
3288
|
-
}));
|
|
3289
|
-
} else {
|
|
3290
|
-
writeWarning(" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
3291
|
-
}
|
|
3292
|
-
writeSuccess(" \u{1F3C1} TSDown pipeline build completed successfully");
|
|
3293
|
-
} catch (error) {
|
|
3294
|
-
writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
3295
|
-
throw error;
|
|
3296
|
-
} finally {
|
|
3297
|
-
stopwatch();
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
_chunk3GQAWCBQjs.__name.call(void 0, build4, "build");
|
|
3301
|
-
|
|
3302
|
-
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
3303
|
-
async function tsdownExecutorFn(options, context2, config) {
|
|
3304
|
-
writeInfo("\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
3305
|
-
if (!_optionalChain([context2, 'access', _168 => _168.projectsConfigurations, 'optionalAccess', _169 => _169.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _170 => _170.projectsConfigurations, 'access', _171 => _171.projects, 'access', _172 => _172[context2.projectName], 'optionalAccess', _173 => _173.root])) {
|
|
3306
|
-
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
3307
|
-
}
|
|
3308
|
-
await build4({
|
|
3309
|
-
...options,
|
|
3310
|
-
projectRoot: _optionalChain([context2, 'access', _174 => _174.projectsConfigurations, 'access', _175 => _175.projects, 'optionalAccess', _176 => _176[context2.projectName], 'access', _177 => _177.root]),
|
|
3311
|
-
projectName: context2.projectName,
|
|
3312
|
-
sourceRoot: _optionalChain([context2, 'access', _178 => _178.projectsConfigurations, 'access', _179 => _179.projects, 'optionalAccess', _180 => _180[context2.projectName], 'optionalAccess', _181 => _181.sourceRoot]),
|
|
3313
|
-
format: options.format,
|
|
3314
|
-
platform: options.platform
|
|
3315
|
-
});
|
|
3316
|
-
return {
|
|
3317
|
-
success: true
|
|
3318
|
-
};
|
|
3319
|
-
}
|
|
3320
|
-
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
3321
|
-
var executor_default8 = withRunExecutor("Storm TSDown build executor", tsdownExecutorFn, {
|
|
3322
|
-
skipReadingConfig: false,
|
|
3323
|
-
hooks: {
|
|
3324
|
-
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
3325
|
-
options.entry ??= [
|
|
3326
|
-
"src/index.ts"
|
|
3327
|
-
];
|
|
3328
|
-
options.outputPath ??= "dist/{projectRoot}";
|
|
3329
|
-
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
3330
|
-
return options;
|
|
3331
|
-
}, "applyDefaultOptions")
|
|
3332
|
-
}
|
|
3333
|
-
});
|
|
3334
|
-
|
|
3335
3133
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
3336
3134
|
var _fsextra = require('fs-extra');
|
|
3337
3135
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
@@ -3353,7 +3151,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
3353
3151
|
};
|
|
3354
3152
|
}
|
|
3355
3153
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
3356
|
-
var
|
|
3154
|
+
var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
|
|
3357
3155
|
skipReadingConfig: false,
|
|
3358
3156
|
hooks: {
|
|
3359
3157
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -3373,7 +3171,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
3373
3171
|
var _jiti = require('jiti');
|
|
3374
3172
|
async function unbuildExecutorFn(options, context2, config) {
|
|
3375
3173
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
3376
|
-
if (!_optionalChain([context2, 'access',
|
|
3174
|
+
if (!_optionalChain([context2, 'access', _172 => _172.projectsConfigurations, 'optionalAccess', _173 => _173.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
3377
3175
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
3378
3176
|
}
|
|
3379
3177
|
if (!context2.projectsConfigurations.projects[context2.projectName].root) {
|
|
@@ -3420,7 +3218,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
3420
3218
|
};
|
|
3421
3219
|
}
|
|
3422
3220
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
3423
|
-
var
|
|
3221
|
+
var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
|
|
3424
3222
|
skipReadingConfig: false,
|
|
3425
3223
|
hooks: {
|
|
3426
3224
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -3584,15 +3382,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3584
3382
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
3585
3383
|
let repository = {
|
|
3586
3384
|
type: "github",
|
|
3587
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
3385
|
+
url: _optionalChain([config, 'optionalAccess', _174 => _174.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _175 => _175.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _176 => _176.namespace]) || _optionalChain([config, 'optionalAccess', _177 => _177.name]) || "repository"}.git`
|
|
3588
3386
|
};
|
|
3589
3387
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
3590
3388
|
if (tree.exists("package.json")) {
|
|
3591
3389
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3592
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3390
|
+
if (_optionalChain([packageJson, 'optionalAccess', _178 => _178.repository])) {
|
|
3593
3391
|
repository = packageJson.repository;
|
|
3594
3392
|
}
|
|
3595
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3393
|
+
if (_optionalChain([packageJson, 'optionalAccess', _179 => _179.description])) {
|
|
3596
3394
|
description = packageJson.description;
|
|
3597
3395
|
}
|
|
3598
3396
|
}
|
|
@@ -3647,9 +3445,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3647
3445
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
3648
3446
|
...json,
|
|
3649
3447
|
pnpm: {
|
|
3650
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3448
|
+
..._optionalChain([json, 'optionalAccess', _180 => _180.pnpm]),
|
|
3651
3449
|
overrides: {
|
|
3652
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3450
|
+
..._optionalChain([json, 'optionalAccess', _181 => _181.pnpm, 'optionalAccess', _182 => _182.overrides]),
|
|
3653
3451
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
3654
3452
|
}
|
|
3655
3453
|
}
|
|
@@ -3663,10 +3461,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3663
3461
|
]);
|
|
3664
3462
|
if (tree.exists("package.json")) {
|
|
3665
3463
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3666
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3464
|
+
if (_optionalChain([packageJson, 'optionalAccess', _183 => _183.repository])) {
|
|
3667
3465
|
repository = packageJson.repository;
|
|
3668
3466
|
}
|
|
3669
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3467
|
+
if (_optionalChain([packageJson, 'optionalAccess', _184 => _184.description])) {
|
|
3670
3468
|
description = packageJson.description;
|
|
3671
3469
|
}
|
|
3672
3470
|
}
|
|
@@ -3714,24 +3512,24 @@ _chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
|
3714
3512
|
function createProjectTsConfigJson(tree, options) {
|
|
3715
3513
|
const tsconfig = {
|
|
3716
3514
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
3717
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3515
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _185 => _185.tsconfigOptions]), () => ( {})),
|
|
3718
3516
|
compilerOptions: {
|
|
3719
3517
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
3720
3518
|
outDir: joinPaths(_devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
3721
3519
|
noEmit: true,
|
|
3722
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3520
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _186 => _186.tsconfigOptions, 'optionalAccess', _187 => _187.compilerOptions]), () => ( {}))
|
|
3723
3521
|
},
|
|
3724
3522
|
files: [
|
|
3725
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3523
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _188 => _188.tsconfigOptions, 'optionalAccess', _189 => _189.files]), () => ( []))
|
|
3726
3524
|
],
|
|
3727
3525
|
include: [
|
|
3728
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3526
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _190 => _190.tsconfigOptions, 'optionalAccess', _191 => _191.include]), () => ( [])),
|
|
3729
3527
|
"src/**/*.ts",
|
|
3730
3528
|
"src/**/*.js",
|
|
3731
3529
|
"bin/**/*"
|
|
3732
3530
|
],
|
|
3733
3531
|
exclude: [
|
|
3734
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3532
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _192 => _192.tsconfigOptions, 'optionalAccess', _193 => _193.exclude]), () => ( [])),
|
|
3735
3533
|
"jest.config.ts",
|
|
3736
3534
|
"src/**/*.spec.ts",
|
|
3737
3535
|
"src/**/*.test.ts"
|
|
@@ -3742,8 +3540,8 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
3742
3540
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
3743
3541
|
async function normalizeOptions(tree, options, config) {
|
|
3744
3542
|
let importPath = options.importPath;
|
|
3745
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
3746
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
3543
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _194 => _194.namespace])) {
|
|
3544
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _195 => _195.namespace])}/${options.name}`;
|
|
3747
3545
|
}
|
|
3748
3546
|
if (options.publishable) {
|
|
3749
3547
|
if (!importPath) {
|
|
@@ -3875,7 +3673,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3875
3673
|
name: "StormWorkspaceConfiguration"
|
|
3876
3674
|
});
|
|
3877
3675
|
writeTrace(jsonSchema, config);
|
|
3878
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
3676
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _196 => _196.workspaceRoot]), () => ( findWorkspaceRoot())), _optionalChain([options, 'access', _197 => _197.outputFile, 'optionalAccess', _198 => _198.startsWith, 'call', _199 => _199("./")]) ? "" : "./");
|
|
3879
3677
|
writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
3880
3678
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
3881
3679
|
spaces: 2
|
|
@@ -4018,9 +3816,6 @@ async function presetGeneratorFn(tree, options) {
|
|
|
4018
3816
|
"storm",
|
|
4019
3817
|
"storm-stack",
|
|
4020
3818
|
"storm-ops",
|
|
4021
|
-
"acidic",
|
|
4022
|
-
"acidic-engine",
|
|
4023
|
-
"cyclone-ui",
|
|
4024
3819
|
"rust",
|
|
4025
3820
|
"nx",
|
|
4026
3821
|
"graphql",
|
|
@@ -4061,10 +3856,10 @@ async function presetGeneratorFn(tree, options) {
|
|
|
4061
3856
|
type: "github",
|
|
4062
3857
|
url: `${options.repositoryUrl}.git`
|
|
4063
3858
|
};
|
|
4064
|
-
json.packageManager ??= "pnpm@
|
|
3859
|
+
json.packageManager ??= "pnpm@10.3.0";
|
|
4065
3860
|
json.engines ??= {
|
|
4066
3861
|
node: ">=20.11.0",
|
|
4067
|
-
pnpm: ">=
|
|
3862
|
+
pnpm: ">=10.3.0"
|
|
4068
3863
|
};
|
|
4069
3864
|
json.prettier = "@storm-software/prettier/config.json";
|
|
4070
3865
|
json.nx ??= {
|
|
@@ -4217,6 +4012,199 @@ var _resolvelocalpackagedependencies = require('@nx/js/src/generators/release-ve
|
|
|
4217
4012
|
var _updatelockfile = require('@nx/js/src/generators/release-version/utils/update-lock-file');
|
|
4218
4013
|
|
|
4219
4014
|
// ../git-tools/src/types.ts
|
|
4015
|
+
var DEFAULT_COMMIT_TYPES = {
|
|
4016
|
+
/* --- Bumps version when selected --- */
|
|
4017
|
+
chore: {
|
|
4018
|
+
description: "Other changes that don't modify src or test files",
|
|
4019
|
+
title: "Chore",
|
|
4020
|
+
emoji: "\u2699\uFE0F ",
|
|
4021
|
+
semverBump: "patch",
|
|
4022
|
+
changelog: {
|
|
4023
|
+
title: "Miscellaneous",
|
|
4024
|
+
hidden: false
|
|
4025
|
+
}
|
|
4026
|
+
},
|
|
4027
|
+
fix: {
|
|
4028
|
+
description: "A change that resolves an issue previously identified with the package",
|
|
4029
|
+
title: "Bug Fix",
|
|
4030
|
+
emoji: "\u{1FAB2} ",
|
|
4031
|
+
semverBump: "patch",
|
|
4032
|
+
changelog: {
|
|
4033
|
+
title: "Bug Fixes",
|
|
4034
|
+
hidden: false
|
|
4035
|
+
}
|
|
4036
|
+
},
|
|
4037
|
+
feat: {
|
|
4038
|
+
description: "A change that adds a new feature to the package",
|
|
4039
|
+
title: "Feature",
|
|
4040
|
+
emoji: "\u{1F511} ",
|
|
4041
|
+
semverBump: "minor",
|
|
4042
|
+
changelog: {
|
|
4043
|
+
title: "Features",
|
|
4044
|
+
hidden: false
|
|
4045
|
+
}
|
|
4046
|
+
},
|
|
4047
|
+
ci: {
|
|
4048
|
+
description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
|
|
4049
|
+
title: "Continuous Integration",
|
|
4050
|
+
emoji: "\u{1F9F0} ",
|
|
4051
|
+
semverBump: "patch",
|
|
4052
|
+
changelog: {
|
|
4053
|
+
title: "Continuous Integration",
|
|
4054
|
+
hidden: false
|
|
4055
|
+
}
|
|
4056
|
+
},
|
|
4057
|
+
refactor: {
|
|
4058
|
+
description: "A code change that neither fixes a bug nor adds a feature",
|
|
4059
|
+
title: "Code Refactoring",
|
|
4060
|
+
emoji: "\u{1F9EA} ",
|
|
4061
|
+
semverBump: "patch",
|
|
4062
|
+
changelog: {
|
|
4063
|
+
title: "Source Code Improvements",
|
|
4064
|
+
hidden: false
|
|
4065
|
+
}
|
|
4066
|
+
},
|
|
4067
|
+
style: {
|
|
4068
|
+
description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
|
|
4069
|
+
title: "Style Improvements",
|
|
4070
|
+
emoji: "\u{1F48E} ",
|
|
4071
|
+
semverBump: "patch",
|
|
4072
|
+
changelog: {
|
|
4073
|
+
title: "Style Improvements",
|
|
4074
|
+
hidden: false
|
|
4075
|
+
}
|
|
4076
|
+
},
|
|
4077
|
+
perf: {
|
|
4078
|
+
description: "A code change that improves performance",
|
|
4079
|
+
title: "Performance Improvement",
|
|
4080
|
+
emoji: "\u23F1\uFE0F ",
|
|
4081
|
+
semverBump: "patch",
|
|
4082
|
+
changelog: {
|
|
4083
|
+
title: "Performance Improvements",
|
|
4084
|
+
hidden: false
|
|
4085
|
+
}
|
|
4086
|
+
},
|
|
4087
|
+
/* --- Does not bump version when selected --- */
|
|
4088
|
+
docs: {
|
|
4089
|
+
description: "A change that only includes documentation updates",
|
|
4090
|
+
title: "Documentation",
|
|
4091
|
+
emoji: "\u{1F4DC} ",
|
|
4092
|
+
semverBump: "none",
|
|
4093
|
+
changelog: {
|
|
4094
|
+
title: "Documentation",
|
|
4095
|
+
hidden: false
|
|
4096
|
+
}
|
|
4097
|
+
},
|
|
4098
|
+
test: {
|
|
4099
|
+
description: "Adding missing tests or correcting existing tests",
|
|
4100
|
+
title: "Testing",
|
|
4101
|
+
emoji: "\u{1F6A8} ",
|
|
4102
|
+
semverBump: "none",
|
|
4103
|
+
changelog: {
|
|
4104
|
+
title: "Testing",
|
|
4105
|
+
hidden: true
|
|
4106
|
+
}
|
|
4107
|
+
},
|
|
4108
|
+
/* --- Not included in commitlint but included in changelog --- */
|
|
4109
|
+
deps: {
|
|
4110
|
+
description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
|
|
4111
|
+
title: "Dependencies",
|
|
4112
|
+
emoji: "\u{1F4E6} ",
|
|
4113
|
+
hidden: true,
|
|
4114
|
+
semverBump: "patch",
|
|
4115
|
+
changelog: {
|
|
4116
|
+
title: "Dependency Upgrades",
|
|
4117
|
+
hidden: false
|
|
4118
|
+
}
|
|
4119
|
+
},
|
|
4120
|
+
/* --- Not included in commitlint or changelog --- */
|
|
4121
|
+
build: {
|
|
4122
|
+
description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
|
|
4123
|
+
title: "Build",
|
|
4124
|
+
emoji: "\u{1F6E0} ",
|
|
4125
|
+
hidden: true,
|
|
4126
|
+
semverBump: "none",
|
|
4127
|
+
changelog: {
|
|
4128
|
+
title: "Build",
|
|
4129
|
+
hidden: true
|
|
4130
|
+
}
|
|
4131
|
+
},
|
|
4132
|
+
release: {
|
|
4133
|
+
description: "Publishing a commit containing a newly released version",
|
|
4134
|
+
title: "Publish Release",
|
|
4135
|
+
emoji: "\u{1F680} ",
|
|
4136
|
+
hidden: true,
|
|
4137
|
+
semverBump: "none",
|
|
4138
|
+
changelog: {
|
|
4139
|
+
title: "Publish Release",
|
|
4140
|
+
hidden: true
|
|
4141
|
+
}
|
|
4142
|
+
}
|
|
4143
|
+
};
|
|
4144
|
+
var DEFAULT_COMMIT_QUESTIONS = {
|
|
4145
|
+
type: {
|
|
4146
|
+
type: "select",
|
|
4147
|
+
title: "Commit Type",
|
|
4148
|
+
description: "Select the commit type that best describes your changes",
|
|
4149
|
+
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
|
|
4150
|
+
ret[type] = DEFAULT_COMMIT_TYPES[type];
|
|
4151
|
+
return ret;
|
|
4152
|
+
}, {}),
|
|
4153
|
+
defaultValue: "chore",
|
|
4154
|
+
maxLength: 20,
|
|
4155
|
+
minLength: 3
|
|
4156
|
+
},
|
|
4157
|
+
scope: {
|
|
4158
|
+
type: "select",
|
|
4159
|
+
title: "Commit Scope",
|
|
4160
|
+
description: "Select the monorepo project that is primarily impacted by this change",
|
|
4161
|
+
enum: {},
|
|
4162
|
+
defaultValue: "monorepo",
|
|
4163
|
+
maxLength: 50,
|
|
4164
|
+
minLength: 1
|
|
4165
|
+
},
|
|
4166
|
+
subject: {
|
|
4167
|
+
type: "input",
|
|
4168
|
+
title: "Commit Subject",
|
|
4169
|
+
description: "Write a short, imperative tense description of the change",
|
|
4170
|
+
maxLength: 150,
|
|
4171
|
+
minLength: 3
|
|
4172
|
+
},
|
|
4173
|
+
body: {
|
|
4174
|
+
type: "input",
|
|
4175
|
+
title: "Commit Body",
|
|
4176
|
+
description: "Provide a longer description of the change",
|
|
4177
|
+
maxLength: 600
|
|
4178
|
+
},
|
|
4179
|
+
isBreaking: {
|
|
4180
|
+
type: "confirm",
|
|
4181
|
+
title: "Breaking Changes",
|
|
4182
|
+
description: "Are there any breaking changes as a result of this commit?",
|
|
4183
|
+
defaultValue: false
|
|
4184
|
+
},
|
|
4185
|
+
breakingBody: {
|
|
4186
|
+
type: "input",
|
|
4187
|
+
title: "Breaking Changes (Details)",
|
|
4188
|
+
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
4189
|
+
when: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (answers) => answers.isBreaking === true, "when"),
|
|
4190
|
+
maxLength: 600,
|
|
4191
|
+
minLength: 3
|
|
4192
|
+
},
|
|
4193
|
+
isIssueAffected: {
|
|
4194
|
+
type: "confirm",
|
|
4195
|
+
title: "Open Issue Affected",
|
|
4196
|
+
description: "Does this change impact any open issues?",
|
|
4197
|
+
defaultValue: false
|
|
4198
|
+
},
|
|
4199
|
+
issuesBody: {
|
|
4200
|
+
type: "input",
|
|
4201
|
+
title: "Open Issue Affected (Details)",
|
|
4202
|
+
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
4203
|
+
when: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (answers) => answers.isIssueAffected === true, "when"),
|
|
4204
|
+
maxLength: 600,
|
|
4205
|
+
minLength: 3
|
|
4206
|
+
}
|
|
4207
|
+
};
|
|
4220
4208
|
var RuleConfigSeverity;
|
|
4221
4209
|
(function(RuleConfigSeverity2) {
|
|
4222
4210
|
RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
|
|
@@ -4224,9 +4212,6 @@ var RuleConfigSeverity;
|
|
|
4224
4212
|
RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
|
|
4225
4213
|
})(RuleConfigSeverity || (RuleConfigSeverity = {}));
|
|
4226
4214
|
|
|
4227
|
-
// ../git-tools/src/release/changelog-renderer.ts
|
|
4228
|
-
var _index = require('nx/release/changelog-renderer/index'); var _index2 = _interopRequireDefault(_index);
|
|
4229
|
-
|
|
4230
4215
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
4231
4216
|
|
|
4232
4217
|
|