@storm-software/git-tools 2.124.86 → 2.125.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 (118) hide show
  1. package/README.md +1 -1
  2. package/bin/chunk-3IBASKZ6.cjs +16 -0
  3. package/bin/chunk-3IBASKZ6.cjs.map +1 -0
  4. package/bin/chunk-6FITE6HP.js +52 -0
  5. package/bin/chunk-6FITE6HP.js.map +1 -0
  6. package/bin/chunk-C7APS633.cjs +19 -0
  7. package/bin/chunk-C7APS633.cjs.map +1 -0
  8. package/bin/{chunk-ZBLIE7F7.cjs → chunk-DFXXNV3C.cjs} +2 -3
  9. package/bin/chunk-DFXXNV3C.cjs.map +1 -0
  10. package/bin/chunk-EI723ABQ.cjs +59 -0
  11. package/bin/chunk-EI723ABQ.cjs.map +1 -0
  12. package/bin/{chunk-Q3DQKTOI.js → chunk-HBLWPOJV.js} +5 -5
  13. package/bin/chunk-HBLWPOJV.js.map +1 -0
  14. package/bin/chunk-IA2Z3BAB.cjs +18 -0
  15. package/bin/chunk-IA2Z3BAB.cjs.map +1 -0
  16. package/bin/chunk-JE32WMBP.js +17 -0
  17. package/bin/chunk-JE32WMBP.js.map +1 -0
  18. package/bin/chunk-LHPUN2YZ.js +22 -0
  19. package/bin/chunk-LHPUN2YZ.js.map +1 -0
  20. package/bin/chunk-N7J3ORRT.js +14 -0
  21. package/bin/chunk-N7J3ORRT.js.map +1 -0
  22. package/bin/chunk-ROGUZ46T.js +22 -0
  23. package/bin/chunk-ROGUZ46T.js.map +1 -0
  24. package/bin/chunk-RZZ5UCVV.js +22 -0
  25. package/bin/chunk-RZZ5UCVV.js.map +1 -0
  26. package/bin/{chunk-WQI3QHPS.js → chunk-S3E6UR4Y.js} +3 -3
  27. package/bin/chunk-S3E6UR4Y.js.map +1 -0
  28. package/bin/chunk-S7Z6YPPG.js +16 -0
  29. package/bin/chunk-S7Z6YPPG.js.map +1 -0
  30. package/bin/chunk-XHWHVOBP.cjs +24 -0
  31. package/bin/chunk-XHWHVOBP.cjs.map +1 -0
  32. package/bin/{chunk-AU5PZKTN.cjs → chunk-YHZNDNCW.cjs} +5 -5
  33. package/bin/chunk-YHZNDNCW.cjs.map +1 -0
  34. package/bin/chunk-Z64XNZ43.cjs +24 -0
  35. package/bin/chunk-Z64XNZ43.cjs.map +1 -0
  36. package/bin/chunk-ZW2KYP2Z.cjs +24 -0
  37. package/bin/chunk-ZW2KYP2Z.cjs.map +1 -0
  38. package/bin/git.cjs +206 -84
  39. package/bin/git.cjs.map +1 -1
  40. package/bin/git.js +129 -7
  41. package/bin/git.js.map +1 -1
  42. package/bin/post-checkout.cjs +9 -21
  43. package/bin/post-checkout.cjs.map +1 -1
  44. package/bin/post-checkout.js +5 -17
  45. package/bin/post-checkout.js.map +1 -1
  46. package/bin/post-commit.cjs +9 -21
  47. package/bin/post-commit.cjs.map +1 -1
  48. package/bin/post-commit.js +5 -17
  49. package/bin/post-commit.js.map +1 -1
  50. package/bin/post-merge.cjs +9 -21
  51. package/bin/post-merge.cjs.map +1 -1
  52. package/bin/post-merge.js +5 -17
  53. package/bin/post-merge.js.map +1 -1
  54. package/bin/pre-commit.cjs +8 -16
  55. package/bin/pre-commit.cjs.map +1 -1
  56. package/bin/pre-commit.js +4 -12
  57. package/bin/pre-commit.js.map +1 -1
  58. package/bin/pre-install.cjs +8 -13
  59. package/bin/pre-install.cjs.map +1 -1
  60. package/bin/pre-install.js +4 -9
  61. package/bin/pre-install.js.map +1 -1
  62. package/bin/pre-push.cjs +9 -72
  63. package/bin/pre-push.cjs.map +1 -1
  64. package/bin/pre-push.js +5 -63
  65. package/bin/pre-push.js.map +1 -1
  66. package/bin/prepare.cjs +8 -11
  67. package/bin/prepare.cjs.map +1 -1
  68. package/bin/prepare.js +4 -7
  69. package/bin/prepare.js.map +1 -1
  70. package/bin/version-warning.cjs +7 -7
  71. package/bin/version-warning.js +2 -2
  72. package/dist/chunk-2NF67ZEY.js +14 -0
  73. package/dist/chunk-5DVCH44C.cjs +22 -0
  74. package/dist/{chunk-NY53WLGC.cjs → chunk-7ZSL4J35.cjs} +9 -9
  75. package/dist/chunk-AU2RMJUK.js +20 -0
  76. package/dist/chunk-BUQYMEBK.cjs +17 -0
  77. package/dist/chunk-C6MBULOZ.js +15 -0
  78. package/dist/chunk-DMVL4OYZ.cjs +14 -0
  79. package/dist/chunk-ENL3GCXS.cjs +2 -0
  80. package/dist/chunk-F2HQMRJH.cjs +16 -0
  81. package/dist/chunk-FJL2V56E.cjs +24 -0
  82. package/dist/chunk-GTOCMU46.cjs +57 -0
  83. package/dist/chunk-HMHOHK22.js +17 -0
  84. package/dist/{chunk-VVJA5N2W.js → chunk-HVTQXN3A.js} +3 -285
  85. package/dist/chunk-JOPN56T4.js +22 -0
  86. package/dist/chunk-LSTKPCAN.cjs +22 -0
  87. package/dist/chunk-Q47SPRY7.js +1 -0
  88. package/dist/chunk-QCNDIFYQ.cjs +20 -0
  89. package/dist/chunk-RK75BACO.js +50 -0
  90. package/dist/{chunk-EMYFDYKP.cjs → chunk-RQ67RJVN.cjs} +13 -296
  91. package/dist/chunk-SIFTTG22.cjs +303 -0
  92. package/dist/chunk-UQMGLURT.js +20 -0
  93. package/dist/{chunk-JCEVFJCA.js → chunk-USTER7R2.js} +2 -2
  94. package/dist/chunk-X7F62ZNF.js +290 -0
  95. package/dist/chunk-YUE6ZNKC.js +12 -0
  96. package/dist/chunk-Z4CPTYLS.cjs +22 -0
  97. package/dist/chunk-ZKDVZXHI.js +20 -0
  98. package/dist/commit/minimal.cjs +4 -4
  99. package/dist/commit/minimal.js +2 -2
  100. package/dist/commit/monorepo.cjs +5 -5
  101. package/dist/commit/monorepo.js +3 -3
  102. package/dist/index.cjs +51 -12
  103. package/dist/index.d.cts +8 -0
  104. package/dist/index.d.ts +8 -0
  105. package/dist/index.js +15 -4
  106. package/dist/lefthook/minimal.yml +69 -0
  107. package/dist/lefthook/recommended.yml +60 -0
  108. package/dist/lefthook/strict.yml +32 -0
  109. package/dist/release/config.cjs +13 -11
  110. package/dist/release/config.js +6 -4
  111. package/package.json +79 -65
  112. package/bin/chunk-AU5PZKTN.cjs.map +0 -1
  113. package/bin/chunk-Q3DQKTOI.js.map +0 -1
  114. package/bin/chunk-WQI3QHPS.js.map +0 -1
  115. package/bin/chunk-ZBLIE7F7.cjs.map +0 -1
  116. package/dist/lefthook/config.yml +0 -119
  117. package/dist/{chunk-F7OO6L26.cjs → chunk-CT6VGZZS.cjs} +1 -1
  118. package/dist/{chunk-KZRVQ5RZ.js → chunk-WCAKLYL2.js} +1 -1
