@storm-software/git-tools 2.124.86 → 2.125.1

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
@@ -0,0 +1,20 @@
1
+ import { checkPackageVersion } from './chunk-HMHOHK22.js';
2
+ import { run } from './chunk-JOPN56T4.js';
3
+ import { writeInfo } from './chunk-X7F62ZNF.js';
4
+
5
+ // src/hooks/post-checkout.ts
6
+ async function postCheckoutHook(config, files) {
7
+ writeInfo("Running post-checkout hook...", config);
8
+ checkPackageVersion(files);
9
+ try {
10
+ run(config, "git-lfs version");
11
+ } catch (error) {
12
+ throw new Error(
13
+ `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.
14
+ Error: ${error?.message}`
15
+ );
16
+ }
17
+ run(config, "git lfs post-checkout");
18
+ }
19
+
20
+ export { postCheckoutHook };
@@ -1,6 +1,6 @@
1
- import { DEFAULT_MINIMAL_COMMIT_QUESTIONS } from './chunk-KZRVQ5RZ.js';
2
- import { DEFAULT_COMMIT_PROMPT_MESSAGES } from './chunk-5XU2KBM6.js';
1
+ import { DEFAULT_MINIMAL_COMMIT_QUESTIONS } from './chunk-WCAKLYL2.js';
3
2
  import { COMMIT_CONFIGS, DEFAULT_COMMIT_TYPES } from './chunk-3GGWHKRP.js';
3
+ import { DEFAULT_COMMIT_PROMPT_MESSAGES } from './chunk-5XU2KBM6.js';
4
4
 
5
5
  // src/commit/config/monorepo.ts
