@storm-software/git-tools 2.98.0 → 2.100.0
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/bin/{chunk-7HYXXE5S.js → chunk-6ZE252BR.js} +52 -3
- package/bin/{chunk-LFH4CIZM.cjs → chunk-GLCRW2R7.cjs} +52 -3
- package/bin/git.cjs +191 -188
- package/bin/git.js +85 -82
- 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 +1 -1
package/bin/git.cjs
CHANGED
|
@@ -21,7 +21,7 @@ var _chunkFNIN2HF7cjs = require('./chunk-FNIN2HF7.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkGLCRW2R7cjs = require('./chunk-GLCRW2R7.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
var _chunkP2CHIYIKcjs = require('./chunk-P2CHIYIK.cjs');
|
|
@@ -3264,7 +3264,7 @@ var require_wrap_ansi = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
3264
3264
|
_chunkKK4YC43Scjs.init_cjs_shims.call(void 0, );
|
|
3265
3265
|
var stringWidth = require_string_width();
|
|
3266
3266
|
var stripAnsi2 = require_strip_ansi();
|
|
3267
|
-
var ansiStyles2 =
|
|
3267
|
+
var ansiStyles2 = _chunkGLCRW2R7cjs.require_ansi_styles.call(void 0, );
|
|
3268
3268
|
var ESCAPES2 = /* @__PURE__ */ new Set([
|
|
3269
3269
|
"\x1B",
|
|
3270
3270
|
"\x9B"
|
|
@@ -15606,7 +15606,7 @@ var require_node = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
15606
15606
|
1
|
|
15607
15607
|
];
|
|
15608
15608
|
try {
|
|
15609
|
-
const supportsColor2 =
|
|
15609
|
+
const supportsColor2 = _chunkGLCRW2R7cjs.require_supports_color.call(void 0, );
|
|
15610
15610
|
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
|
15611
15611
|
exports.colors = [
|
|
15612
15612
|
20,
|
|
@@ -67098,12 +67098,12 @@ var getRuleFromScopeEnum = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0,
|
|
|
67098
67098
|
// src/commitlint/run.ts
|
|
67099
67099
|
var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
|
|
67100
67100
|
var runCommitLint = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (config, params) => {
|
|
67101
|
-
|
|
67101
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "\u{1F4DD} Validating git commit message aligns with the Storm Software specification", config);
|
|
67102
67102
|
let commitMessage;
|
|
67103
67103
|
if (params.message && params.message !== COMMIT_EDITMSG_PATH) {
|
|
67104
67104
|
commitMessage = params.message;
|
|
67105
67105
|
} else {
|
|
67106
|
-
const commitFile =
|
|
67106
|
+
const commitFile = _chunkGLCRW2R7cjs.joinPaths.call(void 0, config.workspaceRoot, params.file || params.message || COMMIT_EDITMSG_PATH);
|
|
67107
67107
|
if (_fs.existsSync.call(void 0, commitFile)) {
|
|
67108
67108
|
commitMessage = await _asyncOptionalChain([(await _promises.readFile.call(void 0, commitFile, "utf8")), 'optionalAccess', async _81 => _81.trim, 'call', async _82 => _82()]);
|
|
67109
67109
|
}
|
|
@@ -67115,19 +67115,19 @@ var runCommitLint = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async
|
|
|
67115
67115
|
if (upstreamRemote) {
|
|
67116
67116
|
const upstreamRemoteIdentifier = _optionalChain([upstreamRemote, 'access', _83 => _83.split, 'call', _84 => _84(" "), 'access', _85 => _85[0], 'optionalAccess', _86 => _86.trim, 'call', _87 => _87()]);
|
|
67117
67117
|
if (!upstreamRemoteIdentifier) {
|
|
67118
|
-
|
|
67118
|
+
_chunkGLCRW2R7cjs.writeWarning.call(void 0, `No upstream remote found for ${config.name}.git. Skipping comparison.`, config);
|
|
67119
67119
|
return;
|
|
67120
67120
|
}
|
|
67121
|
-
|
|
67121
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, `Comparing against remote ${upstreamRemoteIdentifier}`);
|
|
67122
67122
|
const currentBranch = _child_process2.default.execSync("git branch --show-current").toString().trim();
|
|
67123
67123
|
gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
|
|
67124
67124
|
} else {
|
|
67125
|
-
|
|
67125
|
+
_chunkGLCRW2R7cjs.writeWarning.call(void 0, `No upstream remote found for ${config.name}.git. Skipping comparison against upstream main.`, config);
|
|
67126
67126
|
return;
|
|
67127
67127
|
}
|
|
67128
67128
|
commitMessage = _child_process2.default.execSync(gitLogCmd).toString().trim();
|
|
67129
67129
|
if (!commitMessage) {
|
|
67130
|
-
|
|
67130
|
+
_chunkGLCRW2R7cjs.writeWarning.call(void 0, "No commits found. Skipping commit message validation.", config);
|
|
67131
67131
|
return;
|
|
67132
67132
|
}
|
|
67133
67133
|
}
|
|
@@ -67145,7 +67145,7 @@ var runCommitLint = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async
|
|
|
67145
67145
|
helpUrl: commitlintConfig.helpUrl
|
|
67146
67146
|
});
|
|
67147
67147
|
if (!matchCommit || report.errors.length || report.warnings.length) {
|
|
67148
|
-
|
|
67148
|
+
_chunkGLCRW2R7cjs.writeSuccess.call(void 0, `Commit was processing completed successfully!`, config);
|
|
67149
67149
|
} else {
|
|
67150
67150
|
let errorMessage = " Oh no! Your commit message: \n-------------------------------------------------------------------\n" + commitMessage + "\n-------------------------------------------------------------------\n\n Does not follow the commit message convention specified by Storm Software.";
|
|
67151
67151
|
errorMessage += "\ntype(scope): subject \n BLANK LINE \n body";
|
|
@@ -68339,7 +68339,7 @@ var createState = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (c
|
|
|
68339
68339
|
answers: {}
|
|
68340
68340
|
};
|
|
68341
68341
|
} else {
|
|
68342
|
-
|
|
68342
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, `Using custom commit config file: ${commitizenFile}`, config);
|
|
68343
68343
|
let commitizenConfig = await Promise.resolve().then(() => _interopRequireWildcard(require(commitizenFile)));
|
|
68344
68344
|
if (_optionalChain([commitizenConfig, 'optionalAccess', _93 => _93.default])) {
|
|
68345
68345
|
commitizenConfig = _optionalChain([commitizenConfig, 'optionalAccess', _94 => _94.default]);
|
|
@@ -68380,7 +68380,7 @@ var createState = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (c
|
|
|
68380
68380
|
}
|
|
68381
68381
|
if (project) {
|
|
68382
68382
|
let description = `${project.name} - ${project.root}`;
|
|
68383
|
-
const packageJsonPath =
|
|
68383
|
+
const packageJsonPath = _chunkGLCRW2R7cjs.joinPaths.call(void 0, project.root, "package.json");
|
|
68384
68384
|
if (await hfs.isFile(packageJsonPath)) {
|
|
68385
68385
|
const packageJson = await hfs.json(packageJsonPath);
|
|
68386
68386
|
description = packageJson.description || description;
|
|
@@ -68454,10 +68454,10 @@ ${closedIssueEmoji}${config.prompt.settings.closedIssueMessage}${issues}`;
|
|
|
68454
68454
|
|
|
68455
68455
|
// src/commit/run.ts
|
|
68456
68456
|
var runCommit = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (commitizenFile = "@storm-software/git-tools/commit/config", dryRun = false) => {
|
|
68457
|
-
const config = await
|
|
68457
|
+
const config = await _chunkGLCRW2R7cjs.getConfig.call(void 0, );
|
|
68458
68458
|
const state = await createState(config, commitizenFile);
|
|
68459
68459
|
if (dryRun) {
|
|
68460
|
-
|
|
68460
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Running in dry mode.", config);
|
|
68461
68461
|
}
|
|
68462
68462
|
console.log(chalk_template_default`
|
|
68463
68463
|
{bold.#999999 ----------------------------------------}
|
|
@@ -68467,7 +68467,7 @@ var runCommit = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (com
|
|
|
68467
68467
|
`);
|
|
68468
68468
|
state.answers = await askQuestions(state);
|
|
68469
68469
|
const message2 = formatCommitMessage(state);
|
|
68470
|
-
const commitMsgFile =
|
|
68470
|
+
const commitMsgFile = _chunkGLCRW2R7cjs.joinPaths.call(void 0, getGitDir(), "COMMIT_EDITMSG");
|
|
68471
68471
|
console.log(chalk_template_default`
|
|
68472
68472
|
{bold.#999999 ----------------------------------------}
|
|
68473
68473
|
|
|
@@ -68491,8 +68491,8 @@ var runCommit = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (com
|
|
|
68491
68491
|
]);
|
|
68492
68492
|
const command = (0, import_any_shell_escape.default)(commandItems);
|
|
68493
68493
|
if (dryRun) {
|
|
68494
|
-
|
|
68495
|
-
|
|
68494
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, `Skipping execution [dry-run]: ${command.replace(commitMsgFile, ".git/COMMIT_EDITMSG")}`, config);
|
|
68495
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, `Message [dry-run]: ${message2}`, config);
|
|
68496
68496
|
} else {
|
|
68497
68497
|
await _promises2.default.writeFile(commitMsgFile, message2);
|
|
68498
68498
|
_chunkFNIN2HF7cjs.run.call(void 0, config, command);
|
|
@@ -80885,7 +80885,7 @@ var _nxjsonjs = require('nx/src/config/nx-json.js');
|
|
|
80885
80885
|
|
|
80886
80886
|
// src/release/changelog.ts
|
|
80887
80887
|
_chunkKK4YC43Scjs.init_cjs_shims.call(void 0, );
|
|
80888
|
-
var chalk2 = _chunkKK4YC43Scjs.__toESM.call(void 0,
|
|
80888
|
+
var chalk2 = _chunkKK4YC43Scjs.__toESM.call(void 0, _chunkGLCRW2R7cjs.require_source.call(void 0, ), 1);
|
|
80889
80889
|
var import_enquirer = _chunkKK4YC43Scjs.__toESM.call(void 0, require_enquirer(), 1);
|
|
80890
80890
|
var import_semver2 = _chunkKK4YC43Scjs.__toESM.call(void 0, require_semver2(), 1);
|
|
80891
80891
|
var import_tmp = _chunkKK4YC43Scjs.__toESM.call(void 0, require_tmp2(), 1);
|
|
@@ -80928,7 +80928,7 @@ async function generateChangelogContent(releaseVersion2, filepath, newContent, c
|
|
|
80928
80928
|
const changelogReleases = parseChangelogMarkdown(changelogContents).releases;
|
|
80929
80929
|
const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
|
|
80930
80930
|
if (existingVersionToUpdate) {
|
|
80931
|
-
changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project,
|
|
80931
|
+
changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project, workspaceConfig)}
|
|
80932
80932
|
|
|
80933
80933
|
|
|
80934
80934
|
${existingVersionToUpdate.body}`, newContent);
|
|
@@ -80951,16 +80951,11 @@ var titleCase = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, (input) =>
|
|
|
80951
80951
|
}
|
|
80952
80952
|
return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s).join(" ");
|
|
80953
80953
|
}, "titleCase");
|
|
80954
|
-
function generateChangelogTitle(version, project,
|
|
80955
|
-
if (!_optionalChain([workspaceConfig, 'optionalAccess', _185 => _185.
|
|
80954
|
+
function generateChangelogTitle(version, project, workspaceConfig) {
|
|
80955
|
+
if (!_optionalChain([workspaceConfig, 'optionalAccess', _185 => _185.name]) || !project) {
|
|
80956
80956
|
return version;
|
|
80957
80957
|
}
|
|
80958
|
-
|
|
80959
|
-
if (excludeDate !== false) {
|
|
80960
|
-
const dateStr = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
80961
|
-
maybeDateStr = ` (${dateStr})`;
|
|
80962
|
-
}
|
|
80963
|
-
return `[${version}](${workspaceConfig.repository}/releases/tag/${project}%40${version})${maybeDateStr}`;
|
|
80958
|
+
return `[${version}](https://github.com/${workspaceConfig.organization}/${workspaceConfig.name}/releases/tag/${project}%40${version}) (${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)})`;
|
|
80964
80959
|
}
|
|
80965
80960
|
_chunkKK4YC43Scjs.__name.call(void 0, generateChangelogTitle, "generateChangelogTitle");
|
|
80966
80961
|
function parseChangelogMarkdown(contents) {
|
|
@@ -80971,7 +80966,7 @@ function parseChangelogMarkdown(contents) {
|
|
|
80971
80966
|
const releases = [];
|
|
80972
80967
|
for (let i = 0; i < headings.length; i++) {
|
|
80973
80968
|
const heading = headings[i];
|
|
80974
|
-
if (!heading
|
|
80969
|
+
if (!heading) {
|
|
80975
80970
|
continue;
|
|
80976
80971
|
}
|
|
80977
80972
|
const nextHeading = headings[i + 1];
|
|
@@ -84460,8 +84455,8 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84460
84455
|
super(config);_class13.prototype.__init27.call(this);;
|
|
84461
84456
|
}
|
|
84462
84457
|
async render() {
|
|
84463
|
-
this.workspaceConfig = await
|
|
84464
|
-
return super.render();
|
|
84458
|
+
this.workspaceConfig = await _chunkGLCRW2R7cjs.getWorkspaceConfig.call(void 0, );
|
|
84459
|
+
return await super.render();
|
|
84465
84460
|
}
|
|
84466
84461
|
preprocessChanges() {
|
|
84467
84462
|
this.relevantChanges = [
|
|
@@ -84511,23 +84506,20 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84511
84506
|
}
|
|
84512
84507
|
}
|
|
84513
84508
|
/**
|
|
84514
|
-
* Determines if the changelog entry should be rendered as empty.
|
|
84515
|
-
* This is the case when there are no relevant changes, breaking changes,
|
|
84516
|
-
* or dependency bumps.
|
|
84509
|
+
* Determines if the changelog entry should be rendered as empty. This is the case when there are no relevant changes, breaking changes, or dependency bumps.
|
|
84517
84510
|
*/
|
|
84518
|
-
shouldRenderEmptyEntry() {
|
|
84519
|
-
|
|
84520
|
-
}
|
|
84511
|
+
// protected override shouldRenderEmptyEntry(): boolean {
|
|
84512
|
+
// return true;
|
|
84513
|
+
// }
|
|
84521
84514
|
renderVersionTitle() {
|
|
84522
84515
|
const isMajorVersion = `${(0, import_semver.major)(this.changelogEntryVersion)}.0.0` === this.changelogEntryVersion.replace(/^v/, "");
|
|
84523
|
-
return isMajorVersion ? `# ${generateChangelogTitle(this.changelogEntryVersion, this.project,
|
|
84516
|
+
return isMajorVersion ? `# ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}` : `## ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}`;
|
|
84524
84517
|
}
|
|
84525
84518
|
renderBreakingChanges() {
|
|
84526
|
-
const uniqueBreakingChanges = Array.from(new Set(this.breakingChanges));
|
|
84527
84519
|
return [
|
|
84528
84520
|
"### Breaking Changes",
|
|
84529
84521
|
"",
|
|
84530
|
-
...
|
|
84522
|
+
...Array.from(new Set(this.breakingChanges))
|
|
84531
84523
|
];
|
|
84532
84524
|
}
|
|
84533
84525
|
renderDependencyBumps() {
|
|
@@ -84637,7 +84629,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84637
84629
|
// src/release/changelog.ts
|
|
84638
84630
|
function createAPI(overrideReleaseConfig) {
|
|
84639
84631
|
return /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async function releaseChangelog(args) {
|
|
84640
|
-
const workspaceConfig = await
|
|
84632
|
+
const workspaceConfig = await _chunkGLCRW2R7cjs.getWorkspaceConfig.call(void 0, );
|
|
84641
84633
|
const projectGraph = await _projectgraph.createProjectGraphAsync.call(void 0, {
|
|
84642
84634
|
exitOnError: true
|
|
84643
84635
|
});
|
|
@@ -84801,7 +84793,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84801
84793
|
});
|
|
84802
84794
|
if (workspaceChangelog && shouldCreateGitHubRelease(nxReleaseConfig.changelog.workspaceChangelog, args.createRelease)) {
|
|
84803
84795
|
postGitTasks.push(async (latestCommit) => {
|
|
84804
|
-
const contents = formatGithubReleaseNotes(workspaceChangelog.contents, workspaceConfig);
|
|
84796
|
+
const contents = formatGithubReleaseNotes(workspaceChangelog.releaseVersion, workspaceChangelog.contents, null, workspaceConfig);
|
|
84805
84797
|
_output.output.logSingleLine(`Creating GitHub Release
|
|
84806
84798
|
|
|
84807
84799
|
${contents}`);
|
|
@@ -84818,13 +84810,13 @@ ${contents}`);
|
|
|
84818
84810
|
continue;
|
|
84819
84811
|
}
|
|
84820
84812
|
for (const project of releaseGroup.projects) {
|
|
84821
|
-
if (!projectsVersionData[project]
|
|
84813
|
+
if (!_optionalChain([projectsVersionData, 'access', _206 => _206[project], 'optionalAccess', _207 => _207.newVersion])) {
|
|
84822
84814
|
continue;
|
|
84823
84815
|
}
|
|
84824
84816
|
const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
|
|
84825
84817
|
return {
|
|
84826
84818
|
dependencyName: dep.source,
|
|
84827
|
-
newVersion: _optionalChain([projectsVersionData, 'access',
|
|
84819
|
+
newVersion: _optionalChain([projectsVersionData, 'access', _208 => _208[dep.source], 'optionalAccess', _209 => _209.newVersion])
|
|
84828
84820
|
};
|
|
84829
84821
|
}).filter((b) => b.newVersion !== null);
|
|
84830
84822
|
for (const dependent of dependentProjects) {
|
|
@@ -84843,10 +84835,10 @@ ${contents}`);
|
|
|
84843
84835
|
if (config === false) {
|
|
84844
84836
|
continue;
|
|
84845
84837
|
}
|
|
84846
|
-
const projects = _optionalChain([args, 'access',
|
|
84838
|
+
const projects = _optionalChain([args, 'access', _210 => _210.projects, 'optionalAccess', _211 => _211.length]) ? Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
84847
84839
|
return [
|
|
84848
84840
|
project,
|
|
84849
|
-
..._optionalChain([projectsVersionData, 'access',
|
|
84841
|
+
..._optionalChain([projectsVersionData, 'access', _212 => _212[project], 'optionalAccess', _213 => _213.dependentProjects, 'access', _214 => _214.map, 'call', _215 => _215((dep) => dep.source)]) || []
|
|
84850
84842
|
];
|
|
84851
84843
|
}) : releaseGroup.projects;
|
|
84852
84844
|
const projectNodes = projects.map((name) => projectGraph.nodes[name]);
|
|
@@ -84882,12 +84874,12 @@ ${contents}`);
|
|
|
84882
84874
|
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {
|
|
84883
84875
|
projectName: project.name,
|
|
84884
84876
|
releaseGroupName: releaseGroup.name
|
|
84885
|
-
}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async
|
|
84877
|
+
}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _216 => _216.tag]);
|
|
84886
84878
|
if (!fromRef && useAutomaticFromRef) {
|
|
84887
84879
|
const firstCommit = await _git.getFirstGitCommit.call(void 0, );
|
|
84888
84880
|
const allCommits = await getCommits(firstCommit, toSHA);
|
|
84889
84881
|
const commitsForProject = allCommits.filter((c) => c.affectedFiles.find((f) => f.startsWith(project.data.root)));
|
|
84890
|
-
fromRef = _optionalChain([commitsForProject, 'access',
|
|
84882
|
+
fromRef = _optionalChain([commitsForProject, 'access', _217 => _217[0], 'optionalAccess', _218 => _218.shortHash]);
|
|
84891
84883
|
if (args.verbose) {
|
|
84892
84884
|
console.log(`Determined --from ref for ${project.name} from the first commit in which it exists: ${fromRef}`);
|
|
84893
84885
|
}
|
|
@@ -84932,7 +84924,7 @@ ${contents}`);
|
|
|
84932
84924
|
for (const [projectName, projectChangelog] of Object.entries(projectChangelogs)) {
|
|
84933
84925
|
if (projectChangelogs && shouldCreateGitHubRelease(releaseGroup.changelog, args.createRelease)) {
|
|
84934
84926
|
postGitTasks.push(async (latestCommit) => {
|
|
84935
|
-
const contents = formatGithubReleaseNotes(projectChangelog.contents, workspaceConfig);
|
|
84927
|
+
const contents = formatGithubReleaseNotes(projectChangelog.releaseVersion, projectChangelog.contents, projectName, workspaceConfig);
|
|
84936
84928
|
_output.output.logSingleLine(`Creating GitHub Release
|
|
84937
84929
|
|
|
84938
84930
|
${contents}`);
|
|
@@ -84991,7 +84983,7 @@ ${contents}`);
|
|
|
84991
84983
|
return changes2;
|
|
84992
84984
|
}).filter(Boolean);
|
|
84993
84985
|
} else {
|
|
84994
|
-
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async
|
|
84986
|
+
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _219 => _219.tag]);
|
|
84995
84987
|
if (!fromRef) {
|
|
84996
84988
|
if (useAutomaticFromRef) {
|
|
84997
84989
|
fromRef = await _git.getFirstGitCommit.call(void 0, );
|
|
@@ -85187,7 +85179,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
85187
85179
|
}
|
|
85188
85180
|
_chunkKK4YC43Scjs.__name.call(void 0, applyChangesAndExit, "applyChangesAndExit");
|
|
85189
85181
|
async function generateChangelogForWorkspace({ tree, args, projectGraph, nxReleaseConfig, workspaceChangelogVersion, changes, commits }) {
|
|
85190
|
-
const workspaceConfig = await
|
|
85182
|
+
const workspaceConfig = await _chunkGLCRW2R7cjs.getWorkspaceConfig.call(void 0, );
|
|
85191
85183
|
if (!workspaceConfig) {
|
|
85192
85184
|
throw new Error(`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`);
|
|
85193
85185
|
}
|
|
@@ -85211,7 +85203,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85211
85203
|
});
|
|
85212
85204
|
return;
|
|
85213
85205
|
}
|
|
85214
|
-
if (_optionalChain([Object, 'access',
|
|
85206
|
+
if (_optionalChain([Object, 'access', _220 => _220.values, 'call', _221 => _221(nxReleaseConfig.groups), 'access', _222 => _222[0], 'optionalAccess', _223 => _223.projectsRelationship]) === "independent") {
|
|
85215
85207
|
_output.output.warn({
|
|
85216
85208
|
title: `Workspace changelog is enabled, but you have configured an independent projects relationship. This is not supported, so workspace changelog will be disabled.`,
|
|
85217
85209
|
bodyLines: [
|
|
@@ -85267,8 +85259,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85267
85259
|
contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
|
|
85268
85260
|
}
|
|
85269
85261
|
if (interpolatedTreePath) {
|
|
85270
|
-
|
|
85271
|
-
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, rootChangelogContents, null, workspaceConfig));
|
|
85262
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _224 => _224.read, 'call', _225 => _225(interpolatedTreePath), 'optionalAccess', _226 => _226.toString, 'call', _227 => _227()]) : "", null, workspaceConfig));
|
|
85272
85263
|
_printchanges.printAndFlushChanges.call(void 0, tree, !!dryRun, 3, false, _shared.noDiffInChangelogMessage);
|
|
85273
85264
|
}
|
|
85274
85265
|
return {
|
|
@@ -85278,7 +85269,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85278
85269
|
}
|
|
85279
85270
|
_chunkKK4YC43Scjs.__name.call(void 0, generateChangelogForWorkspace, "generateChangelogForWorkspace");
|
|
85280
85271
|
async function generateChangelogForProjects({ tree, args, changes, projectsVersionData, releaseGroup, projects, nxReleaseConfig, projectToAdditionalDependencyBumps }) {
|
|
85281
|
-
const workspaceConfig = await
|
|
85272
|
+
const workspaceConfig = await _chunkGLCRW2R7cjs.getWorkspaceConfig.call(void 0, );
|
|
85282
85273
|
if (!workspaceConfig) {
|
|
85283
85274
|
throw new Error(`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`);
|
|
85284
85275
|
}
|
|
@@ -85297,10 +85288,9 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
85297
85288
|
projectName: project.name,
|
|
85298
85289
|
projectRoot: project.data.root,
|
|
85299
85290
|
workspaceRoot: ""
|
|
85300
|
-
// within the tree, workspaceRoot is the root
|
|
85301
85291
|
});
|
|
85302
85292
|
}
|
|
85303
|
-
if (!_optionalChain([projectsVersionData, 'access',
|
|
85293
|
+
if (!_optionalChain([projectsVersionData, 'access', _228 => _228[project.name], 'optionalAccess', _229 => _229.newVersion])) {
|
|
85304
85294
|
continue;
|
|
85305
85295
|
}
|
|
85306
85296
|
const releaseVersion2 = new (0, _shared.ReleaseVersion)({
|
|
@@ -85313,53 +85303,56 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
85313
85303
|
_output.output.log({
|
|
85314
85304
|
title: `${prefix} an entry in ${interpolatedTreePath} for ${chalk2.white(releaseVersion2.gitTag)}`
|
|
85315
85305
|
});
|
|
85306
|
+
const githubRepoData = _github.getGitHubRepoData.call(void 0, gitRemote, config.createRelease);
|
|
85307
|
+
const changelogRenderer = new StormChangelogRenderer({
|
|
85308
|
+
changes,
|
|
85309
|
+
changelogEntryVersion: releaseVersion2.rawVersion,
|
|
85310
|
+
project: project.name,
|
|
85311
|
+
repoData: githubRepoData,
|
|
85312
|
+
entryWhenNoChanges: typeof config.entryWhenNoChanges === "string" ? _utils.interpolate.call(void 0, config.entryWhenNoChanges, {
|
|
85313
|
+
projectName: project.name,
|
|
85314
|
+
projectRoot: project.data.root,
|
|
85315
|
+
workspaceRoot: ""
|
|
85316
|
+
}) : false,
|
|
85317
|
+
changelogRenderOptions: config.renderOptions,
|
|
85318
|
+
isVersionPlans: !!releaseGroup.versionPlans,
|
|
85319
|
+
conventionalCommitsConfig: releaseGroup.versionPlans ? null : nxReleaseConfig.conventionalCommits,
|
|
85320
|
+
dependencyBumps: projectToAdditionalDependencyBumps.get(project.name)
|
|
85321
|
+
});
|
|
85322
|
+
let contents = await changelogRenderer.render();
|
|
85323
|
+
_output.output.log({
|
|
85324
|
+
title: `Changelog renderer for ${project.name} rendered the following content:
|
|
85325
|
+
|
|
85326
|
+
${contents}`.trim()
|
|
85327
|
+
});
|
|
85328
|
+
if (interactive) {
|
|
85329
|
+
const tmpDir = (0, import_tmp.dirSync)().name;
|
|
85330
|
+
const changelogPath = _path3.joinPathFragments.call(void 0,
|
|
85331
|
+
tmpDir,
|
|
85332
|
+
// Include the tree path in the name so that it is easier to identify which changelog file is being edited
|
|
85333
|
+
`PREVIEW__${interpolatedTreePath.replace(/\//g, "_")}`
|
|
85334
|
+
);
|
|
85335
|
+
_fs.writeFileSync.call(void 0, changelogPath, contents);
|
|
85336
|
+
await _launcheditor.launchEditor.call(void 0, changelogPath);
|
|
85337
|
+
contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
|
|
85338
|
+
}
|
|
85339
|
+
if (interpolatedTreePath) {
|
|
85340
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _230 => _230.read, 'call', _231 => _231(interpolatedTreePath), 'optionalAccess', _232 => _232.toString, 'call', _233 => _233()]) : "", project.name, workspaceConfig));
|
|
85341
|
+
_printchanges.printAndFlushChanges.call(void 0,
|
|
85342
|
+
tree,
|
|
85343
|
+
!!dryRun,
|
|
85344
|
+
3,
|
|
85345
|
+
false,
|
|
85346
|
+
_shared.noDiffInChangelogMessage,
|
|
85347
|
+
// Only print the change for the current changelog file at this point
|
|
85348
|
+
(f) => f.path === interpolatedTreePath
|
|
85349
|
+
);
|
|
85350
|
+
}
|
|
85351
|
+
projectChangelogs[project.name] = {
|
|
85352
|
+
releaseVersion: releaseVersion2,
|
|
85353
|
+
contents
|
|
85354
|
+
};
|
|
85316
85355
|
}
|
|
85317
|
-
const githubRepoData = _github.getGitHubRepoData.call(void 0, gitRemote, config.createRelease);
|
|
85318
|
-
const changelogRenderer = new StormChangelogRenderer({
|
|
85319
|
-
changes,
|
|
85320
|
-
changelogEntryVersion: releaseVersion2.rawVersion,
|
|
85321
|
-
project: project.name,
|
|
85322
|
-
repoData: githubRepoData,
|
|
85323
|
-
entryWhenNoChanges: typeof config.entryWhenNoChanges === "string" ? _utils.interpolate.call(void 0, config.entryWhenNoChanges, {
|
|
85324
|
-
projectName: project.name,
|
|
85325
|
-
projectRoot: project.data.root,
|
|
85326
|
-
workspaceRoot: ""
|
|
85327
|
-
// within the tree, workspaceRoot is the root
|
|
85328
|
-
}) : false,
|
|
85329
|
-
changelogRenderOptions: config.renderOptions,
|
|
85330
|
-
isVersionPlans: !!releaseGroup.versionPlans,
|
|
85331
|
-
conventionalCommitsConfig: releaseGroup.versionPlans ? null : nxReleaseConfig.conventionalCommits,
|
|
85332
|
-
dependencyBumps: projectToAdditionalDependencyBumps.get(project.name)
|
|
85333
|
-
});
|
|
85334
|
-
let contents = await changelogRenderer.render();
|
|
85335
|
-
if (interactive) {
|
|
85336
|
-
const tmpDir = (0, import_tmp.dirSync)().name;
|
|
85337
|
-
const changelogPath = _path3.joinPathFragments.call(void 0,
|
|
85338
|
-
tmpDir,
|
|
85339
|
-
// Include the tree path in the name so that it is easier to identify which changelog file is being edited
|
|
85340
|
-
`PREVIEW__${interpolatedTreePath.replace(/\//g, "_")}`
|
|
85341
|
-
);
|
|
85342
|
-
_fs.writeFileSync.call(void 0, changelogPath, contents);
|
|
85343
|
-
await _launcheditor.launchEditor.call(void 0, changelogPath);
|
|
85344
|
-
contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
|
|
85345
|
-
}
|
|
85346
|
-
if (interpolatedTreePath) {
|
|
85347
|
-
const changelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _228 => _228.read, 'call', _229 => _229(interpolatedTreePath), 'optionalAccess', _230 => _230.toString, 'call', _231 => _231()]) : "";
|
|
85348
|
-
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, changelogContents, project.name, workspaceConfig));
|
|
85349
|
-
_printchanges.printAndFlushChanges.call(void 0,
|
|
85350
|
-
tree,
|
|
85351
|
-
!!dryRun,
|
|
85352
|
-
3,
|
|
85353
|
-
false,
|
|
85354
|
-
_shared.noDiffInChangelogMessage,
|
|
85355
|
-
// Only print the change for the current changelog file at this point
|
|
85356
|
-
(f) => f.path === interpolatedTreePath
|
|
85357
|
-
);
|
|
85358
|
-
}
|
|
85359
|
-
projectChangelogs[project.name] = {
|
|
85360
|
-
releaseVersion: releaseVersion2,
|
|
85361
|
-
contents
|
|
85362
|
-
};
|
|
85363
85356
|
}
|
|
85364
85357
|
return projectChangelogs;
|
|
85365
85358
|
}
|
|
@@ -85368,12 +85361,7 @@ function checkChangelogFilesEnabled(nxReleaseConfig) {
|
|
|
85368
85361
|
if (nxReleaseConfig.changelog.workspaceChangelog && nxReleaseConfig.changelog.workspaceChangelog.file) {
|
|
85369
85362
|
return true;
|
|
85370
85363
|
}
|
|
85371
|
-
|
|
85372
|
-
if (releaseGroup.changelog && releaseGroup.changelog.file) {
|
|
85373
|
-
return true;
|
|
85374
|
-
}
|
|
85375
|
-
}
|
|
85376
|
-
return false;
|
|
85364
|
+
return Object.values(nxReleaseConfig.groups).some((releaseGroup) => _optionalChain([releaseGroup, 'optionalAccess', _234 => _234.changelog, 'optionalAccess', _235 => _235.file]));
|
|
85377
85365
|
}
|
|
85378
85366
|
_chunkKK4YC43Scjs.__name.call(void 0, checkChangelogFilesEnabled, "checkChangelogFilesEnabled");
|
|
85379
85367
|
async function getCommits(fromSHA, toSHA) {
|
|
@@ -85479,13 +85467,28 @@ function versionPlanSemverReleaseTypeToChangelogType(bump) {
|
|
|
85479
85467
|
}
|
|
85480
85468
|
}
|
|
85481
85469
|
_chunkKK4YC43Scjs.__name.call(void 0, versionPlanSemverReleaseTypeToChangelogType, "versionPlanSemverReleaseTypeToChangelogType");
|
|
85482
|
-
function formatGithubReleaseNotes(content, workspaceConfig) {
|
|
85470
|
+
function formatGithubReleaseNotes(releaseVersion2, content, projectName, workspaceConfig) {
|
|
85483
85471
|
if (!workspaceConfig) {
|
|
85484
85472
|
return content;
|
|
85485
85473
|
}
|
|
85486
|
-
return `
|
|
85487
85475
|
${workspaceConfig.release.header || ""}
|
|
85488
|
-
|
|
85476
|
+
|
|
85477
|
+
# ${projectName ? `${titleCase(projectName)} ` : ""}v${releaseVersion2.rawVersion}
|
|
85478
|
+
|
|
85479
|
+
We at [${titleCase(workspaceConfig.organization)}](${workspaceConfig.homepage}) are very excited to announce the v${releaseVersion2.rawVersion} release of the ${projectName ? titleCase(projectName) : workspaceConfig.name ? titleCase(workspaceConfig.name) : "Storm Software"} project! \u{1F680}
|
|
85480
|
+
|
|
85481
|
+
These changes are released under the ${workspaceConfig.license.includes("license") ? workspaceConfig.license : `${workspaceConfig.license} license`}. You can find more details on [our licensing page](${workspaceConfig.licensing}).
|
|
85482
|
+
|
|
85483
|
+
You can find the documentation around this release and much more [our documentation site](${workspaceConfig.docs}).
|
|
85484
|
+
|
|
85485
|
+
If you have any questions or comments, feel free to reach out to the team on [Discord](${workspaceConfig.account.discord}) or [our contact page](${workspaceConfig.contact}). Please help us spread the word by [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@${workspaceConfig.account.twitter}%20release%20${projectName ? `${_optionalChain([titleCase, 'call', _236 => _236(projectName), 'optionalAccess', _237 => _237.replaceAll, 'call', _238 => _238(" ", "%20")])}%20` : ""}v${releaseVersion2.rawVersion}%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/${workspaceConfig.organization}/${workspaceConfig.name}/releases/tag/${releaseVersion2.gitTag}) about this release!
|
|
85486
|
+
|
|
85487
|
+
## Release Notes
|
|
85488
|
+
|
|
85489
|
+
${content.replaceAll(`## ${generateChangelogTitle(releaseVersion2.rawVersion, projectName, workspaceConfig)}`, "").replaceAll(`# ${generateChangelogTitle(releaseVersion2.rawVersion, projectName, workspaceConfig)}`, "")}
|
|
85490
|
+
|
|
85491
|
+
---
|
|
85489
85492
|
|
|
85490
85493
|
${workspaceConfig.release.footer}
|
|
85491
85494
|
`;
|
|
@@ -85568,13 +85571,13 @@ var _filemaputilsjs = require('nx/src/project-graph/file-map-utils.js');
|
|
|
85568
85571
|
var _paramsjs = require('nx/src/utils/params.js');
|
|
85569
85572
|
async function releaseVersion(config, args) {
|
|
85570
85573
|
try {
|
|
85571
|
-
|
|
85574
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Running release version command", config);
|
|
85572
85575
|
const projectGraph = await _projectgraphjs.createProjectGraphAsync.call(void 0, {
|
|
85573
85576
|
exitOnError: true
|
|
85574
85577
|
});
|
|
85575
85578
|
const { projects } = _projectgraphjs.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
85576
85579
|
const nxJson = _nxjsonjs.readNxJson.call(void 0, );
|
|
85577
|
-
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
85580
|
+
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _239 => _239.workspaceRoot]), () => ( _chunkGLCRW2R7cjs.findWorkspaceRoot.call(void 0, )));
|
|
85578
85581
|
if (args.verbose) {
|
|
85579
85582
|
process.env.NX_VERBOSE_LOGGING = "true";
|
|
85580
85583
|
}
|
|
@@ -85582,29 +85585,29 @@ async function releaseVersion(config, args) {
|
|
|
85582
85585
|
if (configError) {
|
|
85583
85586
|
return await _configjs.handleNxReleaseConfigError.call(void 0, configError);
|
|
85584
85587
|
}
|
|
85585
|
-
if ((args.gitCommit === void 0 || args.gitTag === void 0 || args.stageChanges === void 0) && _optionalChain([nxJson, 'access',
|
|
85588
|
+
if ((args.gitCommit === void 0 || args.gitTag === void 0 || args.stageChanges === void 0) && _optionalChain([nxJson, 'access', _240 => _240.release, 'optionalAccess', _241 => _241.git])) {
|
|
85586
85589
|
await _resolvenxjsonerrormessagejs.resolveNxJsonConfigErrorMessage.call(void 0, [
|
|
85587
85590
|
"release",
|
|
85588
85591
|
"git"
|
|
85589
85592
|
]);
|
|
85590
85593
|
throw new Error(`The "release.git" property in nx.json may not be used with the "nx release version" subcommand or programmatic API. Instead, configure git options for subcommands directly with "release.version.git" and "release.changelog.git".`);
|
|
85591
85594
|
}
|
|
85592
|
-
|
|
85595
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Filtering projects and release groups", config);
|
|
85593
85596
|
const { error: filterError, releaseGroups, releaseGroupToFilteredProjects } = _filterreleasegroupsjs.filterReleaseGroups.call(void 0, projectGraph, nxReleaseConfig, args.projects, args.groups);
|
|
85594
85597
|
if (filterError) {
|
|
85595
|
-
|
|
85598
|
+
_chunkGLCRW2R7cjs.writeError.call(void 0, filterError.title, config);
|
|
85596
85599
|
throw new Error(filterError.title);
|
|
85597
85600
|
}
|
|
85598
85601
|
const tree = new (0, _treejs.FsTree)(workspaceRoot3, true);
|
|
85599
85602
|
const versionData = {};
|
|
85600
|
-
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85603
|
+
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _242 => _242.version, 'access', _243 => _243.git, 'access', _244 => _244.commitMessage]);
|
|
85601
85604
|
const additionalChangedFiles = /* @__PURE__ */ new Set();
|
|
85602
85605
|
const generatorCallbacks = [];
|
|
85603
|
-
if (_optionalChain([args, 'access',
|
|
85604
|
-
|
|
85606
|
+
if (_optionalChain([args, 'access', _245 => _245.projects, 'optionalAccess', _246 => _246.length])) {
|
|
85607
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Run versioning for all remaining release groups and filtered projects within them", config);
|
|
85605
85608
|
for (const releaseGroup of releaseGroups) {
|
|
85606
85609
|
const releaseGroupName = releaseGroup.name;
|
|
85607
|
-
|
|
85610
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, `Running versioning for release group "${releaseGroupName}" and filtered projects within it`, config);
|
|
85608
85611
|
const releaseGroupProjectNames = Array.from(_nullishCoalesce(releaseGroupToFilteredProjects.get(releaseGroup), () => ( [])));
|
|
85609
85612
|
const projectBatches = _batchprojectsbygeneratorconfigjs.batchProjectsByGeneratorConfig.call(void 0,
|
|
85610
85613
|
projectGraph,
|
|
@@ -85613,7 +85616,7 @@ async function releaseVersion(config, args) {
|
|
|
85613
85616
|
releaseGroupProjectNames
|
|
85614
85617
|
);
|
|
85615
85618
|
for (const [generatorConfigString, projectNames] of projectBatches.entries()) {
|
|
85616
|
-
|
|
85619
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, `Running versioning for batch "${JSON.stringify(projectNames)}" for release-group "${releaseGroupName}"`, config);
|
|
85617
85620
|
const [generatorName, generatorOptions] = JSON.parse(generatorConfigString);
|
|
85618
85621
|
const generatorData = resolveGeneratorData({
|
|
85619
85622
|
...extractGeneratorCollectionAndName(`batch "${JSON.stringify(projectNames)}" for release-group "${releaseGroupName}"`, generatorName),
|
|
@@ -85640,7 +85643,7 @@ async function releaseVersion(config, args) {
|
|
|
85640
85643
|
});
|
|
85641
85644
|
}
|
|
85642
85645
|
}
|
|
85643
|
-
const gitTagValues2 = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85646
|
+
const gitTagValues2 = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _247 => _247.version, 'access', _248 => _248.git, 'access', _249 => _249.tag]))) ? _sharedjs.createGitTagValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData) : [];
|
|
85644
85647
|
_sharedjs.handleDuplicateGitTags.call(void 0, gitTagValues2);
|
|
85645
85648
|
printAndFlushChanges2(config, tree, !!args.dryRun);
|
|
85646
85649
|
for (const generatorCallback of generatorCallbacks) {
|
|
@@ -85657,29 +85660,29 @@ async function releaseVersion(config, args) {
|
|
|
85657
85660
|
projectsVersionData: versionData
|
|
85658
85661
|
};
|
|
85659
85662
|
}
|
|
85660
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85663
|
+
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _250 => _250.version, 'access', _251 => _251.git, 'access', _252 => _252.commit])))) {
|
|
85661
85664
|
await _sharedjs.commitChanges.call(void 0, {
|
|
85662
85665
|
changedFiles: changedFiles2,
|
|
85663
85666
|
isDryRun: !!args.dryRun,
|
|
85664
85667
|
isVerbose: !!args.verbose,
|
|
85665
85668
|
gitCommitMessages: _sharedjs.createCommitMessageValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage),
|
|
85666
|
-
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85669
|
+
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _253 => _253.version, 'access', _254 => _254.git, 'access', _255 => _255.commitArgs])
|
|
85667
85670
|
});
|
|
85668
|
-
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85669
|
-
|
|
85671
|
+
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _256 => _256.version, 'access', _257 => _257.git, 'access', _258 => _258.stageChanges])))) {
|
|
85672
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
85670
85673
|
await _gitjs.gitAdd.call(void 0, {
|
|
85671
85674
|
changedFiles: changedFiles2,
|
|
85672
85675
|
dryRun: args.dryRun,
|
|
85673
85676
|
verbose: args.verbose
|
|
85674
85677
|
});
|
|
85675
85678
|
}
|
|
85676
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85677
|
-
|
|
85679
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _259 => _259.version, 'access', _260 => _260.git, 'access', _261 => _261.tag])))) {
|
|
85680
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Tagging commit with git", config);
|
|
85678
85681
|
for (const tag of gitTagValues2) {
|
|
85679
85682
|
await _gitjs.gitTag.call(void 0, {
|
|
85680
85683
|
tag,
|
|
85681
|
-
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85682
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85684
|
+
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _262 => _262.version, 'access', _263 => _263.git, 'access', _264 => _264.tagMessage]),
|
|
85685
|
+
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _265 => _265.version, 'access', _266 => _266.git, 'access', _267 => _267.tagArgs]),
|
|
85683
85686
|
dryRun: args.dryRun,
|
|
85684
85687
|
verbose: args.verbose
|
|
85685
85688
|
});
|
|
@@ -85726,7 +85729,7 @@ async function releaseVersion(config, args) {
|
|
|
85726
85729
|
});
|
|
85727
85730
|
}
|
|
85728
85731
|
}
|
|
85729
|
-
const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85732
|
+
const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _268 => _268.version, 'access', _269 => _269.git, 'access', _270 => _270.tag]))) ? _sharedjs.createGitTagValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData) : [];
|
|
85730
85733
|
_sharedjs.handleDuplicateGitTags.call(void 0, gitTagValues);
|
|
85731
85734
|
printAndFlushChanges2(config, tree, !!args.dryRun);
|
|
85732
85735
|
for (const generatorCallback of generatorCallbacks) {
|
|
@@ -85735,10 +85738,10 @@ async function releaseVersion(config, args) {
|
|
|
85735
85738
|
let workspaceVersion = void 0;
|
|
85736
85739
|
if (releaseGroups.length === 1) {
|
|
85737
85740
|
const releaseGroup = releaseGroups[0];
|
|
85738
|
-
if (_optionalChain([releaseGroup, 'optionalAccess',
|
|
85741
|
+
if (_optionalChain([releaseGroup, 'optionalAccess', _271 => _271.projectsRelationship]) === "fixed") {
|
|
85739
85742
|
const releaseGroupProjectNames = Array.from(_nullishCoalesce(releaseGroupToFilteredProjects.get(releaseGroup), () => ( [])));
|
|
85740
85743
|
if (releaseGroupProjectNames.length > 0 && releaseGroupProjectNames[0]) {
|
|
85741
|
-
workspaceVersion = _optionalChain([versionData, 'access',
|
|
85744
|
+
workspaceVersion = _optionalChain([versionData, 'access', _272 => _272[releaseGroupProjectNames[0]], 'optionalAccess', _273 => _273.newVersion]);
|
|
85742
85745
|
}
|
|
85743
85746
|
}
|
|
85744
85747
|
}
|
|
@@ -85752,29 +85755,29 @@ async function releaseVersion(config, args) {
|
|
|
85752
85755
|
projectsVersionData: versionData
|
|
85753
85756
|
};
|
|
85754
85757
|
}
|
|
85755
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85758
|
+
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _274 => _274.version, 'access', _275 => _275.git, 'access', _276 => _276.commit])))) {
|
|
85756
85759
|
await _sharedjs.commitChanges.call(void 0, {
|
|
85757
85760
|
changedFiles,
|
|
85758
85761
|
isDryRun: !!args.dryRun,
|
|
85759
85762
|
isVerbose: !!args.verbose,
|
|
85760
85763
|
gitCommitMessages: _sharedjs.createCommitMessageValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage),
|
|
85761
|
-
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85764
|
+
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _277 => _277.version, 'access', _278 => _278.git, 'access', _279 => _279.commitArgs])
|
|
85762
85765
|
});
|
|
85763
|
-
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85764
|
-
|
|
85766
|
+
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _280 => _280.version, 'access', _281 => _281.git, 'access', _282 => _282.stageChanges])))) {
|
|
85767
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
85765
85768
|
await _gitjs.gitAdd.call(void 0, {
|
|
85766
85769
|
changedFiles,
|
|
85767
85770
|
dryRun: args.dryRun,
|
|
85768
85771
|
verbose: args.verbose
|
|
85769
85772
|
});
|
|
85770
85773
|
}
|
|
85771
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85772
|
-
|
|
85774
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _283 => _283.version, 'access', _284 => _284.git, 'access', _285 => _285.tag])))) {
|
|
85775
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Tagging commit with git", config);
|
|
85773
85776
|
for (const tag of gitTagValues) {
|
|
85774
85777
|
await _gitjs.gitTag.call(void 0, {
|
|
85775
85778
|
tag,
|
|
85776
|
-
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85777
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85779
|
+
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _286 => _286.version, 'access', _287 => _287.git, 'access', _288 => _288.tagMessage]),
|
|
85780
|
+
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _289 => _289.version, 'access', _290 => _290.git, 'access', _291 => _291.tagArgs]),
|
|
85778
85781
|
dryRun: args.dryRun,
|
|
85779
85782
|
verbose: args.verbose
|
|
85780
85783
|
});
|
|
@@ -85785,8 +85788,8 @@ async function releaseVersion(config, args) {
|
|
|
85785
85788
|
projectsVersionData: versionData
|
|
85786
85789
|
};
|
|
85787
85790
|
} catch (error) {
|
|
85788
|
-
|
|
85789
|
-
|
|
85791
|
+
_chunkGLCRW2R7cjs.writeFatal.call(void 0, "A fatal error occurred while determining the Storm Release Version - the process was forced to terminate", config);
|
|
85792
|
+
_chunkGLCRW2R7cjs.writeError.call(void 0, `An exception was thrown while determining the Storm Release Version
|
|
85790
85793
|
- Details: ${error.message}
|
|
85791
85794
|
- Stacktrace: ${error.stack}`, config);
|
|
85792
85795
|
throw new Error(`An exception was thrown in the Storm Release Version generator's process
|
|
@@ -85797,7 +85800,7 @@ async function releaseVersion(config, args) {
|
|
|
85797
85800
|
}
|
|
85798
85801
|
_chunkKK4YC43Scjs.__name.call(void 0, releaseVersion, "releaseVersion");
|
|
85799
85802
|
async function runVersionOnProjects(config, projectGraph, nxJson, args, tree, generatorData, projectNames, releaseGroup, versionData) {
|
|
85800
|
-
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
85803
|
+
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _292 => _292.workspaceRoot]), () => ( _chunkGLCRW2R7cjs.findWorkspaceRoot.call(void 0, )));
|
|
85801
85804
|
const generatorOptions = {
|
|
85802
85805
|
// Always ensure a string to avoid generator schema validation errors
|
|
85803
85806
|
specifier: _nullishCoalesce(args.specifier, () => ( "")),
|
|
@@ -85816,7 +85819,7 @@ async function runVersionOnProjects(config, projectGraph, nxJson, args, tree, ge
|
|
|
85816
85819
|
throw new Error(`The version generator ${generatorData.collectionName}:${generatorData.normalizedGeneratorName} returned a function instead of an expected ReleaseVersionGeneratorResult`);
|
|
85817
85820
|
}
|
|
85818
85821
|
appendVersionData(versionData, versionResult.data);
|
|
85819
|
-
|
|
85822
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, `Updated version data: ${JSON.stringify(versionData, null, 2)}`, config);
|
|
85820
85823
|
return versionResult.callback;
|
|
85821
85824
|
}
|
|
85822
85825
|
_chunkKK4YC43Scjs.__name.call(void 0, runVersionOnProjects, "runVersionOnProjects");
|
|
@@ -85824,12 +85827,12 @@ function printAndFlushChanges2(config, tree, isDryRun) {
|
|
|
85824
85827
|
const changes = tree.listChanges();
|
|
85825
85828
|
for (const f of changes) {
|
|
85826
85829
|
if (f.type === "CREATE") {
|
|
85827
|
-
|
|
85828
|
-
_printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access',
|
|
85830
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, `CREATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
85831
|
+
_printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access', _293 => _293.content, 'optionalAccess', _294 => _294.toString, 'call', _295 => _295()]) || "");
|
|
85829
85832
|
} else if (f.type === "UPDATE") {
|
|
85830
|
-
|
|
85833
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, `UPDATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
85831
85834
|
const currentContentsOnDisk = _fs.readFileSync.call(void 0, (0, import_devkit.joinPathFragments)(tree.root, f.path)).toString();
|
|
85832
|
-
_printchangesjs.printDiff.call(void 0, currentContentsOnDisk, _optionalChain([f, 'access',
|
|
85835
|
+
_printchangesjs.printDiff.call(void 0, currentContentsOnDisk, _optionalChain([f, 'access', _296 => _296.content, 'optionalAccess', _297 => _297.toString, 'call', _298 => _298()]) || "");
|
|
85833
85836
|
} else if (f.type === "DELETE") {
|
|
85834
85837
|
throw new Error("Unexpected DELETE change, please report this as an issue");
|
|
85835
85838
|
}
|
|
@@ -85899,31 +85902,31 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85899
85902
|
process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
85900
85903
|
process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
85901
85904
|
process.env.NPM_CONFIG_PROVENANCE = "true";
|
|
85902
|
-
|
|
85905
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, "Creating workspace Project Graph data...", config);
|
|
85903
85906
|
const nxJson = _nxjsonjs.readNxJson.call(void 0, );
|
|
85904
|
-
|
|
85907
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, "Reading in the workspaces release configuration", config);
|
|
85905
85908
|
const to = options.head || process.env.NX_HEAD;
|
|
85906
85909
|
const from = options.base || process.env.NX_BASE;
|
|
85907
|
-
|
|
85910
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, `Using the following Git SHAs to determine the release content:
|
|
85908
85911
|
- From: ${from}
|
|
85909
85912
|
- To: ${to}
|
|
85910
85913
|
`, config);
|
|
85911
|
-
if (_optionalChain([nxJson, 'access',
|
|
85914
|
+
if (_optionalChain([nxJson, 'access', _299 => _299.release, 'optionalAccess', _300 => _300.groups])) {
|
|
85912
85915
|
nxJson.release.groups = Object.keys(nxJson.release.groups).reduce((ret, groupName) => {
|
|
85913
|
-
const groupConfig = _optionalChain([nxJson, 'access',
|
|
85916
|
+
const groupConfig = _optionalChain([nxJson, 'access', _301 => _301.release, 'optionalAccess', _302 => _302.groups, 'optionalAccess', _303 => _303[groupName]]);
|
|
85914
85917
|
ret[groupName] = _chunkP2CHIYIKcjs.defu.call(void 0, groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
|
|
85915
85918
|
return ret;
|
|
85916
85919
|
}, {});
|
|
85917
85920
|
}
|
|
85918
85921
|
const nxReleaseConfig = _chunkP2CHIYIKcjs.defu.call(void 0, nxJson.release, DEFAULT_RELEASE_CONFIG);
|
|
85919
|
-
|
|
85920
|
-
|
|
85922
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "Using the following `nx.json` release configuration values", config);
|
|
85923
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, nxReleaseConfig, config);
|
|
85921
85924
|
const releaseChangelog = createAPI(nxReleaseConfig);
|
|
85922
85925
|
const releasePublish = _publishjs.createAPI.call(void 0, nxReleaseConfig);
|
|
85923
|
-
|
|
85926
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, "Determining the current release versions...", config);
|
|
85924
85927
|
const { workspaceVersion, projectsVersionData } = await releaseVersion(config, {
|
|
85925
85928
|
dryRun: false,
|
|
85926
|
-
verbose:
|
|
85929
|
+
verbose: _chunkGLCRW2R7cjs.isVerbose.call(void 0, config.logLevel),
|
|
85927
85930
|
preid: config.preid,
|
|
85928
85931
|
deleteVersionPlans: false,
|
|
85929
85932
|
stageChanges: true,
|
|
@@ -85933,50 +85936,50 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85933
85936
|
});
|
|
85934
85937
|
await releaseChangelog({
|
|
85935
85938
|
...options,
|
|
85936
|
-
version: _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85939
|
+
version: _optionalChain([nxReleaseConfig, 'optionalAccess', _304 => _304.projectsRelationship]) !== "fixed" ? void 0 : workspaceVersion,
|
|
85937
85940
|
versionData: projectsVersionData,
|
|
85938
85941
|
dryRun: false,
|
|
85939
|
-
verbose:
|
|
85942
|
+
verbose: _chunkGLCRW2R7cjs.isVerbose.call(void 0, config.logLevel),
|
|
85940
85943
|
to,
|
|
85941
85944
|
from,
|
|
85942
85945
|
gitCommit: true,
|
|
85943
85946
|
gitCommitMessage: "release(monorepo): Publish workspace release updates"
|
|
85944
85947
|
});
|
|
85945
|
-
|
|
85948
|
+
_chunkGLCRW2R7cjs.writeDebug.call(void 0, "Tagging commit with git", config);
|
|
85946
85949
|
if (options.skipPublish) {
|
|
85947
|
-
|
|
85950
|
+
_chunkGLCRW2R7cjs.writeWarning.call(void 0, "Skipping publishing packages since `skipPublish` was provided as `true` in the release options.", config);
|
|
85948
85951
|
} else {
|
|
85949
|
-
const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access',
|
|
85952
|
+
const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access', _305 => _305[key], 'optionalAccess', _306 => _306.newVersion]));
|
|
85950
85953
|
if (changedProjects.length > 0) {
|
|
85951
|
-
|
|
85954
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, `Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
|
|
85952
85955
|
${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
85953
85956
|
`, config);
|
|
85954
85957
|
const result2 = await releasePublish({
|
|
85955
85958
|
...options,
|
|
85956
85959
|
dryRun: !!options.dryRun,
|
|
85957
|
-
verbose:
|
|
85960
|
+
verbose: _chunkGLCRW2R7cjs.isVerbose.call(void 0, config.logLevel)
|
|
85958
85961
|
});
|
|
85959
|
-
const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access',
|
|
85962
|
+
const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access', _307 => _307[key], 'optionalAccess', _308 => _308.code]) && _optionalChain([result2, 'access', _309 => _309[key], 'optionalAccess', _310 => _310.code]) > 0);
|
|
85960
85963
|
if (failedProjects.length > 0) {
|
|
85961
85964
|
throw new Error(`The Storm release process was not completed successfully! One or more errors occured while running the \`nx-release-publish\` executor tasks.
|
|
85962
85965
|
|
|
85963
85966
|
Please review the workflow details for the following project(s):
|
|
85964
|
-
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access',
|
|
85967
|
+
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access', _311 => _311[failedProject], 'optionalAccess', _312 => _312.code])})`).join("\n")}
|
|
85965
85968
|
`);
|
|
85966
85969
|
}
|
|
85967
85970
|
} else {
|
|
85968
|
-
|
|
85971
|
+
_chunkGLCRW2R7cjs.writeWarning.call(void 0, "Skipped publishing packages.", config);
|
|
85969
85972
|
}
|
|
85970
85973
|
}
|
|
85971
|
-
|
|
85974
|
+
_chunkGLCRW2R7cjs.writeSuccess.call(void 0, "Completed the Storm workspace release process!", config);
|
|
85972
85975
|
}, "runRelease");
|
|
85973
85976
|
|
|
85974
85977
|
// src/cli/index.ts
|
|
85975
85978
|
var _config = {};
|
|
85976
85979
|
function createProgram(config) {
|
|
85977
85980
|
_config = config;
|
|
85978
|
-
|
|
85979
|
-
const root2 =
|
|
85981
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "\u26A1 Running Storm Git Tools", config);
|
|
85982
|
+
const root2 = _chunkGLCRW2R7cjs.findWorkspaceRootSafe.call(void 0, process.cwd());
|
|
85980
85983
|
process.env.STORM_WORKSPACE_ROOT ??= root2;
|
|
85981
85984
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root2;
|
|
85982
85985
|
root2 && process.chdir(root2);
|
|
@@ -86004,14 +86007,14 @@ function createProgram(config) {
|
|
|
86004
86007
|
_chunkKK4YC43Scjs.__name.call(void 0, createProgram, "createProgram");
|
|
86005
86008
|
async function commitAction({ config = "@storm-software/git-tools/commit/config.js", dryRun = false }) {
|
|
86006
86009
|
try {
|
|
86007
|
-
|
|
86010
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, `\u26A1 Preparing to commit your changes. Please provide the requested details below...`, _config);
|
|
86008
86011
|
await runCommit(config, dryRun);
|
|
86009
|
-
|
|
86012
|
+
_chunkGLCRW2R7cjs.writeSuccess.call(void 0, `\u{1F389} Storm Commit processing completed successfully!
|
|
86010
86013
|
|
|
86011
86014
|
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}
|
|
86012
86015
|
`, _config);
|
|
86013
86016
|
} catch (error) {
|
|
86014
|
-
|
|
86017
|
+
_chunkGLCRW2R7cjs.writeFatal.call(void 0, `A fatal error occurred while running commit action:
|
|
86015
86018
|
|
|
86016
86019
|
${error.message}`, _config);
|
|
86017
86020
|
throw new Error(error.message, {
|
|
@@ -86022,11 +86025,11 @@ ${error.message}`, _config);
|
|
|
86022
86025
|
_chunkKK4YC43Scjs.__name.call(void 0, commitAction, "commitAction");
|
|
86023
86026
|
async function readmeAction(options) {
|
|
86024
86027
|
try {
|
|
86025
|
-
|
|
86028
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "\u26A1 Formatting the workspace's README.md files", _config);
|
|
86026
86029
|
await runReadme(options);
|
|
86027
|
-
|
|
86030
|
+
_chunkGLCRW2R7cjs.writeSuccess.call(void 0, "Formatting of the workspace's README.md files is complete\n", _config);
|
|
86028
86031
|
} catch (error) {
|
|
86029
|
-
|
|
86032
|
+
_chunkGLCRW2R7cjs.writeFatal.call(void 0, `A fatal error occurred while running README format action:
|
|
86030
86033
|
|
|
86031
86034
|
${error.message}`);
|
|
86032
86035
|
throw new Error(error.message, {
|
|
@@ -86037,16 +86040,16 @@ ${error.message}`);
|
|
|
86037
86040
|
_chunkKK4YC43Scjs.__name.call(void 0, readmeAction, "readmeAction");
|
|
86038
86041
|
async function releaseAction({ project, base, head, dryRun }) {
|
|
86039
86042
|
try {
|
|
86040
|
-
|
|
86043
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, "\u26A1 Running the Storm Release and Publish process on the workspace", _config);
|
|
86041
86044
|
await runRelease(_config, {
|
|
86042
86045
|
dryRun,
|
|
86043
86046
|
project,
|
|
86044
86047
|
base,
|
|
86045
86048
|
head
|
|
86046
86049
|
});
|
|
86047
|
-
|
|
86050
|
+
_chunkGLCRW2R7cjs.writeSuccess.call(void 0, "Release completed successfully!\n", _config);
|
|
86048
86051
|
} catch (error) {
|
|
86049
|
-
|
|
86052
|
+
_chunkGLCRW2R7cjs.writeFatal.call(void 0, `A fatal error occurred while running release action:
|
|
86050
86053
|
|
|
86051
86054
|
${error.message} ${error.stack ? `
|
|
86052
86055
|
|
|
@@ -86060,15 +86063,15 @@ Stacktrace: ${error.stack}` : ""}`, _config);
|
|
|
86060
86063
|
_chunkKK4YC43Scjs.__name.call(void 0, releaseAction, "releaseAction");
|
|
86061
86064
|
async function commitLintAction({ config, message: message2, file }) {
|
|
86062
86065
|
try {
|
|
86063
|
-
|
|
86066
|
+
_chunkGLCRW2R7cjs.writeInfo.call(void 0, `\u26A1 Linting the ${_config.repository ? _config.repository : _config.namespace ? _config.namespace : _config.name ? _config.name : _config.organization ? _config.organization : "Storm-Software"} repository's commit messages.`, _config);
|
|
86064
86067
|
await runCommitLint(_config, {
|
|
86065
86068
|
config,
|
|
86066
86069
|
message: message2,
|
|
86067
86070
|
file
|
|
86068
86071
|
});
|
|
86069
|
-
|
|
86072
|
+
_chunkGLCRW2R7cjs.writeSuccess.call(void 0, "Linting the commit messages completed successfully!\n", _config);
|
|
86070
86073
|
} catch (error) {
|
|
86071
|
-
|
|
86074
|
+
_chunkGLCRW2R7cjs.writeFatal.call(void 0, `A fatal error occurred while linting the commit messages:
|
|
86072
86075
|
|
|
86073
86076
|
${error.message}`, _config);
|
|
86074
86077
|
throw new Error(error.message, {
|
|
@@ -86080,15 +86083,15 @@ _chunkKK4YC43Scjs.__name.call(void 0, commitLintAction, "commitLintAction");
|
|
|
86080
86083
|
|
|
86081
86084
|
// bin/git.ts
|
|
86082
86085
|
void (async () => {
|
|
86083
|
-
const config = await
|
|
86086
|
+
const config = await _chunkGLCRW2R7cjs.getConfig.call(void 0, );
|
|
86084
86087
|
try {
|
|
86085
|
-
|
|
86088
|
+
_chunkGLCRW2R7cjs.handleProcess.call(void 0, config);
|
|
86086
86089
|
const program2 = createProgram(config);
|
|
86087
86090
|
await program2.parseAsync(process.argv);
|
|
86088
|
-
|
|
86089
|
-
|
|
86091
|
+
_chunkGLCRW2R7cjs.writeSuccess.call(void 0, `\u{1F389} Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`, config);
|
|
86092
|
+
_chunkGLCRW2R7cjs.exitWithSuccess.call(void 0, config);
|
|
86090
86093
|
} catch (error) {
|
|
86091
|
-
|
|
86094
|
+
_chunkGLCRW2R7cjs.exitWithError.call(void 0, config);
|
|
86092
86095
|
process.exit(1);
|
|
86093
86096
|
}
|
|
86094
86097
|
})();
|