@storm-software/git-tools 2.89.26 → 2.89.30
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-FJHQPSYU.js → chunk-F5UAXEVI.js} +25 -25
- package/bin/{chunk-WIDIIDDQ.cjs → chunk-NTA62AN7.cjs} +25 -25
- package/bin/git.cjs +116 -130
- package/bin/git.js +65 -79
- 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/dist/lefthook/config.yml +4 -8
- package/dist/lint-staged/config.cjs +43 -43
- package/package.json +1 -1
package/bin/git.cjs
CHANGED
|
@@ -19,7 +19,7 @@ var _chunk7FWXX5NNcjs = require('./chunk-7FWXX5NN.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkNTA62AN7cjs = require('./chunk-NTA62AN7.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkF6YMONH3cjs = require('./chunk-F6YMONH3.cjs');
|
|
@@ -3262,7 +3262,7 @@ var require_wrap_ansi = _chunkEVP6BIDZcjs.__commonJS.call(void 0, {
|
|
|
3262
3262
|
_chunkEVP6BIDZcjs.init_cjs_shims.call(void 0, );
|
|
3263
3263
|
var stringWidth = require_string_width();
|
|
3264
3264
|
var stripAnsi2 = require_strip_ansi();
|
|
3265
|
-
var ansiStyles2 =
|
|
3265
|
+
var ansiStyles2 = _chunkNTA62AN7cjs.require_ansi_styles.call(void 0, );
|
|
3266
3266
|
var ESCAPES2 = /* @__PURE__ */ new Set([
|
|
3267
3267
|
"\x1B",
|
|
3268
3268
|
"\x9B"
|
|
@@ -15604,7 +15604,7 @@ var require_node = _chunkEVP6BIDZcjs.__commonJS.call(void 0, {
|
|
|
15604
15604
|
1
|
|
15605
15605
|
];
|
|
15606
15606
|
try {
|
|
15607
|
-
const supportsColor2 =
|
|
15607
|
+
const supportsColor2 = _chunkNTA62AN7cjs.require_supports_color.call(void 0, );
|
|
15608
15608
|
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
|
15609
15609
|
exports.colors = [
|
|
15610
15610
|
20,
|
|
@@ -50702,12 +50702,12 @@ var getRuleFromScopeEnum = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0,
|
|
|
50702
50702
|
// src/commitlint/run.ts
|
|
50703
50703
|
var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
|
|
50704
50704
|
var runCommitLint = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async (config, params) => {
|
|
50705
|
-
|
|
50705
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "\u{1F4DD} Validating git commit message aligns with the Storm Software specification", config);
|
|
50706
50706
|
let commitMessage;
|
|
50707
50707
|
if (params.message && params.message !== COMMIT_EDITMSG_PATH) {
|
|
50708
50708
|
commitMessage = params.message;
|
|
50709
50709
|
} else {
|
|
50710
|
-
const commitFile =
|
|
50710
|
+
const commitFile = _chunkNTA62AN7cjs.joinPaths.call(void 0, config.workspaceRoot, params.file || params.message || COMMIT_EDITMSG_PATH);
|
|
50711
50711
|
if (_fs.existsSync.call(void 0, commitFile)) {
|
|
50712
50712
|
commitMessage = await _asyncOptionalChain([(await _promises.readFile.call(void 0, commitFile, "utf8")), 'optionalAccess', async _81 => _81.trim, 'call', async _82 => _82()]);
|
|
50713
50713
|
}
|
|
@@ -50719,19 +50719,19 @@ var runCommitLint = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async
|
|
|
50719
50719
|
if (upstreamRemote) {
|
|
50720
50720
|
const upstreamRemoteIdentifier = _optionalChain([upstreamRemote, 'access', _83 => _83.split, 'call', _84 => _84(" "), 'access', _85 => _85[0], 'optionalAccess', _86 => _86.trim, 'call', _87 => _87()]);
|
|
50721
50721
|
if (!upstreamRemoteIdentifier) {
|
|
50722
|
-
|
|
50722
|
+
_chunkNTA62AN7cjs.writeWarning.call(void 0, `No upstream remote found for ${config.name}.git. Skipping comparison.`, config);
|
|
50723
50723
|
return;
|
|
50724
50724
|
}
|
|
50725
|
-
|
|
50725
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, `Comparing against remote ${upstreamRemoteIdentifier}`);
|
|
50726
50726
|
const currentBranch = _child_process2.default.execSync("git branch --show-current").toString().trim();
|
|
50727
50727
|
gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
|
|
50728
50728
|
} else {
|
|
50729
|
-
|
|
50729
|
+
_chunkNTA62AN7cjs.writeWarning.call(void 0, `No upstream remote found for ${config.name}.git. Skipping comparison against upstream main.`, config);
|
|
50730
50730
|
return;
|
|
50731
50731
|
}
|
|
50732
50732
|
commitMessage = _child_process2.default.execSync(gitLogCmd).toString().trim();
|
|
50733
50733
|
if (!commitMessage) {
|
|
50734
|
-
|
|
50734
|
+
_chunkNTA62AN7cjs.writeWarning.call(void 0, "No commits found. Skipping commit message validation.", config);
|
|
50735
50735
|
return;
|
|
50736
50736
|
}
|
|
50737
50737
|
}
|
|
@@ -50749,7 +50749,7 @@ var runCommitLint = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async
|
|
|
50749
50749
|
helpUrl: commitlintConfig.helpUrl
|
|
50750
50750
|
});
|
|
50751
50751
|
if (!matchCommit || report.errors.length || report.warnings.length) {
|
|
50752
|
-
|
|
50752
|
+
_chunkNTA62AN7cjs.writeSuccess.call(void 0, `Commit was processing completed successfully!`, config);
|
|
50753
50753
|
} else {
|
|
50754
50754
|
let errorMessage = " Oh no! Your commit message: \n-------------------------------------------------------------------\n" + commitMessage + "\n-------------------------------------------------------------------\n\n Does not follow the commit message convention specified by Storm Software.";
|
|
50755
50755
|
errorMessage += "\ntype(scope): subject \n BLANK LINE \n body";
|
|
@@ -51943,7 +51943,7 @@ var createState = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async (c
|
|
|
51943
51943
|
answers: {}
|
|
51944
51944
|
};
|
|
51945
51945
|
} else {
|
|
51946
|
-
|
|
51946
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, `Using custom commit config file: ${commitizenFile}`, config);
|
|
51947
51947
|
let commitizenConfig = await Promise.resolve().then(() => _interopRequireWildcard(require(commitizenFile)));
|
|
51948
51948
|
if (_optionalChain([commitizenConfig, 'optionalAccess', _93 => _93.default])) {
|
|
51949
51949
|
commitizenConfig = _optionalChain([commitizenConfig, 'optionalAccess', _94 => _94.default]);
|
|
@@ -51984,7 +51984,7 @@ var createState = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async (c
|
|
|
51984
51984
|
}
|
|
51985
51985
|
if (project) {
|
|
51986
51986
|
let description = `${project.name} - ${project.root}`;
|
|
51987
|
-
const packageJsonPath =
|
|
51987
|
+
const packageJsonPath = _chunkNTA62AN7cjs.joinPaths.call(void 0, project.root, "package.json");
|
|
51988
51988
|
if (await hfs.isFile(packageJsonPath)) {
|
|
51989
51989
|
const packageJson = await hfs.json(packageJsonPath);
|
|
51990
51990
|
description = packageJson.description || description;
|
|
@@ -52058,10 +52058,10 @@ ${closedIssueEmoji}${config.prompt.settings.closedIssueMessage}${issues}`;
|
|
|
52058
52058
|
|
|
52059
52059
|
// src/commit/run.ts
|
|
52060
52060
|
var runCommit = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async (commitizenFile = "@storm-software/git-tools/commit/config", dryRun = false) => {
|
|
52061
|
-
const config = await
|
|
52061
|
+
const config = await _chunkNTA62AN7cjs.getConfig.call(void 0, );
|
|
52062
52062
|
const state = await createState(config, commitizenFile);
|
|
52063
52063
|
if (dryRun) {
|
|
52064
|
-
|
|
52064
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Running in dry mode.", config);
|
|
52065
52065
|
}
|
|
52066
52066
|
console.log(chalk_template_default`
|
|
52067
52067
|
{bold.#999999 ----------------------------------------}
|
|
@@ -52071,7 +52071,7 @@ var runCommit = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async (com
|
|
|
52071
52071
|
`);
|
|
52072
52072
|
state.answers = await askQuestions(state);
|
|
52073
52073
|
const message2 = formatCommitMessage(state);
|
|
52074
|
-
const commitMsgFile =
|
|
52074
|
+
const commitMsgFile = _chunkNTA62AN7cjs.joinPaths.call(void 0, getGitDir(), "COMMIT_EDITMSG");
|
|
52075
52075
|
console.log(chalk_template_default`
|
|
52076
52076
|
{bold.#999999 ----------------------------------------}
|
|
52077
52077
|
|
|
@@ -52095,8 +52095,8 @@ var runCommit = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async (com
|
|
|
52095
52095
|
]);
|
|
52096
52096
|
const command = (0, import_any_shell_escape.default)(commandItems);
|
|
52097
52097
|
if (dryRun) {
|
|
52098
|
-
|
|
52099
|
-
|
|
52098
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, `Skipping execution [dry-run]: ${command.replace(commitMsgFile, ".git/COMMIT_EDITMSG")}`, config);
|
|
52099
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, `Message [dry-run]: ${message2}`, config);
|
|
52100
52100
|
} else {
|
|
52101
52101
|
await _promises2.default.writeFile(commitMsgFile, message2);
|
|
52102
52102
|
_chunk7FWXX5NNcjs.run.call(void 0, config, command);
|
|
@@ -64563,13 +64563,13 @@ var _filemaputilsjs = require('nx/src/project-graph/file-map-utils.js');
|
|
|
64563
64563
|
|
|
64564
64564
|
var _paramsjs = require('nx/src/utils/params.js');
|
|
64565
64565
|
async function releaseVersion(config, args) {
|
|
64566
|
-
|
|
64566
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Running release version command", config);
|
|
64567
64567
|
const projectGraph = await _projectgraphjs.createProjectGraphAsync.call(void 0, {
|
|
64568
64568
|
exitOnError: true
|
|
64569
64569
|
});
|
|
64570
64570
|
const { projects } = _projectgraphjs.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
64571
64571
|
const nxJson = _nxjsonjs.readNxJson.call(void 0, );
|
|
64572
|
-
const workspaceRoot2 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _178 => _178.workspaceRoot]), () => (
|
|
64572
|
+
const workspaceRoot2 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _178 => _178.workspaceRoot]), () => ( _chunkNTA62AN7cjs.findWorkspaceRoot.call(void 0, )));
|
|
64573
64573
|
if (args.verbose) {
|
|
64574
64574
|
process.env.NX_VERBOSE_LOGGING = "true";
|
|
64575
64575
|
}
|
|
@@ -64584,10 +64584,10 @@ async function releaseVersion(config, args) {
|
|
|
64584
64584
|
]);
|
|
64585
64585
|
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".`);
|
|
64586
64586
|
}
|
|
64587
|
-
|
|
64587
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Filtering projects and release groups", config);
|
|
64588
64588
|
const { error: filterError, releaseGroups, releaseGroupToFilteredProjects } = _filterreleasegroupsjs.filterReleaseGroups.call(void 0, projectGraph, nxReleaseConfig, args.projects, args.groups);
|
|
64589
64589
|
if (filterError) {
|
|
64590
|
-
|
|
64590
|
+
_chunkNTA62AN7cjs.writeError.call(void 0, filterError.title, config);
|
|
64591
64591
|
throw new Error(filterError.title);
|
|
64592
64592
|
}
|
|
64593
64593
|
const tree = new (0, _treejs.FsTree)(workspaceRoot2, true);
|
|
@@ -64596,10 +64596,10 @@ async function releaseVersion(config, args) {
|
|
|
64596
64596
|
const additionalChangedFiles = /* @__PURE__ */ new Set();
|
|
64597
64597
|
const generatorCallbacks = [];
|
|
64598
64598
|
if (_optionalChain([args, 'access', _184 => _184.projects, 'optionalAccess', _185 => _185.length])) {
|
|
64599
|
-
|
|
64599
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Run versioning for all remaining release groups and filtered projects within them", config);
|
|
64600
64600
|
for (const releaseGroup of releaseGroups) {
|
|
64601
64601
|
const releaseGroupName = releaseGroup.name;
|
|
64602
|
-
|
|
64602
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, `Running versioning for release group "${releaseGroupName}" and filtered projects within it`, config);
|
|
64603
64603
|
const releaseGroupProjectNames = Array.from(_nullishCoalesce(releaseGroupToFilteredProjects.get(releaseGroup), () => ( [])));
|
|
64604
64604
|
const projectBatches = _batchprojectsbygeneratorconfigjs.batchProjectsByGeneratorConfig.call(void 0,
|
|
64605
64605
|
projectGraph,
|
|
@@ -64608,7 +64608,7 @@ async function releaseVersion(config, args) {
|
|
|
64608
64608
|
releaseGroupProjectNames
|
|
64609
64609
|
);
|
|
64610
64610
|
for (const [generatorConfigString, projectNames] of projectBatches.entries()) {
|
|
64611
|
-
|
|
64611
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, `Running versioning for batch "${JSON.stringify(projectNames)}" for release-group "${releaseGroupName}"`, config);
|
|
64612
64612
|
const [generatorName, generatorOptions] = JSON.parse(generatorConfigString);
|
|
64613
64613
|
const generatorData = resolveGeneratorData({
|
|
64614
64614
|
...extractGeneratorCollectionAndName(`batch "${JSON.stringify(projectNames)}" for release-group "${releaseGroupName}"`, generatorName),
|
|
@@ -64661,7 +64661,7 @@ async function releaseVersion(config, args) {
|
|
|
64661
64661
|
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _192 => _192.version, 'access', _193 => _193.git, 'access', _194 => _194.commitArgs])
|
|
64662
64662
|
});
|
|
64663
64663
|
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _195 => _195.version, 'access', _196 => _196.git, 'access', _197 => _197.stageChanges])))) {
|
|
64664
|
-
|
|
64664
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
64665
64665
|
await _gitjs.gitAdd.call(void 0, {
|
|
64666
64666
|
changedFiles: changedFiles2,
|
|
64667
64667
|
dryRun: args.dryRun,
|
|
@@ -64669,7 +64669,7 @@ async function releaseVersion(config, args) {
|
|
|
64669
64669
|
});
|
|
64670
64670
|
}
|
|
64671
64671
|
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _198 => _198.version, 'access', _199 => _199.git, 'access', _200 => _200.tag])))) {
|
|
64672
|
-
|
|
64672
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Tagging commit with git", config);
|
|
64673
64673
|
for (const tag of gitTagValues2) {
|
|
64674
64674
|
await _gitjs.gitTag.call(void 0, {
|
|
64675
64675
|
tag,
|
|
@@ -64756,7 +64756,7 @@ async function releaseVersion(config, args) {
|
|
|
64756
64756
|
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _216 => _216.version, 'access', _217 => _217.git, 'access', _218 => _218.commitArgs])
|
|
64757
64757
|
});
|
|
64758
64758
|
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _219 => _219.version, 'access', _220 => _220.git, 'access', _221 => _221.stageChanges])))) {
|
|
64759
|
-
|
|
64759
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
64760
64760
|
await _gitjs.gitAdd.call(void 0, {
|
|
64761
64761
|
changedFiles,
|
|
64762
64762
|
dryRun: args.dryRun,
|
|
@@ -64764,7 +64764,7 @@ async function releaseVersion(config, args) {
|
|
|
64764
64764
|
});
|
|
64765
64765
|
}
|
|
64766
64766
|
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _222 => _222.version, 'access', _223 => _223.git, 'access', _224 => _224.tag])))) {
|
|
64767
|
-
|
|
64767
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Tagging commit with git", config);
|
|
64768
64768
|
for (const tag of gitTagValues) {
|
|
64769
64769
|
await _gitjs.gitTag.call(void 0, {
|
|
64770
64770
|
tag,
|
|
@@ -64782,7 +64782,7 @@ async function releaseVersion(config, args) {
|
|
|
64782
64782
|
}
|
|
64783
64783
|
_chunkEVP6BIDZcjs.__name.call(void 0, releaseVersion, "releaseVersion");
|
|
64784
64784
|
async function runVersionOnProjects(config, projectGraph, nxJson, args, tree, generatorData, projectNames, releaseGroup, versionData) {
|
|
64785
|
-
const workspaceRoot2 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _231 => _231.workspaceRoot]), () => (
|
|
64785
|
+
const workspaceRoot2 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _231 => _231.workspaceRoot]), () => ( _chunkNTA62AN7cjs.findWorkspaceRoot.call(void 0, )));
|
|
64786
64786
|
const generatorOptions = {
|
|
64787
64787
|
// Always ensure a string to avoid generator schema validation errors
|
|
64788
64788
|
specifier: _nullishCoalesce(args.specifier, () => ( "")),
|
|
@@ -64801,7 +64801,7 @@ async function runVersionOnProjects(config, projectGraph, nxJson, args, tree, ge
|
|
|
64801
64801
|
throw new Error(`The version generator ${generatorData.collectionName}:${generatorData.normalizedGeneratorName} returned a function instead of an expected ReleaseVersionGeneratorResult`);
|
|
64802
64802
|
}
|
|
64803
64803
|
appendVersionData(versionData, versionResult.data);
|
|
64804
|
-
|
|
64804
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, `Updated version data: ${JSON.stringify(versionData, null, 2)}`, config);
|
|
64805
64805
|
return versionResult.callback;
|
|
64806
64806
|
}
|
|
64807
64807
|
_chunkEVP6BIDZcjs.__name.call(void 0, runVersionOnProjects, "runVersionOnProjects");
|
|
@@ -64809,10 +64809,10 @@ function printAndFlushChanges(config, tree, isDryRun) {
|
|
|
64809
64809
|
const changes = tree.listChanges();
|
|
64810
64810
|
for (const f of changes) {
|
|
64811
64811
|
if (f.type === "CREATE") {
|
|
64812
|
-
|
|
64812
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, `CREATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
64813
64813
|
_printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access', _232 => _232.content, 'optionalAccess', _233 => _233.toString, 'call', _234 => _234()]) || "");
|
|
64814
64814
|
} else if (f.type === "UPDATE") {
|
|
64815
|
-
|
|
64815
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, `UPDATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
64816
64816
|
const currentContentsOnDisk = _fs.readFileSync.call(void 0, (0, import_devkit.joinPathFragments)(tree.root, f.path)).toString();
|
|
64817
64817
|
_printchangesjs.printDiff.call(void 0, currentContentsOnDisk, _optionalChain([f, 'access', _235 => _235.content, 'optionalAccess', _236 => _236.toString, 'call', _237 => _237()]) || "");
|
|
64818
64818
|
} else if (f.type === "DELETE") {
|
|
@@ -64877,97 +64877,90 @@ _chunkEVP6BIDZcjs.__name.call(void 0, resolveGeneratorData, "resolveGeneratorDat
|
|
|
64877
64877
|
|
|
64878
64878
|
// src/release/run.ts
|
|
64879
64879
|
var runRelease = /* @__PURE__ */ _chunkEVP6BIDZcjs.__name.call(void 0, async (config, options) => {
|
|
64880
|
-
|
|
64881
|
-
|
|
64882
|
-
|
|
64883
|
-
|
|
64884
|
-
|
|
64885
|
-
|
|
64886
|
-
|
|
64887
|
-
|
|
64888
|
-
|
|
64889
|
-
|
|
64890
|
-
|
|
64891
|
-
|
|
64892
|
-
|
|
64893
|
-
_chunkWIDIIDDQcjs.writeDebug.call(void 0, `Using the following Git SHAs to determine the release content:
|
|
64880
|
+
process.env.GIT_AUTHOR_NAME = process.env.GITHUB_ACTOR;
|
|
64881
|
+
process.env.GIT_AUTHOR_EMAIL = `${process.env.GITHUB_ACTOR}@users.noreply.github.com`;
|
|
64882
|
+
process.env.GIT_COMMITTER_NAME = config.bot.name;
|
|
64883
|
+
process.env.GIT_COMMITTER_EMAIL = `${config.bot.name}@users.noreply.github.com`;
|
|
64884
|
+
process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
64885
|
+
process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
64886
|
+
process.env.NPM_CONFIG_PROVENANCE = "true";
|
|
64887
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, "Creating workspace Project Graph data...", config);
|
|
64888
|
+
const nxJson = _nxjsonjs.readNxJson.call(void 0, );
|
|
64889
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, "Reading in the workspaces release configuration", config);
|
|
64890
|
+
const to = options.head || process.env.NX_HEAD;
|
|
64891
|
+
const from = options.base || process.env.NX_BASE;
|
|
64892
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, `Using the following Git SHAs to determine the release content:
|
|
64894
64893
|
- From: ${from}
|
|
64895
64894
|
- To: ${to}
|
|
64896
64895
|
`, config);
|
|
64897
|
-
|
|
64898
|
-
|
|
64899
|
-
|
|
64900
|
-
|
|
64901
|
-
|
|
64902
|
-
|
|
64903
|
-
|
|
64904
|
-
|
|
64905
|
-
|
|
64906
|
-
|
|
64907
|
-
|
|
64908
|
-
|
|
64909
|
-
|
|
64910
|
-
|
|
64911
|
-
|
|
64912
|
-
|
|
64913
|
-
|
|
64914
|
-
|
|
64915
|
-
|
|
64916
|
-
|
|
64917
|
-
|
|
64918
|
-
|
|
64919
|
-
|
|
64920
|
-
|
|
64921
|
-
|
|
64922
|
-
|
|
64923
|
-
|
|
64924
|
-
|
|
64925
|
-
|
|
64926
|
-
|
|
64927
|
-
|
|
64928
|
-
|
|
64929
|
-
|
|
64930
|
-
|
|
64931
|
-
|
|
64932
|
-
|
|
64933
|
-
|
|
64934
|
-
|
|
64935
|
-
|
|
64936
|
-
|
|
64896
|
+
if (_optionalChain([nxJson, 'access', _238 => _238.release, 'optionalAccess', _239 => _239.groups])) {
|
|
64897
|
+
nxJson.release.groups = Object.keys(nxJson.release.groups).reduce((ret, groupName) => {
|
|
64898
|
+
const groupConfig = nxJson.release.groups[groupName];
|
|
64899
|
+
ret[groupName] = _chunkF6YMONH3cjs.defu.call(void 0, groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
|
|
64900
|
+
return ret;
|
|
64901
|
+
}, {});
|
|
64902
|
+
}
|
|
64903
|
+
const nxReleaseConfig = _chunkF6YMONH3cjs.defu.call(void 0, nxJson.release, DEFAULT_RELEASE_CONFIG);
|
|
64904
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "Using the following `nx.json` release configuration values", config);
|
|
64905
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, nxReleaseConfig, config);
|
|
64906
|
+
const releaseChangelog = _changelogjs.createAPI.call(void 0, nxReleaseConfig);
|
|
64907
|
+
const releasePublish = _publishjs.createAPI.call(void 0, nxReleaseConfig);
|
|
64908
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, "Determining the current release versions...", config);
|
|
64909
|
+
const { workspaceVersion, projectsVersionData } = await releaseVersion(config, {
|
|
64910
|
+
dryRun: false,
|
|
64911
|
+
verbose: _chunkNTA62AN7cjs.isVerbose.call(void 0, config.logLevel),
|
|
64912
|
+
preid: config.preid,
|
|
64913
|
+
deleteVersionPlans: false,
|
|
64914
|
+
stageChanges: true,
|
|
64915
|
+
gitCommit: false,
|
|
64916
|
+
gitTag: false
|
|
64917
|
+
});
|
|
64918
|
+
await releaseChangelog({
|
|
64919
|
+
...options,
|
|
64920
|
+
version: _optionalChain([nxReleaseConfig, 'optionalAccess', _240 => _240.projectsRelationship]) !== "fixed" ? void 0 : workspaceVersion,
|
|
64921
|
+
versionData: projectsVersionData,
|
|
64922
|
+
dryRun: false,
|
|
64923
|
+
verbose: _chunkNTA62AN7cjs.isVerbose.call(void 0, config.logLevel),
|
|
64924
|
+
to,
|
|
64925
|
+
from,
|
|
64926
|
+
gitCommit: true,
|
|
64927
|
+
gitCommitMessage: "release(monorepo): Publish workspace release updates"
|
|
64928
|
+
});
|
|
64929
|
+
_chunkNTA62AN7cjs.writeDebug.call(void 0, "Tagging commit with git", config);
|
|
64930
|
+
if (options.skipPublish) {
|
|
64931
|
+
_chunkNTA62AN7cjs.writeWarning.call(void 0, "Skipping publishing packages since `skipPublish` was provided as `true` in the release options.", config);
|
|
64932
|
+
} else {
|
|
64933
|
+
const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access', _241 => _241[key], 'optionalAccess', _242 => _242.newVersion]));
|
|
64934
|
+
if (changedProjects.length > 0) {
|
|
64935
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, `Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
|
|
64937
64936
|
${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
64938
64937
|
`, config);
|
|
64939
|
-
|
|
64940
|
-
|
|
64941
|
-
|
|
64942
|
-
|
|
64943
|
-
|
|
64944
|
-
|
|
64945
|
-
|
|
64946
|
-
|
|
64938
|
+
const result2 = await releasePublish({
|
|
64939
|
+
...options,
|
|
64940
|
+
dryRun: !!options.dryRun,
|
|
64941
|
+
verbose: _chunkNTA62AN7cjs.isVerbose.call(void 0, config.logLevel)
|
|
64942
|
+
});
|
|
64943
|
+
const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access', _243 => _243[key], 'optionalAccess', _244 => _244.code]) && _optionalChain([result2, 'access', _245 => _245[key], 'optionalAccess', _246 => _246.code]) > 0);
|
|
64944
|
+
if (failedProjects.length > 0) {
|
|
64945
|
+
throw new Error(`The Storm release process was not completed successfully! One or more errors occured while running the \`nx-release-publish\` executor tasks.
|
|
64947
64946
|
|
|
64948
64947
|
Please review the workflow details for the following project(s):
|
|
64949
64948
|
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access', _247 => _247[failedProject], 'optionalAccess', _248 => _248.code])})`).join("\n")}
|
|
64950
64949
|
`);
|
|
64951
|
-
}
|
|
64952
|
-
} else {
|
|
64953
|
-
_chunkWIDIIDDQcjs.writeWarning.call(void 0, "Skipped publishing packages.", config);
|
|
64954
64950
|
}
|
|
64951
|
+
} else {
|
|
64952
|
+
_chunkNTA62AN7cjs.writeWarning.call(void 0, "Skipped publishing packages.", config);
|
|
64955
64953
|
}
|
|
64956
|
-
_chunkWIDIIDDQcjs.writeSuccess.call(void 0, "Completed the Storm workspace release process!", config);
|
|
64957
|
-
} catch (error) {
|
|
64958
|
-
_chunkWIDIIDDQcjs.writeFatal.call(void 0, "An exception was thrown while running the Storm release workflow.", config);
|
|
64959
|
-
error.message && _chunkWIDIIDDQcjs.writeError.call(void 0, `${error.name ? `${error.name}: ` : ""}${error.message}${error.stack ? `
|
|
64960
|
-
${error.stack}` : ""}`, config);
|
|
64961
|
-
throw error;
|
|
64962
64954
|
}
|
|
64955
|
+
_chunkNTA62AN7cjs.writeSuccess.call(void 0, "Completed the Storm workspace release process!", config);
|
|
64963
64956
|
}, "runRelease");
|
|
64964
64957
|
|
|
64965
64958
|
// src/cli/index.ts
|
|
64966
64959
|
var _config = {};
|
|
64967
64960
|
function createProgram(config) {
|
|
64968
64961
|
_config = config;
|
|
64969
|
-
|
|
64970
|
-
const root2 =
|
|
64962
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "\u26A1 Running Storm Git Tools", config);
|
|
64963
|
+
const root2 = _chunkNTA62AN7cjs.findWorkspaceRootSafe.call(void 0, process.cwd());
|
|
64971
64964
|
process.env.STORM_WORKSPACE_ROOT ??= root2;
|
|
64972
64965
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root2;
|
|
64973
64966
|
root2 && process.chdir(root2);
|
|
@@ -64995,14 +64988,14 @@ function createProgram(config) {
|
|
|
64995
64988
|
_chunkEVP6BIDZcjs.__name.call(void 0, createProgram, "createProgram");
|
|
64996
64989
|
async function commitAction({ config = "@storm-software/git-tools/commit/config.js", dryRun = false }) {
|
|
64997
64990
|
try {
|
|
64998
|
-
|
|
64991
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, `\u26A1 Preparing to commit your changes. Please provide the requested details below...`, _config);
|
|
64999
64992
|
await runCommit(config, dryRun);
|
|
65000
|
-
|
|
64993
|
+
_chunkNTA62AN7cjs.writeSuccess.call(void 0, `\u{1F389} Storm Commit processing completed successfully!
|
|
65001
64994
|
|
|
65002
64995
|
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}
|
|
65003
64996
|
`, _config);
|
|
65004
64997
|
} catch (error) {
|
|
65005
|
-
|
|
64998
|
+
_chunkNTA62AN7cjs.writeFatal.call(void 0, `A fatal error occurred while running commit action:
|
|
65006
64999
|
|
|
65007
65000
|
${error.message}`, _config);
|
|
65008
65001
|
throw new Error(error.message, {
|
|
@@ -65013,11 +65006,11 @@ ${error.message}`, _config);
|
|
|
65013
65006
|
_chunkEVP6BIDZcjs.__name.call(void 0, commitAction, "commitAction");
|
|
65014
65007
|
async function readmeAction(options) {
|
|
65015
65008
|
try {
|
|
65016
|
-
|
|
65009
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "\u26A1 Formatting the workspace's README.md files", _config);
|
|
65017
65010
|
await runReadme(options);
|
|
65018
|
-
|
|
65011
|
+
_chunkNTA62AN7cjs.writeSuccess.call(void 0, "Formatting of the workspace's README.md files is complete\n", _config);
|
|
65019
65012
|
} catch (error) {
|
|
65020
|
-
|
|
65013
|
+
_chunkNTA62AN7cjs.writeFatal.call(void 0, `A fatal error occurred while running README format action:
|
|
65021
65014
|
|
|
65022
65015
|
${error.message}`);
|
|
65023
65016
|
throw new Error(error.message, {
|
|
@@ -65028,23 +65021,19 @@ ${error.message}`);
|
|
|
65028
65021
|
_chunkEVP6BIDZcjs.__name.call(void 0, readmeAction, "readmeAction");
|
|
65029
65022
|
async function releaseAction({ project, base, head, dryRun }) {
|
|
65030
65023
|
try {
|
|
65031
|
-
|
|
65024
|
+
_chunkNTA62AN7cjs.writeInfo.call(void 0, "\u26A1 Running the Storm Release and Publish process on the workspace", _config);
|
|
65032
65025
|
await runRelease(_config, {
|
|
65033
65026
|
dryRun,
|
|
65034
65027
|
project,
|
|
65035
65028
|
base,
|
|
65036
65029
|
head
|
|
65037
65030
|
});
|
|
65038
|
-
|
|
65031
|
+
_chunkNTA62AN7cjs.writeSuccess.call(void 0, "Release completed successfully!\n", _config);
|
|
65039
65032
|
} catch (error) {
|
|
65040
|
-
|
|
65033
|
+
_chunkNTA62AN7cjs.writeFatal.call(void 0, `A fatal error occurred while running release action:
|
|
65041
65034
|
|
|
65042
65035
|
${error.message}`, _config);
|
|
65043
|
-
|
|
65044
|
-
console.error("");
|
|
65045
|
-
console.error("Fatal release error: ");
|
|
65046
|
-
console.error(error);
|
|
65047
|
-
console.error("");
|
|
65036
|
+
_chunkNTA62AN7cjs.writeFatal.call(void 0, error, _config);
|
|
65048
65037
|
throw new Error(error.message, {
|
|
65049
65038
|
cause: error
|
|
65050
65039
|
});
|
|
@@ -65053,15 +65042,15 @@ ${error.message}`, _config);
|
|
|
65053
65042
|
_chunkEVP6BIDZcjs.__name.call(void 0, releaseAction, "releaseAction");
|
|
65054
65043
|
async function commitLintAction({ config, message: message2, file }) {
|
|
65055
65044
|
try {
|
|
65056
|
-
|
|
65045
|
+
_chunkNTA62AN7cjs.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);
|
|
65057
65046
|
await runCommitLint(_config, {
|
|
65058
65047
|
config,
|
|
65059
65048
|
message: message2,
|
|
65060
65049
|
file
|
|
65061
65050
|
});
|
|
65062
|
-
|
|
65051
|
+
_chunkNTA62AN7cjs.writeSuccess.call(void 0, "Linting the commit messages completed successfully!\n", _config);
|
|
65063
65052
|
} catch (error) {
|
|
65064
|
-
|
|
65053
|
+
_chunkNTA62AN7cjs.writeFatal.call(void 0, `A fatal error occurred while linting the commit messages:
|
|
65065
65054
|
|
|
65066
65055
|
${error.message}`, _config);
|
|
65067
65056
|
throw new Error(error.message, {
|
|
@@ -65073,18 +65062,15 @@ _chunkEVP6BIDZcjs.__name.call(void 0, commitLintAction, "commitLintAction");
|
|
|
65073
65062
|
|
|
65074
65063
|
// bin/git.ts
|
|
65075
65064
|
void (async () => {
|
|
65076
|
-
const config = await
|
|
65065
|
+
const config = await _chunkNTA62AN7cjs.getConfig.call(void 0, );
|
|
65077
65066
|
try {
|
|
65078
|
-
|
|
65067
|
+
_chunkNTA62AN7cjs.handleProcess.call(void 0, config);
|
|
65079
65068
|
const program2 = createProgram(config);
|
|
65080
65069
|
await program2.parseAsync(process.argv);
|
|
65081
|
-
|
|
65082
|
-
|
|
65070
|
+
_chunkNTA62AN7cjs.writeSuccess.call(void 0, `\u{1F389} Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`, config);
|
|
65071
|
+
_chunkNTA62AN7cjs.exitWithSuccess.call(void 0, config);
|
|
65083
65072
|
} catch (error) {
|
|
65084
|
-
|
|
65085
|
-
${_optionalChain([error, 'optionalAccess', _249 => _249.message]) ? error.message : JSON.stringify(error)}${_optionalChain([error, 'optionalAccess', _250 => _250.stack]) ? `
|
|
65086
|
-
Stack Trace: ${error.stack}` : ""}`, config);
|
|
65087
|
-
_chunkWIDIIDDQcjs.exitWithError.call(void 0, config);
|
|
65073
|
+
_chunkNTA62AN7cjs.exitWithError.call(void 0, config);
|
|
65088
65074
|
process.exit(1);
|
|
65089
65075
|
}
|
|
65090
65076
|
})();
|