6
6
  var DEFAULT_MONOREPO_COMMIT_QUESTIONS = {
@@ -0,0 +1,290 @@
1
+ import 'date-fns/formatDistanceToNow';
2
+ import chalk from 'chalk';
3
+
4
+ // ../config-tools/src/logger/console.ts
5
+
6
+ // ../config-tools/src/types.ts
7
+ var LogLevel = {
8
+ SILENT: 0,
9
+ FATAL: 10,
10
+ ERROR: 20,
11
+ WARN: 30,
12
+ SUCCESS: 35,
13
+ INFO: 40,
14
+ DEBUG: 60,
15
+ TRACE: 70,
16
+ ALL: 100
17
+ };
18
+ var LogLevelLabel = {
19
+ SILENT: "silent",
20
+ FATAL: "fatal",
21
+ ERROR: "error",
22
+ WARN: "warn",
23
+ SUCCESS: "success",
24
+ INFO: "info",
25
+ DEBUG: "debug",
26
+ TRACE: "trace",
27
+ ALL: "all"
28
+ };
29
+
30
+ // ../config-tools/src/utilities/colors.ts
31
+ var DEFAULT_COLOR_CONFIG = {
32
+ dark: {
33
+ brand: "#2dd4bf",
34
+ success: "#10b981",
35
+ info: "#58a6ff",
36
+ debug: "#8afafc",
37
+ warning: "#f3d371",
38
+ danger: "#D8314A",
39
+ fatal: "#a40e26"}
40
+ };
41
+ var chalkDefault = {
42
+ hex: (_) => (message) => message,
43
+ bgHex: (_) => ({
44
+ whiteBright: (message) => message,
45
+ white: (message) => message
46
+ }),
47
+ white: (message) => message,
48
+ whiteBright: (message) => message,
49
+ gray: (message) => message,
50
+ bold: {
51
+ hex: (_) => (message) => message,
52
+ bgHex: (_) => ({
53
+ whiteBright: (message) => message,
54
+ white: (message) => message
55
+ }),
56
+ whiteBright: (message) => message,
57
+ white: (message) => message
58
+ },
59
+ dim: {
60
+ hex: (_) => (message) => message,
61
+ gray: (message) => message
62
+ }
63
+ };
64
+ var getChalk = () => {
65
+ let _chalk = chalk;
66
+ if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
67
+ _chalk = chalkDefault;
68
+ }
69
+ return _chalk;
70
+ };
71
+
72
+ // ../config-tools/src/logger/is-unicode-supported.ts
73
+ function isUnicodeSupported() {
74
+ if (process.platform !== "win32") {
75
+ return process.env.TERM !== "linux";
76
+ }
77
+ return Boolean(process.env.WT_SESSION) || // Windows Terminal
78
+ Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
79
+ process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
80
+ process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
81
+ }
82
+
83
+ // ../config-tools/src/logger/console-icons.ts
84
+ var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
85
+ var CONSOLE_ICONS = {
86
+ [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
87
+ [LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
88
+ [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
89
+ [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
90
+ [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
91
+ [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
92
+ [LogLevelLabel.TRACE]: useIcon("\u2699", "T"),
93
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
94
+ };
95
+
96
+ // ../config-tools/src/logger/format-timestamp.ts
97
+ var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
98
+ return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
99
+ };
100
+
101
+ // ../config-tools/src/logger/get-log-level.ts
102
+ var getLogLevel = (label) => {
103
+ switch (label) {
104
+ case "all":
105
+ return LogLevel.ALL;
106
+ case "trace":
107
+ return LogLevel.TRACE;
108
+ case "debug":
109
+ return LogLevel.DEBUG;
110
+ case "info":
111
+ return LogLevel.INFO;
112
+ case "warn":
113
+ return LogLevel.WARN;
114
+ case "error":
115
+ return LogLevel.ERROR;
116
+ case "fatal":
117
+ return LogLevel.FATAL;
118
+ case "silent":
119
+ return LogLevel.SILENT;
120
+ default:
121
+ return LogLevel.INFO;
122
+ }
123
+ };
124
+ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
125
+ if (logLevel >= LogLevel.ALL) {
126
+ return LogLevelLabel.ALL;
127
+ }
128
+ if (logLevel >= LogLevel.TRACE) {
129
+ return LogLevelLabel.TRACE;
130
+ }
131
+ if (logLevel >= LogLevel.DEBUG) {
132
+ return LogLevelLabel.DEBUG;
133
+ }
134
+ if (logLevel >= LogLevel.INFO) {
135
+ return LogLevelLabel.INFO;
136
+ }
137
+ if (logLevel >= LogLevel.WARN) {
138
+ return LogLevelLabel.WARN;
139
+ }
140
+ if (logLevel >= LogLevel.ERROR) {
141
+ return LogLevelLabel.ERROR;
142
+ }
143
+ if (logLevel >= LogLevel.FATAL) {
144
+ return LogLevelLabel.FATAL;
145
+ }
146
+ if (logLevel <= LogLevel.SILENT) {
147
+ return LogLevelLabel.SILENT;
148
+ }
149
+ return LogLevelLabel.INFO;
150
+ };
151
+
152
+ // ../config-tools/src/logger/console.ts
153
+ var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
154
+ const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
155
+ const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
156
+ if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
157
+ return (_) => {
158
+ };
159
+ }
160
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
161
+ return (message) => {
162
+ console.error(
163
+ `
164
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
165
+ colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal
166
+ )(
167
+ `[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `
168
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
169
+ `
170
+ );
171
+ };
172
+ }
173
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
174
+ return (message) => {
175
+ console.error(
176
+ `
177
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
178
+ colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger
179
+ )(
180
+ `[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `
181
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
182
+ `
183
+ );
184
+ };
185
+ }
186
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
187
+ return (message) => {
188
+ console.warn(
189
+ `
190
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
191
+ colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning
192
+ )(
193
+ `[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `
194
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
195
+ `
196
+ );
197
+ };
198
+ }
199
+ if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
200
+ return (message) => {
201
+ console.info(
202
+ `
203
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
204
+ colors.success ?? DEFAULT_COLOR_CONFIG.dark.success
205
+ )(
206
+ `[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `
207
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
208
+ `
209
+ );
210
+ };
211
+ }
212
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
213
+ return (message) => {
214
+ console.info(
215
+ `
216
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
217
+ colors.info ?? DEFAULT_COLOR_CONFIG.dark.info
218
+ )(
219
+ `[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
220
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
221
+ `
222
+ );
223
+ };
224
+ }
225
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
226
+ return (message) => {
227
+ console.debug(
228
+ `
229
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
230
+ colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug
231
+ )(
232
+ `[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `
233
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
234
+ `
235
+ );
236
+ };
237
+ }
238
+ if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
239
+ return (message) => {
240
+ console.debug(
241
+ `
242
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex("#bbbbbb")(
243
+ `[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `
244
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
245
+ `
246
+ );
247
+ };
248
+ }
249
+ return (message) => {
250
+ console.log(
251
+ `
252
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
253
+ colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand
254
+ )(
255
+ `[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `
256
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
257
+ `
258
+ );
259
+ };
260
+ };
261
+ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
262
+ var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
263
+ var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
264
+ var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
265
+ var MAX_DEPTH = 6;
266
+ var formatLogMessage = (message, options = {}, depth = 0) => {
267
+ if (depth > MAX_DEPTH) {
268
+ return "<max depth>";
269
+ }
270
+ const prefix = options.prefix ?? "-";
271
+ const skip = options.skip ?? [];
272
+ return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
273
+ ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth + 1)}`).join("\n")}` : typeof message === "object" ? `
274
+ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
275
+ (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
276
+ message[key],
277
+ { prefix: `${prefix}-`, skip },
278
+ depth + 1
279
+ ) : message[key]}`
280
+ ).join("\n")}` : message;
281
+ };
282
+ var _isFunction = (value) => {
283
+ try {
284
+ return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
285
+ } catch {
286
+ return false;
287
+ }
288
+ };
289
+
290
+ export { LogLevel, formatLogMessage, getLogLevel, getLogLevelLabel, writeInfo, writeSuccess, writeTrace, writeWarning };
@@ -0,0 +1,12 @@
1
+ import { run } from './chunk-JOPN56T4.js';
2
+ import { writeInfo } from './chunk-X7F62ZNF.js';
3
+
4
+ // src/hooks/prepare.ts
5
+ async function prepareHook(config) {
6
+ writeInfo("Running prepare hook...", config);
7
+ if (!process.env.CI && !process.env.STORM_CI) {
8
+ run(config, "pnpm lefthook install");
9
+ }
10
+ }
11
+
12
+ export { prepareHook };
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var chunkQCNDIFYQ_cjs = require('./chunk-QCNDIFYQ.cjs');
4
+ var chunkFJL2V56E_cjs = require('./chunk-FJL2V56E.cjs');
5
+ var chunkSIFTTG22_cjs = require('./chunk-SIFTTG22.cjs');
6
+
7
+ // src/hooks/post-commit.ts
8
+ async function postCommitHook(config, files) {
9
+ chunkSIFTTG22_cjs.writeInfo("Running post-commit hook...", config);
10
+ chunkQCNDIFYQ_cjs.checkPackageVersion(files);
11
+ try {
12
+ chunkFJL2V56E_cjs.run(config, "git-lfs version");
13
+ } catch (error) {
14
+ throw new Error(
15
+ `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.
16
+ Error: ${error?.message}`
17
+ );
18
+ }
19
+ chunkFJL2V56E_cjs.run(config, "git lfs post-commit");
20
+ }
21
+
22
+ exports.postCommitHook = postCommitHook;
@@ -0,0 +1,20 @@
1
+ import { checkPackageVersion } from './chunk-HMHOHK22.js';
2
+ import { run } from './chunk-JOPN56T4.js';
3
+ import { writeInfo } from './chunk-X7F62ZNF.js';
4
+
5
+ // src/hooks/post-commit.ts
6
+ async function postCommitHook(config, files) {
7
+ writeInfo("Running post-commit hook...", config);
8
+ checkPackageVersion(files);
9
+ try {
10
+ run(config, "git-lfs version");
11
+ } catch (error) {
12
+ throw new Error(
13
+ `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.
14
+ Error: ${error?.message}`
15
+ );
16
+ }
17
+ run(config, "git lfs post-commit");
18
+ }
19
+
20
+ export { postCommitHook };
@@ -2,17 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkF7OO6L26_cjs = require('../../chunk-F7OO6L26.cjs');
6
- require('../../chunk-YBAE6I5L.cjs');
5
+ var chunkCT6VGZZS_cjs = require('../../chunk-CT6VGZZS.cjs');
7
6
  require('../../chunk-4VPJA7YJ.cjs');
7
+ require('../../chunk-YBAE6I5L.cjs');
8
8
 
9
9
 
10
10
 
11
11
  Object.defineProperty(exports, "DEFAULT_MINIMAL_COMMIT_QUESTIONS", {
12
12
  enumerable: true,
13
- get: function () { return chunkF7OO6L26_cjs.DEFAULT_MINIMAL_COMMIT_QUESTIONS; }
13
+ get: function () { return chunkCT6VGZZS_cjs.DEFAULT_MINIMAL_COMMIT_QUESTIONS; }
14
14
  });
15
15
  Object.defineProperty(exports, "default", {
16
16
  enumerable: true,
17
- get: function () { return chunkF7OO6L26_cjs.minimal_default; }
17
+ get: function () { return chunkCT6VGZZS_cjs.minimal_default; }
18
18
  });
@@ -1,3 +1,3 @@
1
- export { DEFAULT_MINIMAL_COMMIT_QUESTIONS, minimal_default as default } from '../../chunk-KZRVQ5RZ.js';
2
- import '../../chunk-5XU2KBM6.js';
1
+ export { DEFAULT_MINIMAL_COMMIT_QUESTIONS, minimal_default as default } from '../../chunk-WCAKLYL2.js';
3
2
  import '../../chunk-3GGWHKRP.js';
3
+ import '../../chunk-5XU2KBM6.js';
@@ -2,18 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkNY53WLGC_cjs = require('../../chunk-NY53WLGC.cjs');
6
- require('../../chunk-F7OO6L26.cjs');
7
- require('../../chunk-YBAE6I5L.cjs');
5
+ var chunk7ZSL4J35_cjs = require('../../chunk-7ZSL4J35.cjs');
6
+ require('../../chunk-CT6VGZZS.cjs');
8
7
  require('../../chunk-4VPJA7YJ.cjs');
8
+ require('../../chunk-YBAE6I5L.cjs');
9
9
 
10
10
 
11
11
 
12
12
  Object.defineProperty(exports, "DEFAULT_MONOREPO_COMMIT_QUESTIONS", {
13
13
  enumerable: true,
14
- get: function () { return chunkNY53WLGC_cjs.DEFAULT_MONOREPO_COMMIT_QUESTIONS; }
14
+ get: function () { return chunk7ZSL4J35_cjs.DEFAULT_MONOREPO_COMMIT_QUESTIONS; }
15
15
  });
16
16
  Object.defineProperty(exports, "default", {
17
17
  enumerable: true,
18
- get: function () { return chunkNY53WLGC_cjs.monorepo_default; }
18
+ get: function () { return chunk7ZSL4J35_cjs.monorepo_default; }
19
19
  });
@@ -1,4 +1,4 @@
1
- export { DEFAULT_MONOREPO_COMMIT_QUESTIONS, monorepo_default as default } from '../../chunk-JCEVFJCA.js';
2
- import '../../chunk-KZRVQ5RZ.js';
3
- import '../../chunk-5XU2KBM6.js';
1
+ export { DEFAULT_MONOREPO_COMMIT_QUESTIONS, monorepo_default as default } from '../../chunk-USTER7R2.js';
2
+ import '../../chunk-WCAKLYL2.js';
4
3
  import '../../chunk-3GGWHKRP.js';
4
+ import '../../chunk-5XU2KBM6.js';
package/dist/index.cjs CHANGED
@@ -1,46 +1,85 @@
1
1
  'use strict';
2
2
 
3
- var chunkEMYFDYKP_cjs = require('./chunk-EMYFDYKP.cjs');
4
- var chunkNY53WLGC_cjs = require('./chunk-NY53WLGC.cjs');
5
- require('./chunk-F7OO6L26.cjs');
6
- var chunkYBAE6I5L_cjs = require('./chunk-YBAE6I5L.cjs');
3
+ var chunkRQ67RJVN_cjs = require('./chunk-RQ67RJVN.cjs');
4
+ var chunk7ZSL4J35_cjs = require('./chunk-7ZSL4J35.cjs');
5
+ require('./chunk-CT6VGZZS.cjs');
7
6
  require('./chunk-4VPJA7YJ.cjs');
7
+ var chunkYBAE6I5L_cjs = require('./chunk-YBAE6I5L.cjs');
8
+ require('./chunk-ENL3GCXS.cjs');
9
+ var chunkGTOCMU46_cjs = require('./chunk-GTOCMU46.cjs');
10
+ var chunkDMVL4OYZ_cjs = require('./chunk-DMVL4OYZ.cjs');
11
+ var chunkLSTKPCAN_cjs = require('./chunk-LSTKPCAN.cjs');
12
+ var chunkZ4CPTYLS_cjs = require('./chunk-Z4CPTYLS.cjs');
13
+ var chunk5DVCH44C_cjs = require('./chunk-5DVCH44C.cjs');
14
+ var chunkBUQYMEBK_cjs = require('./chunk-BUQYMEBK.cjs');
15
+ require('./chunk-QCNDIFYQ.cjs');
16
+ var chunkF2HQMRJH_cjs = require('./chunk-F2HQMRJH.cjs');
17
+ require('./chunk-FJL2V56E.cjs');
18
+ require('./chunk-SIFTTG22.cjs');
8
19
 
9
20
 
10
21
 
11
22
  Object.defineProperty(exports, "DEFAULT_CONVENTIONAL_COMMITS_CONFIG", {
12
23
  enumerable: true,
13
- get: function () { return chunkEMYFDYKP_cjs.DEFAULT_CONVENTIONAL_COMMITS_CONFIG; }
24
+ get: function () { return chunkRQ67RJVN_cjs.DEFAULT_CONVENTIONAL_COMMITS_CONFIG; }
14
25
  });
15
26
  Object.defineProperty(exports, "DEFAULT_JS_RELEASE_GROUP_CONFIG", {
16
27
  enumerable: true,
17
- get: function () { return chunkEMYFDYKP_cjs.DEFAULT_JS_RELEASE_GROUP_CONFIG; }
28
+ get: function () { return chunkRQ67RJVN_cjs.DEFAULT_JS_RELEASE_GROUP_CONFIG; }
18
29
  });
19
30
  Object.defineProperty(exports, "DEFAULT_RELEASE_CONFIG", {
20
31
  enumerable: true,
21
- get: function () { return chunkEMYFDYKP_cjs.DEFAULT_RELEASE_CONFIG; }
32
+ get: function () { return chunkRQ67RJVN_cjs.DEFAULT_RELEASE_CONFIG; }
22
33
  });
23
34
  Object.defineProperty(exports, "DEFAULT_RELEASE_GROUP_CONFIG", {
24
35
  enumerable: true,
25
- get: function () { return chunkEMYFDYKP_cjs.DEFAULT_RELEASE_GROUP_CONFIG; }
36
+ get: function () { return chunkRQ67RJVN_cjs.DEFAULT_RELEASE_GROUP_CONFIG; }
26
37
  });
27
38
  Object.defineProperty(exports, "DEFAULT_RELEASE_TAG_PATTERN", {
28
39
  enumerable: true,
29
- get: function () { return chunkEMYFDYKP_cjs.DEFAULT_RELEASE_TAG_PATTERN; }
40
+ get: function () { return chunkRQ67RJVN_cjs.DEFAULT_RELEASE_TAG_PATTERN; }
30
41
  });
31
42
  Object.defineProperty(exports, "DEFAULT_RUST_RELEASE_GROUP_CONFIG", {
32
43
  enumerable: true,
33
- get: function () { return chunkEMYFDYKP_cjs.DEFAULT_RUST_RELEASE_GROUP_CONFIG; }
44
+ get: function () { return chunkRQ67RJVN_cjs.DEFAULT_RUST_RELEASE_GROUP_CONFIG; }
34
45
  });
35
46
  Object.defineProperty(exports, "getReleaseGroupConfig", {
36
47
  enumerable: true,
37
- get: function () { return chunkEMYFDYKP_cjs.getReleaseGroupConfig; }
48
+ get: function () { return chunkRQ67RJVN_cjs.getReleaseGroupConfig; }
38
49
  });
39
50
  Object.defineProperty(exports, "DEFAULT_MONOREPO_COMMIT_QUESTIONS", {
40
51
  enumerable: true,
41
- get: function () { return chunkNY53WLGC_cjs.DEFAULT_MONOREPO_COMMIT_QUESTIONS; }
52
+ get: function () { return chunk7ZSL4J35_cjs.DEFAULT_MONOREPO_COMMIT_QUESTIONS; }
42
53
  });
43
54
  Object.defineProperty(exports, "DEFAULT_COMMIT_PROMPT_MESSAGES", {
44
55
  enumerable: true,
45
56
  get: function () { return chunkYBAE6I5L_cjs.DEFAULT_COMMIT_PROMPT_MESSAGES; }
46
57
  });
58
+ Object.defineProperty(exports, "prePushHook", {
59
+ enumerable: true,
60
+ get: function () { return chunkGTOCMU46_cjs.prePushHook; }
61
+ });
62
+ Object.defineProperty(exports, "prepareHook", {
63
+ enumerable: true,
64
+ get: function () { return chunkDMVL4OYZ_cjs.prepareHook; }
65
+ });
66
+ Object.defineProperty(exports, "postCheckoutHook", {
67
+ enumerable: true,
68
+ get: function () { return chunkLSTKPCAN_cjs.postCheckoutHook; }
69
+ });
70
+ Object.defineProperty(exports, "postCommitHook", {
71
+ enumerable: true,
72
+ get: function () { return chunkZ4CPTYLS_cjs.postCommitHook; }
73
+ });
74
+ Object.defineProperty(exports, "postMergeHook", {
75
+ enumerable: true,
76
+ get: function () { return chunk5DVCH44C_cjs.postMergeHook; }
77
+ });
78
+ Object.defineProperty(exports, "preCommitHook", {
79
+ enumerable: true,
80
+ get: function () { return chunkBUQYMEBK_cjs.preCommitHook; }
81
+ });
82
+ Object.defineProperty(exports, "preInstallHook", {
83
+ enumerable: true,
84
+ get: function () { return chunkF2HQMRJH_cjs.preInstallHook; }
85
+ });
package/dist/index.d.cts CHANGED
@@ -1,7 +1,15 @@
1
1
  export { DEFAULT_MONOREPO_COMMIT_QUESTIONS } from './commit/config/monorepo.cjs';
2
+ export { postCheckoutHook } from './hooks/post-checkout.cjs';
3
+ export { postCommitHook } from './hooks/post-commit.cjs';
4
+ export { postMergeHook } from './hooks/post-merge.cjs';
5
+ export { preCommitHook } from './hooks/pre-commit.cjs';
6
+ export { preInstallHook } from './hooks/pre-install.cjs';
7
+ export { prePushHook } from './hooks/pre-push.cjs';
8
+ export { prepareHook } from './hooks/prepare.cjs';
2
9
  export { DEFAULT_CONVENTIONAL_COMMITS_CONFIG, DEFAULT_JS_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_CONFIG, DEFAULT_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_TAG_PATTERN, DEFAULT_RUST_RELEASE_GROUP_CONFIG, getReleaseGroupConfig } from './release/config.cjs';
3
10
  export { CommitLintCLIOptions, CommitLintOutcome, CommitLintRuleOutcome, CommitPromptMessagesEnum, CommitQuestionProps, CommitScopeProps, CommitScopesEnum, CommitSettingsEnum, CommitState, DEFAULT_COMMIT_PROMPT_MESSAGES, DeepPartial, DefaultCommitPromptMessagesKeys, NxReleaseRequiredGitConfig, ReadMeOptions, ReleaseConfig, ReleaseContext, ReleaseGroupConfig, ReleaseOptions } from './types.cjs';
4
11
  import 'conventional-changelog-storm-software/types/commit-types';
12
+ import '@storm-software/config';
5
13
  import '@storm-software/config/types';
6
14
  import '@nx/devkit';
7
15
  import 'conventional-changelog-storm-software/types/commitlint';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,15 @@
1
1
  export { DEFAULT_MONOREPO_COMMIT_QUESTIONS } from './commit/config/monorepo.js';
2
+ export { postCheckoutHook } from './hooks/post-checkout.js';
3
+ export { postCommitHook } from './hooks/post-commit.js';
4
+ export { postMergeHook } from './hooks/post-merge.js';
5
+ export { preCommitHook } from './hooks/pre-commit.js';
6
+ export { preInstallHook } from './hooks/pre-install.js';
7
+ export { prePushHook } from './hooks/pre-push.js';
8
+ export { prepareHook } from './hooks/prepare.js';
2
9
  export { DEFAULT_CONVENTIONAL_COMMITS_CONFIG, DEFAULT_JS_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_CONFIG, DEFAULT_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_TAG_PATTERN, DEFAULT_RUST_RELEASE_GROUP_CONFIG, getReleaseGroupConfig } from './release/config.js';
3
10
  export { CommitLintCLIOptions, CommitLintOutcome, CommitLintRuleOutcome, CommitPromptMessagesEnum, CommitQuestionProps, CommitScopeProps, CommitScopesEnum, CommitSettingsEnum, CommitState, DEFAULT_COMMIT_PROMPT_MESSAGES, DeepPartial, DefaultCommitPromptMessagesKeys, NxReleaseRequiredGitConfig, ReadMeOptions, ReleaseConfig, ReleaseContext, ReleaseGroupConfig, ReleaseOptions } from './types.js';
4
11
  import 'conventional-changelog-storm-software/types/commit-types';
12
+ import '@storm-software/config';
5
13
  import '@storm-software/config/types';
6
14
  import '@nx/devkit';
7
15
  import 'conventional-changelog-storm-software/types/commitlint';
package/dist/index.js CHANGED
@@ -1,5 +1,16 @@
1
- export { DEFAULT_CONVENTIONAL_COMMITS_CONFIG, DEFAULT_JS_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_CONFIG, DEFAULT_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_TAG_PATTERN, DEFAULT_RUST_RELEASE_GROUP_CONFIG, getReleaseGroupConfig } from './chunk-VVJA5N2W.js';
2
- export { DEFAULT_MONOREPO_COMMIT_QUESTIONS } from './chunk-JCEVFJCA.js';
3
- import './chunk-KZRVQ5RZ.js';
4
- export { DEFAULT_COMMIT_PROMPT_MESSAGES } from './chunk-5XU2KBM6.js';
1
+ export { DEFAULT_CONVENTIONAL_COMMITS_CONFIG, DEFAULT_JS_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_CONFIG, DEFAULT_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_TAG_PATTERN, DEFAULT_RUST_RELEASE_GROUP_CONFIG, getReleaseGroupConfig } from './chunk-HVTQXN3A.js';
2
+ export { DEFAULT_MONOREPO_COMMIT_QUESTIONS } from './chunk-USTER7R2.js';
3
+ import './chunk-WCAKLYL2.js';
5
4
  import './chunk-3GGWHKRP.js';
5
+ export { DEFAULT_COMMIT_PROMPT_MESSAGES } from './chunk-5XU2KBM6.js';
6
+ import './chunk-Q47SPRY7.js';
7
+ export { prePushHook } from './chunk-RK75BACO.js';
8
+ export { prepareHook } from './chunk-YUE6ZNKC.js';
9
+ export { postCheckoutHook } from './chunk-UQMGLURT.js';
10
+ export { postCommitHook } from './chunk-ZKDVZXHI.js';
11
+ export { postMergeHook } from './chunk-AU2RMJUK.js';
12
+ export { preCommitHook } from './chunk-C6MBULOZ.js';
13
+ import './chunk-HMHOHK22.js';
14
+ export { preInstallHook } from './chunk-2NF67ZEY.js';
15
+ import './chunk-JOPN56T4.js';
16
+ import './chunk-X7F62ZNF.js';
@@ -0,0 +1,69 @@
1
+ # #
2
+ # Lefthook configuration file: #
3
+ # This file is used to configure Lefthook, a tool for managing Git hooks. #
4
+ # #
5
+ # https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md #
6
+
7
+ $schema: https://raw.githubusercontent.com/evilmartians/lefthook/refs/heads/master/schema.json
8
+ assert_lefthook_installed: true
9
+ colors: true
10
+ no_tty: false
11
+ min_version: "1.5.0"
12
+
13
+ pre-commit:
14
+ commands:
15
+ install:
16
+ glob: "{pnpm-lock.yaml,lefthook.yml,lefthook.yaml,lefthook.json}"
17
+ run: pnpm install && pnpm lefthook install && git update-index
18
+ stage_fixed: true
19
+ prepare:
20
+ files: git diff --name-only HEAD @{push}
21
+ glob: "**/*"
22
+ run: pnpm exec storm-git prepare --files {files}
23
+ stage_fixed: true
24
+ pre-commit:
25
+ files: git diff --name-only HEAD @{push}
26
+ glob: "**/*"
27
+ run: pnpm exec storm-git pre-commit --files {files}
28
+ stage_fixed: true
29
+ codeowners:
30
+ files: git diff --name-only HEAD @{push}
31
+ glob: "**/CODEOWNERS"
32
+ run: pnpm exec storm-lint codeowners
33
+
34
+ commit-msg:
35
+ commands:
36
+ validate:
37
+ run: pnpm exec storm-git commitlint --message {1}
38
+
39
+ pre-push:
40
+ piped: true
41
+ commands:
42
+ build:
43
+ glob: "**/*"
44
+ run: pnpm build-dev
45
+ stage_fixed: true
46
+ lint-github-actions:
47
+ glob: .github/workflows/*.*
48
+ run: "zizmor --offline --config='./tools/config/zizmor.yml' .github/workflows/"
49
+ pre-push:
50
+ files: git diff --name-only HEAD @{push}
51
+ glob: "**/*"
52
+ run: pnpm exec storm-git pre-push --files {files}
53
+ stage_fixed: true
54
+
55
+ post-merge:
56
+ commands:
57
+ validate:
58
+ files: git diff --name-only HEAD @{push}
59
+ glob: "**/*"
60
+ run: pnpm exec storm-git post-merge --files {files}
61
+ stage_fixed: true
62
+
63
+ post-commit:
64
+ commands:
65
+ validate:
66
+ files: git diff --name-only HEAD @{push}
67
+ glob: "**/*"
68
+ run: pnpm exec storm-git post-commit --files {files}
69
+ stage_fixed: true