@storm-software/git-tools 2.113.38 → 2.115.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/git.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
5
- var chunkEBHPAULB_cjs = require('./chunk-EBHPAULB.cjs');
5
+ var chunkO7PN47AE_cjs = require('./chunk-O7PN47AE.cjs');
6
6
  var TOML = require('@ltd/j-toml');
7
7
  var commander = require('commander');
8
8
  var prompts = require('@inquirer/prompts');
@@ -915,7 +915,7 @@ function getRuleFromScopeEnum(scopeEnum) {
915
915
  // src/commitlint/run.ts
916
916
  var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
917
917
  var runCommitLint = async (config, params) => {
918
- chunkEBHPAULB_cjs.writeInfo(
918
+ chunkO7PN47AE_cjs.writeInfo(
919
919
  "\u{1F4DD} Validating git commit message aligns with the Storm Software specification",
920
920
  config
921
921
  );
@@ -923,7 +923,7 @@ var runCommitLint = async (config, params) => {
923
923
  if (params.message && params.message !== COMMIT_EDITMSG_PATH) {
924
924
  commitMessage = params.message;
925
925
  } else {
926
- const commitFile = chunkEBHPAULB_cjs.joinPaths(
926
+ const commitFile = chunkO7PN47AE_cjs.joinPaths(
927
927
  config.workspaceRoot,
928
928
  params.file || params.message || COMMIT_EDITMSG_PATH
929
929
  );
@@ -940,17 +940,17 @@ var runCommitLint = async (config, params) => {
940
940
  if (upstreamRemote) {
941
941
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
942
942
  if (!upstreamRemoteIdentifier) {
943
- chunkEBHPAULB_cjs.writeWarning(
943
+ chunkO7PN47AE_cjs.writeWarning(
944
944
  `No upstream remote found for ${config.name}.git. Skipping comparison.`,
945
945
  config
946
946
  );
947
947
  return;
948
948
  }
949
- chunkEBHPAULB_cjs.writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
949
+ chunkO7PN47AE_cjs.writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
950
950
  const currentBranch = childProcess__default.default.execSync("git branch --show-current").toString().trim();
951
951
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
952
952
  } else {
953
- chunkEBHPAULB_cjs.writeWarning(
953
+ chunkO7PN47AE_cjs.writeWarning(
954
954
  `No upstream remote found for ${config.name}.git. Skipping comparison against upstream main.`,
955
955
  config
956
956
  );
@@ -958,7 +958,7 @@ var runCommitLint = async (config, params) => {
958
958
  }
959
959
  commitMessage = childProcess__default.default.execSync(gitLogCmd).toString().trim();
960
960
  if (!commitMessage) {
961
- chunkEBHPAULB_cjs.writeWarning(
961
+ chunkO7PN47AE_cjs.writeWarning(
962
962
  "No commits found. Skipping commit message validation.",
963
963
  config
964
964
  );
@@ -971,7 +971,7 @@ var runCommitLint = async (config, params) => {
971
971
  });
972
972
  const commitMsgRegex = `(${allowedTypes})\\((${allowedScopes})\\)!?:\\s(([a-z0-9:-s])+)`;
973
973
  const matchCommit = new RegExp(commitMsgRegex, "g").test(commitMessage);
974
- const commitlintConfig = chunkEBHPAULB_cjs.defu(
974
+ const commitlintConfig = chunkO7PN47AE_cjs.defu(
975
975
  params.config ?? {},
976
976
  { rules: { "scope-enum": getRuleFromScopeEnum(allowedScopes) } },
977
977
  DEFAULT_COMMITLINT_CONFIG
@@ -981,7 +981,7 @@ var runCommitLint = async (config, params) => {
981
981
  helpUrl: commitlintConfig.helpUrl
982
982
  });
983
983
  if (!matchCommit || report.errors.length || report.warnings.length) {
984
- chunkEBHPAULB_cjs.writeSuccess(`Commit was processing completed successfully!`, config);
984
+ chunkO7PN47AE_cjs.writeSuccess(`Commit was processing completed successfully!`, config);
985
985
  } else {
986
986
  let errorMessage = " Oh no! Your commit message: \n-------------------------------------------------------------------\n" + commitMessage + "\n-------------------------------------------------------------------\n\n Does not follow the commit message convention specified by Storm Software.";
987
987
  errorMessage += "\ntype(scope): subject \n BLANK LINE \n body";
@@ -1053,14 +1053,14 @@ async function createState(config, commitizenFile = "@storm-software/git-tools/c
1053
1053
  answers: {}
1054
1054
  };
1055
1055
  } else {
1056
- chunkEBHPAULB_cjs.writeInfo(`Using custom commit config file: ${commitizenFile}`, config);
1056
+ chunkO7PN47AE_cjs.writeInfo(`Using custom commit config file: ${commitizenFile}`, config);
1057
1057
  let commitizenConfig = await import(commitizenFile);
1058
1058
  if (commitizenConfig?.default) {
1059
1059
  commitizenConfig = commitizenConfig?.default;
1060
1060
  }
1061
1061
  state = {
1062
1062
  config: await resolveCommitOptions(
1063
- chunkEBHPAULB_cjs.defu(commitizenConfig ?? {}, DEFAULT_COMMIT_CONFIG),
1063
+ chunkO7PN47AE_cjs.defu(commitizenConfig ?? {}, DEFAULT_COMMIT_CONFIG),
1064
1064
  config
1065
1065
  ),
1066
1066
  root,
@@ -1116,7 +1116,7 @@ async function createState(config, commitizenFile = "@storm-software/git-tools/c
1116
1116
  const project = projectConfigurations.projects[scope];
1117
1117
  if (project) {
1118
1118
  let description = `${project.name} - ${project.root}`;
1119
- const packageJsonPath = chunkEBHPAULB_cjs.joinPaths(project.root, "package.json");
1119
+ const packageJsonPath = chunkO7PN47AE_cjs.joinPaths(project.root, "package.json");
1120
1120
  if (fs$1.existsSync(packageJsonPath)) {
1121
1121
  const packageJsonFile = await fs.readFile(packageJsonPath, "utf8");
1122
1122
  const packageJson = JSON.parse(packageJsonFile);
@@ -1193,10 +1193,10 @@ ${closedIssueEmoji}${config.prompt.settings.closedIssueMessage}${issues}`;
1193
1193
 
1194
1194
  // src/commit/run.ts
1195
1195
  var runCommit = async (commitizenFile = "@storm-software/git-tools/commit/config", dryRun = false) => {
1196
- const config = await chunkEBHPAULB_cjs.getConfig();
1196
+ const config = await chunkO7PN47AE_cjs.getConfig();
1197
1197
  const state = await createState(config, commitizenFile);
1198
1198
  if (dryRun) {
1199
- chunkEBHPAULB_cjs.writeInfo("Running in dry mode.", config);
1199
+ chunkO7PN47AE_cjs.writeInfo("Running in dry mode.", config);
1200
1200
  }
1201
1201
  console.log(chalkTemplate__default.default`
1202
1202
  {bold.#999999 ----------------------------------------}
@@ -1206,7 +1206,7 @@ var runCommit = async (commitizenFile = "@storm-software/git-tools/commit/config
1206
1206
  `);
1207
1207
  state.answers = await askQuestions(state);
1208
1208
  const message = formatCommitMessage(state);
1209
- const commitMsgFile = chunkEBHPAULB_cjs.joinPaths(getGitDir(), "COMMIT_EDITMSG");
1209
+ const commitMsgFile = chunkO7PN47AE_cjs.joinPaths(getGitDir(), "COMMIT_EDITMSG");
1210
1210
  console.log(chalkTemplate__default.default`
1211
1211
  {bold.#999999 ----------------------------------------}
1212
1212
 
@@ -1219,11 +1219,11 @@ var runCommit = async (commitizenFile = "@storm-software/git-tools/commit/config
1219
1219
  commandItems.push(...["--file", commitMsgFile]);
1220
1220
  const command = shellescape__default.default(commandItems);
1221
1221
  if (dryRun) {
1222
- chunkEBHPAULB_cjs.writeDebug(
1222
+ chunkO7PN47AE_cjs.writeDebug(
1223
1223
  `Skipping execution [dry-run]: ${command.replace(commitMsgFile, ".git/COMMIT_EDITMSG")}`,
1224
1224
  config
1225
1225
  );
1226
- chunkEBHPAULB_cjs.writeDebug(`Message [dry-run]: ${message}`, config);
1226
+ chunkO7PN47AE_cjs.writeDebug(`Message [dry-run]: ${message}`, config);
1227
1227
  } else {
1228
1228
  await fs__default.default.writeFile(commitMsgFile, message);
1229
1229
  chunkCIJVSMK2_cjs.run(config, command);
@@ -2457,7 +2457,7 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer__default.def
2457
2457
  };
2458
2458
  }
2459
2459
  async render() {
2460
- this.workspaceConfig = await chunkEBHPAULB_cjs.getWorkspaceConfig();
2460
+ this.workspaceConfig = await chunkO7PN47AE_cjs.getWorkspaceConfig();
2461
2461
  return await super.render();
2462
2462
  }
2463
2463
  preprocessChanges() {
@@ -2768,7 +2768,7 @@ async function createOrUpdateGithubReleaseInternal(githubRequestConfig, release,
2768
2768
  if (!shouldContinueInGitHub) {
2769
2769
  return;
2770
2770
  }
2771
- const open = chunkEBHPAULB_cjs.__require("open");
2771
+ const open = chunkO7PN47AE_cjs.__require("open");
2772
2772
  await open(result.url).then(() => {
2773
2773
  console.info(
2774
2774
  `
@@ -2848,6 +2848,19 @@ async function syncGithubRelease(githubRequestConfig, release, existingGithubRel
2848
2848
  url: newGhRelease.html_url
2849
2849
  };
2850
2850
  } catch (error) {
2851
+ if (process.env.CI) {
2852
+ console.error(
2853
+ `An error occurred while trying to create a release on GitHub, please report this on https://github.com/storm-software/storm-ops (NOTE: make sure to redact your GitHub token from the error message!): ${typeof error?.message === "string" ? error?.message : `
2854
+
2855
+ ${error}`}`
2856
+ );
2857
+ throw new Error(
2858
+ "`An error occurred while trying to create a release on GitHub in a CI environment",
2859
+ {
2860
+ cause: error
2861
+ }
2862
+ );
2863
+ }
2851
2864
  return {
2852
2865
  status: "manual",
2853
2866
  error,
@@ -2868,7 +2881,7 @@ async function resolveTokenData(hostname) {
2868
2881
  );
2869
2882
  if (fs$1.existsSync(ghCLIPath)) {
2870
2883
  const yamlContents = await fs$1.promises.readFile(ghCLIPath, "utf8");
2871
- const { load } = chunkEBHPAULB_cjs.__require("@zkochan/js-yaml");
2884
+ const { load } = chunkO7PN47AE_cjs.__require("@zkochan/js-yaml");
2872
2885
  const ghCLIConfig = load(yamlContents);
2873
2886
  if (ghCLIConfig[hostname]) {
2874
2887
  if (ghCLIConfig[hostname].oauth_token) {
@@ -2982,7 +2995,7 @@ async function isUserAnOrganizationMember(userId, config, remoteName = "origin")
2982
2995
  // src/release/changelog.ts
2983
2996
  function createAPI(overrideReleaseConfig) {
2984
2997
  return async function releaseChangelog(args) {
2985
- const workspaceConfig = await chunkEBHPAULB_cjs.getWorkspaceConfig();
2998
+ const workspaceConfig = await chunkO7PN47AE_cjs.getWorkspaceConfig();
2986
2999
  const projectGraph$1 = await projectGraph.createProjectGraphAsync({ exitOnError: true });
2987
3000
  const nxJson$1 = nxJson.readNxJson();
2988
3001
  const userProvidedReleaseConfig = deepMergeJson.deepMergeJson(
@@ -3683,7 +3696,7 @@ async function generateChangelogForWorkspace({
3683
3696
  workspaceChangelogVersion,
3684
3697
  changes
3685
3698
  }) {
3686
- const workspaceConfig = await chunkEBHPAULB_cjs.getWorkspaceConfig();
3699
+ const workspaceConfig = await chunkO7PN47AE_cjs.getWorkspaceConfig();
3687
3700
  if (!workspaceConfig) {
3688
3701
  throw new Error(
3689
3702
  `Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
@@ -3797,7 +3810,7 @@ async function generateChangelogForProjects({
3797
3810
  nxReleaseConfig,
3798
3811
  projectToAdditionalDependencyBumps
3799
3812
  }) {
3800
- const workspaceConfig = await chunkEBHPAULB_cjs.getWorkspaceConfig();
3813
+ const workspaceConfig = await chunkO7PN47AE_cjs.getWorkspaceConfig();
3801
3814
  if (!workspaceConfig) {
3802
3815
  throw new Error(
3803
3816
  `Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
@@ -4102,7 +4115,7 @@ var runRelease = async (config, options) => {
4102
4115
  throw new Error("The `GITHUB_ACTOR` environment variable is not set.");
4103
4116
  }
4104
4117
  if (!await isUserAnOrganizationMember(process.env.GITHUB_ACTOR, config)) {
4105
- chunkEBHPAULB_cjs.writeFatal(
4118
+ chunkO7PN47AE_cjs.writeFatal(
4106
4119
  "You must be a member of the Storm Software organization to run the release process.",
4107
4120
  config
4108
4121
  );
@@ -4119,12 +4132,12 @@ var runRelease = async (config, options) => {
4119
4132
  process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
4120
4133
  process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
4121
4134
  process.env.NPM_CONFIG_PROVENANCE = "true";
4122
- chunkEBHPAULB_cjs.writeDebug("Creating workspace Project Graph data...", config);
4135
+ chunkO7PN47AE_cjs.writeDebug("Creating workspace Project Graph data...", config);
4123
4136
  const nxJson = nxJson_js.readNxJson();
4124
- chunkEBHPAULB_cjs.writeDebug("Reading in the workspaces release configuration", config);
4137
+ chunkO7PN47AE_cjs.writeDebug("Reading in the workspaces release configuration", config);
4125
4138
  const to = options.head || process.env.NX_HEAD;
4126
4139
  const from = options.base || process.env.NX_BASE;
4127
- chunkEBHPAULB_cjs.writeDebug(
4140
+ chunkO7PN47AE_cjs.writeDebug(
4128
4141
  `Using the following Git SHAs to determine the release content:
4129
4142
  - From: ${from}
4130
4143
  - To: ${to}
@@ -4135,28 +4148,28 @@ var runRelease = async (config, options) => {
4135
4148
  nxJson.release.groups = Object.keys(nxJson.release.groups).reduce(
4136
4149
  (ret, groupName) => {
4137
4150
  const groupConfig = nxJson.release?.groups?.[groupName];
4138
- ret[groupName] = chunkEBHPAULB_cjs.defu(groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
4151
+ ret[groupName] = chunkO7PN47AE_cjs.defu(groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
4139
4152
  return ret;
4140
4153
  },
4141
4154
  {}
4142
4155
  );
4143
4156
  }
4144
- const nxReleaseConfig = chunkEBHPAULB_cjs.defu(
4157
+ const nxReleaseConfig = chunkO7PN47AE_cjs.defu(
4145
4158
  nxJson.release,
4146
4159
  DEFAULT_RELEASE_CONFIG
4147
4160
  );
4148
- chunkEBHPAULB_cjs.writeInfo(
4161
+ chunkO7PN47AE_cjs.writeInfo(
4149
4162
  "Using the following `nx.json` release configuration values",
4150
4163
  config
4151
4164
  );
4152
- chunkEBHPAULB_cjs.writeInfo(nxReleaseConfig, config);
4165
+ chunkO7PN47AE_cjs.writeInfo(nxReleaseConfig, config);
4153
4166
  const releaseVersion = version_js.createAPI(nxReleaseConfig);
4154
4167
  const releaseChangelog = createAPI(nxReleaseConfig);
4155
4168
  const releasePublish = publish_js.createAPI(nxReleaseConfig);
4156
- chunkEBHPAULB_cjs.writeDebug("Determining the current release versions...", config);
4169
+ chunkO7PN47AE_cjs.writeDebug("Determining the current release versions...", config);
4157
4170
  const { workspaceVersion, projectsVersionData } = await releaseVersion({
4158
4171
  dryRun: false,
4159
- verbose: chunkEBHPAULB_cjs.isVerbose(config.logLevel),
4172
+ verbose: chunkO7PN47AE_cjs.isVerbose(config.logLevel),
4160
4173
  preid: config.preid,
4161
4174
  deleteVersionPlans: false,
4162
4175
  stageChanges: true,
@@ -4167,15 +4180,15 @@ var runRelease = async (config, options) => {
4167
4180
  version: nxReleaseConfig?.projectsRelationship !== "fixed" ? void 0 : workspaceVersion,
4168
4181
  versionData: projectsVersionData,
4169
4182
  dryRun: false,
4170
- verbose: chunkEBHPAULB_cjs.isVerbose(config.logLevel),
4183
+ verbose: chunkO7PN47AE_cjs.isVerbose(config.logLevel),
4171
4184
  to,
4172
4185
  from,
4173
4186
  gitCommit: true,
4174
4187
  gitCommitMessage: "release(monorepo): Publish workspace release updates"
4175
4188
  });
4176
- chunkEBHPAULB_cjs.writeDebug("Tagging commit with git", config);
4189
+ chunkO7PN47AE_cjs.writeDebug("Tagging commit with git", config);
4177
4190
  if (options.skipPublish) {
4178
- chunkEBHPAULB_cjs.writeWarning(
4191
+ chunkO7PN47AE_cjs.writeWarning(
4179
4192
  "Skipping publishing packages since `skipPublish` was provided as `true` in the release options.",
4180
4193
  config
4181
4194
  );
@@ -4184,7 +4197,7 @@ var runRelease = async (config, options) => {
4184
4197
  (key) => projectsVersionData[key]?.newVersion
4185
4198
  );
4186
4199
  if (changedProjects.length > 0) {
4187
- chunkEBHPAULB_cjs.writeInfo(
4200
+ chunkO7PN47AE_cjs.writeInfo(
4188
4201
  `Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
4189
4202
  ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
4190
4203
  `,
@@ -4194,7 +4207,7 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
4194
4207
  const result = await releasePublish({
4195
4208
  ...options,
4196
4209
  dryRun: !!options.dryRun,
4197
- verbose: chunkEBHPAULB_cjs.isVerbose(config.logLevel)
4210
+ verbose: chunkO7PN47AE_cjs.isVerbose(config.logLevel)
4198
4211
  });
4199
4212
  const failedProjects = Object.keys(result).filter(
4200
4213
  (key) => result[key]?.code && result[key]?.code > 0
@@ -4209,10 +4222,10 @@ ${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${res
4209
4222
  );
4210
4223
  }
4211
4224
  } else {
4212
- chunkEBHPAULB_cjs.writeWarning("Skipped publishing packages.", config);
4225
+ chunkO7PN47AE_cjs.writeWarning("Skipped publishing packages.", config);
4213
4226
  }
4214
4227
  }
4215
- chunkEBHPAULB_cjs.writeSuccess("Completed the Storm workspace release process!", config);
4228
+ chunkO7PN47AE_cjs.writeSuccess("Completed the Storm workspace release process!", config);
4216
4229
  };
4217
4230
  async function updatePackageManifests(projectsVersionData, config) {
4218
4231
  let projectGraph;
@@ -4227,7 +4240,7 @@ async function updatePackageManifests(projectsVersionData, config) {
4227
4240
  Object.keys(projectsVersionData).map(async (node) => {
4228
4241
  const projectNode = projectGraph.nodes[node];
4229
4242
  if (!projectNode?.data.root) {
4230
- chunkEBHPAULB_cjs.writeWarning(
4243
+ chunkO7PN47AE_cjs.writeWarning(
4231
4244
  `Project node ${node} not found in the project graph. Skipping manifest update.`,
4232
4245
  config
4233
4246
  );
@@ -4235,17 +4248,17 @@ async function updatePackageManifests(projectsVersionData, config) {
4235
4248
  }
4236
4249
  const versionData = projectsVersionData[node];
4237
4250
  if (projectNode?.data.root && versionData && versionData.newVersion !== null) {
4238
- chunkEBHPAULB_cjs.writeTrace(
4251
+ chunkO7PN47AE_cjs.writeTrace(
4239
4252
  `Writing version ${versionData.newVersion} update to manifest file for ${node}
4240
4253
  `,
4241
4254
  config
4242
4255
  );
4243
- const projectRoot = chunkEBHPAULB_cjs.joinPaths(
4256
+ const projectRoot = chunkO7PN47AE_cjs.joinPaths(
4244
4257
  config.workspaceRoot,
4245
4258
  projectNode.data.root
4246
4259
  );
4247
- const packageJsonPath = chunkEBHPAULB_cjs.joinPaths(projectRoot, "package.json");
4248
- const cargoTomlPath = chunkEBHPAULB_cjs.joinPaths(projectRoot, "Cargo.toml");
4260
+ const packageJsonPath = chunkO7PN47AE_cjs.joinPaths(projectRoot, "package.json");
4261
+ const cargoTomlPath = chunkO7PN47AE_cjs.joinPaths(projectRoot, "Cargo.toml");
4249
4262
  if (fs$1.existsSync(packageJsonPath)) {
4250
4263
  const packageJsonContent = await fs.readFile(packageJsonPath, "utf8");
4251
4264
  const packageJson = JSON.parse(packageJsonContent);
@@ -4263,7 +4276,7 @@ async function updatePackageManifests(projectsVersionData, config) {
4263
4276
  })
4264
4277
  );
4265
4278
  } else {
4266
- chunkEBHPAULB_cjs.writeWarning("No project nodes found. Skipping manifest updates.", config);
4279
+ chunkO7PN47AE_cjs.writeWarning("No project nodes found. Skipping manifest updates.", config);
4267
4280
  }
4268
4281
  }
4269
4282
 
@@ -4271,8 +4284,8 @@ async function updatePackageManifests(projectsVersionData, config) {
4271
4284
  var _config = {};
4272
4285
  function createProgram(config) {
4273
4286
  _config = config;
4274
- chunkEBHPAULB_cjs.writeInfo("\u26A1 Running Storm Git Tools", config);
4275
- const root = chunkEBHPAULB_cjs.findWorkspaceRootSafe(process.cwd());
4287
+ chunkO7PN47AE_cjs.writeInfo("\u26A1 Running Storm Git Tools", config);
4288
+ const root = chunkO7PN47AE_cjs.findWorkspaceRootSafe(process.cwd());
4276
4289
  process.env.STORM_WORKSPACE_ROOT ??= root;
4277
4290
  process.env.NX_WORKSPACE_ROOT_PATH ??= root;
4278
4291
  if (root) {
@@ -4337,12 +4350,12 @@ async function commitAction({
4337
4350
  dryRun = false
4338
4351
  }) {
4339
4352
  try {
4340
- chunkEBHPAULB_cjs.writeInfo(
4353
+ chunkO7PN47AE_cjs.writeInfo(
4341
4354
  `\u26A1 Preparing to commit your changes. Please provide the requested details below...`,
4342
4355
  _config
4343
4356
  );
4344
4357
  await runCommit(config, dryRun);
4345
- chunkEBHPAULB_cjs.writeSuccess(
4358
+ chunkO7PN47AE_cjs.writeSuccess(
4346
4359
  `\u{1F389} Storm Commit processing completed successfully!
4347
4360
 
4348
4361
  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}
@@ -4350,7 +4363,7 @@ Note: Please run "pnpm push" to upload these changes to the remote ${_config.nam
4350
4363
  _config
4351
4364
  );
4352
4365
  } catch (error) {
4353
- chunkEBHPAULB_cjs.writeFatal(
4366
+ chunkO7PN47AE_cjs.writeFatal(
4354
4367
  `A fatal error occurred while running commit action:
4355
4368
 
4356
4369
  ${error.message}`,
@@ -4361,14 +4374,14 @@ ${error.message}`,
4361
4374
  }
4362
4375
  async function readmeAction(options) {
4363
4376
  try {
4364
- chunkEBHPAULB_cjs.writeInfo("\u26A1 Formatting the workspace's README.md files", _config);
4377
+ chunkO7PN47AE_cjs.writeInfo("\u26A1 Formatting the workspace's README.md files", _config);
4365
4378
  await runReadme(options);
4366
- chunkEBHPAULB_cjs.writeSuccess(
4379
+ chunkO7PN47AE_cjs.writeSuccess(
4367
4380
  "Formatting of the workspace's README.md files is complete\n",
4368
4381
  _config
4369
4382
  );
4370
4383
  } catch (error) {
4371
- chunkEBHPAULB_cjs.writeFatal(
4384
+ chunkO7PN47AE_cjs.writeFatal(
4372
4385
  `A fatal error occurred while running README format action:
4373
4386
 
4374
4387
  ${error.message}`
@@ -4383,7 +4396,7 @@ async function releaseAction({
4383
4396
  dryRun
4384
4397
  }) {
4385
4398
  try {
4386
- chunkEBHPAULB_cjs.writeInfo(
4399
+ chunkO7PN47AE_cjs.writeInfo(
4387
4400
  "\u26A1 Running the Storm Release and Publish process on the workspace",
4388
4401
  _config
4389
4402
  );
@@ -4393,9 +4406,9 @@ async function releaseAction({
4393
4406
  base,
4394
4407
  head
4395
4408
  });
4396
- chunkEBHPAULB_cjs.writeSuccess("Release completed successfully!\n", _config);
4409
+ chunkO7PN47AE_cjs.writeSuccess("Release completed successfully!\n", _config);
4397
4410
  } catch (error) {
4398
- chunkEBHPAULB_cjs.writeFatal(
4411
+ chunkO7PN47AE_cjs.writeFatal(
4399
4412
  `A fatal error occurred while running release action:
4400
4413
 
4401
4414
  ${error.message} ${error.stack ? `
@@ -4413,7 +4426,7 @@ async function commitLintAction({
4413
4426
  file
4414
4427
  }) {
4415
4428
  try {
4416
- chunkEBHPAULB_cjs.writeInfo(
4429
+ chunkO7PN47AE_cjs.writeInfo(
4417
4430
  `\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.`,
4418
4431
  _config
4419
4432
  );
@@ -4422,12 +4435,12 @@ async function commitLintAction({
4422
4435
  message,
4423
4436
  file
4424
4437
  });
4425
- chunkEBHPAULB_cjs.writeSuccess(
4438
+ chunkO7PN47AE_cjs.writeSuccess(
4426
4439
  "Linting the commit messages completed successfully!\n",
4427
4440
  _config
4428
4441
  );
4429
4442
  } catch (error) {
4430
- chunkEBHPAULB_cjs.writeFatal(
4443
+ chunkO7PN47AE_cjs.writeFatal(
4431
4444
  `A fatal error occurred while linting the commit messages:
4432
4445
 
4433
4446
  ${error.message}`,
@@ -4439,18 +4452,18 @@ ${error.message}`,
4439
4452
 
4440
4453
  // bin/git.ts
4441
4454
  void (async () => {
4442
- const config = await chunkEBHPAULB_cjs.getConfig();
4455
+ const config = await chunkO7PN47AE_cjs.getConfig();
4443
4456
  try {
4444
- chunkEBHPAULB_cjs.handleProcess(config);
4457
+ chunkO7PN47AE_cjs.handleProcess(config);
4445
4458
  const program = createProgram(config);
4446
4459
  await program.parseAsync(process.argv);
4447
- chunkEBHPAULB_cjs.writeSuccess(
4460
+ chunkO7PN47AE_cjs.writeSuccess(
4448
4461
  `\u{1F389} Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`,
4449
4462
  config
4450
4463
  );
4451
- chunkEBHPAULB_cjs.exitWithSuccess(config);
4464
+ chunkO7PN47AE_cjs.exitWithSuccess(config);
4452
4465
  } catch (error) {
4453
- chunkEBHPAULB_cjs.exitWithError(config);
4466
+ chunkO7PN47AE_cjs.exitWithError(config);
4454
4467
  process.exit(1);
4455
4468
  }
4456
4469
  })();
package/bin/git.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { run } from './chunk-54Q5U5WW.js';
3
- import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, findWorkspaceRootSafe, writeFatal, joinPaths, writeDebug, defu, isVerbose, writeWarning, getWorkspaceConfig, writeTrace, __require } from './chunk-W7SSBH3S.js';
3
+ import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, findWorkspaceRootSafe, writeFatal, joinPaths, writeDebug, defu, isVerbose, writeWarning, getWorkspaceConfig, writeTrace, __require } from './chunk-XOHAV6VL.js';
4
4
  import TOML from '@ltd/j-toml';
5
5
  import { Command, Option } from 'commander';
6
6
  import { select, confirm, input } from '@inquirer/prompts';
@@ -2831,6 +2831,19 @@ async function syncGithubRelease(githubRequestConfig, release, existingGithubRel
2831
2831
  url: newGhRelease.html_url
2832
2832
  };
2833
2833
  } catch (error) {
2834
+ if (process.env.CI) {
2835
+ console.error(
2836
+ `An error occurred while trying to create a release on GitHub, please report this on https://github.com/storm-software/storm-ops (NOTE: make sure to redact your GitHub token from the error message!): ${typeof error?.message === "string" ? error?.message : `
2837
+
2838
+ ${error}`}`
2839
+ );
2840
+ throw new Error(
2841
+ "`An error occurred while trying to create a release on GitHub in a CI environment",
2842
+ {
2843
+ cause: error
2844
+ }
2845
+ );
2846
+ }
2834
2847
  return {
2835
2848
  status: "manual",
2836
2849
  error,
@@ -3,33 +3,33 @@
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
5
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
6
- var chunkEBHPAULB_cjs = require('./chunk-EBHPAULB.cjs');
6
+ var chunkO7PN47AE_cjs = require('./chunk-O7PN47AE.cjs');
7
7
 
8
8
  // bin/post-checkout.ts
9
9
  void (async () => {
10
- const config = await chunkEBHPAULB_cjs.getConfig();
10
+ const config = await chunkO7PN47AE_cjs.getConfig();
11
11
  try {
12
- chunkEBHPAULB_cjs.handleProcess(config);
13
- chunkEBHPAULB_cjs.writeInfo("Running post-checkout hook...", config);
12
+ chunkO7PN47AE_cjs.handleProcess(config);
13
+ chunkO7PN47AE_cjs.writeInfo("Running post-checkout hook...", config);
14
14
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
15
15
  try {
16
16
  chunkCIJVSMK2_cjs.run(config, "git-lfs version");
17
17
  } catch (error) {
18
- chunkEBHPAULB_cjs.writeError(
18
+ chunkO7PN47AE_cjs.writeError(
19
19
  `This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.
20
20
  Error: ${error?.message}`,
21
21
  config
22
22
  );
23
- chunkEBHPAULB_cjs.exitWithError(config);
23
+ chunkO7PN47AE_cjs.exitWithError(config);
24
24
  }
25
25
  chunkCIJVSMK2_cjs.run(config, "git lfs post-checkout");
26
- chunkEBHPAULB_cjs.exitWithSuccess(config);
26
+ chunkO7PN47AE_cjs.exitWithSuccess(config);
27
27
  } catch (error) {
28
- chunkEBHPAULB_cjs.writeFatal(
28
+ chunkO7PN47AE_cjs.writeFatal(
29
29
  `A fatal error occurred while running the program: ${error.message}`,
30
30
  config
31
31
  );
32
- chunkEBHPAULB_cjs.exitWithError(config);
32
+ chunkO7PN47AE_cjs.exitWithError(config);
33
33
  process.exit(1);
34
34
  }
35
35
  })();
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
3
3
  import { run } from './chunk-54Q5U5WW.js';
4
- import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-W7SSBH3S.js';
4
+ import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-XOHAV6VL.js';
5
5
 
6
6
  // bin/post-checkout.ts
7
7
  void (async () => {
@@ -3,33 +3,33 @@
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
5
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
6
- var chunkEBHPAULB_cjs = require('./chunk-EBHPAULB.cjs');
6
+ var chunkO7PN47AE_cjs = require('./chunk-O7PN47AE.cjs');
7
7
 
8
8
  // bin/post-commit.ts
9
9
  void (async () => {
10
- const config = await chunkEBHPAULB_cjs.getConfig();
10
+ const config = await chunkO7PN47AE_cjs.getConfig();
11
11
  try {
12
- chunkEBHPAULB_cjs.handleProcess(config);
13
- chunkEBHPAULB_cjs.writeInfo("Running post-commit hook...", config);
12
+ chunkO7PN47AE_cjs.handleProcess(config);
13
+ chunkO7PN47AE_cjs.writeInfo("Running post-commit hook...", config);
14
14
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
15
15
  try {
16
16
  chunkCIJVSMK2_cjs.run(config, "git-lfs version");
17
17
  } catch (error) {
18
- chunkEBHPAULB_cjs.writeError(
18
+ chunkO7PN47AE_cjs.writeError(
19
19
  `This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.
20
20
  Error: ${error?.message}`,
21
21
  config
22
22
  );
23
- chunkEBHPAULB_cjs.exitWithError(config);
23
+ chunkO7PN47AE_cjs.exitWithError(config);
24
24
  }
25
25
  chunkCIJVSMK2_cjs.run(config, "git lfs post-commit");
26
- chunkEBHPAULB_cjs.exitWithSuccess(config);
26
+ chunkO7PN47AE_cjs.exitWithSuccess(config);
27
27
  } catch (error) {
28
- chunkEBHPAULB_cjs.writeFatal(
28
+ chunkO7PN47AE_cjs.writeFatal(
29
29
  `A fatal error occurred while running the program: ${error.message}`,
30
30
  config
31
31
  );
32
- chunkEBHPAULB_cjs.exitWithError(config);
32
+ chunkO7PN47AE_cjs.exitWithError(config);
33
33
  process.exit(1);
34
34
  }
35
35
  })();
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
3
3
  import { run } from './chunk-54Q5U5WW.js';
4
- import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-W7SSBH3S.js';
4
+ import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-XOHAV6VL.js';
5
5
 
6
6
  // bin/post-commit.ts
7
7
  void (async () => {
@@ -3,33 +3,33 @@
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
5
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
6
- var chunkEBHPAULB_cjs = require('./chunk-EBHPAULB.cjs');
6
+ var chunkO7PN47AE_cjs = require('./chunk-O7PN47AE.cjs');
7
7
 
8
8
  // bin/post-merge.ts
9
9
  void (async () => {
10
- const config = await chunkEBHPAULB_cjs.getConfig();
10
+ const config = await chunkO7PN47AE_cjs.getConfig();
11
11
  try {
12
- chunkEBHPAULB_cjs.handleProcess(config);
13
- chunkEBHPAULB_cjs.writeInfo("Running post-merge hook...", config);
12
+ chunkO7PN47AE_cjs.handleProcess(config);
13
+ chunkO7PN47AE_cjs.writeInfo("Running post-merge hook...", config);
14
14
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
15
15
  try {
16
16
  chunkCIJVSMK2_cjs.run(config, "git-lfs version");
17
17
  } catch (error) {
18
- chunkEBHPAULB_cjs.writeError(
18
+ chunkO7PN47AE_cjs.writeError(
19
19
  `This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.
20
20
  Error: ${error?.message}`,
21
21
  config
22
22
  );
23
- chunkEBHPAULB_cjs.exitWithError(config);
23
+ chunkO7PN47AE_cjs.exitWithError(config);
24
24
  }
25
25
  chunkCIJVSMK2_cjs.run(config, "git lfs post-merge");
26
- chunkEBHPAULB_cjs.exitWithSuccess(config);
26
+ chunkO7PN47AE_cjs.exitWithSuccess(config);
27
27
  } catch (error) {
28
- chunkEBHPAULB_cjs.writeFatal(
28
+ chunkO7PN47AE_cjs.writeFatal(
29
29
  `A fatal error occurred while running the program: ${error.message}`,
30
30
  config
31
31
  );
32
- chunkEBHPAULB_cjs.exitWithError(config);
32
+ chunkO7PN47AE_cjs.exitWithError(config);
33
33
  process.exit(1);
34
34
  }
35
35
  })();
package/bin/post-merge.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
3
3
  import { run } from './chunk-54Q5U5WW.js';
4
- import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-W7SSBH3S.js';
4
+ import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-XOHAV6VL.js';
5
5
 
6
6
  // bin/post-merge.ts
7
7
  void (async () => {