@storm-software/git-tools 2.120.0 → 2.121.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.
Files changed (57) hide show
  1. package/README.md +1 -1
  2. package/bin/{chunk-FEIWTHDN.cjs → chunk-7V324BCR.cjs} +347 -297
  3. package/bin/{chunk-VATYGW5F.js → chunk-XJZXOYRK.js} +346 -296
  4. package/bin/git.cjs +143 -99
  5. package/bin/git.js +73 -29
  6. package/bin/post-checkout.cjs +9 -9
  7. package/bin/post-checkout.js +1 -1
  8. package/bin/post-commit.cjs +9 -9
  9. package/bin/post-commit.js +1 -1
  10. package/bin/post-merge.cjs +9 -9
  11. package/bin/post-merge.js +1 -1
  12. package/bin/pre-commit.cjs +9 -9
  13. package/bin/pre-commit.js +1 -1
  14. package/bin/pre-install.cjs +9 -9
  15. package/bin/pre-install.js +1 -1
  16. package/bin/pre-push.cjs +13 -13
  17. package/bin/pre-push.js +1 -1
  18. package/bin/prepare.cjs +7 -7
  19. package/bin/prepare.js +1 -1
  20. package/bin/version-warning.cjs +5 -5
  21. package/bin/version-warning.js +1 -1
  22. package/dist/{chunk-C4NLID2V.js → chunk-25G45MG4.js} +1 -1
  23. package/dist/{chunk-LSRFGWF5.js → chunk-2IQTQBAX.js} +1 -1
  24. package/dist/chunk-2RKFQIWE.cjs +19 -0
  25. package/dist/{chunk-ZE542BCU.cjs → chunk-2SHAD3P5.cjs} +5 -2
  26. package/dist/{chunk-5XXXTVPU.js → chunk-GRCMQK4Q.js} +5 -2
  27. package/dist/{chunk-NWZD3QTO.cjs → chunk-RG47FAF4.cjs} +3 -3
  28. package/dist/commit/minimal.cjs +5 -5
  29. package/dist/commit/minimal.d.cts +1 -0
  30. package/dist/commit/minimal.d.ts +1 -0
  31. package/dist/commit/minimal.js +1 -1
  32. package/dist/commit/monorepo.cjs +3 -3
  33. package/dist/commit/monorepo.d.cts +1 -0
  34. package/dist/commit/monorepo.d.ts +1 -0
  35. package/dist/commit/monorepo.js +2 -2
  36. package/dist/commitlint/minimal.cjs +3 -12
  37. package/dist/commitlint/minimal.d.cts +1 -9
  38. package/dist/commitlint/minimal.d.ts +1 -9
  39. package/dist/commitlint/minimal.js +2 -11
  40. package/dist/commitlint/monorepo.cjs +3 -12
  41. package/dist/commitlint/monorepo.d.cts +1 -9
  42. package/dist/commitlint/monorepo.d.ts +1 -9
  43. package/dist/commitlint/monorepo.js +2 -11
  44. package/dist/index.cjs +4 -6
  45. package/dist/index.d.cts +2 -1
  46. package/dist/index.d.ts +2 -1
  47. package/dist/index.js +3 -5
  48. package/dist/release/config.cjs +3 -3
  49. package/dist/release/config.d.cts +4 -3
  50. package/dist/release/config.d.ts +4 -3
  51. package/dist/release/config.js +2 -2
  52. package/dist/types.cjs +2 -4
  53. package/dist/types.d.cts +4 -143
  54. package/dist/types.d.ts +4 -143
  55. package/dist/types.js +1 -3
  56. package/package.json +12 -5
  57. package/dist/chunk-KD6Y4AJS.cjs +0 -19
package/bin/git.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
5
- var chunkFEIWTHDN_cjs = require('./chunk-FEIWTHDN.cjs');
5
+ var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
6
6
  var TOML = require('@ltd/j-toml');
7
7
  var commander = require('commander');
8
8
  var prompts = require('@inquirer/prompts');
@@ -94,7 +94,7 @@ function stringifyCargoToml(cargoToml) {
94
94
  return tomlString;
95
95
  }
96
96
 
97
- // src/types.ts
97
+ // ../conventional-changelog/src/commit-types.ts
98
98
  var COMMIT_TYPES = {
99
99
  /* --- Bumps version when selected --- */
100
100
  "chore": {
@@ -224,6 +224,64 @@ var COMMIT_TYPES = {
224
224
  }
225
225
  }
226
226
  };