package/bin/git.js CHANGED
@@ -1,7 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import './chunk-Q3DQKTOI.js';
2
+ import { postCheckoutHook } from './chunk-ROGUZ46T.js';
3
+ import { postCommitHook } from './chunk-RZZ5UCVV.js';
4
+ import { postMergeHook } from './chunk-LHPUN2YZ.js';
5
+ import { preCommitHook } from './chunk-JE32WMBP.js';
6
+ import './chunk-S7Z6YPPG.js';
7
+ import { prePushHook } from './chunk-6FITE6HP.js';
8
+ import './chunk-HBLWPOJV.js';
9
+ import { prepareHook } from './chunk-N7J3ORRT.js';
3
10
  import { run } from './chunk-G3YPGVPS.js';
4
- import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, brandIcon, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, isVerbose, writeWarning, defu, writeTrace, STORM_DEFAULT_RELEASE_BANNER } from './chunk-WQI3QHPS.js';
11
+ import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, brandIcon, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, isVerbose, writeWarning, defu, writeTrace, STORM_DEFAULT_RELEASE_BANNER } from './chunk-S3E6UR4Y.js';
5
12
  import TOML from '@ltd/j-toml';
6
13
  import { Command } from 'commander';
7
14
  import '@inquirer/checkbox';
@@ -3886,6 +3893,13 @@ function createProgram(config5) {
3886
3893
  "Should the release be run in dry-run mode (no updates are made)"
3887
3894
  ).action(releaseAction);
