@storm-software/git-tools 2.131.32 → 2.131.34

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.js CHANGED
@@ -22,7 +22,7 @@ import '@inquirer/password';
22
22
  import '@inquirer/search';
23
23
  import default11 from '@inquirer/select';
24
24
  import shellescape from 'any-shell-escape';
25
- import chalkTemplate from 'chalk-template';
25
+ import chalk2 from 'chalk';
26
26
  import fs, { readFile as readFile$1, writeFile } from 'node:fs/promises';
27
27
  import createBasePreset from 'conventional-changelog-conventionalcommits';
28
28
  import { readCachedProjectGraph, createProjectGraphAsync as createProjectGraphAsync$1, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph$1 } from 'nx/src/project-graph/project-graph';
@@ -47,7 +47,6 @@ import axios from 'axios';
47
47
  import { homedir } from 'node:os';
48
48
  import { defaultCreateReleaseProvider, GithubRemoteReleaseClient } from 'nx/src/command-line/release/utils/remote-release-clients/github';
49
49
  import { parse } from 'yaml';
50
- import chalk from 'chalk';
51
50
  import { printAndFlushChanges as printAndFlushChanges$1 } from 'nx/src/command-line/release/utils/print-changes';
52
51
  import { createGitTagValues, handleDuplicateGitTags, createCommitMessageValues, isPrerelease, shouldPreferDockerVersionForReleaseGroup, ReleaseVersion, noDiffInChangelogMessage, shouldSkipVersionActions } from 'nx/src/command-line/release/utils/shared';
53
52
  import { interpolate as interpolate$1 } from 'nx/src/tasks-runner/utils';
@@ -1209,7 +1208,7 @@ async function createState(workspaceConfig, configPath) {
1209
1208
  if (state.config.questions.type.enum) {
1210
1209
  ret[key] = {
1211
1210
  ...state.config.questions.type.enum[key],
1212
- title: chalkTemplate`${state.config.questions.type.enum[key]?.emoji ? `${state.config.questions.type.enum[key]?.emoji} ` : ""}{bold ${key}} ${state.config.questions.type.enum[key]?.title && state.config.questions.type.enum[key]?.title !== key ? `- ${state.config.questions.type.enum[key]?.title}` : ""}${state.config.questions.type.enum[key]?.semverBump ? ` (version bump: ${state.config.questions.type.enum[key]?.semverBump})` : ""}`,
1211
+ title: `${state.config.questions.type.enum[key]?.emoji ? `${state.config.questions.type.enum[key]?.emoji} ` : ""}${chalk2.bold(key)} ${state.config.questions.type.enum[key]?.title && state.config.questions.type.enum[key]?.title !== key ? `- ${state.config.questions.type.enum[key]?.title}` : ""}${state.config.questions.type.enum[key]?.semverBump ? ` (version bump: ${state.config.questions.type.enum[key]?.semverBump})` : ""}`,
1213
1212
  hidden: false
1214
1213
  };
1215
1214
  }
@@ -1225,7 +1224,7 @@ async function createState(workspaceConfig, configPath) {
1225
1224
  for (const scope of scopes) {
1226
1225
  if (scope === "monorepo") {
1227
1226
  state.config.questions.scope.enum[scope] = {
1228
- title: chalkTemplate`{bold monorepo} - workspace root`,
1227
+ title: chalk2.bold("monorepo") + " - workspace root",
1229
1228
  description: "The base workspace package (workspace root)",
1230
1229
  hidden: false,
1231
1230
  projectRoot: "/"
@@ -1259,7 +1258,7 @@ async function createState(workspaceConfig, configPath) {
1259
1258
  description = packageJson.description || description;
1260
1259
  }
1261
1260
  state.config.questions.scope.enum[scope] = {
1262
- title: chalkTemplate`{bold ${project.name}} - ${project.root}`,
1261
+ title: chalk2.bold(project.name) + " - " + project.root,
1263
1262
  description,
1264
1263
  hidden: false,
1265
1264
  projectRoot: project.root
@@ -1331,22 +1330,24 @@ async function runCommit(commitizenFile, dryRun = false) {
1331
1330
  if (dryRun) {
1332
1331
  writeInfo("Running in dry mode.", workspaceConfig);
1333
1332
  }
1334
- console.log(chalkTemplate`
1335
- {bold.#999999 ----------------------------------------}
1336
-
1337
- {bold.#FFFFFF ${brandIcon(workspaceConfig)} Storm Software Git-Tools - Commit}
1338
- {#CCCCCC Please provide the requested details below...}
1339
- `);
1333
+ console.log(
1334
+ chalk2.bold.hex("#999999")("----------------------------------------") + "\n\n" + chalk2.bold.hex("#FFFFFF")(
1335
+ ` ${brandIcon(workspaceConfig)} Storm Software Git-Tools - Commit`
1336
+ ) + "\n" + chalk2.hex("#CCCCCC")("Please provide the requested details below...")
1337
+ );
1340
1338
  state.answers = await askQuestions(state);
1341
1339
  const message = formatCommitMessage(state, workspaceConfig);
1342
1340
  const commitMsgFile = joinPaths(getGitDir(), "COMMIT_EDITMSG");
1343
- console.log(chalkTemplate`
1344
- {bold.#999999 ----------------------------------------}
1341
+ console.log(
1342
+ chalk2.bold.hex("#999999")("----------------------------------------") + `
1345
1343
 
1346
- {bold.#FFFFFF Commit message} - {#DDDDDD ${message}}
1347
- {bold.#FFFFFF Git-Commit File} - {#DDDDDD ${commitMsgFile}}
1344
+ ${chalk2.bold.hex("#FFFFFF")("Commit message")} - ${chalk2.hex("#DDDDDD")(message)}
1345
+ ${chalk2.bold.hex("#FFFFFF")("Git-Commit File")} - ${chalk2.hex("#DDDDDD")(
1346
+ commitMsgFile
1347
+ )}
1348
1348
 
1349
- `);
1349
+ `
1350
+ );
1350
1351
  await runCommitLint(workspaceConfig, { message });
1351
1352
  const commandItems = ["git", "commit", "-S"];
1352
1353
  commandItems.push(...["--file", commitMsgFile]);
@@ -1376,8 +1377,7 @@ async function askQuestions(state) {
1376
1377
  return state.answers;
1377
1378
  }
1378
1379
  async function askQuestion(index, question) {
1379
- const message = chalkTemplate`{bold ${index + 1}. ${question.title}} - ${question.description}
1380
- `;
1380
+ const message = `${chalk2.bold(`${index + 1}. ${question.title}`)} - ${question.description}`;
1381
1381
  if (question.type === "select" && question.enum && Object.keys(question.enum).length > 1) {
1382
1382
  return default11({
1383
1383
  message,
@@ -2570,7 +2570,7 @@ async function generateChangelogForProjects({
2570
2570
  if (interpolatedTreePath) {
2571
2571
  const prefix = dryRun ? "Previewing" : "Generating";
2572
2572
  output.log({
2573
- title: `${prefix} an entry in ${interpolatedTreePath} for ${chalk.white(
2573
+ title: `${prefix} an entry in ${interpolatedTreePath} for ${chalk2.white(
2574
2574
  releaseVersion.gitTag
2575
2575
  )}`
2576
2576
  });