@storm-software/projen 0.9.31 → 0.9.33
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 +102 -42
- package/README.md +7 -7
- package/dist/{chunk-TKYNU6LX.js → chunk-3DQG66DJ.js} +7 -7
- package/dist/chunk-3Y6AMHJ5.js +6 -0
- package/dist/{chunk-ZXG4IN2I.mjs → chunk-K66SNYX5.mjs} +399 -408
- package/dist/{chunk-2QLFDU35.mjs → chunk-M432POFH.mjs} +1 -1
- package/dist/{chunk-Y44MTSI7.mjs → chunk-MC42JFGZ.mjs} +2 -2
- package/dist/{chunk-TGOBVO4I.mjs → chunk-TTG4YCRZ.mjs} +1 -1
- package/dist/{chunk-D7E6PO7R.js → chunk-VEIIPJHP.js} +764 -773
- package/dist/{chunk-SETAUINA.js → chunk-WTMG7MTK.js} +2 -2
- package/dist/{chunk-574Q4AGO.mjs → chunk-WXKORI6N.mjs} +1 -1
- package/dist/{chunk-EKZ5PM52.js → chunk-Z2UXMCUY.js} +3 -3
- package/dist/generators.d.mts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/{index-C9MVcMz_.d.mts → index-Dx_XVEzo.d.mts} +64 -0
- package/dist/{index-C9MVcMz_.d.ts → index-Dx_XVEzo.d.ts} +64 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/index.mjs +5 -5
- package/dist/src/components/index.js +3 -3
- package/dist/src/components/index.mjs +2 -2
- package/dist/src/components/nx-workspace.js +17 -17
- package/dist/src/components/nx-workspace.mjs +2 -2
- package/dist/src/generators/init/generator.d.mts +1 -1
- package/dist/src/generators/init/generator.d.ts +1 -1
- package/dist/src/generators/init/generator.js +4 -4
- package/dist/src/generators/init/generator.mjs +3 -3
- package/dist/tsup.config.js +2 -2
- package/dist/tsup.config.mjs +1 -1
- package/package.json +6 -6
- package/dist/chunk-TTGWXSDC.js +0 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
correctPaths,
|
|
3
3
|
joinPaths
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TTG4YCRZ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__dirname,
|
|
7
7
|
__name,
|
|
8
8
|
__require,
|
|
9
9
|
init_esm_shims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MC42JFGZ.mjs";
|
|
11
11
|
|
|
12
12
|
// src/generators/init/generator.ts
|
|
13
13
|
init_esm_shims();
|
|
@@ -68,8 +68,23 @@ init_esm_shims();
|
|
|
68
68
|
init_esm_shims();
|
|
69
69
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
70
70
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
71
|
+
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
71
72
|
var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
|
|
72
73
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
74
|
+
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
75
|
+
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
76
|
+
var STORM_DEFAULT_ACCOUNT_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
77
|
+
var STORM_DEFAULT_ACCOUNT_TELEGRAM = "https://t.me/storm_software";
|
|
78
|
+
var STORM_DEFAULT_ACCOUNT_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
79
|
+
var STORM_DEFAULT_ACCOUNT_MEDIUM = "https://medium.com/storm-software";
|
|
80
|
+
var STORM_DEFAULT_ACCOUNT_GITHUB = "https://github.com/storm-software";
|
|
81
|
+
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
Join us on [Discord](${STORM_DEFAULT_ACCOUNT_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
85
|
+
|
|
86
|
+
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!
|
|
87
|
+
`;
|
|
73
88
|
|
|
74
89
|
// ../config/src/define-config.ts
|
|
75
90
|
init_esm_shims();
|
|
@@ -161,9 +176,22 @@ var ColorConfigMapSchema = z.union([
|
|
|
161
176
|
var ExtendsItemSchema = z.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.");
|
|
162
177
|
var ExtendsSchema = ExtendsItemSchema.or(z.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.");
|
|
163
178
|
var WorkspaceBotConfigSchema = z.object({
|
|
164
|
-
name: z.string().trim().default("
|
|
179
|
+
name: z.string().trim().default("stormie-bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
165
180
|
email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
166
181
|
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
182
|
+
var WorkspaceReleaseConfigSchema = z.object({
|
|
183
|
+
banner: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("A URL to a banner image used to display the workspace's release"),
|
|
184
|
+
header: z.string().trim().optional().describe("A header message appended to the start of the workspace's release notes"),
|
|
185
|
+
footer: z.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe("A footer message appended to the end of the workspace's release notes")
|
|
186
|
+
}).describe("The workspace's release config used during the release process");
|
|
187
|
+
var WorkspaceAccountConfigSchema = z.object({
|
|
188
|
+
twitter: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
189
|
+
discord: z.string().trim().default(STORM_DEFAULT_ACCOUNT_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
190
|
+
telegram: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
191
|
+
slack: z.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
|
|
192
|
+
medium: z.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
193
|
+
github: z.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
194
|
+
}).describe("The workspace's account config used to store various social media links");
|
|
167
195
|
var WorkspaceDirectoryConfigSchema = z.object({
|
|
168
196
|
cache: z.string().trim().optional().describe("The directory used to store the environment's cached file data"),
|
|
169
197
|
data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
@@ -183,10 +211,13 @@ var StormConfigSchema = z.object({
|
|
|
183
211
|
homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
184
212
|
docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
185
213
|
licensing: z.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
214
|
+
contact: z.string().trim().url().default(STORM_DEFAULT_CONTACT).describe("The base contact site for the workspace"),
|
|
186
215
|
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
187
216
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
188
217
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
189
218
|
bot: WorkspaceBotConfigSchema,
|
|
219
|
+
release: WorkspaceReleaseConfigSchema,
|
|
220
|
+
account: WorkspaceAccountConfigSchema,
|
|
190
221
|
mode: z.enum([
|
|
191
222
|
"development",
|
|
192
223
|
"staging",
|
|
@@ -538,7 +569,7 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _c
|
|
|
538
569
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
539
570
|
return (message) => {
|
|
540
571
|
console.error(`
|
|
541
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]}
|
|
572
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
542
573
|
`);
|
|
543
574
|
};
|
|
544
575
|
}
|
|
@@ -792,12 +823,26 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
792
823
|
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
793
824
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
794
825
|
},
|
|
826
|
+
release: {
|
|
827
|
+
banner: process.env[`${prefix}RELEASE_BANNER`] || void 0,
|
|
828
|
+
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
829
|
+
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
830
|
+
},
|
|
831
|
+
account: {
|
|
832
|
+
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
833
|
+
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
834
|
+
telegram: process.env[`${prefix}ACCOUNT_TELEGRAM`] || void 0,
|
|
835
|
+
slack: process.env[`${prefix}ACCOUNT_SLACK`] || void 0,
|
|
836
|
+
medium: process.env[`${prefix}ACCOUNT_MEDIUM`] || void 0,
|
|
837
|
+
github: process.env[`${prefix}ACCOUNT_GITHUB`] || void 0
|
|
838
|
+
},
|
|
795
839
|
organization: process.env[`${prefix}ORGANIZATION`] || void 0,
|
|
796
840
|
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
797
841
|
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
798
842
|
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
799
843
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
800
844
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
845
|
+
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
801
846
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
802
847
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
803
848
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -957,6 +1002,31 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
957
1002
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
958
1003
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
959
1004
|
}
|
|
1005
|
+
if (config.release) {
|
|
1006
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1007
|
+
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
1008
|
+
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
1009
|
+
}
|
|
1010
|
+
if (config.account) {
|
|
1011
|
+
if (config.account.twitter) {
|
|
1012
|
+
process.env[`${prefix}ACCOUNT_TWITTER`] = config.account.twitter;
|
|
1013
|
+
}
|
|
1014
|
+
if (config.account.discord) {
|
|
1015
|
+
process.env[`${prefix}ACCOUNT_DISCORD`] = config.account.discord;
|
|
1016
|
+
}
|
|
1017
|
+
if (config.account.telegram) {
|
|
1018
|
+
process.env[`${prefix}ACCOUNT_TELEGRAM`] = config.account.telegram;
|
|
1019
|
+
}
|
|
1020
|
+
if (config.account.slack) {
|
|
1021
|
+
process.env[`${prefix}ACCOUNT_SLACK`] = config.account.slack;
|
|
1022
|
+
}
|
|
1023
|
+
if (config.account.medium) {
|
|
1024
|
+
process.env[`${prefix}ACCOUNT_MEDIUM`] = config.account.medium;
|
|
1025
|
+
}
|
|
1026
|
+
if (config.account.github) {
|
|
1027
|
+
process.env[`${prefix}ACCOUNT_GITHUB`] = config.account.github;
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
960
1030
|
if (config.organization) {
|
|
961
1031
|
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
962
1032
|
}
|
|
@@ -975,6 +1045,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
975
1045
|
if (config.licensing) {
|
|
976
1046
|
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
977
1047
|
}
|
|
1048
|
+
if (config.contact) {
|
|
1049
|
+
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1050
|
+
}
|
|
978
1051
|
if (config.timezone) {
|
|
979
1052
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
980
1053
|
process.env.TZ = config.timezone;
|
|
@@ -1073,7 +1146,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1073
1146
|
}
|
|
1074
1147
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1075
1148
|
for (const key of Object.keys(config.extensions ?? {})) {
|
|
1076
|
-
config.extensions[key] && Object.keys(config.extensions[key])
|
|
1149
|
+
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
1150
|
+
setExtensionEnv(key, config.extensions[key]);
|
|
1151
|
+
}
|
|
1077
1152
|
}
|
|
1078
1153
|
}, "setConfigEnv");
|
|
1079
1154
|
var setThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
@@ -1585,11 +1660,11 @@ init_esm_shims();
|
|
|
1585
1660
|
|
|
1586
1661
|
// ../build-tools/src/config.ts
|
|
1587
1662
|
init_esm_shims();
|
|
1588
|
-
var DEFAULT_COMPILED_BANNER =
|
|
1589
|
-
|
|
1663
|
+
var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
1664
|
+
*
|
|
1590
1665
|
* \u26A1 Built by Storm Software
|
|
1591
|
-
|
|
1592
|
-
|
|
1666
|
+
*
|
|
1667
|
+
*****************************************/
|
|
1593
1668
|
`;
|
|
1594
1669
|
var DEFAULT_ENVIRONMENT = "production";
|
|
1595
1670
|
var DEFAULT_TARGET = "esnext";
|
|
@@ -1628,7 +1703,7 @@ init_esm_shims();
|
|
|
1628
1703
|
import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
|
|
1629
1704
|
import { glob } from "glob";
|
|
1630
1705
|
import { readFile as readFile2, writeFile } from "node:fs/promises";
|
|
1631
|
-
var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot,
|
|
1706
|
+
var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
1632
1707
|
const pendingAssets = Array.from(assets ?? []);
|
|
1633
1708
|
pendingAssets.push({
|
|
1634
1709
|
input: projectRoot,
|
|
@@ -1640,7 +1715,7 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
|
|
|
1640
1715
|
glob: "LICENSE",
|
|
1641
1716
|
output: "."
|
|
1642
1717
|
});
|
|
1643
|
-
if (
|
|
1718
|
+
if (generatePackageJson2 === false) {
|
|
1644
1719
|
pendingAssets.push({
|
|
1645
1720
|
input: projectRoot,
|
|
1646
1721
|
glob: "package.json",
|
|
@@ -1690,7 +1765,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
|
|
|
1690
1765
|
const projectGraph = readCachedProjectGraph();
|
|
1691
1766
|
const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
1692
1767
|
const localPackages = [];
|
|
1693
|
-
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data
|
|
1768
|
+
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot3)) {
|
|
1694
1769
|
const projectNode = project.node;
|
|
1695
1770
|
if (projectNode.data.root) {
|
|
1696
1771
|
const projectPackageJsonPath = joinPaths(workspaceRoot3, projectNode.data.root, "package.json");
|
|
@@ -1787,38 +1862,18 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projec
|
|
|
1787
1862
|
packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
|
|
1788
1863
|
return packageJson;
|
|
1789
1864
|
}, "addWorkspacePackageJsonFields");
|
|
1790
|
-
var addPackageJsonExport = /* @__PURE__ */ __name((file, type = "module", sourceRoot) => {
|
|
1791
|
-
let entry = file.replaceAll("\\", "/");
|
|
1792
|
-
if (sourceRoot) {
|
|
1793
|
-
entry = entry.replace(sourceRoot, "");
|
|
1794
|
-
}
|
|
1795
|
-
return {
|
|
1796
|
-
import: {
|
|
1797
|
-
types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
|
|
1798
|
-
default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
|
|
1799
|
-
},
|
|
1800
|
-
require: {
|
|
1801
|
-
types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
|
|
1802
|
-
default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
|
|
1803
|
-
},
|
|
1804
|
-
default: {
|
|
1805
|
-
types: `./dist/${entry}.d.ts`,
|
|
1806
|
-
default: `./dist/${entry}.js`
|
|
1807
|
-
}
|
|
1808
|
-
};
|
|
1809
|
-
}, "addPackageJsonExport");
|
|
1810
1865
|
|
|
1811
1866
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
1812
1867
|
init_esm_shims();
|
|
1813
1868
|
import { glob as glob2 } from "glob";
|
|
1814
1869
|
var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
1815
|
-
const workspaceRoot3 = config.workspaceRoot
|
|
1870
|
+
const workspaceRoot3 = config.workspaceRoot || findWorkspaceRoot();
|
|
1816
1871
|
const entryPoints = [];
|
|
1817
1872
|
if (entry) {
|
|
1818
|
-
if (
|
|
1819
|
-
entryPoints.push(...entry);
|
|
1820
|
-
} else if (typeof entry === "string") {
|
|
1873
|
+
if (typeof entry === "string") {
|
|
1821
1874
|
entryPoints.push(entry);
|
|
1875
|
+
} else if (Array.isArray(entry)) {
|
|
1876
|
+
entryPoints.push(...entry);
|
|
1822
1877
|
} else {
|
|
1823
1878
|
entryPoints.push(...Object.values(entry));
|
|
1824
1879
|
}
|
|
@@ -1826,27 +1881,38 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
|
|
|
1826
1881
|
if (emitOnAll) {
|
|
1827
1882
|
entryPoints.push(joinPaths(workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
1828
1883
|
}
|
|
1829
|
-
const results =
|
|
1830
|
-
|
|
1884
|
+
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
1885
|
+
const paths = [];
|
|
1831
1886
|
if (entryPoint.includes("*")) {
|
|
1832
1887
|
const files = await glob2(entryPoint, {
|
|
1833
|
-
withFileTypes: true
|
|
1888
|
+
withFileTypes: true,
|
|
1889
|
+
ignore: [
|
|
1890
|
+
"**/node_modules/**"
|
|
1891
|
+
]
|
|
1834
1892
|
});
|
|
1835
|
-
|
|
1893
|
+
paths.push(...files.reduce((ret, filePath) => {
|
|
1836
1894
|
const result = correctPaths(joinPaths(filePath.path, filePath.name).replaceAll(correctPaths(workspaceRoot3), "").replaceAll(correctPaths(projectRoot), ""));
|
|
1837
1895
|
if (result) {
|
|
1838
1896
|
writeDebug(`Trying to add entry point ${result} at "${joinPaths(filePath.path, filePath.name)}"`, config);
|
|
1839
|
-
if (!
|
|
1840
|
-
|
|
1897
|
+
if (!paths.includes(result)) {
|
|
1898
|
+
paths.push(result);
|
|
1841
1899
|
}
|
|
1842
1900
|
}
|
|
1843
1901
|
return ret;
|
|
1844
1902
|
}, []));
|
|
1845
1903
|
} else {
|
|
1846
|
-
|
|
1904
|
+
paths.push(entryPoint);
|
|
1847
1905
|
}
|
|
1848
|
-
|
|
1849
|
-
|
|
1906
|
+
return paths;
|
|
1907
|
+
}));
|
|
1908
|
+
return results.filter(Boolean).reduce((ret, result) => {
|
|
1909
|
+
result.forEach((res) => {
|
|
1910
|
+
if (res && !ret.includes(res)) {
|
|
1911
|
+
ret.push(res);
|
|
1912
|
+
}
|
|
1913
|
+
});
|
|
1914
|
+
return ret;
|
|
1915
|
+
}, []);
|
|
1850
1916
|
}, "getEntryPoints");
|
|
1851
1917
|
|
|
1852
1918
|
// ../build-tools/src/utilities/get-env.ts
|
|
@@ -1869,26 +1935,6 @@ init_esm_shims();
|
|
|
1869
1935
|
|
|
1870
1936
|
// ../build-tools/src/utilities/get-out-extension.ts
|
|
1871
1937
|
init_esm_shims();
|
|
1872
|
-
function getOutExtension(format2, pkgType) {
|
|
1873
|
-
let jsExtension = ".js";
|
|
1874
|
-
let dtsExtension = ".d.ts";
|
|
1875
|
-
if (pkgType === "module" && format2 === "cjs") {
|
|
1876
|
-
jsExtension = ".cjs";
|
|
1877
|
-
dtsExtension = ".d.cts";
|
|
1878
|
-
}
|
|
1879
|
-
if (pkgType !== "module" && format2 === "esm") {
|
|
1880
|
-
jsExtension = ".mjs";
|
|
1881
|
-
dtsExtension = ".d.mts";
|
|
1882
|
-
}
|
|
1883
|
-
if (format2 === "iife") {
|
|
1884
|
-
jsExtension = ".global.js";
|
|
1885
|
-
}
|
|
1886
|
-
return {
|
|
1887
|
-
js: jsExtension,
|
|
1888
|
-
dts: dtsExtension
|
|
1889
|
-
};
|
|
1890
|
-
}
|
|
1891
|
-
__name(getOutExtension, "getOutExtension");
|
|
1892
1938
|
|
|
1893
1939
|
// ../build-tools/src/utilities/get-project-deps.ts
|
|
1894
1940
|
init_esm_shims();
|
|
@@ -2075,8 +2121,8 @@ init_esm_shims();
|
|
|
2075
2121
|
import * as esbuild from "esbuild";
|
|
2076
2122
|
var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
2077
2123
|
name: "storm:esm-split-code-to-cjs",
|
|
2078
|
-
setup(
|
|
2079
|
-
|
|
2124
|
+
setup(build4) {
|
|
2125
|
+
build4.onEnd(async (result) => {
|
|
2080
2126
|
const outFiles = Object.keys(result.metafile?.outputs ?? {});
|
|
2081
2127
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
2082
2128
|
await esbuild.build({
|
|
@@ -2095,15 +2141,15 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
2095
2141
|
init_esm_shims();
|
|
2096
2142
|
var fixImportsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
2097
2143
|
name: "storm:fix-imports",
|
|
2098
|
-
setup(
|
|
2099
|
-
|
|
2144
|
+
setup(build4) {
|
|
2145
|
+
build4.onResolve({
|
|
2100
2146
|
filter: /^spdx-exceptions/
|
|
2101
2147
|
}, () => {
|
|
2102
2148
|
return {
|
|
2103
2149
|
path: __require.resolve("spdx-exceptions")
|
|
2104
2150
|
};
|
|
2105
2151
|
});
|
|
2106
|
-
|
|
2152
|
+
build4.onResolve({
|
|
2107
2153
|
filter: /^spdx-license-ids/
|
|
2108
2154
|
}, () => {
|
|
2109
2155
|
return {
|
|
@@ -2119,8 +2165,8 @@ import { dirname } from "node:path";
|
|
|
2119
2165
|
var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
2120
2166
|
return {
|
|
2121
2167
|
name: "native-node-modules",
|
|
2122
|
-
setup(
|
|
2123
|
-
|
|
2168
|
+
setup(build4) {
|
|
2169
|
+
build4.onResolve({
|
|
2124
2170
|
filter: /\.node$/,
|
|
2125
2171
|
namespace: "file"
|
|
2126
2172
|
}, (args) => {
|
|
@@ -2139,7 +2185,7 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
2139
2185
|
path: resolvedId
|
|
2140
2186
|
};
|
|
2141
2187
|
});
|
|
2142
|
-
|
|
2188
|
+
build4.onLoad({
|
|
2143
2189
|
filter: /.*/,
|
|
2144
2190
|
namespace: "node-file"
|
|
2145
2191
|
}, (args) => {
|
|
@@ -2152,14 +2198,14 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
|
|
|
2152
2198
|
resolveDir: dirname(args.path)
|
|
2153
2199
|
};
|
|
2154
2200
|
});
|
|
2155
|
-
|
|
2201
|
+
build4.onResolve({
|
|
2156
2202
|
filter: /\.node$/,
|
|
2157
2203
|
namespace: "node-file"
|
|
2158
2204
|
}, (args) => ({
|
|
2159
2205
|
path: args.path,
|
|
2160
2206
|
namespace: "file"
|
|
2161
2207
|
}));
|
|
2162
|
-
const opts =
|
|
2208
|
+
const opts = build4.initialOptions;
|
|
2163
2209
|
opts.loader = opts.loader || {};
|
|
2164
2210
|
opts.loader[".node"] = "file";
|
|
2165
2211
|
}
|
|
@@ -2187,8 +2233,8 @@ var nodeProtocolPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
|
|
|
2187
2233
|
init_esm_shims();
|
|
2188
2234
|
var onErrorPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
2189
2235
|
name: "storm:on-error",
|
|
2190
|
-
setup(
|
|
2191
|
-
|
|
2236
|
+
setup(build4) {
|
|
2237
|
+
build4.onEnd((result) => {
|
|
2192
2238
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
2193
2239
|
writeError(`The following errors occurred during the build:
|
|
2194
2240
|
${result.errors.map((error) => error.text).join("\n")}
|
|
@@ -2225,14 +2271,14 @@ function resolvePathsConfig(options, cwd) {
|
|
|
2225
2271
|
__name(resolvePathsConfig, "resolvePathsConfig");
|
|
2226
2272
|
var resolvePathsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
2227
2273
|
name: "storm:resolve-paths",
|
|
2228
|
-
setup(
|
|
2229
|
-
const parentTsConfig =
|
|
2274
|
+
setup(build4) {
|
|
2275
|
+
const parentTsConfig = build4.initialOptions.tsconfig ? __require(joinPaths(resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : __require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
2230
2276
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
2231
2277
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
2232
|
-
|
|
2278
|
+
build4.onResolve({
|
|
2233
2279
|
filter: packagesRegex
|
|
2234
2280
|
}, (args) => {
|
|
2235
|
-
if (
|
|
2281
|
+
if (build4.initialOptions.external?.includes(args.path)) {
|
|
2236
2282
|
return {
|
|
2237
2283
|
path: args.path,
|
|
2238
2284
|
external: true
|
|
@@ -2281,6 +2327,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
2281
2327
|
overrideTsconfig: {
|
|
2282
2328
|
compilerOptions: {
|
|
2283
2329
|
paths: {}
|
|
2330
|
+
// bug with api extract + paths
|
|
2284
2331
|
}
|
|
2285
2332
|
}
|
|
2286
2333
|
},
|
|
@@ -2307,11 +2354,11 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
2307
2354
|
__name(bundleTypeDefinitions, "bundleTypeDefinitions");
|
|
2308
2355
|
var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
2309
2356
|
name: "storm:tsc",
|
|
2310
|
-
setup(
|
|
2357
|
+
setup(build4) {
|
|
2311
2358
|
if (options.emitTypes === false) {
|
|
2312
2359
|
return;
|
|
2313
2360
|
}
|
|
2314
|
-
|
|
2361
|
+
build4.onStart(async () => {
|
|
2315
2362
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
2316
2363
|
await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
2317
2364
|
}
|
|
@@ -2326,7 +2373,7 @@ var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
|
2326
2373
|
} else if (existsSync5(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
2327
2374
|
dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
2328
2375
|
}
|
|
2329
|
-
const ext = resolvedOptions.
|
|
2376
|
+
const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
2330
2377
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
2331
2378
|
bundleTypeDefinitions(dtsPath, bundlePath, resolvedOptions.external ?? [], resolvedOptions);
|
|
2332
2379
|
const dtsContents = await fs3.readFile(`${bundlePath}.d.ts`, "utf8");
|
|
@@ -2348,9 +2395,6 @@ function getTypeDependencyPackageName(npmPackage) {
|
|
|
2348
2395
|
__name(getTypeDependencyPackageName, "getTypeDependencyPackageName");
|
|
2349
2396
|
|
|
2350
2397
|
// ../esbuild/src/config.ts
|
|
2351
|
-
var getOutputExtensionMap = /* @__PURE__ */ __name((options, pkgType) => {
|
|
2352
|
-
return options.outExtension ? options.outExtension(options.format, pkgType) : getOutExtension(options.format, pkgType);
|
|
2353
|
-
}, "getOutputExtensionMap");
|
|
2354
2398
|
var getDefaultBuildPlugins = /* @__PURE__ */ __name((options, resolvedOptions) => [
|
|
2355
2399
|
nodeProtocolPlugin(options, resolvedOptions),
|
|
2356
2400
|
resolvePathsPlugin(options, resolvedOptions),
|
|
@@ -2376,6 +2420,18 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
2376
2420
|
bundle: true,
|
|
2377
2421
|
clean: true,
|
|
2378
2422
|
debug: false,
|
|
2423
|
+
resolveExtensions: [
|
|
2424
|
+
".tsx",
|
|
2425
|
+
".ts",
|
|
2426
|
+
".cts",
|
|
2427
|
+
".mts",
|
|
2428
|
+
".jsx",
|
|
2429
|
+
".js",
|
|
2430
|
+
".cjs",
|
|
2431
|
+
".mjs",
|
|
2432
|
+
".css",
|
|
2433
|
+
".json"
|
|
2434
|
+
],
|
|
2379
2435
|
loader: {
|
|
2380
2436
|
".aac": "file",
|
|
2381
2437
|
".css": "file",
|
|
@@ -2435,7 +2491,7 @@ var missingIgnore = [
|
|
|
2435
2491
|
];
|
|
2436
2492
|
var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
2437
2493
|
name: "storm:deps-check",
|
|
2438
|
-
setup(
|
|
2494
|
+
setup(build4) {
|
|
2439
2495
|
const pkgJsonPath = path5.join(process.cwd(), "package.json");
|
|
2440
2496
|
const pkgContents = __require(pkgJsonPath);
|
|
2441
2497
|
const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
|
|
@@ -2447,7 +2503,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
|
2447
2503
|
];
|
|
2448
2504
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2449
2505
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2450
|
-
|
|
2506
|
+
build4.onResolve({
|
|
2451
2507
|
filter: onlyPackages
|
|
2452
2508
|
}, (args) => {
|
|
2453
2509
|
if (args.importer.includes(process.cwd())) {
|
|
@@ -2463,7 +2519,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
|
2463
2519
|
external: true
|
|
2464
2520
|
};
|
|
2465
2521
|
});
|
|
2466
|
-
|
|
2522
|
+
build4.onEnd(() => {
|
|
2467
2523
|
const unusedDependencies = [
|
|
2468
2524
|
...dependencies
|
|
2469
2525
|
].filter((dep) => {
|
|
@@ -2601,9 +2657,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2601
2657
|
if (!existsSync6(packageJsonPath)) {
|
|
2602
2658
|
throw new Error("Cannot find package.json configuration");
|
|
2603
2659
|
}
|
|
2604
|
-
const packageJsonFile = await hf.readFile(packageJsonPath, "utf8");
|
|
2605
|
-
const packageJson = JSON.parse(packageJsonFile);
|
|
2606
|
-
const outExtension = getOutputExtensionMap(options, packageJson.type);
|
|
2607
2660
|
const env = getEnv("esbuild", options);
|
|
2608
2661
|
const result = {
|
|
2609
2662
|
...options,
|
|
@@ -2616,18 +2669,12 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2616
2669
|
"module",
|
|
2617
2670
|
"main"
|
|
2618
2671
|
],
|
|
2619
|
-
resolveExtensions: [
|
|
2620
|
-
".ts",
|
|
2621
|
-
".js",
|
|
2622
|
-
".node"
|
|
2623
|
-
],
|
|
2624
2672
|
...userOptions,
|
|
2625
2673
|
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
2626
2674
|
format: options.format || "cjs",
|
|
2627
|
-
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry
|
|
2628
|
-
"./src/index.ts"
|
|
2629
|
-
], userOptions.emitOnAll),
|
|
2675
|
+
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts", userOptions.emitOnAll === true),
|
|
2630
2676
|
outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
|
|
2677
|
+
distDir: userOptions.distDir || "dist",
|
|
2631
2678
|
plugins: [],
|
|
2632
2679
|
name: userOptions.name || projectName,
|
|
2633
2680
|
projectConfigurations,
|
|
@@ -2646,7 +2693,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2646
2693
|
bundle: userOptions.bundle !== false,
|
|
2647
2694
|
keepNames: true,
|
|
2648
2695
|
watch: userOptions.watch === true,
|
|
2649
|
-
outExtension,
|
|
2650
2696
|
footer: userOptions.footer,
|
|
2651
2697
|
banner: {
|
|
2652
2698
|
js: options.banner || DEFAULT_COMPILED_BANNER,
|
|
@@ -2663,20 +2709,26 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2663
2709
|
...options.define,
|
|
2664
2710
|
...Object.keys(env || {}).reduce((res, key) => {
|
|
2665
2711
|
const value = JSON.stringify(env[key]);
|
|
2712
|
+
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
2666
2713
|
return {
|
|
2667
2714
|
...res,
|
|
2668
|
-
[`process.env.${
|
|
2669
|
-
[`import.meta.env.${
|
|
2715
|
+
[`process.env.${safeKey}`]: value,
|
|
2716
|
+
[`import.meta.env.${safeKey}`]: value
|
|
2670
2717
|
};
|
|
2671
2718
|
}, {})
|
|
2672
2719
|
},
|
|
2673
2720
|
inject: [
|
|
2674
2721
|
options.format === "cjs" && options.injectShims ? joinPaths(__dirname, "../assets/cjs_shims.js") : "",
|
|
2675
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ? joinPaths(__dirname, "../assets/esm_shims.js") : ""
|
|
2676
|
-
|
|
2677
|
-
].filter(Boolean)
|
|
2722
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? joinPaths(__dirname, "../assets/esm_shims.js") : ""
|
|
2723
|
+
]
|
|
2678
2724
|
};
|
|
2679
2725
|
result.plugins = userOptions.plugins ?? getDefaultBuildPlugins(userOptions, result);
|
|
2726
|
+
if (options.inject) {
|
|
2727
|
+
options.inject = defu4(result.inject, options.inject);
|
|
2728
|
+
}
|
|
2729
|
+
options.inject?.filter(Boolean);
|
|
2730
|
+
delete result.entry;
|
|
2731
|
+
delete result.outputPath;
|
|
2680
2732
|
stopwatch();
|
|
2681
2733
|
return result;
|
|
2682
2734
|
}, "resolveOptions");
|
|
@@ -2697,7 +2749,7 @@ async function generatePackageJson(context2) {
|
|
|
2697
2749
|
packageJson = await addWorkspacePackageJsonFields(context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
2698
2750
|
packageJson.exports ??= {};
|
|
2699
2751
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
2700
|
-
packageJson.exports["."] ??=
|
|
2752
|
+
packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
|
|
2701
2753
|
let entryPoints = [
|
|
2702
2754
|
{
|
|
2703
2755
|
in: "./src/index.ts",
|
|
@@ -2715,12 +2767,15 @@ async function generatePackageJson(context2) {
|
|
|
2715
2767
|
const split = entryPoint.out.split(".");
|
|
2716
2768
|
split.pop();
|
|
2717
2769
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
2718
|
-
packageJson.exports[`./${entry}`] ??=
|
|
2770
|
+
packageJson.exports[`./${entry}`] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/${entry}.js`;
|
|
2719
2771
|
}
|
|
2720
2772
|
}
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2773
|
+
if (context2.options.format === "esm") {
|
|
2774
|
+
packageJson.module = packageJson.type === "module" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.mjs`;
|
|
2775
|
+
} else {
|
|
2776
|
+
packageJson.main = packageJson.type === "commonjs" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.cjs`;
|
|
2777
|
+
}
|
|
2778
|
+
packageJson.types = `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.d.ts`;
|
|
2724
2779
|
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
2725
2780
|
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
2726
2781
|
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
@@ -2755,11 +2810,39 @@ __name(generateContext, "generateContext");
|
|
|
2755
2810
|
async function executeEsBuild(context2) {
|
|
2756
2811
|
writeDebug(` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
2757
2812
|
const stopwatch = getStopwatch(`${context2.options.name} build`);
|
|
2758
|
-
if (process.env.
|
|
2813
|
+
if (process.env.STORM_WATCH) {
|
|
2759
2814
|
const ctx = await esbuild2.context(context2.options);
|
|
2760
2815
|
watch(ctx, context2.options);
|
|
2761
2816
|
}
|
|
2762
|
-
const
|
|
2817
|
+
const options = {
|
|
2818
|
+
...context2.options
|
|
2819
|
+
};
|
|
2820
|
+
options.outdir = joinPaths(context2.options.outdir, context2.options.distDir);
|
|
2821
|
+
delete options.env;
|
|
2822
|
+
delete options.name;
|
|
2823
|
+
delete options.assets;
|
|
2824
|
+
delete options.mode;
|
|
2825
|
+
delete options.orgName;
|
|
2826
|
+
delete options.watch;
|
|
2827
|
+
delete options.clean;
|
|
2828
|
+
delete options.debug;
|
|
2829
|
+
delete options.generatePackageJson;
|
|
2830
|
+
delete options.emitOnAll;
|
|
2831
|
+
delete options.distDir;
|
|
2832
|
+
delete options.includeSrc;
|
|
2833
|
+
delete options.verbose;
|
|
2834
|
+
delete options.projectRoot;
|
|
2835
|
+
delete options.projectName;
|
|
2836
|
+
delete options.projectGraph;
|
|
2837
|
+
delete options.projectConfigurations;
|
|
2838
|
+
delete options.renderers;
|
|
2839
|
+
delete options.config;
|
|
2840
|
+
delete options.injectShims;
|
|
2841
|
+
delete options.external;
|
|
2842
|
+
writeTrace(`Run esbuild (${context2.options.name}) with the following options:
|
|
2843
|
+
${formatLogMessage(options)}`, context2.options.config);
|
|
2844
|
+
const result = await esbuild2.build(options);
|
|
2845
|
+
await esbuild2.stop();
|
|
2763
2846
|
if (result.metafile) {
|
|
2764
2847
|
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
|
2765
2848
|
await hf.writeFile(metafilePath, JSON.stringify(result.metafile));
|
|
@@ -2841,7 +2924,7 @@ async function build3(options) {
|
|
|
2841
2924
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
2842
2925
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
2843
2926
|
} catch (error) {
|
|
2844
|
-
writeFatal("
|
|
2927
|
+
writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
2845
2928
|
throw error;
|
|
2846
2929
|
} finally {
|
|
2847
2930
|
stopwatch();
|
|
@@ -2960,287 +3043,6 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
|
|
|
2960
3043
|
}
|
|
2961
3044
|
});
|
|
2962
3045
|
|
|
2963
|
-
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
2964
|
-
init_esm_shims();
|
|
2965
|
-
|
|
2966
|
-
// ../tsdown/src/build.ts
|
|
2967
|
-
init_esm_shims();
|
|
2968
|
-
import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3, writeJsonFile as writeJsonFile2 } from "@nx/devkit";
|
|
2969
|
-
import defu5 from "defu";
|
|
2970
|
-
import { existsSync as existsSync8 } from "node:fs";
|
|
2971
|
-
import hf2 from "node:fs/promises";
|
|
2972
|
-
import { findWorkspaceRoot as findWorkspaceRoot3 } from "nx/src/utils/find-workspace-root";
|
|
2973
|
-
import { build as tsdown } from "tsdown";
|
|
2974
|
-
|
|
2975
|
-
// ../tsdown/src/clean.ts
|
|
2976
|
-
init_esm_shims();
|
|
2977
|
-
import { rm as rm2 } from "node:fs/promises";
|
|
2978
|
-
async function cleanDirectories2(name = "TSDown", directory, config) {
|
|
2979
|
-
await rm2(directory, {
|
|
2980
|
-
recursive: true,
|
|
2981
|
-
force: true
|
|
2982
|
-
});
|
|
2983
|
-
}
|
|
2984
|
-
__name(cleanDirectories2, "cleanDirectories");
|
|
2985
|
-
|
|
2986
|
-
// ../tsdown/src/config.ts
|
|
2987
|
-
init_esm_shims();
|
|
2988
|
-
var DEFAULT_BUILD_OPTIONS2 = {
|
|
2989
|
-
platform: "node",
|
|
2990
|
-
target: "node22",
|
|
2991
|
-
format: [
|
|
2992
|
-
"esm",
|
|
2993
|
-
"cjs"
|
|
2994
|
-
],
|
|
2995
|
-
tsconfig: "tsconfig.json",
|
|
2996
|
-
mode: "production",
|
|
2997
|
-
globalName: "globalThis",
|
|
2998
|
-
unused: {
|
|
2999
|
-
level: "error"
|
|
3000
|
-
},
|
|
3001
|
-
injectShims: true,
|
|
3002
|
-
watch: false,
|
|
3003
|
-
bundle: true,
|
|
3004
|
-
treeshake: true,
|
|
3005
|
-
clean: true,
|
|
3006
|
-
debug: false
|
|
3007
|
-
};
|
|
3008
|
-
|
|
3009
|
-
// ../tsdown/src/build.ts
|
|
3010
|
-
var resolveOptions2 = /* @__PURE__ */ __name(async (userOptions) => {
|
|
3011
|
-
const projectRoot = userOptions.projectRoot;
|
|
3012
|
-
const workspaceRoot3 = findWorkspaceRoot3(projectRoot);
|
|
3013
|
-
if (!workspaceRoot3) {
|
|
3014
|
-
throw new Error("Cannot find Nx workspace root");
|
|
3015
|
-
}
|
|
3016
|
-
const config = await getConfig(workspaceRoot3.dir);
|
|
3017
|
-
writeDebug(" \u2699\uFE0F Resolving build options", config);
|
|
3018
|
-
const stopwatch = getStopwatch("Build options resolution");
|
|
3019
|
-
const projectGraph = await createProjectGraphAsync2({
|
|
3020
|
-
exitOnError: true
|
|
3021
|
-
});
|
|
3022
|
-
const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
|
|
3023
|
-
if (!existsSync8(projectJsonPath)) {
|
|
3024
|
-
throw new Error("Cannot find project.json configuration");
|
|
3025
|
-
}
|
|
3026
|
-
const projectJsonFile = await hf2.readFile(projectJsonPath, "utf8");
|
|
3027
|
-
const projectJson = JSON.parse(projectJsonFile);
|
|
3028
|
-
const projectName = projectJson.name;
|
|
3029
|
-
const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
|
|
3030
|
-
if (!projectConfigurations?.projects?.[projectName]) {
|
|
3031
|
-
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.");
|
|
3032
|
-
}
|
|
3033
|
-
const options = defu5(userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
3034
|
-
options.name ??= `${projectName}-${options.format}`;
|
|
3035
|
-
options.target ??= DEFAULT_TARGET;
|
|
3036
|
-
const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
3037
|
-
if (!existsSync8(packageJsonPath)) {
|
|
3038
|
-
throw new Error("Cannot find package.json configuration");
|
|
3039
|
-
}
|
|
3040
|
-
const env = getEnv("tsdown", options);
|
|
3041
|
-
const result = {
|
|
3042
|
-
...options,
|
|
3043
|
-
config,
|
|
3044
|
-
...userOptions,
|
|
3045
|
-
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
3046
|
-
format: options.format || "cjs",
|
|
3047
|
-
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
3048
|
-
"./src/index.ts"
|
|
3049
|
-
], userOptions.emitOnAll),
|
|
3050
|
-
outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
|
|
3051
|
-
plugins: [],
|
|
3052
|
-
name: userOptions.name || projectName,
|
|
3053
|
-
projectConfigurations,
|
|
3054
|
-
projectName,
|
|
3055
|
-
projectGraph,
|
|
3056
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || joinPaths(projectRoot, "src"),
|
|
3057
|
-
minify: userOptions.minify || !userOptions.debug,
|
|
3058
|
-
verbose: userOptions.verbose || isVerbose() || userOptions.debug === true,
|
|
3059
|
-
includeSrc: userOptions.includeSrc === true,
|
|
3060
|
-
metafile: userOptions.metafile !== false,
|
|
3061
|
-
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
3062
|
-
clean: userOptions.clean !== false,
|
|
3063
|
-
emitOnAll: userOptions.emitOnAll === true,
|
|
3064
|
-
dts: userOptions.emitTypes === true ? {
|
|
3065
|
-
transformer: "oxc"
|
|
3066
|
-
} : userOptions.emitTypes,
|
|
3067
|
-
bundleDts: userOptions.emitTypes,
|
|
3068
|
-
assets: userOptions.assets ?? [],
|
|
3069
|
-
shims: userOptions.injectShims !== true,
|
|
3070
|
-
bundle: userOptions.bundle !== false,
|
|
3071
|
-
watch: userOptions.watch === true,
|
|
3072
|
-
define: {
|
|
3073
|
-
STORM_FORMAT: JSON.stringify(options.format || "cjs"),
|
|
3074
|
-
...options.format === "cjs" && options.injectShims ? {
|
|
3075
|
-
"import.meta.url": "importMetaUrl"
|
|
3076
|
-
} : {},
|
|
3077
|
-
...Object.keys(env || {}).reduce((res, key) => {
|
|
3078
|
-
const value = JSON.stringify(env[key]);
|
|
3079
|
-
return {
|
|
3080
|
-
...res,
|
|
3081
|
-
[`process.env.${key}`]: value,
|
|
3082
|
-
[`import.meta.env.${key}`]: value
|
|
3083
|
-
};
|
|
3084
|
-
}, {}),
|
|
3085
|
-
...options.define
|
|
3086
|
-
}
|
|
3087
|
-
};
|
|
3088
|
-
stopwatch();
|
|
3089
|
-
return result;
|
|
3090
|
-
}, "resolveOptions");
|
|
3091
|
-
async function generatePackageJson2(options) {
|
|
3092
|
-
if (options.generatePackageJson !== false && existsSync8(joinPaths(options.projectRoot, "package.json"))) {
|
|
3093
|
-
writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
|
|
3094
|
-
const stopwatch = getStopwatch("Write package.json file");
|
|
3095
|
-
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
3096
|
-
if (!existsSync8(packageJsonPath)) {
|
|
3097
|
-
throw new Error("Cannot find package.json configuration");
|
|
3098
|
-
}
|
|
3099
|
-
const packageJsonFile = await hf2.readFile(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
3100
|
-
if (!packageJsonFile) {
|
|
3101
|
-
throw new Error("Cannot find package.json configuration file");
|
|
3102
|
-
}
|
|
3103
|
-
let packageJson = JSON.parse(packageJsonFile);
|
|
3104
|
-
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
3105
|
-
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
3106
|
-
packageJson.exports ??= {};
|
|
3107
|
-
packageJson.exports["./package.json"] ??= "./package.json";
|
|
3108
|
-
packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot);
|
|
3109
|
-
let entryPoints = [
|
|
3110
|
-
{
|
|
3111
|
-
in: "./src/index.ts",
|
|
3112
|
-
out: "./src/index.ts"
|
|
3113
|
-
}
|
|
3114
|
-
];
|
|
3115
|
-
if (options.entryPoints) {
|
|
3116
|
-
if (Array.isArray(options.entryPoints)) {
|
|
3117
|
-
entryPoints = options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
|
|
3118
|
-
in: entryPoint,
|
|
3119
|
-
out: entryPoint
|
|
3120
|
-
} : entryPoint);
|
|
3121
|
-
}
|
|
3122
|
-
for (const entryPoint of entryPoints) {
|
|
3123
|
-
const split = entryPoint.out.split(".");
|
|
3124
|
-
split.pop();
|
|
3125
|
-
const entry = split.join(".").replaceAll("\\", "/");
|
|
3126
|
-
packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
3130
|
-
packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
|
|
3131
|
-
packageJson.types = "./dist/index.d.ts";
|
|
3132
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
3133
|
-
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
3134
|
-
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
3135
|
-
}
|
|
3136
|
-
return ret;
|
|
3137
|
-
}, packageJson.exports);
|
|
3138
|
-
await writeJsonFile2(joinPaths(options.outdir, "package.json"), packageJson);
|
|
3139
|
-
stopwatch();
|
|
3140
|
-
}
|
|
3141
|
-
return options;
|
|
3142
|
-
}
|
|
3143
|
-
__name(generatePackageJson2, "generatePackageJson");
|
|
3144
|
-
async function executeTSDown(options) {
|
|
3145
|
-
writeDebug(` \u{1F680} Running ${options.name} build`, options.config);
|
|
3146
|
-
const stopwatch = getStopwatch(`${options.name} build`);
|
|
3147
|
-
await tsdown({
|
|
3148
|
-
...options,
|
|
3149
|
-
entry: options.entryPoints,
|
|
3150
|
-
outDir: options.outdir,
|
|
3151
|
-
config: false
|
|
3152
|
-
});
|
|
3153
|
-
stopwatch();
|
|
3154
|
-
return options;
|
|
3155
|
-
}
|
|
3156
|
-
__name(executeTSDown, "executeTSDown");
|
|
3157
|
-
async function copyBuildAssets2(options) {
|
|
3158
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
3159
|
-
const stopwatch = getStopwatch(`${options.name} asset copy`);
|
|
3160
|
-
await copyAssets(options.config, options.assets ?? [], options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
3161
|
-
stopwatch();
|
|
3162
|
-
return options;
|
|
3163
|
-
}
|
|
3164
|
-
__name(copyBuildAssets2, "copyBuildAssets");
|
|
3165
|
-
async function reportResults2(options) {
|
|
3166
|
-
writeSuccess(` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
3167
|
-
}
|
|
3168
|
-
__name(reportResults2, "reportResults");
|
|
3169
|
-
async function cleanOutputPath2(options) {
|
|
3170
|
-
if (options.clean !== false && options.outdir) {
|
|
3171
|
-
writeDebug(` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
3172
|
-
const stopwatch = getStopwatch(`${options.name} output clean`);
|
|
3173
|
-
await cleanDirectories2(options.name, options.outdir, options.config);
|
|
3174
|
-
stopwatch();
|
|
3175
|
-
}
|
|
3176
|
-
return options;
|
|
3177
|
-
}
|
|
3178
|
-
__name(cleanOutputPath2, "cleanOutputPath");
|
|
3179
|
-
async function build4(options) {
|
|
3180
|
-
writeDebug(` \u26A1 Executing Storm TSDown pipeline`);
|
|
3181
|
-
const stopwatch = getStopwatch("TSDown pipeline");
|
|
3182
|
-
try {
|
|
3183
|
-
const opts = Array.isArray(options) ? options : [
|
|
3184
|
-
options
|
|
3185
|
-
];
|
|
3186
|
-
if (opts.length === 0) {
|
|
3187
|
-
throw new Error("No build options were provided");
|
|
3188
|
-
}
|
|
3189
|
-
const resolved = await Promise.all(opts.map(async (opt) => await resolveOptions2(opt)));
|
|
3190
|
-
if (resolved.length > 0) {
|
|
3191
|
-
await cleanOutputPath2(resolved[0]);
|
|
3192
|
-
await generatePackageJson2(resolved[0]);
|
|
3193
|
-
await Promise.all(resolved.map(async (opt) => {
|
|
3194
|
-
await executeTSDown(opt);
|
|
3195
|
-
await copyBuildAssets2(opt);
|
|
3196
|
-
await reportResults2(opt);
|
|
3197
|
-
}));
|
|
3198
|
-
} else {
|
|
3199
|
-
writeWarning(" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
3200
|
-
}
|
|
3201
|
-
writeSuccess(" \u{1F3C1} TSDown pipeline build completed successfully");
|
|
3202
|
-
} catch (error) {
|
|
3203
|
-
writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
3204
|
-
throw error;
|
|
3205
|
-
} finally {
|
|
3206
|
-
stopwatch();
|
|
3207
|
-
}
|
|
3208
|
-
}
|
|
3209
|
-
__name(build4, "build");
|
|
3210
|
-
|
|
3211
|
-
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
3212
|
-
async function tsdownExecutorFn(options, context2, config) {
|
|
3213
|
-
writeInfo("\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
3214
|
-
if (!context2.projectsConfigurations?.projects || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !context2.projectsConfigurations.projects[context2.projectName]?.root) {
|
|
3215
|
-
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
3216
|
-
}
|
|
3217
|
-
await build4({
|
|
3218
|
-
...options,
|
|
3219
|
-
projectRoot: context2.projectsConfigurations.projects?.[context2.projectName].root,
|
|
3220
|
-
projectName: context2.projectName,
|
|
3221
|
-
sourceRoot: context2.projectsConfigurations.projects?.[context2.projectName]?.sourceRoot,
|
|
3222
|
-
format: options.format,
|
|
3223
|
-
platform: options.platform
|
|
3224
|
-
});
|
|
3225
|
-
return {
|
|
3226
|
-
success: true
|
|
3227
|
-
};
|
|
3228
|
-
}
|
|
3229
|
-
__name(tsdownExecutorFn, "tsdownExecutorFn");
|
|
3230
|
-
var executor_default8 = withRunExecutor("Storm TSDown build executor", tsdownExecutorFn, {
|
|
3231
|
-
skipReadingConfig: false,
|
|
3232
|
-
hooks: {
|
|
3233
|
-
applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
|
|
3234
|
-
options.entry ??= [
|
|
3235
|
-
"src/index.ts"
|
|
3236
|
-
];
|
|
3237
|
-
options.outputPath ??= "dist/{projectRoot}";
|
|
3238
|
-
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
3239
|
-
return options;
|
|
3240
|
-
}, "applyDefaultOptions")
|
|
3241
|
-
}
|
|
3242
|
-
});
|
|
3243
|
-
|
|
3244
3046
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
3245
3047
|
init_esm_shims();
|
|
3246
3048
|
import { removeSync } from "fs-extra";
|
|
@@ -3263,7 +3065,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
3263
3065
|
};
|
|
3264
3066
|
}
|
|
3265
3067
|
__name(typiaExecutorFn, "typiaExecutorFn");
|
|
3266
|
-
var
|
|
3068
|
+
var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
|
|
3267
3069
|
skipReadingConfig: false,
|
|
3268
3070
|
hooks: {
|
|
3269
3071
|
applyDefaultOptions: /* @__PURE__ */ __name((options) => {
|
|
@@ -3280,7 +3082,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
3280
3082
|
|
|
3281
3083
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
3282
3084
|
init_esm_shims();
|
|
3283
|
-
import { defu as
|
|
3085
|
+
import { defu as defu5 } from "defu";
|
|
3284
3086
|
import { createJiti } from "jiti";
|
|
3285
3087
|
async function unbuildExecutorFn(options, context2, config) {
|
|
3286
3088
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
@@ -3298,7 +3100,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
3298
3100
|
interopDefault: true
|
|
3299
3101
|
});
|
|
3300
3102
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
3301
|
-
await stormUnbuild.build(
|
|
3103
|
+
await stormUnbuild.build(defu5({
|
|
3302
3104
|
...options,
|
|
3303
3105
|
projectRoot: context2.projectsConfigurations.projects[context2.projectName].root,
|
|
3304
3106
|
projectName: context2.projectName,
|
|
@@ -3331,7 +3133,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
3331
3133
|
};
|
|
3332
3134
|
}
|
|
3333
3135
|
__name(unbuildExecutorFn, "unbuildExecutorFn");
|
|
3334
|
-
var
|
|
3136
|
+
var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
|
|
3335
3137
|
skipReadingConfig: false,
|
|
3336
3138
|
hooks: {
|
|
3337
3139
|
applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
|
|
@@ -4231,6 +4033,199 @@ init_esm_shims();
|
|
|
4231
4033
|
|
|
4232
4034
|
// ../git-tools/src/types.ts
|
|
4233
4035
|
init_esm_shims();
|
|
4036
|
+
var DEFAULT_COMMIT_TYPES = {
|
|
4037
|
+
/* --- Bumps version when selected --- */
|
|
4038
|
+
chore: {
|
|
4039
|
+
description: "Other changes that don't modify src or test files",
|
|
4040
|
+
title: "Chore",
|
|
4041
|
+
emoji: "\u2699\uFE0F ",
|
|
4042
|
+
semverBump: "patch",
|
|
4043
|
+
changelog: {
|
|
4044
|
+
title: "Miscellaneous",
|
|
4045
|
+
hidden: false
|
|
4046
|
+
}
|
|
4047
|
+
},
|
|
4048
|
+
fix: {
|
|
4049
|
+
description: "A change that resolves an issue previously identified with the package",
|
|
4050
|
+
title: "Bug Fix",
|
|
4051
|
+
emoji: "\u{1FAB2} ",
|
|
4052
|
+
semverBump: "patch",
|
|
4053
|
+
changelog: {
|
|
4054
|
+
title: "Bug Fixes",
|
|
4055
|
+
hidden: false
|
|
4056
|
+
}
|
|
4057
|
+
},
|
|
4058
|
+
feat: {
|
|
4059
|
+
description: "A change that adds a new feature to the package",
|
|
4060
|
+
title: "Feature",
|
|
4061
|
+
emoji: "\u{1F511} ",
|
|
4062
|
+
semverBump: "minor",
|
|
4063
|
+
changelog: {
|
|
4064
|
+
title: "Features",
|
|
4065
|
+
hidden: false
|
|
4066
|
+
}
|
|
4067
|
+
},
|
|
4068
|
+
ci: {
|
|
4069
|
+
description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
|
|
4070
|
+
title: "Continuous Integration",
|
|
4071
|
+
emoji: "\u{1F9F0} ",
|
|
4072
|
+
semverBump: "patch",
|
|
4073
|
+
changelog: {
|
|
4074
|
+
title: "Continuous Integration",
|
|
4075
|
+
hidden: false
|
|
4076
|
+
}
|
|
4077
|
+
},
|
|
4078
|
+
refactor: {
|
|
4079
|
+
description: "A code change that neither fixes a bug nor adds a feature",
|
|
4080
|
+
title: "Code Refactoring",
|
|
4081
|
+
emoji: "\u{1F9EA} ",
|
|
4082
|
+
semverBump: "patch",
|
|
4083
|
+
changelog: {
|
|
4084
|
+
title: "Source Code Improvements",
|
|
4085
|
+
hidden: false
|
|
4086
|
+
}
|
|
4087
|
+
},
|
|
4088
|
+
style: {
|
|
4089
|
+
description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
|
|
4090
|
+
title: "Style Improvements",
|
|
4091
|
+
emoji: "\u{1F48E} ",
|
|
4092
|
+
semverBump: "patch",
|
|
4093
|
+
changelog: {
|
|
4094
|
+
title: "Style Improvements",
|
|
4095
|
+
hidden: false
|
|
4096
|
+
}
|
|
4097
|
+
},
|
|
4098
|
+
perf: {
|
|
4099
|
+
description: "A code change that improves performance",
|
|
4100
|
+
title: "Performance Improvement",
|
|
4101
|
+
emoji: "\u23F1\uFE0F ",
|
|
4102
|
+
semverBump: "patch",
|
|
4103
|
+
changelog: {
|
|
4104
|
+
title: "Performance Improvements",
|
|
4105
|
+
hidden: false
|
|
4106
|
+
}
|
|
4107
|
+
},
|
|
4108
|
+
/* --- Does not bump version when selected --- */
|
|
4109
|
+
docs: {
|
|
4110
|
+
description: "A change that only includes documentation updates",
|
|
4111
|
+
title: "Documentation",
|
|
4112
|
+
emoji: "\u{1F4DC} ",
|
|
4113
|
+
semverBump: "none",
|
|
4114
|
+
changelog: {
|
|
4115
|
+
title: "Documentation",
|
|
4116
|
+
hidden: false
|
|
4117
|
+
}
|
|
4118
|
+
},
|
|
4119
|
+
test: {
|
|
4120
|
+
description: "Adding missing tests or correcting existing tests",
|
|
4121
|
+
title: "Testing",
|
|
4122
|
+
emoji: "\u{1F6A8} ",
|
|
4123
|
+
semverBump: "none",
|
|
4124
|
+
changelog: {
|
|
4125
|
+
title: "Testing",
|
|
4126
|
+
hidden: true
|
|
4127
|
+
}
|
|
4128
|
+
},
|
|
4129
|
+
/* --- Not included in commitlint but included in changelog --- */
|
|
4130
|
+
deps: {
|
|
4131
|
+
description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
|
|
4132
|
+
title: "Dependencies",
|
|
4133
|
+
emoji: "\u{1F4E6} ",
|
|
4134
|
+
hidden: true,
|
|
4135
|
+
semverBump: "patch",
|
|
4136
|
+
changelog: {
|
|
4137
|
+
title: "Dependency Upgrades",
|
|
4138
|
+
hidden: false
|
|
4139
|
+
}
|
|
4140
|
+
},
|
|
4141
|
+
/* --- Not included in commitlint or changelog --- */
|
|
4142
|
+
build: {
|
|
4143
|
+
description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
|
|
4144
|
+
title: "Build",
|
|
4145
|
+
emoji: "\u{1F6E0} ",
|
|
4146
|
+
hidden: true,
|
|
4147
|
+
semverBump: "none",
|
|
4148
|
+
changelog: {
|
|
4149
|
+
title: "Build",
|
|
4150
|
+
hidden: true
|
|
4151
|
+
}
|
|
4152
|
+
},
|
|
4153
|
+
release: {
|
|
4154
|
+
description: "Publishing a commit containing a newly released version",
|
|
4155
|
+
title: "Publish Release",
|
|
4156
|
+
emoji: "\u{1F680} ",
|
|
4157
|
+
hidden: true,
|
|
4158
|
+
semverBump: "none",
|
|
4159
|
+
changelog: {
|
|
4160
|
+
title: "Publish Release",
|
|
4161
|
+
hidden: true
|
|
4162
|
+
}
|
|
4163
|
+
}
|
|
4164
|
+
};
|
|
4165
|
+
var DEFAULT_COMMIT_QUESTIONS = {
|
|
4166
|
+
type: {
|
|
4167
|
+
type: "select",
|
|
4168
|
+
title: "Commit Type",
|
|
4169
|
+
description: "Select the commit type that best describes your changes",
|
|
4170
|
+
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
|
|
4171
|
+
ret[type] = DEFAULT_COMMIT_TYPES[type];
|
|
4172
|
+
return ret;
|
|
4173
|
+
}, {}),
|
|
4174
|
+
defaultValue: "chore",
|
|
4175
|
+
maxLength: 20,
|
|
4176
|
+
minLength: 3
|
|
4177
|
+
},
|
|
4178
|
+
scope: {
|
|
4179
|
+
type: "select",
|
|
4180
|
+
title: "Commit Scope",
|
|
4181
|
+
description: "Select the monorepo project that is primarily impacted by this change",
|
|
4182
|
+
enum: {},
|
|
4183
|
+
defaultValue: "monorepo",
|
|
4184
|
+
maxLength: 50,
|
|
4185
|
+
minLength: 1
|
|
4186
|
+
},
|
|
4187
|
+
subject: {
|
|
4188
|
+
type: "input",
|
|
4189
|
+
title: "Commit Subject",
|
|
4190
|
+
description: "Write a short, imperative tense description of the change",
|
|
4191
|
+
maxLength: 150,
|
|
4192
|
+
minLength: 3
|
|
4193
|
+
},
|
|
4194
|
+
body: {
|
|
4195
|
+
type: "input",
|
|
4196
|
+
title: "Commit Body",
|
|
4197
|
+
description: "Provide a longer description of the change",
|
|
4198
|
+
maxLength: 600
|
|
4199
|
+
},
|
|
4200
|
+
isBreaking: {
|
|
4201
|
+
type: "confirm",
|
|
4202
|
+
title: "Breaking Changes",
|
|
4203
|
+
description: "Are there any breaking changes as a result of this commit?",
|
|
4204
|
+
defaultValue: false
|
|
4205
|
+
},
|
|
4206
|
+
breakingBody: {
|
|
4207
|
+
type: "input",
|
|
4208
|
+
title: "Breaking Changes (Details)",
|
|
4209
|
+
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
4210
|
+
when: /* @__PURE__ */ __name((answers) => answers.isBreaking === true, "when"),
|
|
4211
|
+
maxLength: 600,
|
|
4212
|
+
minLength: 3
|
|
4213
|
+
},
|
|
4214
|
+
isIssueAffected: {
|
|
4215
|
+
type: "confirm",
|
|
4216
|
+
title: "Open Issue Affected",
|
|
4217
|
+
description: "Does this change impact any open issues?",
|
|
4218
|
+
defaultValue: false
|
|
4219
|
+
},
|
|
4220
|
+
issuesBody: {
|
|
4221
|
+
type: "input",
|
|
4222
|
+
title: "Open Issue Affected (Details)",
|
|
4223
|
+
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
4224
|
+
when: /* @__PURE__ */ __name((answers) => answers.isIssueAffected === true, "when"),
|
|
4225
|
+
maxLength: 600,
|
|
4226
|
+
minLength: 3
|
|
4227
|
+
}
|
|
4228
|
+
};
|
|
4234
4229
|
var RuleConfigSeverity;
|
|
4235
4230
|
(function(RuleConfigSeverity2) {
|
|
4236
4231
|
RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
|
|
@@ -4238,10 +4233,6 @@ var RuleConfigSeverity;
|
|
|
4238
4233
|
RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
|
|
4239
4234
|
})(RuleConfigSeverity || (RuleConfigSeverity = {}));
|
|
4240
4235
|
|
|
4241
|
-
// ../git-tools/src/release/changelog-renderer.ts
|
|
4242
|
-
init_esm_shims();
|
|
4243
|
-
import ChangelogRenderer from "nx/release/changelog-renderer/index";
|
|
4244
|
-
|
|
4245
4236
|
// ../git-tools/src/release/config.ts
|
|
4246
4237
|
init_esm_shims();
|
|
4247
4238
|
|
|
@@ -4695,7 +4686,7 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
|
|
|
4695
4686
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
4696
4687
|
init_esm_shims();
|
|
4697
4688
|
import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
|
|
4698
|
-
import { existsSync as
|
|
4689
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
4699
4690
|
import { join as join4 } from "node:path";
|
|
4700
4691
|
import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
|
|
4701
4692
|
import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
|
|
@@ -4710,13 +4701,13 @@ var PNPM_LOCK_PATH = join4(workspaceRoot2, PNPM_LOCK_FILE);
|
|
|
4710
4701
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
4711
4702
|
init_esm_shims();
|
|
4712
4703
|
import { joinPathFragments as joinPathFragments6, readJsonFile as readJsonFile2 } from "@nx/devkit";
|
|
4713
|
-
import { existsSync as
|
|
4704
|
+
import { existsSync as existsSync9 } from "node:fs";
|
|
4714
4705
|
|
|
4715
4706
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4716
4707
|
init_esm_shims();
|
|
4717
4708
|
import { readJsonFile as readJsonFile3 } from "@nx/devkit";
|
|
4718
|
-
import
|
|
4719
|
-
import { existsSync as
|
|
4709
|
+
import defu6 from "defu";
|
|
4710
|
+
import { existsSync as existsSync10 } from "node:fs";
|
|
4720
4711
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
4721
4712
|
|
|
4722
4713
|
// ../workspace-tools/src/utils/typia-transform.ts
|