227
+
228
+ // ../conventional-changelog/src/utilities/constants.ts
229
+ var CHANGELOG_COMMITS = Object.entries(COMMIT_TYPES).reduce(
230
+ (ret, [key, commitType]) => {
231
+ ret[key] = {
232
+ ...commitType.changelog,
233
+ type: key,
234
+ title: commitType.changelog?.title || commitType.title,
235
+ hidden: commitType.changelog?.hidden
236
+ };
237
+ return ret;
238
+ },
239
+ {}
240
+ );
241
+ var CHANGELOG_COMMIT_ORDER = [
242
+ CHANGELOG_COMMITS.feat,
243
+ CHANGELOG_COMMITS.fix,
244
+ CHANGELOG_COMMITS.chore,
245
+ CHANGELOG_COMMITS.deps,
246
+ CHANGELOG_COMMITS.docs,
247
+ CHANGELOG_COMMITS.style,
248
+ CHANGELOG_COMMITS.refactor,
249
+ CHANGELOG_COMMITS.perf,
250
+ CHANGELOG_COMMITS.build,
251
+ CHANGELOG_COMMITS.ci,
252
+ CHANGELOG_COMMITS.test
253
+ ];
254
+ CHANGELOG_COMMIT_ORDER.map(
255
+ (entry) => entry.type
256
+ );
257
+ CHANGELOG_COMMIT_ORDER.map(
258
+ (entry) => entry.title
259
+ );
260
+ var MINIMAL_PARSER_DEFAULT_OPTIONS = {
261
+ headerPattern: /^(\w*): (.*)$/,
262
+ breakingHeaderPattern: /^(\w*): (.*)$/,
263
+ headerCorrespondence: ["type", "subject"],
264
+ noteKeywords: ["BREAKING CHANGE", "BREAKING-CHANGE"],
265
+ revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
266
+ revertCorrespondence: ["header", "hash"],
267
+ issuePrefixes: ["#"]
268
+ };
269
+ var MONOREPO_PARSER_DEFAULT_OPTIONS = {
270
+ headerPattern: /^(\w*)(?:\((.*)\))!?: (.*)$/,
271
+ breakingHeaderPattern: /^(\w*)(?:\((.*)\))!: (.*)$/,
272
+ headerCorrespondence: ["type", "scope", "subject"],
273
+ noteKeywords: ["BREAKING CHANGE", "BREAKING-CHANGE"],
274
+ revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
275
+ revertCorrespondence: ["header", "hash"],
276
+ issuePrefixes: ["#"]
277
+ };
278
+
279
+ // ../conventional-changelog/src/parser.ts
280
+ function createParserOpts(variant) {
281
+ return variant === "minimal" ? MINIMAL_PARSER_DEFAULT_OPTIONS : MONOREPO_PARSER_DEFAULT_OPTIONS;
282
+ }
283
+
284
+ // src/types.ts
227
285
  var DEFAULT_MINIMAL_COMMIT_QUESTIONS = {
228
286
  type: {
229
287
  type: "select",
@@ -345,8 +403,9 @@ var DEFAULT_MINIMAL_COMMIT_RULES = {
345
403
  ],
346
404
  "type-max-length": [2 /* Error */, "always", 20],
347
405
  "type-min-length": [2 /* Error */, "always", 3],
406
+ "scope-empty": 0 /* Disabled */,
348
407
  "scope-case": 0 /* Disabled */,
349
- "scope-empty": 0 /* Disabled */
408
+ "scope-enum": 0 /* Disabled */
350
409
  };
351
410
  var DEFAULT_MONOREPO_COMMIT_RULES = {
352
411
  "body-leading-blank": [1 /* Warning */, "always"],
@@ -376,46 +435,28 @@ var DEFAULT_MONOREPO_COMMIT_RULES = {
376
435
  // src/commitlint/config/minimal.ts
377
436
  var config = {
378
437
  rules: DEFAULT_MINIMAL_COMMIT_RULES,
379
- helpUrl: "https://developer.stormsoftware.com/commitlint/minimal",
380
- parserOpts: {
381
- headerPattern: /^(\w*): (.*)$/,
382
- breakingHeaderPattern: /^(\w*): (.*)$/,
383
- headerCorrespondence: ["type", "subject"],
384
- noteKeywords: ["BREAKING CHANGE", "BREAKING-CHANGE"],
385
- revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
386
- revertCorrespondence: ["header", "hash"],
387
- issuePrefixes: ["#"]
388
- }
438
+ helpUrl: "https://developer.stormsoftware.com/commitlint/minimal"
389
439
  };
390
440
  var minimal_default = config;
391
441
 
392
442
  // src/commitlint/config/monorepo.ts
393
443
  var config2 = {
394
444
  rules: DEFAULT_MONOREPO_COMMIT_RULES,
395
- helpUrl: "https://developer.stormsoftware.com/commitlint/monorepo",
396
- parserOpts: {
397
- headerPattern: /^(\w*)(?:\((.*)\))!?: (.*)$/,
398
- breakingHeaderPattern: /^(\w*)(?:\((.*)\))!: (.*)$/,
399
- headerCorrespondence: ["type", "scope", "subject"],
400
- noteKeywords: ["BREAKING CHANGE", "BREAKING-CHANGE"],
401
- revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
402
- revertCorrespondence: ["header", "hash"],
403
- issuePrefixes: ["#"]
404
- }
445
+ helpUrl: "https://developer.stormsoftware.com/commitlint/monorepo"
405
446
  };
406
447
  var monorepo_default = config2;
407
448
 
408
449
  // src/commitlint/helpers.ts
409
- var jiti = jiti$1.createJiti(chunkFEIWTHDN_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
450
+ var jiti = jiti$1.createJiti(chunk7V324BCR_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
410
451
  async function resolveCommitlintConfig(workspaceConfig, configPath) {
411
452
  if (configPath && configPath !== "@storm-software/git-tools/commitlint/minimal" && configPath !== "@storm-software/git-tools/commitlint/monorepo") {
412
- chunkFEIWTHDN_cjs.writeInfo(
453
+ chunk7V324BCR_cjs.writeInfo(
413
454
  `Using custom commitlint config file: ${configPath}`,
414
455
  workspaceConfig
415
456
  );
416
457
  } else {
417
458
  configPath = workspaceConfig?.variant === "minimal" ? "@storm-software/git-tools/commitlint/minimal" : "@storm-software/git-tools/commitlint/monorepo";
418
- chunkFEIWTHDN_cjs.writeInfo(
459
+ chunk7V324BCR_cjs.writeInfo(
419
460
  `Using standard commitlint config file: ${configPath}`,
420
461
  workspaceConfig
421
462
  );
@@ -1006,7 +1047,7 @@ function getRuleFromScopeEnum(scopeEnum) {
1006
1047
  // src/commitlint/run.ts
1007
1048
  var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
1008
1049
  async function runCommitLint(workspaceConfig, options) {
1009
- chunkFEIWTHDN_cjs.writeInfo(
1050
+ chunk7V324BCR_cjs.writeInfo(
1010
1051
  "\u{1F4DD} Validating git commit message aligns with the Storm Software specification",
1011
1052
  workspaceConfig
1012
1053
  );
@@ -1014,7 +1055,7 @@ async function runCommitLint(workspaceConfig, options) {
1014
1055
  if (options.message && options.message !== COMMIT_EDITMSG_PATH) {
1015
1056
  commitMessage = options.message;
1016
1057
  } else {
1017
- const commitFile = chunkFEIWTHDN_cjs.joinPaths(
1058
+ const commitFile = chunk7V324BCR_cjs.joinPaths(
1018
1059
  workspaceConfig.workspaceRoot,
1019
1060
  options.file || options.message || COMMIT_EDITMSG_PATH
1020
1061
  );
@@ -1031,17 +1072,17 @@ async function runCommitLint(workspaceConfig, options) {
1031
1072
  if (upstreamRemote) {
1032
1073
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
1033
1074
  if (!upstreamRemoteIdentifier) {
1034
- chunkFEIWTHDN_cjs.writeWarning(
1075
+ chunk7V324BCR_cjs.writeWarning(
1035
1076
  `No upstream remote found for ${workspaceConfig.name}.git. Skipping comparison.`,
1036
1077
  workspaceConfig
1037
1078
  );
1038
1079
  return;
1039
1080
  }
1040
- chunkFEIWTHDN_cjs.writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
1081
+ chunk7V324BCR_cjs.writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
1041
1082
  const currentBranch = childProcess__default.default.execSync("git branch --show-current").toString().trim();
1042
1083
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
1043
1084
  } else {
1044
- chunkFEIWTHDN_cjs.writeWarning(
1085
+ chunk7V324BCR_cjs.writeWarning(
1045
1086
  `No upstream remote found for ${workspaceConfig.name}.git. Skipping comparison against upstream main.`,
1046
1087
  workspaceConfig
1047
1088
  );
@@ -1049,7 +1090,7 @@ async function runCommitLint(workspaceConfig, options) {
1049
1090
  }
1050
1091
  commitMessage = childProcess__default.default.execSync(gitLogCmd).toString().trim();
1051
1092
  if (!commitMessage) {
1052
- chunkFEIWTHDN_cjs.writeWarning(
1093
+ chunk7V324BCR_cjs.writeWarning(
1053
1094
  "No commits found. Skipping commit message validation.",
1054
1095
  workspaceConfig
1055
1096
  );
@@ -1076,9 +1117,12 @@ async function runCommitLint(workspaceConfig, options) {
1076
1117
  `(${Object.keys(allowedTypes).join("|")})!?:\\s([a-z0-9:\\-\\/\\s])+`
1077
1118
  );
1078
1119
  }
1079
- const report = await lint(commitMessage, commitlintConfig);
1120
+ const report = await lint(commitMessage, {
1121
+ ...commitlintConfig,
1122
+ parserOpts: createParserOpts(workspaceConfig.variant)
1123
+ });
1080
1124
  if (!commitlintRegex.test(commitMessage) || report.errors.length || report.warnings.length) {
1081
- chunkFEIWTHDN_cjs.writeSuccess(
1125
+ chunk7V324BCR_cjs.writeSuccess(
1082
1126
  `Commit was processing completed successfully!`,
1083
1127
  workspaceConfig
1084
1128
  );
@@ -1131,7 +1175,7 @@ var monorepo_default2 = config4;
1131
1175
  // src/commit/helpers.ts
1132
1176
  function resolveMinimalCommitOptions(config5 = minimal_default2) {
1133
1177
  return {
1134
- parserPreset: "conventional-changelog-conventionalcommits",
1178
+ parserPreset: "conventional-changelog-storm-software",
1135
1179
  prompt: {
1136
1180
  settings: config5.settings,
1137
1181
  messages: config5.messages,
@@ -1142,7 +1186,7 @@ function resolveMinimalCommitOptions(config5 = minimal_default2) {
1142
1186
  function resolveMonorepoCommitOptions(workspaceConfig, config5 = monorepo_default2) {
1143
1187
  return {
1144
1188
  utils: { getScopeEnum: getScopeEnumUtil({ config: workspaceConfig }) },
1145
- parserPreset: "conventional-changelog-conventionalcommits",
1189
+ parserPreset: "conventional-changelog-storm-software",
1146
1190
  prompt: {
1147
1191
  settings: config5.settings,
1148
1192
  messages: config5.messages,
@@ -1150,16 +1194,16 @@ function resolveMonorepoCommitOptions(workspaceConfig, config5 = monorepo_defaul
1150
1194
  }
1151
1195
  };
1152
1196
  }
1153
- var jiti2 = jiti$1.createJiti(chunkFEIWTHDN_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
1197
+ var jiti2 = jiti$1.createJiti(chunk7V324BCR_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
1154
1198
  async function resolveCommitConfig(workspaceConfig, configPath) {
1155
1199
  if (configPath && configPath !== "@storm-software/git-tools/commit/minimal" && configPath !== "@storm-software/git-tools/commit/monorepo") {
1156
- chunkFEIWTHDN_cjs.writeInfo(
1200
+ chunk7V324BCR_cjs.writeInfo(
1157
1201
  `Using custom commit config file: ${configPath}`,
1158
1202
  workspaceConfig
1159
1203
  );
1160
1204
  } else {
1161
1205
  configPath = workspaceConfig?.variant === "minimal" ? "@storm-software/git-tools/commit/minimal" : "@storm-software/git-tools/commit/monorepo";
1162
- chunkFEIWTHDN_cjs.writeInfo(
1206
+ chunk7V324BCR_cjs.writeInfo(
1163
1207
  `Using standard commit config file: ${configPath}`,
1164
1208
  workspaceConfig
1165
1209
  );
@@ -1259,7 +1303,7 @@ async function createState(workspaceConfig, configPath) {
1259
1303
  const project = projectConfigurations.projects[scope];
1260
1304
  if (project) {
1261
1305
  let description = `${project.name} - ${project.root}`;
1262
- const packageJsonPath = chunkFEIWTHDN_cjs.joinPaths(project.root, "package.json");
1306
+ const packageJsonPath = chunk7V324BCR_cjs.joinPaths(project.root, "package.json");
1263
1307
  if (fs$1.existsSync(packageJsonPath)) {
1264
1308
  const packageJsonFile = await fs.readFile(packageJsonPath, "utf8");
1265
1309
  const packageJson = JSON.parse(packageJsonFile);
@@ -1336,10 +1380,10 @@ ${closedIssueEmoji}${config5.prompt.settings.closedIssueMessage}${issues}`;
1336
1380
 
1337
1381
  // src/commit/run.ts
1338
1382
  async function runCommit(commitizenFile, dryRun = false) {
1339
- const workspaceConfig = await chunkFEIWTHDN_cjs.getWorkspaceConfig();
1383
+ const workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
1340
1384
  const state = await createState(workspaceConfig, commitizenFile);
1341
1385
  if (dryRun) {
1342
- chunkFEIWTHDN_cjs.writeInfo("Running in dry mode.", workspaceConfig);
1386
+ chunk7V324BCR_cjs.writeInfo("Running in dry mode.", workspaceConfig);
1343
1387
  }
1344
1388
  console.log(chalkTemplate__default.default`
1345
1389
  {bold.#999999 ----------------------------------------}
@@ -1349,7 +1393,7 @@ async function runCommit(commitizenFile, dryRun = false) {
1349
1393
  `);
1350
1394
  state.answers = await askQuestions(state);
1351
1395
  const message = formatCommitMessage(state);
1352
- const commitMsgFile = chunkFEIWTHDN_cjs.joinPaths(getGitDir(), "COMMIT_EDITMSG");
1396
+ const commitMsgFile = chunk7V324BCR_cjs.joinPaths(getGitDir(), "COMMIT_EDITMSG");
1353
1397
  console.log(chalkTemplate__default.default`
1354
1398
  {bold.#999999 ----------------------------------------}
1355
1399
 
@@ -1362,11 +1406,11 @@ async function runCommit(commitizenFile, dryRun = false) {
1362
1406
  commandItems.push(...["--file", commitMsgFile]);
1363
1407
  const command = shellescape__default.default(commandItems);
1364
1408
  if (dryRun) {
1365
- chunkFEIWTHDN_cjs.writeDebug(
1409
+ chunk7V324BCR_cjs.writeDebug(
1366
1410
  `Skipping execution [dry-run]: ${command.replace(commitMsgFile, ".git/COMMIT_EDITMSG")}`,
1367
1411
  workspaceConfig
1368
1412
  );
1369
- chunkFEIWTHDN_cjs.writeDebug(`Message [dry-run]: ${message}`, workspaceConfig);
1413
+ chunk7V324BCR_cjs.writeDebug(`Message [dry-run]: ${message}`, workspaceConfig);
1370
1414
  } else {
1371
1415
  await fs__default.default.writeFile(commitMsgFile, message);
1372
1416
  chunkCIJVSMK2_cjs.run(workspaceConfig, command);
@@ -2398,7 +2442,7 @@ async function generateChangelogContent(releaseVersion, filepath, newContent, cu
2398
2442
  const header = await prettier.format(
2399
2443
  `![${(typeof workspaceConfig?.release.banner === "string" ? workspaceConfig.organization ? titleCase(
2400
2444
  typeof workspaceConfig.organization === "string" ? workspaceConfig.organization : workspaceConfig.organization.name
2401
- ) : void 0 : workspaceConfig?.release.banner.alt) || "Branded release banner image"}](${bannerUrl || chunkFEIWTHDN_cjs.STORM_DEFAULT_RELEASE_BANNER})
2445
+ ) : void 0 : workspaceConfig?.release.banner.alt) || "Branded release banner image"}](${bannerUrl || chunk7V324BCR_cjs.STORM_DEFAULT_RELEASE_BANNER})
2402
2446
 
2403
2447
  # Changelog ${project || workspaceConfig?.name ? "for" : ""}${workspaceConfig?.name ? ` ${titleCase(workspaceConfig.name)}` : ""}${project ? `${workspaceConfig?.name ? " -" : ""} ${titleCase(project)}` : ""}
2404
2448
 
@@ -2637,7 +2681,7 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer__default.def
2637
2681
  };
2638
2682
  }
2639
2683
  async render() {
2640
- this.workspaceConfig = await chunkFEIWTHDN_cjs.getWorkspaceConfig();
2684
+ this.workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
2641
2685
  return await super.render();
2642
2686
  }
2643
2687
  preprocessChanges() {
@@ -2948,7 +2992,7 @@ async function createOrUpdateGithubReleaseInternal(githubRequestConfig, release,
2948
2992
  if (!shouldContinueInGitHub) {
2949
2993
  return;
2950
2994
  }
2951
- const open = chunkFEIWTHDN_cjs.__require("open");
2995
+ const open = chunk7V324BCR_cjs.__require("open");
2952
2996
  await open(result.url).then(() => {
2953
2997
  console.info(
2954
2998
  `
@@ -3174,7 +3218,7 @@ async function isUserAnOrganizationMember(userId, config5, remoteName = "origin"
3174
3218
  // src/release/changelog.ts
3175
3219
  function createAPI(overrideReleaseConfig) {
3176
3220
  return async function releaseChangelog(args) {
3177
- const workspaceConfig = await chunkFEIWTHDN_cjs.getWorkspaceConfig();
3221
+ const workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
3178
3222
  const projectGraph$1 = await projectGraph.createProjectGraphAsync({ exitOnError: true });
3179
3223
  const nxJson$1 = nxJson.readNxJson();
3180
3224
  const userProvidedReleaseConfig = deepMergeJson.deepMergeJson(
@@ -3277,12 +3321,12 @@ function createAPI(overrideReleaseConfig) {
3277
3321
  const postGitTasks = [];
3278
3322
  let workspaceChangelogChanges = [];
3279
3323
  let workspaceChangelogCommits = [];
3280
- const versionPlansEnabledForWorkspaceChangelog = releaseGroups[0].resolvedVersionPlans;
3324
+ const versionPlansEnabledForWorkspaceChangelog = releaseGroups[0]?.resolvedVersionPlans;
3281
3325
  if (versionPlansEnabledForWorkspaceChangelog) {
3282
3326
  if (releaseGroups.length === 1) {
3283
3327
  const releaseGroup = releaseGroups[0];
3284
- if (releaseGroup.projectsRelationship === "fixed") {
3285
- const versionPlans = releaseGroup.resolvedVersionPlans;
3328
+ if (releaseGroup?.projectsRelationship === "fixed") {
3329
+ const versionPlans = releaseGroup?.resolvedVersionPlans;
3286
3330
  workspaceChangelogChanges = versionPlans.flatMap((vp) => {
3287
3331
  const releaseType = versionPlanSemverReleaseTypeToChangelogType(
3288
3332
  vp.groupVersionBump
@@ -3835,7 +3879,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
3835
3879
  });
3836
3880
  latestCommit = await git.getCommitHash("HEAD");
3837
3881
  } else if ((args.stageChanges ?? nxReleaseConfig.changelog?.git.stageChanges) && changes.length) {
3838
- chunkFEIWTHDN_cjs.writeDebug(`Staging changed files with git`);
3882
+ chunk7V324BCR_cjs.writeDebug(`Staging changed files with git`);
3839
3883
  await git.gitAdd({
3840
3884
  changedFiles,
3841
3885
  deletedFiles,
@@ -3844,7 +3888,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
3844
3888
  });
3845
3889
  }
3846
3890
  if (args.gitTag ?? nxReleaseConfig.changelog?.git.tag) {
3847
- chunkFEIWTHDN_cjs.writeDebug(`Tagging commit with git`);
3891
+ chunk7V324BCR_cjs.writeDebug(`Tagging commit with git`);
3848
3892
  for (const tag of gitTagValues) {
3849
3893
  await gitTag({
3850
3894
  tag,
@@ -3856,7 +3900,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
3856
3900
  }
3857
3901
  }
3858
3902
  if (args.gitPush ?? nxReleaseConfig.changelog?.git.push) {
3859
- chunkFEIWTHDN_cjs.writeDebug(`Pushing to git remote "${args.gitRemote}"`);
3903
+ chunk7V324BCR_cjs.writeDebug(`Pushing to git remote "${args.gitRemote}"`);
3860
3904
  await git.gitPush({
3861
3905
  gitRemote: args.gitRemote,
3862
3906
  dryRun: args.dryRun,
@@ -3875,7 +3919,7 @@ async function generateChangelogForWorkspace({
3875
3919
  workspaceChangelogVersion,
3876
3920
  changes
3877
3921
  }) {
3878
- const workspaceConfig = await chunkFEIWTHDN_cjs.getWorkspaceConfig();
3922
+ const workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
3879
3923
  if (!workspaceConfig) {
3880
3924
  throw new Error(
3881
3925
  `Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
@@ -3989,7 +4033,7 @@ async function generateChangelogForProjects({
3989
4033
  nxReleaseConfig,
3990
4034
  projectToAdditionalDependencyBumps
3991
4035
  }) {
3992
- const workspaceConfig = await chunkFEIWTHDN_cjs.getWorkspaceConfig();
4036
+ const workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
3993
4037
  if (!workspaceConfig) {
3994
4038
  throw new Error(
3995
4039
  `Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
@@ -4294,7 +4338,7 @@ var runRelease = async (config5, options) => {
4294
4338
  throw new Error("The `GITHUB_ACTOR` environment variable is not set.");
4295
4339
  }
4296
4340
  if (!await isUserAnOrganizationMember(process.env.GITHUB_ACTOR, config5)) {
4297
- chunkFEIWTHDN_cjs.writeFatal(
4341
+ chunk7V324BCR_cjs.writeFatal(
4298
4342
  "You must be a member of the Storm Software organization to run the release process.",
4299
4343
  config5
4300
4344
  );
@@ -4311,12 +4355,12 @@ var runRelease = async (config5, options) => {
4311
4355
  process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
4312
4356
  process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
4313
4357
  process.env.NPM_CONFIG_PROVENANCE = "true";
4314
- chunkFEIWTHDN_cjs.writeDebug("Creating workspace Project Graph data...", config5);
4358
+ chunk7V324BCR_cjs.writeDebug("Creating workspace Project Graph data...", config5);
4315
4359
  const nxJson = nxJson_js.readNxJson();
4316
- chunkFEIWTHDN_cjs.writeDebug("Reading in the workspaces release configuration", config5);
4360
+ chunk7V324BCR_cjs.writeDebug("Reading in the workspaces release configuration", config5);
4317
4361
  const to = options.head || process.env.NX_HEAD;
4318
4362
  const from = options.base || process.env.NX_BASE;
4319
- chunkFEIWTHDN_cjs.writeDebug(
4363
+ chunk7V324BCR_cjs.writeDebug(
4320
4364
  `Using the following Git SHAs to determine the release content:
4321
4365
  - From: ${from}
4322
4366
  - To: ${to}
@@ -4327,28 +4371,28 @@ var runRelease = async (config5, options) => {
4327
4371
  nxJson.release.groups = Object.keys(nxJson.release.groups).reduce(
4328
4372
  (ret, groupName) => {
4329
4373
  const groupConfig = nxJson.release?.groups?.[groupName];
4330
- ret[groupName] = chunkFEIWTHDN_cjs.defu(groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
4374
+ ret[groupName] = chunk7V324BCR_cjs.defu(groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
4331
4375
  return ret;
4332
4376
  },
4333
4377
  {}
4334
4378
  );
4335
4379
  }
4336
- const nxReleaseConfig = chunkFEIWTHDN_cjs.defu(
4380
+ const nxReleaseConfig = chunk7V324BCR_cjs.defu(
4337
4381
  nxJson.release,
4338
4382
  DEFAULT_RELEASE_CONFIG
4339
4383
  );
4340
- chunkFEIWTHDN_cjs.writeInfo(
4384
+ chunk7V324BCR_cjs.writeInfo(
4341
4385
  "Using the following `nx.json` release configuration values",
4342
4386
  config5
4343
4387
  );
4344
- chunkFEIWTHDN_cjs.writeInfo(nxReleaseConfig, config5);
4388
+ chunk7V324BCR_cjs.writeInfo(nxReleaseConfig, config5);
4345
4389
  const releaseVersion = version_js.createAPI(nxReleaseConfig);
4346
4390
  const releaseChangelog = createAPI(nxReleaseConfig);
4347
4391
  const releasePublish = publish_js.createAPI(nxReleaseConfig);
4348
- chunkFEIWTHDN_cjs.writeDebug("Determining the current release versions...", config5);
4392
+ chunk7V324BCR_cjs.writeDebug("Determining the current release versions...", config5);
4349
4393
  const { workspaceVersion, projectsVersionData } = await releaseVersion({
4350
4394
  dryRun: false,
4351
- verbose: chunkFEIWTHDN_cjs.isVerbose(config5.logLevel),
4395
+ verbose: chunk7V324BCR_cjs.isVerbose(config5.logLevel),
4352
4396
  preid: config5.preid,
4353
4397
  deleteVersionPlans: false,
4354
4398
  stageChanges: true,
@@ -4359,15 +4403,15 @@ var runRelease = async (config5, options) => {
4359
4403
  version: nxReleaseConfig?.projectsRelationship !== "fixed" ? void 0 : workspaceVersion,
4360
4404
  versionData: projectsVersionData,
4361
4405
  dryRun: false,
4362
- verbose: chunkFEIWTHDN_cjs.isVerbose(config5.logLevel),
4406
+ verbose: chunk7V324BCR_cjs.isVerbose(config5.logLevel),
4363
4407
  to,
4364
4408
  from,
4365
4409
  gitCommit: true,
4366
4410
  gitCommitMessage: "release(monorepo): Publish workspace release updates"
4367
4411
  });
4368
- chunkFEIWTHDN_cjs.writeDebug("Tagging commit with git", config5);
4412
+ chunk7V324BCR_cjs.writeDebug("Tagging commit with git", config5);
4369
4413
  if (options.skipPublish) {
4370
- chunkFEIWTHDN_cjs.writeWarning(
4414
+ chunk7V324BCR_cjs.writeWarning(
4371
4415
  "Skipping publishing packages since `skipPublish` was provided as `true` in the release options.",
4372
4416
  config5
4373
4417
  );
@@ -4376,7 +4420,7 @@ var runRelease = async (config5, options) => {
4376
4420
  (key) => projectsVersionData[key]?.newVersion
4377
4421
  );
4378
4422
  if (changedProjects.length > 0) {
4379
- chunkFEIWTHDN_cjs.writeInfo(
4423
+ chunk7V324BCR_cjs.writeInfo(
4380
4424
  `Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
4381
4425
  ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
4382
4426
  `,
@@ -4386,7 +4430,7 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
4386
4430
  const result = await releasePublish({
4387
4431
  ...options,
4388
4432
  dryRun: !!options.dryRun,
4389
- verbose: chunkFEIWTHDN_cjs.isVerbose(config5.logLevel)
4433
+ verbose: chunk7V324BCR_cjs.isVerbose(config5.logLevel)
4390
4434
  });
4391
4435
  const failedProjects = Object.keys(result).filter(
4392
4436
  (key) => result[key]?.code && result[key]?.code > 0
@@ -4401,10 +4445,10 @@ ${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${res
4401
4445
  );
4402
4446
  }
4403
4447
  } else {
4404
- chunkFEIWTHDN_cjs.writeWarning("Skipped publishing packages.", config5);
4448
+ chunk7V324BCR_cjs.writeWarning("Skipped publishing packages.", config5);
4405
4449
  }
4406
4450
  }
4407
- chunkFEIWTHDN_cjs.writeSuccess("Completed the Storm workspace release process!", config5);
4451
+ chunk7V324BCR_cjs.writeSuccess("Completed the Storm workspace release process!", config5);
4408
4452
  };
4409
4453
  async function updatePackageManifests(projectsVersionData, config5) {
4410
4454
  let projectGraph;
@@ -4419,7 +4463,7 @@ async function updatePackageManifests(projectsVersionData, config5) {
4419
4463
  Object.keys(projectsVersionData).map(async (node) => {
4420
4464
  const projectNode = projectGraph.nodes[node];
4421
4465
  if (!projectNode?.data.root) {
4422
- chunkFEIWTHDN_cjs.writeWarning(
4466
+ chunk7V324BCR_cjs.writeWarning(
4423
4467
  `Project node ${node} not found in the project graph. Skipping manifest update.`,
4424
4468
  config5
4425
4469
  );
@@ -4427,17 +4471,17 @@ async function updatePackageManifests(projectsVersionData, config5) {
4427
4471
  }
4428
4472
  const versionData = projectsVersionData[node];
4429
4473
  if (projectNode?.data.root && versionData && versionData.newVersion !== null) {
4430
- chunkFEIWTHDN_cjs.writeTrace(
4474
+ chunk7V324BCR_cjs.writeTrace(
4431
4475
  `Writing version ${versionData.newVersion} update to manifest file for ${node}
4432
4476
  `,
4433
4477
  config5
4434
4478
  );
4435
- const projectRoot = chunkFEIWTHDN_cjs.joinPaths(
4479
+ const projectRoot = chunk7V324BCR_cjs.joinPaths(
4436
4480
  config5.workspaceRoot,
4437
4481
  projectNode.data.root
4438
4482
  );
4439
- const packageJsonPath = chunkFEIWTHDN_cjs.joinPaths(projectRoot, "package.json");
4440
- const cargoTomlPath = chunkFEIWTHDN_cjs.joinPaths(projectRoot, "Cargo.toml");
4483
+ const packageJsonPath = chunk7V324BCR_cjs.joinPaths(projectRoot, "package.json");
4484
+ const cargoTomlPath = chunk7V324BCR_cjs.joinPaths(projectRoot, "Cargo.toml");
4441
4485
  if (fs$1.existsSync(packageJsonPath)) {
4442
4486
  const packageJsonContent = await fs.readFile(packageJsonPath, "utf8");
4443
4487
  const packageJson = JSON.parse(packageJsonContent);
@@ -4455,7 +4499,7 @@ async function updatePackageManifests(projectsVersionData, config5) {
4455
4499
  })
4456
4500
  );
4457
4501
  } else {
4458
- chunkFEIWTHDN_cjs.writeWarning("No project nodes found. Skipping manifest updates.", config5);
4502
+ chunk7V324BCR_cjs.writeWarning("No project nodes found. Skipping manifest updates.", config5);
4459
4503
  }
4460
4504
  }
4461
4505
 
@@ -4463,8 +4507,8 @@ async function updatePackageManifests(projectsVersionData, config5) {
4463
4507
  var _config = {};
4464
4508
  function createProgram(config5) {
4465
4509
  _config = config5;
4466
- chunkFEIWTHDN_cjs.writeInfo("\u26A1 Running Storm Git Tools", config5);
4467
- const root = chunkFEIWTHDN_cjs.findWorkspaceRootSafe(process.cwd());
4510
+ chunk7V324BCR_cjs.writeInfo("\u26A1 Running Storm Git Tools", config5);
4511
+ const root = chunk7V324BCR_cjs.findWorkspaceRootSafe(process.cwd());
4468
4512
  process.env.STORM_WORKSPACE_ROOT ??= root;
4469
4513
  process.env.NX_WORKSPACE_ROOT_PATH ??= root;
4470
4514
  if (root) {
@@ -4533,12 +4577,12 @@ async function commitAction({
4533
4577
  dryRun = false
4534
4578
  }) {
4535
4579
  try {
4536
- chunkFEIWTHDN_cjs.writeInfo(
4580
+ chunk7V324BCR_cjs.writeInfo(
4537
4581
  `\u26A1 Preparing to commit your changes. Please provide the requested details below...`,
4538
4582
  _config
4539
4583
  );
4540
4584
  await runCommit(config5, dryRun);
4541
- chunkFEIWTHDN_cjs.writeSuccess(
4585
+ chunk7V324BCR_cjs.writeSuccess(
4542
4586
  `\u{1F389} Storm Commit processing completed successfully!
4543
4587
 
4544
4588
  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}
@@ -4546,7 +4590,7 @@ Note: Please run "pnpm push" to upload these changes to the remote ${_config.nam
4546
4590
  _config
4547
4591
  );
4548
4592
  } catch (error) {
4549
- chunkFEIWTHDN_cjs.writeFatal(
4593
+ chunk7V324BCR_cjs.writeFatal(
4550
4594
  `A fatal error occurred while running commit action:
4551
4595
 
4552
4596
  ${error.message}`,
@@ -4557,14 +4601,14 @@ ${error.message}`,
4557
4601
  }
4558
4602
  async function readmeAction(options) {
4559
4603
  try {
4560
- chunkFEIWTHDN_cjs.writeInfo("\u26A1 Formatting the workspace's README.md files", _config);
4604
+ chunk7V324BCR_cjs.writeInfo("\u26A1 Formatting the workspace's README.md files", _config);
4561
4605
  await runReadme(options);
4562
- chunkFEIWTHDN_cjs.writeSuccess(
4606
+ chunk7V324BCR_cjs.writeSuccess(
4563
4607
  "Formatting of the workspace's README.md files is complete\n",
4564
4608
  _config
4565
4609
  );
4566
4610
  } catch (error) {
4567
- chunkFEIWTHDN_cjs.writeFatal(
4611
+ chunk7V324BCR_cjs.writeFatal(
4568
4612
  `A fatal error occurred while running README format action:
4569
4613
 
4570
4614
  ${error.message}`
@@ -4579,7 +4623,7 @@ async function releaseAction({
4579
4623
  dryRun
4580
4624
  }) {
4581
4625
  try {
4582
- chunkFEIWTHDN_cjs.writeInfo(
4626
+ chunk7V324BCR_cjs.writeInfo(
4583
4627
  "\u26A1 Running the Storm Release and Publish process on the workspace",
4584
4628
  _config
4585
4629
  );
@@ -4589,9 +4633,9 @@ async function releaseAction({
4589
4633
  base,
4590
4634
  head
4591
4635
  });
4592
- chunkFEIWTHDN_cjs.writeSuccess("Release completed successfully!\n", _config);
4636
+ chunk7V324BCR_cjs.writeSuccess("Release completed successfully!\n", _config);
4593
4637
  } catch (error) {
4594
- chunkFEIWTHDN_cjs.writeFatal(
4638
+ chunk7V324BCR_cjs.writeFatal(
4595
4639
  `A fatal error occurred while running release action:
4596
4640
 
4597
4641
  ${error.message} ${error.stack ? `
@@ -4605,17 +4649,17 @@ Stacktrace: ${error.stack}` : ""}`,
4605
4649
  }
4606
4650
  async function commitLintAction(options) {
4607
4651
  try {
4608
- chunkFEIWTHDN_cjs.writeInfo(
4652
+ chunk7V324BCR_cjs.writeInfo(
4609
4653
  `\u26A1 Linting the ${_config.repository ? _config.repository : _config.namespace ? _config.namespace : _config.name ? _config.name : typeof _config.organization === "string" ? _config.organization : _config.organization?.name ? _config.organization?.name : "Storm-Software"} repository's commit messages.`,
4610
4654
  _config
4611
4655
  );
4612
4656
  await runCommitLint(_config, options);
4613
- chunkFEIWTHDN_cjs.writeSuccess(
4657
+ chunk7V324BCR_cjs.writeSuccess(
4614
4658
  "Linting the commit messages completed successfully!\n",
4615
4659
  _config
4616
4660
  );
4617
4661
  } catch (error) {
4618
- chunkFEIWTHDN_cjs.writeFatal(
4662
+ chunk7V324BCR_cjs.writeFatal(
4619
4663
  `A fatal error occurred while linting the commit messages:
4620
4664
 
4621
4665
  ${error.message}`,
@@ -4627,18 +4671,18 @@ ${error.message}`,
4627
4671
 
4628
4672
  // bin/git.ts
4629
4673
  void (async () => {
4630
- const config5 = await chunkFEIWTHDN_cjs.getConfig();
4674
+ const config5 = await chunk7V324BCR_cjs.getConfig();
4631
4675
  try {
4632
- chunkFEIWTHDN_cjs.handleProcess(config5);
4676
+ chunk7V324BCR_cjs.handleProcess(config5);
4633
4677
  const program = createProgram(config5);
4634
4678
  await program.parseAsync(process.argv);
4635
- chunkFEIWTHDN_cjs.writeSuccess(
4679
+ chunk7V324BCR_cjs.writeSuccess(
4636
4680
  `\u{1F389} Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`,
4637
4681
  config5
4638
4682
  );
4639
- chunkFEIWTHDN_cjs.exitWithSuccess(config5);
4683
+ chunk7V324BCR_cjs.exitWithSuccess(config5);
4640
4684
  } catch (error) {
4641
- chunkFEIWTHDN_cjs.exitWithError(config5);
4685
+ chunk7V324BCR_cjs.exitWithError(config5);
4642
4686
  process.exit(1);
4643
4687
  }
4644
4688
  })();