@storm-software/git-tools 2.115.1 → 2.115.3
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/README.md +1 -1
- package/bin/chunk-EICIIIDG.js +3686 -0
- package/bin/chunk-MC32ZYE5.cjs +3709 -0
- package/bin/git.cjs +72 -69
- package/bin/git.js +8 -5
- package/bin/post-checkout.cjs +9 -9
- package/bin/post-checkout.js +1 -1
- package/bin/post-commit.cjs +9 -9
- package/bin/post-commit.js +1 -1
- package/bin/post-merge.cjs +9 -9
- package/bin/post-merge.js +1 -1
- package/bin/pre-commit.cjs +9 -9
- package/bin/pre-commit.js +1 -1
- package/bin/pre-install.cjs +9 -9
- package/bin/pre-install.js +1 -1
- package/bin/pre-push.cjs +13 -13
- package/bin/pre-push.js +1 -1
- package/bin/prepare.cjs +7 -7
- package/bin/prepare.js +1 -1
- package/bin/version-warning.cjs +5 -5
- package/bin/version-warning.js +1 -1
- package/package.json +4 -4
- package/bin/chunk-O7PN47AE.cjs +0 -2006
- package/bin/chunk-XOHAV6VL.js +0 -1965
package/bin/git.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkMC32ZYE5_cjs = require('./chunk-MC32ZYE5.cjs');
|
|
6
6
|
var TOML = require('@ltd/j-toml');
|
|
7
7
|
var commander = require('commander');
|
|
8
8
|
var prompts = require('@inquirer/prompts');
|
|
@@ -915,7 +915,7 @@ function getRuleFromScopeEnum(scopeEnum) {
|
|
|
915
915
|
// src/commitlint/run.ts
|
|
916
916
|
var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
|
|
917
917
|
var runCommitLint = async (config, params) => {
|
|
918
|
-
|
|
918
|
+
chunkMC32ZYE5_cjs.writeInfo(
|
|
919
919
|
"\u{1F4DD} Validating git commit message aligns with the Storm Software specification",
|
|
920
920
|
config
|
|
921
921
|
);
|
|
@@ -923,7 +923,7 @@ var runCommitLint = async (config, params) => {
|
|
|
923
923
|
if (params.message && params.message !== COMMIT_EDITMSG_PATH) {
|
|
924
924
|
commitMessage = params.message;
|
|
925
925
|
} else {
|
|
926
|
-
const commitFile =
|
|
926
|
+
const commitFile = chunkMC32ZYE5_cjs.joinPaths(
|
|
927
927
|
config.workspaceRoot,
|
|
928
928
|
params.file || params.message || COMMIT_EDITMSG_PATH
|
|
929
929
|
);
|
|
@@ -940,17 +940,17 @@ var runCommitLint = async (config, params) => {
|
|
|
940
940
|
if (upstreamRemote) {
|
|
941
941
|
const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
|
|
942
942
|
if (!upstreamRemoteIdentifier) {
|
|
943
|
-
|
|
943
|
+
chunkMC32ZYE5_cjs.writeWarning(
|
|
944
944
|
`No upstream remote found for ${config.name}.git. Skipping comparison.`,
|
|
945
945
|
config
|
|
946
946
|
);
|
|
947
947
|
return;
|
|
948
948
|
}
|
|
949
|
-
|
|
949
|
+
chunkMC32ZYE5_cjs.writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
|
|
950
950
|
const currentBranch = childProcess__default.default.execSync("git branch --show-current").toString().trim();
|
|
951
951
|
gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
|
|
952
952
|
} else {
|
|
953
|
-
|
|
953
|
+
chunkMC32ZYE5_cjs.writeWarning(
|
|
954
954
|
`No upstream remote found for ${config.name}.git. Skipping comparison against upstream main.`,
|
|
955
955
|
config
|
|
956
956
|
);
|
|
@@ -958,7 +958,7 @@ var runCommitLint = async (config, params) => {
|
|
|
958
958
|
}
|
|
959
959
|
commitMessage = childProcess__default.default.execSync(gitLogCmd).toString().trim();
|
|
960
960
|
if (!commitMessage) {
|
|
961
|
-
|
|
961
|
+
chunkMC32ZYE5_cjs.writeWarning(
|
|
962
962
|
"No commits found. Skipping commit message validation.",
|
|
963
963
|
config
|
|
964
964
|
);
|
|
@@ -971,7 +971,7 @@ var runCommitLint = async (config, params) => {
|
|
|
971
971
|
});
|
|
972
972
|
const commitMsgRegex = `(${allowedTypes})\\((${allowedScopes})\\)!?:\\s(([a-z0-9:-s])+)`;
|
|
973
973
|
const matchCommit = new RegExp(commitMsgRegex, "g").test(commitMessage);
|
|
974
|
-
const commitlintConfig =
|
|
974
|
+
const commitlintConfig = chunkMC32ZYE5_cjs.defu(
|
|
975
975
|
params.config ?? {},
|
|
976
976
|
{ rules: { "scope-enum": getRuleFromScopeEnum(allowedScopes) } },
|
|
977
977
|
DEFAULT_COMMITLINT_CONFIG
|
|
@@ -981,7 +981,7 @@ var runCommitLint = async (config, params) => {
|
|
|
981
981
|
helpUrl: commitlintConfig.helpUrl
|
|
982
982
|
});
|
|
983
983
|
if (!matchCommit || report.errors.length || report.warnings.length) {
|
|
984
|
-
|
|
984
|
+
chunkMC32ZYE5_cjs.writeSuccess(`Commit was processing completed successfully!`, config);
|
|
985
985
|
} else {
|
|
986
986
|
let errorMessage = " Oh no! Your commit message: \n-------------------------------------------------------------------\n" + commitMessage + "\n-------------------------------------------------------------------\n\n Does not follow the commit message convention specified by Storm Software.";
|
|
987
987
|
errorMessage += "\ntype(scope): subject \n BLANK LINE \n body";
|
|
@@ -1053,14 +1053,14 @@ async function createState(config, commitizenFile = "@storm-software/git-tools/c
|
|
|
1053
1053
|
answers: {}
|
|
1054
1054
|
};
|
|
1055
1055
|
} else {
|
|
1056
|
-
|
|
1056
|
+
chunkMC32ZYE5_cjs.writeInfo(`Using custom commit config file: ${commitizenFile}`, config);
|
|
1057
1057
|
let commitizenConfig = await import(commitizenFile);
|
|
1058
1058
|
if (commitizenConfig?.default) {
|
|
1059
1059
|
commitizenConfig = commitizenConfig?.default;
|
|
1060
1060
|
}
|
|
1061
1061
|
state = {
|
|
1062
1062
|
config: await resolveCommitOptions(
|
|
1063
|
-
|
|
1063
|
+
chunkMC32ZYE5_cjs.defu(commitizenConfig ?? {}, DEFAULT_COMMIT_CONFIG),
|
|
1064
1064
|
config
|
|
1065
1065
|
),
|
|
1066
1066
|
root,
|
|
@@ -1116,7 +1116,7 @@ async function createState(config, commitizenFile = "@storm-software/git-tools/c
|
|
|
1116
1116
|
const project = projectConfigurations.projects[scope];
|
|
1117
1117
|
if (project) {
|
|
1118
1118
|
let description = `${project.name} - ${project.root}`;
|
|
1119
|
-
const packageJsonPath =
|
|
1119
|
+
const packageJsonPath = chunkMC32ZYE5_cjs.joinPaths(project.root, "package.json");
|
|
1120
1120
|
if (fs$1.existsSync(packageJsonPath)) {
|
|
1121
1121
|
const packageJsonFile = await fs.readFile(packageJsonPath, "utf8");
|
|
1122
1122
|
const packageJson = JSON.parse(packageJsonFile);
|
|
@@ -1193,10 +1193,10 @@ ${closedIssueEmoji}${config.prompt.settings.closedIssueMessage}${issues}`;
|
|
|
1193
1193
|
|
|
1194
1194
|
// src/commit/run.ts
|
|
1195
1195
|
var runCommit = async (commitizenFile = "@storm-software/git-tools/commit/config", dryRun = false) => {
|
|
1196
|
-
const config = await
|
|
1196
|
+
const config = await chunkMC32ZYE5_cjs.getConfig();
|
|
1197
1197
|
const state = await createState(config, commitizenFile);
|
|
1198
1198
|
if (dryRun) {
|
|
1199
|
-
|
|
1199
|
+
chunkMC32ZYE5_cjs.writeInfo("Running in dry mode.", config);
|
|
1200
1200
|
}
|
|
1201
1201
|
console.log(chalkTemplate__default.default`
|
|
1202
1202
|
{bold.#999999 ----------------------------------------}
|
|
@@ -1206,7 +1206,7 @@ var runCommit = async (commitizenFile = "@storm-software/git-tools/commit/config
|
|
|
1206
1206
|
`);
|
|
1207
1207
|
state.answers = await askQuestions(state);
|
|
1208
1208
|
const message = formatCommitMessage(state);
|
|
1209
|
-
const commitMsgFile =
|
|
1209
|
+
const commitMsgFile = chunkMC32ZYE5_cjs.joinPaths(getGitDir(), "COMMIT_EDITMSG");
|
|
1210
1210
|
console.log(chalkTemplate__default.default`
|
|
1211
1211
|
{bold.#999999 ----------------------------------------}
|
|
1212
1212
|
|
|
@@ -1219,11 +1219,11 @@ var runCommit = async (commitizenFile = "@storm-software/git-tools/commit/config
|
|
|
1219
1219
|
commandItems.push(...["--file", commitMsgFile]);
|
|
1220
1220
|
const command = shellescape__default.default(commandItems);
|
|
1221
1221
|
if (dryRun) {
|
|
1222
|
-
|
|
1222
|
+
chunkMC32ZYE5_cjs.writeDebug(
|
|
1223
1223
|
`Skipping execution [dry-run]: ${command.replace(commitMsgFile, ".git/COMMIT_EDITMSG")}`,
|
|
1224
1224
|
config
|
|
1225
1225
|
);
|
|
1226
|
-
|
|
1226
|
+
chunkMC32ZYE5_cjs.writeDebug(`Message [dry-run]: ${message}`, config);
|
|
1227
1227
|
} else {
|
|
1228
1228
|
await fs__default.default.writeFile(commitMsgFile, message);
|
|
1229
1229
|
chunkCIJVSMK2_cjs.run(config, command);
|
|
@@ -2251,10 +2251,13 @@ function titleCase(input2) {
|
|
|
2251
2251
|
// src/utilities/changelog-utils.ts
|
|
2252
2252
|
async function generateChangelogContent(releaseVersion, filepath, newContent, currentContent, project, workspaceConfig) {
|
|
2253
2253
|
const formatOptions = await prettier.resolveConfig(filepath) ?? {};
|
|
2254
|
+
const bannerUrl = typeof workspaceConfig?.release.banner === "string" ? workspaceConfig?.release.banner : workspaceConfig?.release.banner?.url;
|
|
2254
2255
|
const header = await prettier.format(
|
|
2255
|
-
|
|
2256
|
+
`
|
|
2256
2259
|
|
|
2257
|
-
|
|
2260
|
+
# Changelog ${project || workspaceConfig?.name ? "for" : ""}${workspaceConfig?.name ? ` ${titleCase(workspaceConfig.name)}` : ""}${project ? `${workspaceConfig?.name ? " -" : ""} ${titleCase(project)}` : ""}
|
|
2258
2261
|
|
|
2259
2262
|
`,
|
|
2260
2263
|
{
|
|
@@ -2457,7 +2460,7 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer__default.def
|
|
|
2457
2460
|
};
|
|
2458
2461
|
}
|
|
2459
2462
|
async render() {
|
|
2460
|
-
this.workspaceConfig = await
|
|
2463
|
+
this.workspaceConfig = await chunkMC32ZYE5_cjs.getWorkspaceConfig();
|
|
2461
2464
|
return await super.render();
|
|
2462
2465
|
}
|
|
2463
2466
|
preprocessChanges() {
|
|
@@ -2768,7 +2771,7 @@ async function createOrUpdateGithubReleaseInternal(githubRequestConfig, release,
|
|
|
2768
2771
|
if (!shouldContinueInGitHub) {
|
|
2769
2772
|
return;
|
|
2770
2773
|
}
|
|
2771
|
-
const open =
|
|
2774
|
+
const open = chunkMC32ZYE5_cjs.__require("open");
|
|
2772
2775
|
await open(result.url).then(() => {
|
|
2773
2776
|
console.info(
|
|
2774
2777
|
`
|
|
@@ -2881,7 +2884,7 @@ async function resolveTokenData(hostname) {
|
|
|
2881
2884
|
);
|
|
2882
2885
|
if (fs$1.existsSync(ghCLIPath)) {
|
|
2883
2886
|
const yamlContents = await fs$1.promises.readFile(ghCLIPath, "utf8");
|
|
2884
|
-
const { load } =
|
|
2887
|
+
const { load } = chunkMC32ZYE5_cjs.__require("@zkochan/js-yaml");
|
|
2885
2888
|
const ghCLIConfig = load(yamlContents);
|
|
2886
2889
|
if (ghCLIConfig[hostname]) {
|
|
2887
2890
|
if (ghCLIConfig[hostname].oauth_token) {
|
|
@@ -2995,7 +2998,7 @@ async function isUserAnOrganizationMember(userId, config, remoteName = "origin")
|
|
|
2995
2998
|
// src/release/changelog.ts
|
|
2996
2999
|
function createAPI(overrideReleaseConfig) {
|
|
2997
3000
|
return async function releaseChangelog(args) {
|
|
2998
|
-
const workspaceConfig = await
|
|
3001
|
+
const workspaceConfig = await chunkMC32ZYE5_cjs.getWorkspaceConfig();
|
|
2999
3002
|
const projectGraph$1 = await projectGraph.createProjectGraphAsync({ exitOnError: true });
|
|
3000
3003
|
const nxJson$1 = nxJson.readNxJson();
|
|
3001
3004
|
const userProvidedReleaseConfig = deepMergeJson.deepMergeJson(
|
|
@@ -3696,7 +3699,7 @@ async function generateChangelogForWorkspace({
|
|
|
3696
3699
|
workspaceChangelogVersion,
|
|
3697
3700
|
changes
|
|
3698
3701
|
}) {
|
|
3699
|
-
const workspaceConfig = await
|
|
3702
|
+
const workspaceConfig = await chunkMC32ZYE5_cjs.getWorkspaceConfig();
|
|
3700
3703
|
if (!workspaceConfig) {
|
|
3701
3704
|
throw new Error(
|
|
3702
3705
|
`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
|
|
@@ -3810,7 +3813,7 @@ async function generateChangelogForProjects({
|
|
|
3810
3813
|
nxReleaseConfig,
|
|
3811
3814
|
projectToAdditionalDependencyBumps
|
|
3812
3815
|
}) {
|
|
3813
|
-
const workspaceConfig = await
|
|
3816
|
+
const workspaceConfig = await chunkMC32ZYE5_cjs.getWorkspaceConfig();
|
|
3814
3817
|
if (!workspaceConfig) {
|
|
3815
3818
|
throw new Error(
|
|
3816
3819
|
`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
|
|
@@ -4009,9 +4012,9 @@ function formatGithubReleaseNotes(releaseVersion, content, projectName, workspac
|
|
|
4009
4012
|
if (!workspaceConfig) {
|
|
4010
4013
|
return content;
|
|
4011
4014
|
}
|
|
4012
|
-
return `
|
|
4017
|
+
) : void 0 : workspaceConfig.release.banner.alt) || "Release banner header"}](${typeof workspaceConfig.release.banner === "string" ? workspaceConfig.release.banner : workspaceConfig.release.banner?.url})
|
|
4015
4018
|
${workspaceConfig.release.header || ""}
|
|
4016
4019
|
|
|
4017
4020
|
# ${projectName ? `${titleCase(projectName)} ` : ""}v${releaseVersion.rawVersion}
|
|
@@ -4115,7 +4118,7 @@ var runRelease = async (config, options) => {
|
|
|
4115
4118
|
throw new Error("The `GITHUB_ACTOR` environment variable is not set.");
|
|
4116
4119
|
}
|
|
4117
4120
|
if (!await isUserAnOrganizationMember(process.env.GITHUB_ACTOR, config)) {
|
|
4118
|
-
|
|
4121
|
+
chunkMC32ZYE5_cjs.writeFatal(
|
|
4119
4122
|
"You must be a member of the Storm Software organization to run the release process.",
|
|
4120
4123
|
config
|
|
4121
4124
|
);
|
|
@@ -4132,12 +4135,12 @@ var runRelease = async (config, options) => {
|
|
|
4132
4135
|
process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
4133
4136
|
process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
4134
4137
|
process.env.NPM_CONFIG_PROVENANCE = "true";
|
|
4135
|
-
|
|
4138
|
+
chunkMC32ZYE5_cjs.writeDebug("Creating workspace Project Graph data...", config);
|
|
4136
4139
|
const nxJson = nxJson_js.readNxJson();
|
|
4137
|
-
|
|
4140
|
+
chunkMC32ZYE5_cjs.writeDebug("Reading in the workspaces release configuration", config);
|
|
4138
4141
|
const to = options.head || process.env.NX_HEAD;
|
|
4139
4142
|
const from = options.base || process.env.NX_BASE;
|
|
4140
|
-
|
|
4143
|
+
chunkMC32ZYE5_cjs.writeDebug(
|
|
4141
4144
|
`Using the following Git SHAs to determine the release content:
|
|
4142
4145
|
- From: ${from}
|
|
4143
4146
|
- To: ${to}
|
|
@@ -4148,28 +4151,28 @@ var runRelease = async (config, options) => {
|
|
|
4148
4151
|
nxJson.release.groups = Object.keys(nxJson.release.groups).reduce(
|
|
4149
4152
|
(ret, groupName) => {
|
|
4150
4153
|
const groupConfig = nxJson.release?.groups?.[groupName];
|
|
4151
|
-
ret[groupName] =
|
|
4154
|
+
ret[groupName] = chunkMC32ZYE5_cjs.defu(groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
|
|
4152
4155
|
return ret;
|
|
4153
4156
|
},
|
|
4154
4157
|
{}
|
|
4155
4158
|
);
|
|
4156
4159
|
}
|
|
4157
|
-
const nxReleaseConfig =
|
|
4160
|
+
const nxReleaseConfig = chunkMC32ZYE5_cjs.defu(
|
|
4158
4161
|
nxJson.release,
|
|
4159
4162
|
DEFAULT_RELEASE_CONFIG
|
|
4160
4163
|
);
|
|
4161
|
-
|
|
4164
|
+
chunkMC32ZYE5_cjs.writeInfo(
|
|
4162
4165
|
"Using the following `nx.json` release configuration values",
|
|
4163
4166
|
config
|
|
4164
4167
|
);
|
|
4165
|
-
|
|
4168
|
+
chunkMC32ZYE5_cjs.writeInfo(nxReleaseConfig, config);
|
|
4166
4169
|
const releaseVersion = version_js.createAPI(nxReleaseConfig);
|
|
4167
4170
|
const releaseChangelog = createAPI(nxReleaseConfig);
|
|
4168
4171
|
const releasePublish = publish_js.createAPI(nxReleaseConfig);
|
|
4169
|
-
|
|
4172
|
+
chunkMC32ZYE5_cjs.writeDebug("Determining the current release versions...", config);
|
|
4170
4173
|
const { workspaceVersion, projectsVersionData } = await releaseVersion({
|
|
4171
4174
|
dryRun: false,
|
|
4172
|
-
verbose:
|
|
4175
|
+
verbose: chunkMC32ZYE5_cjs.isVerbose(config.logLevel),
|
|
4173
4176
|
preid: config.preid,
|
|
4174
4177
|
deleteVersionPlans: false,
|
|
4175
4178
|
stageChanges: true,
|
|
@@ -4180,15 +4183,15 @@ var runRelease = async (config, options) => {
|
|
|
4180
4183
|
version: nxReleaseConfig?.projectsRelationship !== "fixed" ? void 0 : workspaceVersion,
|
|
4181
4184
|
versionData: projectsVersionData,
|
|
4182
4185
|
dryRun: false,
|
|
4183
|
-
verbose:
|
|
4186
|
+
verbose: chunkMC32ZYE5_cjs.isVerbose(config.logLevel),
|
|
4184
4187
|
to,
|
|
4185
4188
|
from,
|
|
4186
4189
|
gitCommit: true,
|
|
4187
4190
|
gitCommitMessage: "release(monorepo): Publish workspace release updates"
|
|
4188
4191
|
});
|
|
4189
|
-
|
|
4192
|
+
chunkMC32ZYE5_cjs.writeDebug("Tagging commit with git", config);
|
|
4190
4193
|
if (options.skipPublish) {
|
|
4191
|
-
|
|
4194
|
+
chunkMC32ZYE5_cjs.writeWarning(
|
|
4192
4195
|
"Skipping publishing packages since `skipPublish` was provided as `true` in the release options.",
|
|
4193
4196
|
config
|
|
4194
4197
|
);
|
|
@@ -4197,7 +4200,7 @@ var runRelease = async (config, options) => {
|
|
|
4197
4200
|
(key) => projectsVersionData[key]?.newVersion
|
|
4198
4201
|
);
|
|
4199
4202
|
if (changedProjects.length > 0) {
|
|
4200
|
-
|
|
4203
|
+
chunkMC32ZYE5_cjs.writeInfo(
|
|
4201
4204
|
`Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
|
|
4202
4205
|
${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
4203
4206
|
`,
|
|
@@ -4207,7 +4210,7 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
|
4207
4210
|
const result = await releasePublish({
|
|
4208
4211
|
...options,
|
|
4209
4212
|
dryRun: !!options.dryRun,
|
|
4210
|
-
verbose:
|
|
4213
|
+
verbose: chunkMC32ZYE5_cjs.isVerbose(config.logLevel)
|
|
4211
4214
|
});
|
|
4212
4215
|
const failedProjects = Object.keys(result).filter(
|
|
4213
4216
|
(key) => result[key]?.code && result[key]?.code > 0
|
|
@@ -4222,10 +4225,10 @@ ${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${res
|
|
|
4222
4225
|
);
|
|
4223
4226
|
}
|
|
4224
4227
|
} else {
|
|
4225
|
-
|
|
4228
|
+
chunkMC32ZYE5_cjs.writeWarning("Skipped publishing packages.", config);
|
|
4226
4229
|
}
|
|
4227
4230
|
}
|
|
4228
|
-
|
|
4231
|
+
chunkMC32ZYE5_cjs.writeSuccess("Completed the Storm workspace release process!", config);
|
|
4229
4232
|
};
|
|
4230
4233
|
async function updatePackageManifests(projectsVersionData, config) {
|
|
4231
4234
|
let projectGraph;
|
|
@@ -4240,7 +4243,7 @@ async function updatePackageManifests(projectsVersionData, config) {
|
|
|
4240
4243
|
Object.keys(projectsVersionData).map(async (node) => {
|
|
4241
4244
|
const projectNode = projectGraph.nodes[node];
|
|
4242
4245
|
if (!projectNode?.data.root) {
|
|
4243
|
-
|
|
4246
|
+
chunkMC32ZYE5_cjs.writeWarning(
|
|
4244
4247
|
`Project node ${node} not found in the project graph. Skipping manifest update.`,
|
|
4245
4248
|
config
|
|
4246
4249
|
);
|
|
@@ -4248,17 +4251,17 @@ async function updatePackageManifests(projectsVersionData, config) {
|
|
|
4248
4251
|
}
|
|
4249
4252
|
const versionData = projectsVersionData[node];
|
|
4250
4253
|
if (projectNode?.data.root && versionData && versionData.newVersion !== null) {
|
|
4251
|
-
|
|
4254
|
+
chunkMC32ZYE5_cjs.writeTrace(
|
|
4252
4255
|
`Writing version ${versionData.newVersion} update to manifest file for ${node}
|
|
4253
4256
|
`,
|
|
4254
4257
|
config
|
|
4255
4258
|
);
|
|
4256
|
-
const projectRoot =
|
|
4259
|
+
const projectRoot = chunkMC32ZYE5_cjs.joinPaths(
|
|
4257
4260
|
config.workspaceRoot,
|
|
4258
4261
|
projectNode.data.root
|
|
4259
4262
|
);
|
|
4260
|
-
const packageJsonPath =
|
|
4261
|
-
const cargoTomlPath =
|
|
4263
|
+
const packageJsonPath = chunkMC32ZYE5_cjs.joinPaths(projectRoot, "package.json");
|
|
4264
|
+
const cargoTomlPath = chunkMC32ZYE5_cjs.joinPaths(projectRoot, "Cargo.toml");
|
|
4262
4265
|
if (fs$1.existsSync(packageJsonPath)) {
|
|
4263
4266
|
const packageJsonContent = await fs.readFile(packageJsonPath, "utf8");
|
|
4264
4267
|
const packageJson = JSON.parse(packageJsonContent);
|
|
@@ -4276,7 +4279,7 @@ async function updatePackageManifests(projectsVersionData, config) {
|
|
|
4276
4279
|
})
|
|
4277
4280
|
);
|
|
4278
4281
|
} else {
|
|
4279
|
-
|
|
4282
|
+
chunkMC32ZYE5_cjs.writeWarning("No project nodes found. Skipping manifest updates.", config);
|
|
4280
4283
|
}
|
|
4281
4284
|
}
|
|
4282
4285
|
|
|
@@ -4284,8 +4287,8 @@ async function updatePackageManifests(projectsVersionData, config) {
|
|
|
4284
4287
|
var _config = {};
|
|
4285
4288
|
function createProgram(config) {
|
|
4286
4289
|
_config = config;
|
|
4287
|
-
|
|
4288
|
-
const root =
|
|
4290
|
+
chunkMC32ZYE5_cjs.writeInfo("\u26A1 Running Storm Git Tools", config);
|
|
4291
|
+
const root = chunkMC32ZYE5_cjs.findWorkspaceRootSafe(process.cwd());
|
|
4289
4292
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
4290
4293
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
4291
4294
|
if (root) {
|
|
@@ -4350,12 +4353,12 @@ async function commitAction({
|
|
|
4350
4353
|
dryRun = false
|
|
4351
4354
|
}) {
|
|
4352
4355
|
try {
|
|
4353
|
-
|
|
4356
|
+
chunkMC32ZYE5_cjs.writeInfo(
|
|
4354
4357
|
`\u26A1 Preparing to commit your changes. Please provide the requested details below...`,
|
|
4355
4358
|
_config
|
|
4356
4359
|
);
|
|
4357
4360
|
await runCommit(config, dryRun);
|
|
4358
|
-
|
|
4361
|
+
chunkMC32ZYE5_cjs.writeSuccess(
|
|
4359
4362
|
`\u{1F389} Storm Commit processing completed successfully!
|
|
4360
4363
|
|
|
4361
4364
|
Note: Please run "pnpm push" to upload these changes to the remote ${_config.name ? _config.name : _config.namespace ? _config.namespace : _config.organization ? _config.organization : "Storm-Software"} Git repository at ${_config.repository}
|
|
@@ -4363,7 +4366,7 @@ Note: Please run "pnpm push" to upload these changes to the remote ${_config.nam
|
|
|
4363
4366
|
_config
|
|
4364
4367
|
);
|
|
4365
4368
|
} catch (error) {
|
|
4366
|
-
|
|
4369
|
+
chunkMC32ZYE5_cjs.writeFatal(
|
|
4367
4370
|
`A fatal error occurred while running commit action:
|
|
4368
4371
|
|
|
4369
4372
|
${error.message}`,
|
|
@@ -4374,14 +4377,14 @@ ${error.message}`,
|
|
|
4374
4377
|
}
|
|
4375
4378
|
async function readmeAction(options) {
|
|
4376
4379
|
try {
|
|
4377
|
-
|
|
4380
|
+
chunkMC32ZYE5_cjs.writeInfo("\u26A1 Formatting the workspace's README.md files", _config);
|
|
4378
4381
|
await runReadme(options);
|
|
4379
|
-
|
|
4382
|
+
chunkMC32ZYE5_cjs.writeSuccess(
|
|
4380
4383
|
"Formatting of the workspace's README.md files is complete\n",
|
|
4381
4384
|
_config
|
|
4382
4385
|
);
|
|
4383
4386
|
} catch (error) {
|
|
4384
|
-
|
|
4387
|
+
chunkMC32ZYE5_cjs.writeFatal(
|
|
4385
4388
|
`A fatal error occurred while running README format action:
|
|
4386
4389
|
|
|
4387
4390
|
${error.message}`
|
|
@@ -4396,7 +4399,7 @@ async function releaseAction({
|
|
|
4396
4399
|
dryRun
|
|
4397
4400
|
}) {
|
|
4398
4401
|
try {
|
|
4399
|
-
|
|
4402
|
+
chunkMC32ZYE5_cjs.writeInfo(
|
|
4400
4403
|
"\u26A1 Running the Storm Release and Publish process on the workspace",
|
|
4401
4404
|
_config
|
|
4402
4405
|
);
|
|
@@ -4406,9 +4409,9 @@ async function releaseAction({
|
|
|
4406
4409
|
base,
|
|
4407
4410
|
head
|
|
4408
4411
|
});
|
|
4409
|
-
|
|
4412
|
+
chunkMC32ZYE5_cjs.writeSuccess("Release completed successfully!\n", _config);
|
|
4410
4413
|
} catch (error) {
|
|
4411
|
-
|
|
4414
|
+
chunkMC32ZYE5_cjs.writeFatal(
|
|
4412
4415
|
`A fatal error occurred while running release action:
|
|
4413
4416
|
|
|
4414
4417
|
${error.message} ${error.stack ? `
|
|
@@ -4426,7 +4429,7 @@ async function commitLintAction({
|
|
|
4426
4429
|
file
|
|
4427
4430
|
}) {
|
|
4428
4431
|
try {
|
|
4429
|
-
|
|
4432
|
+
chunkMC32ZYE5_cjs.writeInfo(
|
|
4430
4433
|
`\u26A1 Linting the ${_config.repository ? _config.repository : _config.namespace ? _config.namespace : _config.name ? _config.name : typeof _config.organization === "string" ? _config.organization : _config.organization?.name ? _config.organization?.name : "Storm-Software"} repository's commit messages.`,
|
|
4431
4434
|
_config
|
|
4432
4435
|
);
|
|
@@ -4435,12 +4438,12 @@ async function commitLintAction({
|
|
|
4435
4438
|
message,
|
|
4436
4439
|
file
|
|
4437
4440
|
});
|
|
4438
|
-
|
|
4441
|
+
chunkMC32ZYE5_cjs.writeSuccess(
|
|
4439
4442
|
"Linting the commit messages completed successfully!\n",
|
|
4440
4443
|
_config
|
|
4441
4444
|
);
|
|
4442
4445
|
} catch (error) {
|
|
4443
|
-
|
|
4446
|
+
chunkMC32ZYE5_cjs.writeFatal(
|
|
4444
4447
|
`A fatal error occurred while linting the commit messages:
|
|
4445
4448
|
|
|
4446
4449
|
${error.message}`,
|
|
@@ -4452,18 +4455,18 @@ ${error.message}`,
|
|
|
4452
4455
|
|
|
4453
4456
|
// bin/git.ts
|
|
4454
4457
|
void (async () => {
|
|
4455
|
-
const config = await
|
|
4458
|
+
const config = await chunkMC32ZYE5_cjs.getConfig();
|
|
4456
4459
|
try {
|
|
4457
|
-
|
|
4460
|
+
chunkMC32ZYE5_cjs.handleProcess(config);
|
|
4458
4461
|
const program = createProgram(config);
|
|
4459
4462
|
await program.parseAsync(process.argv);
|
|
4460
|
-
|
|
4463
|
+
chunkMC32ZYE5_cjs.writeSuccess(
|
|
4461
4464
|
`\u{1F389} Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`,
|
|
4462
4465
|
config
|
|
4463
4466
|
);
|
|
4464
|
-
|
|
4467
|
+
chunkMC32ZYE5_cjs.exitWithSuccess(config);
|
|
4465
4468
|
} catch (error) {
|
|
4466
|
-
|
|
4469
|
+
chunkMC32ZYE5_cjs.exitWithError(config);
|
|
4467
4470
|
process.exit(1);
|
|
4468
4471
|
}
|
|
4469
4472
|
})();
|
package/bin/git.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { run } from './chunk-54Q5U5WW.js';
|
|
3
|
-
import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, findWorkspaceRootSafe, writeFatal, joinPaths, writeDebug, defu, isVerbose, writeWarning, getWorkspaceConfig, writeTrace, __require } from './chunk-
|
|
3
|
+
import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, findWorkspaceRootSafe, writeFatal, joinPaths, writeDebug, defu, isVerbose, writeWarning, getWorkspaceConfig, writeTrace, __require, STORM_DEFAULT_RELEASE_BANNER } from './chunk-EICIIIDG.js';
|
|
4
4
|
import TOML from '@ltd/j-toml';
|
|
5
5
|
import { Command, Option } from 'commander';
|
|
6
6
|
import { select, confirm, input } from '@inquirer/prompts';
|
|
@@ -2234,10 +2234,13 @@ function titleCase(input2) {
|
|
|
2234
2234
|
// src/utilities/changelog-utils.ts
|
|
2235
2235
|
async function generateChangelogContent(releaseVersion, filepath, newContent, currentContent, project, workspaceConfig) {
|
|
2236
2236
|
const formatOptions = await resolveConfig(filepath) ?? {};
|
|
2237
|
+
const bannerUrl = typeof workspaceConfig?.release.banner === "string" ? workspaceConfig?.release.banner : workspaceConfig?.release.banner?.url;
|
|
2237
2238
|
const header = await format(
|
|
2238
|
-
|
|
2239
|
+
`
|
|
2239
2242
|
|
|
2240
|
-
|
|
2243
|
+
# Changelog ${project || workspaceConfig?.name ? "for" : ""}${workspaceConfig?.name ? ` ${titleCase(workspaceConfig.name)}` : ""}${project ? `${workspaceConfig?.name ? " -" : ""} ${titleCase(project)}` : ""}
|
|
2241
2244
|
|
|
2242
2245
|
`,
|
|
2243
2246
|
{
|
|
@@ -3992,9 +3995,9 @@ function formatGithubReleaseNotes(releaseVersion, content, projectName, workspac
|
|
|
3992
3995
|
if (!workspaceConfig) {
|
|
3993
3996
|
return content;
|
|
3994
3997
|
}
|
|
3995
|
-
return `
|
|
4000
|
+
) : void 0 : workspaceConfig.release.banner.alt) || "Release banner header"}](${typeof workspaceConfig.release.banner === "string" ? workspaceConfig.release.banner : workspaceConfig.release.banner?.url})
|
|
3998
4001
|
${workspaceConfig.release.header || ""}
|
|
3999
4002
|
|
|
4000
4003
|
# ${projectName ? `${titleCase(projectName)} ` : ""}v${releaseVersion.rawVersion}
|
package/bin/post-checkout.cjs
CHANGED
|
@@ -3,33 +3,33 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
|
|
5
5
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkMC32ZYE5_cjs = require('./chunk-MC32ZYE5.cjs');
|
|
7
7
|
|
|
8
8
|
// bin/post-checkout.ts
|
|
9
9
|
void (async () => {
|
|
10
|
-
const config = await
|
|
10
|
+
const config = await chunkMC32ZYE5_cjs.getConfig();
|
|
11
11
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
chunkMC32ZYE5_cjs.handleProcess(config);
|
|
13
|
+
chunkMC32ZYE5_cjs.writeInfo("Running post-checkout hook...", config);
|
|
14
14
|
chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
|
|
15
15
|
try {
|
|
16
16
|
chunkCIJVSMK2_cjs.run(config, "git-lfs version");
|
|
17
17
|
} catch (error) {
|
|
18
|
-
|
|
18
|
+
chunkMC32ZYE5_cjs.writeError(
|
|
19
19
|
`This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.
|
|
20
20
|
Error: ${error?.message}`,
|
|
21
21
|
config
|
|
22
22
|
);
|
|
23
|
-
|
|
23
|
+
chunkMC32ZYE5_cjs.exitWithError(config);
|
|
24
24
|
}
|
|
25
25
|
chunkCIJVSMK2_cjs.run(config, "git lfs post-checkout");
|
|
26
|
-
|
|
26
|
+
chunkMC32ZYE5_cjs.exitWithSuccess(config);
|
|
27
27
|
} catch (error) {
|
|
28
|
-
|
|
28
|
+
chunkMC32ZYE5_cjs.writeFatal(
|
|
29
29
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
30
30
|
config
|
|
31
31
|
);
|
|
32
|
-
|
|
32
|
+
chunkMC32ZYE5_cjs.exitWithError(config);
|
|
33
33
|
process.exit(1);
|
|
34
34
|
}
|
|
35
35
|
})();
|
package/bin/post-checkout.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
|
|
3
3
|
import { run } from './chunk-54Q5U5WW.js';
|
|
4
|
-
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-
|
|
4
|
+
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-EICIIIDG.js';
|
|
5
5
|
|
|
6
6
|
// bin/post-checkout.ts
|
|
7
7
|
void (async () => {
|
package/bin/post-commit.cjs
CHANGED
|
@@ -3,33 +3,33 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
|
|
5
5
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkMC32ZYE5_cjs = require('./chunk-MC32ZYE5.cjs');
|
|
7
7
|
|
|
8
8
|
// bin/post-commit.ts
|
|
9
9
|
void (async () => {
|
|
10
|
-
const config = await
|
|
10
|
+
const config = await chunkMC32ZYE5_cjs.getConfig();
|
|
11
11
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
chunkMC32ZYE5_cjs.handleProcess(config);
|
|
13
|
+
chunkMC32ZYE5_cjs.writeInfo("Running post-commit hook...", config);
|
|
14
14
|
chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
|
|
15
15
|
try {
|
|
16
16
|
chunkCIJVSMK2_cjs.run(config, "git-lfs version");
|
|
17
17
|
} catch (error) {
|
|
18
|
-
|
|
18
|
+
chunkMC32ZYE5_cjs.writeError(
|
|
19
19
|
`This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.
|
|
20
20
|
Error: ${error?.message}`,
|
|
21
21
|
config
|
|
22
22
|
);
|
|
23
|
-
|
|
23
|
+
chunkMC32ZYE5_cjs.exitWithError(config);
|
|
24
24
|
}
|
|
25
25
|
chunkCIJVSMK2_cjs.run(config, "git lfs post-commit");
|
|
26
|
-
|
|
26
|
+
chunkMC32ZYE5_cjs.exitWithSuccess(config);
|
|
27
27
|
} catch (error) {
|
|
28
|
-
|
|
28
|
+
chunkMC32ZYE5_cjs.writeFatal(
|
|
29
29
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
30
30
|
config
|
|
31
31
|
);
|
|
32
|
-
|
|
32
|
+
chunkMC32ZYE5_cjs.exitWithError(config);
|
|
33
33
|
process.exit(1);
|
|
34
34
|
}
|
|
35
35
|
})();
|
package/bin/post-commit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
|
|
3
3
|
import { run } from './chunk-54Q5U5WW.js';
|
|
4
|
-
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-
|
|
4
|
+
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-EICIIIDG.js';
|
|
5
5
|
|
|
6
6
|
// bin/post-commit.ts
|
|
7
7
|
void (async () => {
|