@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
@@ -0,0 +1,16 @@
1
+ import { run } from './chunk-G3YPGVPS.js';
2
+ import { writeInfo } from './chunk-S3E6UR4Y.js';
3
+
4
+ // src/hooks/pre-install.ts
5
+ async function preInstallHook(config) {
6
+ writeInfo("Running pre-install hook...", config);
7
+ if (Boolean(process.env.CI) || Boolean(process.env.STORM_CI)) {
8
+ writeInfo("Skipping pre-install for CI process...", config);
9
+ return;
10
+ }
11
+ run(config, "npx -y only-allow pnpm");
12
+ }
13
+
14
+ export { preInstallHook };
15
+ //# sourceMappingURL=chunk-S7Z6YPPG.js.map
16
+ //# sourceMappingURL=chunk-S7Z6YPPG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/pre-install.ts"],"names":[],"mappings":";;;;AAKA,eAAsB,eAAe,MAAA,EAA8B;AACjE,EAAA,SAAA,CAAU,+BAA+B,MAAM,CAAA;AAE/C,EAAA,IAAI,OAAA,CAAQ,QAAQ,GAAA,CAAI,EAAE,KAAK,OAAA,CAAQ,OAAA,CAAQ,GAAA,CAAI,QAAQ,CAAA,EAAG;AAC5D,IAAA,SAAA,CAAU,0CAA0C,MAAM,CAAA;AAC1D,IAAA;AAAA,EACF;AAEA,EAAA,GAAA,CAAI,QAAQ,wBAAwB,CAAA;AACtC","file":"chunk-S7Z6YPPG.js","sourcesContent":["#!/usr/bin/env node\n\nimport { StormWorkspaceConfig } from \"@storm-software/config\";\nimport { run, writeInfo } from \"@storm-software/config-tools\";\n\nexport async function preInstallHook(config: StormWorkspaceConfig) {\n writeInfo(\"Running pre-install hook...\", config);\n\n if (Boolean(process.env.CI) || Boolean(process.env.STORM_CI)) {\n writeInfo(\"Skipping pre-install for CI process...\", config);\n return;\n }\n\n run(config, \"npx -y only-allow pnpm\");\n}\n"]}
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var chunkYHZNDNCW_cjs = require('./chunk-YHZNDNCW.cjs');
4
+ var chunkFH5OSXAJ_cjs = require('./chunk-FH5OSXAJ.cjs');
5
+ var chunkDFXXNV3C_cjs = require('./chunk-DFXXNV3C.cjs');
6
+
7
+ // src/hooks/post-commit.ts
8
+ async function postCommitHook(config, files) {
9
+ chunkDFXXNV3C_cjs.writeInfo("Running post-commit hook...", config);
10
+ chunkYHZNDNCW_cjs.checkPackageVersion(files);
11
+ try {
12
+ chunkFH5OSXAJ_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
+ chunkFH5OSXAJ_cjs.run(config, "git lfs post-commit");
20
+ }
21
+
22
+ exports.postCommitHook = postCommitHook;
23
+ //# sourceMappingURL=chunk-XHWHVOBP.cjs.map
24
+ //# sourceMappingURL=chunk-XHWHVOBP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/post-commit.ts"],"names":["writeInfo","checkPackageVersion","run"],"mappings":";;;;;;;AAMA,eAAsB,cAAA,CACpB,QACA,KAAA,EACA;AACA,EAAAA,2BAAA,CAAU,+BAA+B,MAAM,CAAA;AAC/C,EAAAC,qCAAA,CAAoB,KAAK,CAAA;AAEzB,EAAA,IAAI;AACF,IAAAC,qBAAA,CAAI,QAAQ,iBAAiB,CAAA;AAAA,EAC/B,SAAS,KAAA,EAAO;AACd,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA;AAAA,OAAA,EACG,OAAiB,OACpB,CAAA;AAAA,KACF;AAAA,EACF;AAEA,EAAAA,qBAAA,CAAI,QAAQ,qBAAqB,CAAA;AACnC","file":"chunk-XHWHVOBP.cjs","sourcesContent":["#!/usr/bin/env node\n\nimport { StormWorkspaceConfig } from \"@storm-software/config\";\nimport { run, writeInfo } from \"@storm-software/config-tools\";\nimport { checkPackageVersion } from \"../utilities/check-package-version\";\n\nexport async function postCommitHook(\n config: StormWorkspaceConfig,\n files: string[]\n) {\n writeInfo(\"Running post-commit hook...\", config);\n checkPackageVersion(files);\n\n try {\n run(config, \"git-lfs version\");\n } catch (error) {\n throw new Error(\n `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.\\nError: ${\n (error as Error)?.message\n }`\n );\n }\n\n run(config, \"git lfs post-commit\");\n}\n"]}
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  // src/utilities/check-package-version.ts
4
- var isPackageVersionChanged = (fields) => fields?.some(
4
+ var isPackageVersionChanged = (files) => files?.some(
5
5
  (arg) => arg.includes("package-lock.json") || arg.includes("yarn.lock") || arg.includes("pnpm-lock.json") || arg.includes("pnpm-lock.yaml") || arg.includes("pnpm-lock.yml") || arg.includes("bun.lockb")
6
6
  );
7
- var checkPackageVersion = (fields) => {
8
- if (isPackageVersionChanged(fields)) {
7
+ var checkPackageVersion = (files) => {
8
+ if (isPackageVersionChanged(files)) {
9
9
  console.warn(
10
10
  [
11
11
  "\u26A0\uFE0F ----------------------------------------------------------------------------------------- \u26A0\uFE0F",
@@ -18,5 +18,5 @@ var checkPackageVersion = (fields) => {
18
18
 
19
19
  exports.checkPackageVersion = checkPackageVersion;
20
20
  exports.isPackageVersionChanged = isPackageVersionChanged;
21
- //# sourceMappingURL=chunk-AU5PZKTN.cjs.map
22
- //# sourceMappingURL=chunk-AU5PZKTN.cjs.map
21
+ //# sourceMappingURL=chunk-YHZNDNCW.cjs.map
22
+ //# sourceMappingURL=chunk-YHZNDNCW.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utilities/check-package-version.ts"],"names":[],"mappings":";;;AAMO,IAAM,uBAAA,GAA0B,CAAC,KAAA,KACtC,KAAA,EAAO,IAAA;AAAA,EACL,CAAA,GAAA,KACE,IAAI,QAAA,CAAS,mBAAmB,KAChC,GAAA,CAAI,QAAA,CAAS,WAAW,CAAA,IACxB,GAAA,CAAI,QAAA,CAAS,gBAAgB,CAAA,IAC7B,GAAA,CAAI,QAAA,CAAS,gBAAgB,CAAA,IAC7B,GAAA,CAAI,SAAS,eAAe,CAAA,IAC5B,GAAA,CAAI,QAAA,CAAS,WAAW;AAC5B;AAOK,IAAM,mBAAA,GAAsB,CAAC,KAAA,KAAoB;AACtD,EAAA,IAAI,uBAAA,CAAwB,KAAK,CAAA,EAAG;AAClC,IAAA,OAAA,CAAQ,IAAA;AAAA,MACN;AAAA,QACE,qHAAA;AAAA,QACA,qHAAA;AAAA,QACA;AAAA,OACF,CAAE,KAAK,IAAI;AAAA,KACb;AAAA,EACF;AACF","file":"chunk-YHZNDNCW.cjs","sourcesContent":["/**\n * Checks if the package version has changed by looking for changes in lock files.\n *\n * @param files - An array of file paths to check for changes. Typically, this would be the list of files changed in a git commit or checkout.\n * @returns true if any of the lock files have changed, indicating a potential change in package versions; otherwise, false.\n */\nexport const isPackageVersionChanged = (files: string[]) =>\n files?.some(\n arg =>\n arg.includes(\"package-lock.json\") ||\n arg.includes(\"yarn.lock\") ||\n arg.includes(\"pnpm-lock.json\") ||\n arg.includes(\"pnpm-lock.yaml\") ||\n arg.includes(\"pnpm-lock.yml\") ||\n arg.includes(\"bun.lockb\")\n );\n\n/**\n * Checks if the package version has changed and logs a warning if it has. This function is typically used in git hooks to alert developers to run `pnpm i` when lock files have changed, ensuring that their local environment is up to date with the latest dependencies.\n *\n * @param files - An array of file paths to check for changes. Typically, this would be the list of files changed in a git commit or checkout.\n */\nexport const checkPackageVersion = (files: string[]) => {\n if (isPackageVersionChanged(files)) {\n console.warn(\n [\n \"⚠️ ----------------------------------------------------------------------------------------- ⚠️\",\n \"⚠️ The pnpm-lock file changed! Please run `pnpm i` to ensure your packages are up to date. ⚠️\",\n \"⚠️ ----------------------------------------------------------------------------------------- ⚠️\"\n ].join(\"\\n\")\n );\n }\n};\n"]}
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var chunkYHZNDNCW_cjs = require('./chunk-YHZNDNCW.cjs');
4
+ var chunkFH5OSXAJ_cjs = require('./chunk-FH5OSXAJ.cjs');
5
+ var chunkDFXXNV3C_cjs = require('./chunk-DFXXNV3C.cjs');
6
+
7
+ // src/hooks/post-merge.ts
8
+ async function postMergeHook(config, files) {
9
+ chunkDFXXNV3C_cjs.writeInfo("Running post-merge hook...", config);
10
+ chunkYHZNDNCW_cjs.checkPackageVersion(files);
11
+ try {
12
+ chunkFH5OSXAJ_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-merge.
16
+ Error: ${error?.message}`
17
+ );
18
+ }
19
+ chunkFH5OSXAJ_cjs.run(config, "git lfs post-merge");
20
+ }
21
+
22
+ exports.postMergeHook = postMergeHook;
23
+ //# sourceMappingURL=chunk-Z64XNZ43.cjs.map
24
+ //# sourceMappingURL=chunk-Z64XNZ43.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/post-merge.ts"],"names":["writeInfo","checkPackageVersion","run"],"mappings":";;;;;;;AAMA,eAAsB,aAAA,CACpB,QACA,KAAA,EACA;AACA,EAAAA,2BAAA,CAAU,8BAA8B,MAAM,CAAA;AAC9C,EAAAC,qCAAA,CAAoB,KAAK,CAAA;AAEzB,EAAA,IAAI;AACF,IAAAC,qBAAA,CAAI,QAAQ,iBAAiB,CAAA;AAAA,EAC/B,SAAS,KAAA,EAAO;AACd,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA;AAAA,OAAA,EACG,OAAiB,OACpB,CAAA;AAAA,KACF;AAAA,EACF;AAEA,EAAAA,qBAAA,CAAI,QAAQ,oBAAoB,CAAA;AAClC","file":"chunk-Z64XNZ43.cjs","sourcesContent":["#!/usr/bin/env node\n\nimport { StormWorkspaceConfig } from \"@storm-software/config\";\nimport { run, writeInfo } from \"@storm-software/config-tools\";\nimport { checkPackageVersion } from \"../utilities/check-package-version\";\n\nexport async function postMergeHook(\n config: StormWorkspaceConfig,\n files: string[]\n) {\n writeInfo(\"Running post-merge hook...\", config);\n checkPackageVersion(files);\n\n try {\n run(config, \"git-lfs version\");\n } catch (error) {\n throw new Error(\n `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.\\nError: ${\n (error as Error)?.message\n }`\n );\n }\n\n run(config, \"git lfs post-merge\");\n}\n"]}
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var chunkYHZNDNCW_cjs = require('./chunk-YHZNDNCW.cjs');
4
+ var chunkFH5OSXAJ_cjs = require('./chunk-FH5OSXAJ.cjs');
5
+ var chunkDFXXNV3C_cjs = require('./chunk-DFXXNV3C.cjs');
6
+
7
+ // src/hooks/post-checkout.ts
8
+ async function postCheckoutHook(config, files) {
9
+ chunkDFXXNV3C_cjs.writeInfo("Running post-checkout hook...", config);
10
+ chunkYHZNDNCW_cjs.checkPackageVersion(files);
11
+ try {
12
+ chunkFH5OSXAJ_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-checkout.
16
+ Error: ${error?.message}`
17
+ );
18
+ }
19
+ chunkFH5OSXAJ_cjs.run(config, "git lfs post-checkout");
20
+ }
21
+
22
+ exports.postCheckoutHook = postCheckoutHook;
23
+ //# sourceMappingURL=chunk-ZW2KYP2Z.cjs.map
24
+ //# sourceMappingURL=chunk-ZW2KYP2Z.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/post-checkout.ts"],"names":["writeInfo","checkPackageVersion","run"],"mappings":";;;;;;;AAMA,eAAsB,gBAAA,CACpB,QACA,KAAA,EACA;AACA,EAAAA,2BAAA,CAAU,iCAAiC,MAAM,CAAA;AACjD,EAAAC,qCAAA,CAAoB,KAAK,CAAA;AAEzB,EAAA,IAAI;AACF,IAAAC,qBAAA,CAAI,QAAQ,iBAAiB,CAAA;AAAA,EAC/B,SAAS,KAAA,EAAO;AACd,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA;AAAA,OAAA,EACG,OAAiB,OACpB,CAAA;AAAA,KACF;AAAA,EACF;AAEA,EAAAA,qBAAA,CAAI,QAAQ,uBAAuB,CAAA;AACrC","file":"chunk-ZW2KYP2Z.cjs","sourcesContent":["#!/usr/bin/env node\n\nimport { StormWorkspaceConfig } from \"@storm-software/config\";\nimport { run, writeInfo } from \"@storm-software/config-tools\";\nimport { checkPackageVersion } from \"../utilities/check-package-version\";\n\nexport async function postCheckoutHook(\n config: StormWorkspaceConfig,\n files: string[]\n) {\n writeInfo(\"Running post-checkout hook...\", config);\n checkPackageVersion(files);\n\n try {\n run(config, \"git-lfs version\");\n } catch (error) {\n throw new Error(\n `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.\\nError: ${\n (error as Error)?.message\n }`\n );\n }\n\n run(config, \"git lfs post-checkout\");\n}\n"]}