3888
3895
  program.command("commitlint").description("Run commitlint for the workspace's commit message.").option("--config <file>", "The CommitLint config file path").option("--message <commit-message>", "The commit message to lint").option("--file <commit-file>", "The commit message to lint").action(commitLintAction);
3896
+ program.command("post-checkout").description("Run post-checkout git hook for the workspace.").option("--files <files...>", "The files changed in the commit or checkout").action(postCheckoutAction);
3897
+ program.command("post-commit").description("Run post-commit git hook for the workspace.").option("--files <files...>", "The files changed in the commit or checkout").action(postCommitAction);
3898
+ program.command("post-merge").description("Run post-merge git hook for the workspace.").option("--files <files...>", "The files changed in the merge").action(postMergeAction);
3899
+ program.command("pre-commit").description("Run pre-commit git hook for the workspace.").option("--files <files...>", "The files changed in the commit or checkout").action(preCommitAction);
3900
+ program.command("pre-push").description("Run pre-push git hook for the workspace.").option("--files <files...>", "The files changed in the push").action(prePushAction);
3901
+ program.command("pre-install").description("Run pre-install git hook for the workspace.").option("--files <files...>", "The files changed in the install");
3902
+ program.command("prepare").description("Run prepare git hook for the workspace.").action(prepareAction);
3889
3903
  return program;
3890
3904
  }
3891
3905
  async function commitAction({
@@ -3894,12 +3908,12 @@ async function commitAction({
3894
3908
  }) {
3895
3909
  try {
3896
3910
  writeInfo(
3897
- `${brandIcon(config5)} Preparing to commit your changes. Please provide the requested details below...`,
3911
+ `${brandIcon(typeof config5 === "string" ? {} : config5)} Preparing to commit your changes. Please provide the requested details below...`,
3898
3912
  _config
3899
3913
  );
3900
3914
  await runCommit(config5, dryRun);
3901
3915
  writeSuccess(
3902
- `\u2714 Storm Commit processing completed successfully!
3916
+ ` \u2714 Storm Commit processing completed successfully!
3903
3917
 
3904
3918
  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}
3905
3919
  `,
@@ -3927,7 +3941,7 @@ async function readmeAction(options) {
3927
3941
  );
3928
3942
  await runReadme(options);
3929
3943
  writeSuccess(
3930
- "Formatting of the workspace's README.md files is complete\n",
3944
+ " \u2714 Formatting of the workspace's README.md files is complete\n",
3931
3945
  _config
3932
3946
  );
3933
3947
  } catch (error) {
@@ -3956,7 +3970,7 @@ async function releaseAction({
3956
3970
  base,
3957
3971
  head
3958
3972
  });
3959
- writeSuccess("Release completed successfully!\n", _config);
3973
+ writeSuccess(" \u2714 Release completed successfully!\n", _config);
3960
3974
  } catch (error) {
3961
3975
  writeFatal(
3962
3976
  `A fatal error occurred while running release action:
@@ -3978,13 +3992,121 @@ async function commitLintAction(options) {
3978
3992
  );
3979
3993
  await runCommitLint(_config, options);
3980
3994
  writeSuccess(
3981
- "Linting the commit messages completed successfully!\n",
3995
+ " \u2714 Linting the commit messages completed successfully!\n",
3982
3996
  _config
3983
3997
  );
3984
3998
  } catch (error) {
3985
3999
  writeFatal(
3986
4000
  `A fatal error occurred while linting the commit messages:
3987
4001
 
4002
+ ${error.message}`,
4003
+ _config
4004
+ );
4005
+ throw new Error(error.message, { cause: error });
4006
+ }
4007
+ }
4008
+ async function postCheckoutAction({ files }) {
4009
+ try {
4010
+ writeInfo(
4011
+ `${brandIcon(_config)} Running the Storm post-checkout git hook for ${files.length} files in the workspace...`,
4012
+ _config
4013
+ );
4014
+ await postCheckoutHook(_config, files);
4015
+ writeSuccess(" \u2714 Post-checkout hook completed successfully!\n", _config);
4016
+ } catch (error) {
4017
+ writeFatal(
4018
+ `A fatal error occurred while running the post-checkout hook:
4019
+
4020
+ ${error.message}`,
4021
+ _config
4022
+ );
4023
+ throw new Error(error.message, { cause: error });
4024
+ }
4025
+ }
4026
+ async function postCommitAction({ files }) {
4027
+ try {
4028
+ writeInfo(
4029
+ `${brandIcon(_config)} Running the Storm post-commit git hook for ${files.length} files in the workspace...`,
4030
+ _config
4031
+ );
4032
+ await postCommitHook(_config, files);
4033
+ writeSuccess(" \u2714 Post-commit hook completed successfully!\n", _config);
4034
+ } catch (error) {
4035
+ writeFatal(
4036
+ `A fatal error occurred while running the post-commit hook:
4037
+
4038
+ ${error.message}`,
4039
+ _config
4040
+ );
4041
+ throw new Error(error.message, { cause: error });
4042
+ }
4043
+ }
4044
+ async function postMergeAction({ files }) {
4045
+ try {
4046
+ writeInfo(
4047
+ `${brandIcon(_config)} Running the Storm post-merge git hook for ${files.length} files in the workspace...`,
4048
+ _config
4049
+ );
4050
+ await postMergeHook(_config, files);
4051
+ writeSuccess(" \u2714 Post-merge hook completed successfully!\n", _config);
4052
+ } catch (error) {
4053
+ writeFatal(
4054
+ `A fatal error occurred while running the post-merge hook:
4055
+
4056
+ ${error.message}`,
4057
+ _config
4058
+ );
4059
+ throw new Error(error.message, { cause: error });
4060
+ }
4061
+ }
4062
+ async function preCommitAction({ files }) {
4063
+ try {
4064
+ writeInfo(
4065
+ `${brandIcon(_config)} Running the Storm pre-commit git hook for ${files.length} files in the workspace...`,
4066
+ _config
4067
+ );
4068
+ await preCommitHook(_config, files);
4069
+ writeSuccess(" \u2714 Pre-commit hook completed successfully!\n", _config);
4070
+ } catch (error) {
4071
+ writeFatal(
4072
+ `A fatal error occurred while running the pre-commit hook:
4073
+
4074
+ ${error.message}`,
4075
+ _config
4076
+ );
4077
+ throw new Error(error.message, { cause: error });
4078
+ }
4079
+ }
4080
+ async function prePushAction({ files }) {
4081
+ try {
4082
+ writeInfo(
4083
+ `${brandIcon(_config)} Running the Storm pre-push git hook for ${files.length} files in the workspace...`,
4084
+ _config
4085
+ );
4086
+ await prePushHook(_config, files);
4087
+ writeSuccess(" \u2714 Pre-push hook completed successfully!\n", _config);
4088
+ } catch (error) {
4089
+ writeFatal(
4090
+ `A fatal error occurred while running the pre-push hook:
4091
+
4092
+ ${error.message}`,
4093
+ _config
4094
+ );
4095
+ throw new Error(error.message, { cause: error });
4096
+ }
4097
+ }
4098
+ async function prepareAction() {
4099
+ try {
4100
+ writeInfo(
4101
+ `${brandIcon(_config)} Running the Storm prepare git hook for the workspace...`,
4102
+ _config
4103
+ );
4104
+ await prepareHook(_config);
4105
+ writeSuccess(" \u2714 Prepare hook completed successfully!\n", _config);
4106
+ } catch (error) {
4107
+ writeFatal(
4108
+ `A fatal error occurred while running the prepare hook:
4109
+
3988
4110
  ${error.message}`,
3989
4111
  _config
3990
4112
  );