@storm-software/git-tools 2.131.109 → 2.131.112

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 (102) hide show
  1. package/README.md +1 -1
  2. package/bin/chunk-2AV5HYTF.cjs +58 -0
  3. package/bin/chunk-2AV5HYTF.cjs.map +1 -0
  4. package/bin/{chunk-KMPLSTO3.js → chunk-7J7WTT44.js} +4 -4
  5. package/bin/chunk-7J7WTT44.js.map +1 -0
  6. package/bin/chunk-BBYXIOTE.cjs +19 -0
  7. package/bin/chunk-BBYXIOTE.cjs.map +1 -0
  8. package/bin/chunk-CYET4YQA.js +51 -0
  9. package/bin/chunk-CYET4YQA.js.map +1 -0
  10. package/bin/{chunk-PWU3UV75.cjs → chunk-IATNESIH.cjs} +4 -4
  11. package/bin/chunk-IATNESIH.cjs.map +1 -0
  12. package/bin/{chunk-FG3I2VCP.cjs → chunk-JORAXF7H.cjs} +4 -4
  13. package/bin/chunk-JORAXF7H.cjs.map +1 -0
  14. package/bin/chunk-KN36EKQK.js +17 -0
  15. package/bin/chunk-KN36EKQK.js.map +1 -0
  16. package/bin/{chunk-TQGWTIZB.cjs → chunk-LJN53JNW.cjs} +3 -3
  17. package/bin/chunk-LJN53JNW.cjs.map +1 -0
  18. package/bin/{chunk-GUKZHV4C.js → chunk-MHLCOIRK.js} +4 -4
  19. package/bin/chunk-MHLCOIRK.js.map +1 -0
  20. package/bin/{chunk-2YVIE3BK.js → chunk-S7XHJBRS.js} +3 -3
  21. package/bin/chunk-S7XHJBRS.js.map +1 -0
  22. package/bin/chunk-SP3UCTLI.cjs +59 -0
  23. package/bin/chunk-SP3UCTLI.cjs.map +1 -0
  24. package/bin/{chunk-K6GWYEPW.cjs → chunk-XQOIAFJG.cjs} +4 -4
  25. package/bin/chunk-XQOIAFJG.cjs.map +1 -0
  26. package/bin/chunk-XVWRXJFS.js +53 -0
  27. package/bin/chunk-XVWRXJFS.js.map +1 -0
  28. package/bin/{chunk-WPUDOWXK.js → chunk-YKPFFJLQ.js} +4 -4
  29. package/bin/chunk-YKPFFJLQ.js.map +1 -0
  30. package/bin/{chunk-JJVQKQSQ.js → chunk-YNYCZK6A.js} +3 -3
  31. package/bin/chunk-YNYCZK6A.js.map +1 -0
  32. package/bin/{chunk-SGL3Y2VO.cjs → chunk-Z2M4I2BJ.cjs} +3 -3
  33. package/bin/chunk-Z2M4I2BJ.cjs.map +1 -0
  34. package/bin/git.cjs +14 -14
  35. package/bin/git.js +8 -8
  36. package/bin/post-checkout.cjs +3 -3
  37. package/bin/post-checkout.js +2 -2
  38. package/bin/post-commit.cjs +3 -3
  39. package/bin/post-commit.js +2 -2
  40. package/bin/post-merge.cjs +3 -3
  41. package/bin/post-merge.js +2 -2
  42. package/bin/pre-commit.cjs +3 -3
  43. package/bin/pre-commit.js +2 -2
  44. package/bin/pre-install.cjs +2 -2
  45. package/bin/pre-install.js +1 -1
  46. package/bin/pre-push.cjs +3 -3
  47. package/bin/pre-push.js +2 -2
  48. package/bin/prepare.cjs +2 -2
  49. package/bin/prepare.js +1 -1
  50. package/bin/version-warning.cjs +2 -2
  51. package/bin/version-warning.cjs.map +1 -1
  52. package/bin/version-warning.js +2 -2
  53. package/bin/version-warning.js.map +1 -1
  54. package/dist/{chunk-AHLNR6XV.js → chunk-2R63WHWO.js} +1 -1
  55. package/dist/{chunk-F2FAV3G7.js → chunk-GLCQOF2M.js} +3 -3
  56. package/dist/chunk-HOQEXODF.cjs +56 -0
  57. package/dist/{chunk-DHKJKEWQ.cjs → chunk-IAK23H7B.cjs} +1 -1
  58. package/dist/{chunk-FIBROPKG.cjs → chunk-LXXJEGUX.cjs} +2 -2
  59. package/dist/{chunk-YT5MBM4H.js → chunk-NPCVH6FC.js} +2 -2
  60. package/dist/chunk-O7UOEIMT.js +49 -0
  61. package/dist/{chunk-OBTRAJMP.js → chunk-OABXW2AI.js} +2 -2
  62. package/dist/{chunk-4LAYVXYI.js → chunk-PBGCSXPL.js} +2 -2
  63. package/dist/chunk-RGE2RUUB.cjs +57 -0
  64. package/dist/{chunk-TDEG4V2Y.cjs → chunk-SHNYRICK.cjs} +2 -2
  65. package/dist/{chunk-P4GKSB3C.cjs → chunk-SJJTGPWB.cjs} +1 -1
  66. package/dist/{chunk-GMUM2CKB.js → chunk-T5BLHFZW.js} +1 -1
  67. package/dist/{chunk-EEEX7BTF.cjs → chunk-TMEQLVEV.cjs} +4 -4
  68. package/dist/chunk-ZF6CEBNE.js +51 -0
  69. package/dist/{chunk-WQU2Z7JS.cjs → chunk-ZYMWVRAL.cjs} +2 -2
  70. package/dist/index.cjs +33 -33
  71. package/dist/index.js +9 -9
  72. package/dist/release/config.cjs +19 -19
  73. package/dist/release/config.js +2 -2
  74. package/package.json +6 -6
  75. package/bin/chunk-2YVIE3BK.js.map +0 -1
  76. package/bin/chunk-DKB6PGG3.js +0 -52
  77. package/bin/chunk-DKB6PGG3.js.map +0 -1
  78. package/bin/chunk-EQSXP2RC.cjs +0 -59
  79. package/bin/chunk-EQSXP2RC.cjs.map +0 -1
  80. package/bin/chunk-FG3I2VCP.cjs.map +0 -1
  81. package/bin/chunk-FNMZLTI2.cjs +0 -19
  82. package/bin/chunk-FNMZLTI2.cjs.map +0 -1
  83. package/bin/chunk-GUKZHV4C.js.map +0 -1
  84. package/bin/chunk-HBLWPOJV.js +0 -19
  85. package/bin/chunk-HBLWPOJV.js.map +0 -1
  86. package/bin/chunk-IFGNDIXB.js +0 -17
  87. package/bin/chunk-IFGNDIXB.js.map +0 -1
  88. package/bin/chunk-JJVQKQSQ.js.map +0 -1
  89. package/bin/chunk-K6GWYEPW.cjs.map +0 -1
  90. package/bin/chunk-KMPLSTO3.js.map +0 -1
  91. package/bin/chunk-PWU3UV75.cjs.map +0 -1
  92. package/bin/chunk-SGL3Y2VO.cjs.map +0 -1
  93. package/bin/chunk-TQGWTIZB.cjs.map +0 -1
  94. package/bin/chunk-WPUDOWXK.js.map +0 -1
  95. package/bin/chunk-YHZNDNCW.cjs +0 -22
  96. package/bin/chunk-YHZNDNCW.cjs.map +0 -1
  97. package/dist/chunk-GPFVAOPY.js +0 -50
  98. package/dist/chunk-HMHOHK22.js +0 -17
  99. package/dist/chunk-QCNDIFYQ.cjs +0 -20
  100. package/dist/chunk-VQNC53VQ.cjs +0 -57
  101. /package/dist/{chunk-FN4S2UNY.cjs → chunk-IVBFLZSL.cjs} +0 -0
  102. /package/dist/{chunk-UX5W5DUP.js → chunk-J5FHPMMG.js} +0 -0
@@ -10,7 +10,7 @@ async function preInstallHook(config) {
10
10
  chunk7LF2JPA5_cjs.writeInfo("Skipping pre-install for CI process...", config);
11
11
  return;
12
12
  }
13
- chunkFJL2V56E_cjs.run(config, "npx -y only-allow pnpm");
13
+ chunkFJL2V56E_cjs.run(config, `npx -y only-allow ${config.packageManager}`);
14
14
  }
15
15
 
16
16
  exports.preInstallHook = preInstallHook;
@@ -8,7 +8,7 @@ async function preInstallHook(config) {
8
8
  writeInfo("Skipping pre-install for CI process...", config);
9
9
  return;
10
10
  }
11
- run(config, "npx -y only-allow pnpm");
11
+ run(config, `npx -y only-allow ${config.packageManager}`);
12
12
  }
13
13
 
14
14
  export { preInstallHook };
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkQCNDIFYQ_cjs = require('./chunk-QCNDIFYQ.cjs');
3
+ var chunkRGE2RUUB_cjs = require('./chunk-RGE2RUUB.cjs');
4
4
  var chunk7LF2JPA5_cjs = require('./chunk-7LF2JPA5.cjs');
5
5
 
6
6
  // src/hooks/pre-commit.ts
7
7
  async function preCommitHook(config, files) {
8
8
  chunk7LF2JPA5_cjs.writeInfo("Running pre-commit hook...", config);
9
- chunkQCNDIFYQ_cjs.checkPackageVersion(files);
10
- if (chunkQCNDIFYQ_cjs.isPackageVersionChanged(files)) {
9
+ chunkRGE2RUUB_cjs.checkPackageVersion(files, config);
10
+ if (chunkRGE2RUUB_cjs.isPackageVersionChanged(files)) {
11
11
  throw new Error(
12
- "Please regenerate the package lock file before committing..."
12
+ `Please regenerate the ${chunkRGE2RUUB_cjs.getLockFileName(config.packageManager)} before committing...`
13
13
  );
14
14
  }
15
15
  }
@@ -0,0 +1,51 @@
1
+ // src/utilities/package-manager.ts
2
+ var LOCK_FILE_BY_PACKAGE_MANAGER = {
3
+ npm: "package-lock.json",
4
+ yarn: "yarn.lock",
5
+ pnpm: "pnpm-lock.yaml",
6
+ bun: "bun.lock"
7
+ };
8
+ var OTHER_LOCK_FILES = {
9
+ npm: ["yarn.lock", "pnpm-lock.yaml", "bun.lock", "bun.lockb"],
10
+ yarn: ["package-lock.json", "pnpm-lock.yaml", "bun.lock", "bun.lockb"],
11
+ pnpm: ["package-lock.json", "yarn.lock", "bun.lock", "bun.lockb"],
12
+ bun: ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb"]
13
+ };
14
+ function getLockFileName(packageManager) {
15
+ return LOCK_FILE_BY_PACKAGE_MANAGER[packageManager];
16
+ }
17
+ function getOtherLockFileNames(packageManager) {
18
+ return OTHER_LOCK_FILES[packageManager];
19
+ }
20
+ function getInstallCommand(packageManager) {
21
+ switch (packageManager) {
22
+ case "npm":
23
+ return "npm i";
24
+ case "yarn":
25
+ return "yarn install";
26
+ case "pnpm":
27
+ return "pnpm i";
28
+ case "bun":
29
+ return "bun install";
30
+ }
31
+ }
32
+
33
+ // src/utilities/check-package-version.ts
34
+ var isPackageVersionChanged = (files) => files?.some(
35
+ (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.lock") || arg.includes("bun.lockb")
36
+ );
37
+ var checkPackageVersion = (files, config) => {
38
+ if (isPackageVersionChanged(files)) {
39
+ const lockFileName = getLockFileName(config.packageManager);
40
+ const installCommand = getInstallCommand(config.packageManager);
41
+ console.warn(
42
+ [
43
+ "\u26A0\uFE0F ----------------------------------------------------------------------------------------- \u26A0\uFE0F",
44
+ `\u26A0\uFE0F The ${lockFileName} file changed! Please run \`${installCommand}\` to ensure your packages are up to date. \u26A0\uFE0F`,
45
+ "\u26A0\uFE0F ----------------------------------------------------------------------------------------- \u26A0\uFE0F"
46
+ ].join("\n")
47
+ );
48
+ }
49
+ };
50
+
51
+ export { checkPackageVersion, getInstallCommand, getLockFileName, getOtherLockFileNames, isPackageVersionChanged };
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkQCNDIFYQ_cjs = require('./chunk-QCNDIFYQ.cjs');
3
+ var chunkRGE2RUUB_cjs = require('./chunk-RGE2RUUB.cjs');
4
4
  var chunkFJL2V56E_cjs = require('./chunk-FJL2V56E.cjs');
5
5
  var chunk7LF2JPA5_cjs = require('./chunk-7LF2JPA5.cjs');
6
6
 
7
7
  // src/hooks/post-checkout.ts
8
8
  async function postCheckoutHook(config, files) {
9
9
  chunk7LF2JPA5_cjs.writeInfo("Running post-checkout hook...", config);
10
- chunkQCNDIFYQ_cjs.checkPackageVersion(files);
10
+ chunkRGE2RUUB_cjs.checkPackageVersion(files, config);
11
11
  try {
12
12
  chunkFJL2V56E_cjs.run(config, "git-lfs version");
13
13
  } catch (error) {
package/dist/index.cjs CHANGED
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunkFN4S2UNY_cjs = require('./chunk-FN4S2UNY.cjs');
3
+ var chunkIVBFLZSL_cjs = require('./chunk-IVBFLZSL.cjs');
4
4
  var chunkRIPABM45_cjs = require('./chunk-RIPABM45.cjs');
5
5
  require('./chunk-WRSI3KUJ.cjs');
6
6
  require('./chunk-5TXHP6RI.cjs');
7
7
  var chunkYBAE6I5L_cjs = require('./chunk-YBAE6I5L.cjs');
8
8
  require('./chunk-ENL3GCXS.cjs');
9
- var chunkVQNC53VQ_cjs = require('./chunk-VQNC53VQ.cjs');
10
- var chunkDHKJKEWQ_cjs = require('./chunk-DHKJKEWQ.cjs');
11
- var chunkWQU2Z7JS_cjs = require('./chunk-WQU2Z7JS.cjs');
12
- var chunkTDEG4V2Y_cjs = require('./chunk-TDEG4V2Y.cjs');
13
- var chunkFIBROPKG_cjs = require('./chunk-FIBROPKG.cjs');
14
- var chunkEEEX7BTF_cjs = require('./chunk-EEEX7BTF.cjs');
15
- require('./chunk-QCNDIFYQ.cjs');
16
- var chunkP4GKSB3C_cjs = require('./chunk-P4GKSB3C.cjs');
9
+ var chunkHOQEXODF_cjs = require('./chunk-HOQEXODF.cjs');
10
+ var chunkIAK23H7B_cjs = require('./chunk-IAK23H7B.cjs');
11
+ var chunkZYMWVRAL_cjs = require('./chunk-ZYMWVRAL.cjs');
12
+ var chunkSHNYRICK_cjs = require('./chunk-SHNYRICK.cjs');
13
+ var chunkLXXJEGUX_cjs = require('./chunk-LXXJEGUX.cjs');
14
+ var chunkTMEQLVEV_cjs = require('./chunk-TMEQLVEV.cjs');
15
+ require('./chunk-RGE2RUUB.cjs');
16
+ var chunkSJJTGPWB_cjs = require('./chunk-SJJTGPWB.cjs');
17
17
  require('./chunk-FJL2V56E.cjs');
18
18
  require('./chunk-7LF2JPA5.cjs');
19
19
 
@@ -21,71 +21,71 @@ require('./chunk-7LF2JPA5.cjs');
21
21
 
22
22
  Object.defineProperty(exports, "DEFAULT_CHANGELOG_RELEASE_CONFIG", {
23
23
  enumerable: true,
24
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_CHANGELOG_RELEASE_CONFIG; }
24
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_CHANGELOG_RELEASE_CONFIG; }
25
25
  });
26
26
  Object.defineProperty(exports, "DEFAULT_COMMIT_MESSAGE", {
27
27
  enumerable: true,
28
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_COMMIT_MESSAGE; }
28
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_COMMIT_MESSAGE; }
29
29
  });
30
30
  Object.defineProperty(exports, "DEFAULT_CONVENTIONAL_COMMITS_CONFIG", {
31
31
  enumerable: true,
32
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_CONVENTIONAL_COMMITS_CONFIG; }
32
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_CONVENTIONAL_COMMITS_CONFIG; }
33
33
  });
34
34
  Object.defineProperty(exports, "DEFAULT_FIXED_RELEASE_GROUP_CONFIG", {
35
35
  enumerable: true,
36
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_FIXED_RELEASE_GROUP_CONFIG; }
36
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_FIXED_RELEASE_GROUP_CONFIG; }
37
37
  });
38
38
  Object.defineProperty(exports, "DEFAULT_FIXED_RELEASE_TAG_PATTERN", {
39
39
  enumerable: true,
40
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_FIXED_RELEASE_TAG_PATTERN; }
40
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_FIXED_RELEASE_TAG_PATTERN; }
41
41
  });
42
42
  Object.defineProperty(exports, "DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG", {
43
43
  enumerable: true,
44
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG; }
44
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG; }
45
45
  });
46
46
  Object.defineProperty(exports, "DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN", {
47
47
  enumerable: true,
48
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN; }
48
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN; }
49
49
  });
50
50
  Object.defineProperty(exports, "DEFAULT_JS_RELEASE_GROUP_CONFIG", {
51
51
  enumerable: true,
52
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_JS_RELEASE_GROUP_CONFIG; }
52
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_JS_RELEASE_GROUP_CONFIG; }
53
53
  });
54
54
  Object.defineProperty(exports, "DEFAULT_RELEASE_CONFIG", {
55
55
  enumerable: true,
56
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_RELEASE_CONFIG; }
56
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_RELEASE_CONFIG; }
57
57
  });
58
58
  Object.defineProperty(exports, "DEFAULT_RELEASE_GROUP_CONFIG", {
59
59
  enumerable: true,
60
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_RELEASE_GROUP_CONFIG; }
60
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_RELEASE_GROUP_CONFIG; }
61
61
  });
62
62
  Object.defineProperty(exports, "DEFAULT_RELEASE_GROUP_GIT_CONFIG", {
63
63
  enumerable: true,
64
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_RELEASE_GROUP_GIT_CONFIG; }
64
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_RELEASE_GROUP_GIT_CONFIG; }
65
65
  });
66
66
  Object.defineProperty(exports, "DEFAULT_RUST_RELEASE_GROUP_CONFIG", {
67
67
  enumerable: true,
68
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_RUST_RELEASE_GROUP_CONFIG; }
68
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_RUST_RELEASE_GROUP_CONFIG; }
69
69
  });
70
70
  Object.defineProperty(exports, "DEFAULT_VERSION_RELEASE_CONFIG", {
71
71
  enumerable: true,
72
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_VERSION_RELEASE_CONFIG; }
72
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_VERSION_RELEASE_CONFIG; }
73
73
  });
74
74
  Object.defineProperty(exports, "formatConfigLog", {
75
75
  enumerable: true,
76
- get: function () { return chunkFN4S2UNY_cjs.formatConfigLog; }
76
+ get: function () { return chunkIVBFLZSL_cjs.formatConfigLog; }
77
77
  });
78
78
  Object.defineProperty(exports, "getReleaseConfig", {
79
79
  enumerable: true,
80
- get: function () { return chunkFN4S2UNY_cjs.getReleaseConfig; }
80
+ get: function () { return chunkIVBFLZSL_cjs.getReleaseConfig; }
81
81
  });
82
82
  Object.defineProperty(exports, "getReleaseGroupConfig", {
83
83
  enumerable: true,
84
- get: function () { return chunkFN4S2UNY_cjs.getReleaseGroupConfig; }
84
+ get: function () { return chunkIVBFLZSL_cjs.getReleaseGroupConfig; }
85
85
  });
86
86
  Object.defineProperty(exports, "mergeReleaseGroupConfig", {
87
87
  enumerable: true,
88
- get: function () { return chunkFN4S2UNY_cjs.mergeReleaseGroupConfig; }
88
+ get: function () { return chunkIVBFLZSL_cjs.mergeReleaseGroupConfig; }
89
89
  });
90
90
  Object.defineProperty(exports, "DEFAULT_MONOREPO_COMMIT_QUESTIONS", {
91
91
  enumerable: true,
@@ -97,29 +97,29 @@ Object.defineProperty(exports, "DEFAULT_COMMIT_PROMPT_MESSAGES", {
97
97
  });
98
98
  Object.defineProperty(exports, "prePushHook", {
99
99
  enumerable: true,
100
- get: function () { return chunkVQNC53VQ_cjs.prePushHook; }
100
+ get: function () { return chunkHOQEXODF_cjs.prePushHook; }
101
101
  });
102
102
  Object.defineProperty(exports, "prepareHook", {
103
103
  enumerable: true,
104
- get: function () { return chunkDHKJKEWQ_cjs.prepareHook; }
104
+ get: function () { return chunkIAK23H7B_cjs.prepareHook; }
105
105
  });
106
106
  Object.defineProperty(exports, "postCheckoutHook", {
107
107
  enumerable: true,
108
- get: function () { return chunkWQU2Z7JS_cjs.postCheckoutHook; }
108
+ get: function () { return chunkZYMWVRAL_cjs.postCheckoutHook; }
109
109
  });
110
110
  Object.defineProperty(exports, "postCommitHook", {
111
111
  enumerable: true,
112
- get: function () { return chunkTDEG4V2Y_cjs.postCommitHook; }
112
+ get: function () { return chunkSHNYRICK_cjs.postCommitHook; }
113
113
  });
114
114
  Object.defineProperty(exports, "postMergeHook", {
115
115
  enumerable: true,
116
- get: function () { return chunkFIBROPKG_cjs.postMergeHook; }
116
+ get: function () { return chunkLXXJEGUX_cjs.postMergeHook; }
117
117
  });
118
118
  Object.defineProperty(exports, "preCommitHook", {
119
119
  enumerable: true,
120
- get: function () { return chunkEEEX7BTF_cjs.preCommitHook; }
120
+ get: function () { return chunkTMEQLVEV_cjs.preCommitHook; }
121
121
  });
122
122
  Object.defineProperty(exports, "preInstallHook", {
123
123
  enumerable: true,
124
- get: function () { return chunkP4GKSB3C_cjs.preInstallHook; }
124
+ get: function () { return chunkSJJTGPWB_cjs.preInstallHook; }
125
125
  });
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- export { DEFAULT_CHANGELOG_RELEASE_CONFIG, DEFAULT_COMMIT_MESSAGE, DEFAULT_CONVENTIONAL_COMMITS_CONFIG, DEFAULT_FIXED_RELEASE_GROUP_CONFIG, DEFAULT_FIXED_RELEASE_TAG_PATTERN, DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG, DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN, DEFAULT_JS_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_CONFIG, DEFAULT_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_GROUP_GIT_CONFIG, DEFAULT_RUST_RELEASE_GROUP_CONFIG, DEFAULT_VERSION_RELEASE_CONFIG, formatConfigLog, getReleaseConfig, getReleaseGroupConfig, mergeReleaseGroupConfig } from './chunk-UX5W5DUP.js';
1
+ export { DEFAULT_CHANGELOG_RELEASE_CONFIG, DEFAULT_COMMIT_MESSAGE, DEFAULT_CONVENTIONAL_COMMITS_CONFIG, DEFAULT_FIXED_RELEASE_GROUP_CONFIG, DEFAULT_FIXED_RELEASE_TAG_PATTERN, DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG, DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN, DEFAULT_JS_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_CONFIG, DEFAULT_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_GROUP_GIT_CONFIG, DEFAULT_RUST_RELEASE_GROUP_CONFIG, DEFAULT_VERSION_RELEASE_CONFIG, formatConfigLog, getReleaseConfig, getReleaseGroupConfig, mergeReleaseGroupConfig } from './chunk-J5FHPMMG.js';
2
2
  export { DEFAULT_MONOREPO_COMMIT_QUESTIONS } from './chunk-OMWWQPRY.js';
3
3
  import './chunk-XS6PFVQQ.js';
4
4
  import './chunk-4T5NCWMG.js';
5
5
  export { DEFAULT_COMMIT_PROMPT_MESSAGES } from './chunk-5XU2KBM6.js';
6
6
  import './chunk-Q47SPRY7.js';
7
- export { prePushHook } from './chunk-GPFVAOPY.js';
8
- export { prepareHook } from './chunk-AHLNR6XV.js';
9
- export { postCheckoutHook } from './chunk-OBTRAJMP.js';
10
- export { postCommitHook } from './chunk-4LAYVXYI.js';
11
- export { postMergeHook } from './chunk-YT5MBM4H.js';
12
- export { preCommitHook } from './chunk-F2FAV3G7.js';
13
- import './chunk-HMHOHK22.js';
14
- export { preInstallHook } from './chunk-GMUM2CKB.js';
7
+ export { prePushHook } from './chunk-O7UOEIMT.js';
8
+ export { prepareHook } from './chunk-2R63WHWO.js';
9
+ export { postCheckoutHook } from './chunk-OABXW2AI.js';
10
+ export { postCommitHook } from './chunk-PBGCSXPL.js';
11
+ export { postMergeHook } from './chunk-NPCVH6FC.js';
12
+ export { preCommitHook } from './chunk-GLCQOF2M.js';
13
+ import './chunk-ZF6CEBNE.js';
14
+ export { preInstallHook } from './chunk-T5BLHFZW.js';
15
15
  import './chunk-JOPN56T4.js';
16
16
  import './chunk-PPBPJTXT.js';
@@ -1,80 +1,80 @@
1
1
  'use strict';
2
2
 
3
- var chunkFN4S2UNY_cjs = require('../chunk-FN4S2UNY.cjs');
3
+ var chunkIVBFLZSL_cjs = require('../chunk-IVBFLZSL.cjs');
4
4
  require('../chunk-RIPABM45.cjs');
5
5
  require('../chunk-WRSI3KUJ.cjs');
6
6
  require('../chunk-5TXHP6RI.cjs');
7
7
  require('../chunk-YBAE6I5L.cjs');
8
- require('../chunk-QCNDIFYQ.cjs');
8
+ require('../chunk-RGE2RUUB.cjs');
9
9
  require('../chunk-7LF2JPA5.cjs');
10
10
 
11
11
 
12
12
 
13
13
  Object.defineProperty(exports, "DEFAULT_CHANGELOG_RELEASE_CONFIG", {
14
14
  enumerable: true,
15
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_CHANGELOG_RELEASE_CONFIG; }
15
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_CHANGELOG_RELEASE_CONFIG; }
16
16
  });
17
17
  Object.defineProperty(exports, "DEFAULT_COMMIT_MESSAGE", {
18
18
  enumerable: true,
19
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_COMMIT_MESSAGE; }
19
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_COMMIT_MESSAGE; }
20
20
  });
21
21
  Object.defineProperty(exports, "DEFAULT_CONVENTIONAL_COMMITS_CONFIG", {
22
22
  enumerable: true,
23
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_CONVENTIONAL_COMMITS_CONFIG; }
23
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_CONVENTIONAL_COMMITS_CONFIG; }
24
24
  });
25
25
  Object.defineProperty(exports, "DEFAULT_FIXED_RELEASE_GROUP_CONFIG", {
26
26
  enumerable: true,
27
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_FIXED_RELEASE_GROUP_CONFIG; }
27
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_FIXED_RELEASE_GROUP_CONFIG; }
28
28
  });
29
29
  Object.defineProperty(exports, "DEFAULT_FIXED_RELEASE_TAG_PATTERN", {
30
30
  enumerable: true,
31
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_FIXED_RELEASE_TAG_PATTERN; }
31
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_FIXED_RELEASE_TAG_PATTERN; }
32
32
  });
33
33
  Object.defineProperty(exports, "DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG", {
34
34
  enumerable: true,
35
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG; }
35
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG; }
36
36
  });
37
37
  Object.defineProperty(exports, "DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN", {
38
38
  enumerable: true,
39
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN; }
39
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN; }
40
40
  });
41
41
  Object.defineProperty(exports, "DEFAULT_JS_RELEASE_GROUP_CONFIG", {
42
42
  enumerable: true,
43
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_JS_RELEASE_GROUP_CONFIG; }
43
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_JS_RELEASE_GROUP_CONFIG; }
44
44
  });
45
45
  Object.defineProperty(exports, "DEFAULT_RELEASE_CONFIG", {
46
46
  enumerable: true,
47
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_RELEASE_CONFIG; }
47
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_RELEASE_CONFIG; }
48
48
  });
49
49
  Object.defineProperty(exports, "DEFAULT_RELEASE_GROUP_CONFIG", {
50
50
  enumerable: true,
51
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_RELEASE_GROUP_CONFIG; }
51
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_RELEASE_GROUP_CONFIG; }
52
52
  });
53
53
  Object.defineProperty(exports, "DEFAULT_RELEASE_GROUP_GIT_CONFIG", {
54
54
  enumerable: true,
55
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_RELEASE_GROUP_GIT_CONFIG; }
55
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_RELEASE_GROUP_GIT_CONFIG; }
56
56
  });
57
57
  Object.defineProperty(exports, "DEFAULT_RUST_RELEASE_GROUP_CONFIG", {
58
58
  enumerable: true,
59
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_RUST_RELEASE_GROUP_CONFIG; }
59
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_RUST_RELEASE_GROUP_CONFIG; }
60
60
  });
61
61
  Object.defineProperty(exports, "DEFAULT_VERSION_RELEASE_CONFIG", {
62
62
  enumerable: true,
63
- get: function () { return chunkFN4S2UNY_cjs.DEFAULT_VERSION_RELEASE_CONFIG; }
63
+ get: function () { return chunkIVBFLZSL_cjs.DEFAULT_VERSION_RELEASE_CONFIG; }
64
64
  });
65
65
  Object.defineProperty(exports, "formatConfigLog", {
66
66
  enumerable: true,
67
- get: function () { return chunkFN4S2UNY_cjs.formatConfigLog; }
67
+ get: function () { return chunkIVBFLZSL_cjs.formatConfigLog; }
68
68
  });
69
69
  Object.defineProperty(exports, "getReleaseConfig", {
70
70
  enumerable: true,
71
- get: function () { return chunkFN4S2UNY_cjs.getReleaseConfig; }
71
+ get: function () { return chunkIVBFLZSL_cjs.getReleaseConfig; }
72
72
  });
73
73
  Object.defineProperty(exports, "getReleaseGroupConfig", {
74
74
  enumerable: true,
75
- get: function () { return chunkFN4S2UNY_cjs.getReleaseGroupConfig; }
75
+ get: function () { return chunkIVBFLZSL_cjs.getReleaseGroupConfig; }
76
76
  });
77
77
  Object.defineProperty(exports, "mergeReleaseGroupConfig", {
78
78
  enumerable: true,
79
- get: function () { return chunkFN4S2UNY_cjs.mergeReleaseGroupConfig; }
79
+ get: function () { return chunkIVBFLZSL_cjs.mergeReleaseGroupConfig; }
80
80
  });
@@ -1,7 +1,7 @@
1
- export { DEFAULT_CHANGELOG_RELEASE_CONFIG, DEFAULT_COMMIT_MESSAGE, DEFAULT_CONVENTIONAL_COMMITS_CONFIG, DEFAULT_FIXED_RELEASE_GROUP_CONFIG, DEFAULT_FIXED_RELEASE_TAG_PATTERN, DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG, DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN, DEFAULT_JS_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_CONFIG, DEFAULT_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_GROUP_GIT_CONFIG, DEFAULT_RUST_RELEASE_GROUP_CONFIG, DEFAULT_VERSION_RELEASE_CONFIG, formatConfigLog, getReleaseConfig, getReleaseGroupConfig, mergeReleaseGroupConfig } from '../chunk-UX5W5DUP.js';
1
+ export { DEFAULT_CHANGELOG_RELEASE_CONFIG, DEFAULT_COMMIT_MESSAGE, DEFAULT_CONVENTIONAL_COMMITS_CONFIG, DEFAULT_FIXED_RELEASE_GROUP_CONFIG, DEFAULT_FIXED_RELEASE_TAG_PATTERN, DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG, DEFAULT_INDEPENDENT_RELEASE_TAG_PATTERN, DEFAULT_JS_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_CONFIG, DEFAULT_RELEASE_GROUP_CONFIG, DEFAULT_RELEASE_GROUP_GIT_CONFIG, DEFAULT_RUST_RELEASE_GROUP_CONFIG, DEFAULT_VERSION_RELEASE_CONFIG, formatConfigLog, getReleaseConfig, getReleaseGroupConfig, mergeReleaseGroupConfig } from '../chunk-J5FHPMMG.js';
2
2
  import '../chunk-OMWWQPRY.js';
3
3
  import '../chunk-XS6PFVQQ.js';
4
4
  import '../chunk-4T5NCWMG.js';
5
5
  import '../chunk-5XU2KBM6.js';
6
- import '../chunk-HMHOHK22.js';
6
+ import '../chunk-ZF6CEBNE.js';
7
7
  import '../chunk-PPBPJTXT.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/git-tools",
3
- "version": "2.131.109",
3
+ "version": "2.131.112",
4
4
  "private": false,
5
5
  "description": "Tools for managing Git repositories within a Nx workspace.",
6
6
  "keywords": [
@@ -191,8 +191,8 @@
191
191
  "@inquirer/prompts": "^8.5.2",
192
192
  "@nx/devkit": "23.0.1",
193
193
  "@nx/js": "23.0.1",
194
- "@storm-software/config": "^1.138.38",
195
- "@storm-software/config-tools": "^1.190.101",
194
+ "@storm-software/config": "^1.138.41",
195
+ "@storm-software/config-tools": "^1.190.104",
196
196
  "@textlint/ast-node-types": "14.4.2",
197
197
  "@textlint/markdown-to-ast": "14.4.2",
198
198
  "anchor-markdown-header": "0.7.0",
@@ -200,7 +200,7 @@
200
200
  "axios": "1.8.2",
201
201
  "chalk": "^4.1.2",
202
202
  "conventional-changelog-conventionalcommits": "^9.3.1",
203
- "conventional-changelog-storm-software": "^0.3.262",
203
+ "conventional-changelog-storm-software": "^0.3.265",
204
204
  "htmlparser2": "10.0.0",
205
205
  "jsonc-parser": "3.2.1",
206
206
  "nanoclone": "^1.0.2",
@@ -217,7 +217,7 @@
217
217
  "zod": "^4.4.3"
218
218
  },
219
219
  "devDependencies": {
220
- "@storm-software/package-constants": "^0.1.114",
220
+ "@storm-software/package-constants": "^0.1.117",
221
221
  "@types/node": "^25.9.5",
222
222
  "commander": "^12.1.0",
223
223
  "conventional-commits-parser": "^6.4.0",
@@ -226,5 +226,5 @@
226
226
  },
227
227
  "peerDependencies": { "zod": ">=4.0.0" },
228
228
  "publishConfig": { "access": "public" },
229
- "gitHead": "7735deb945f520b42918d9cae9f8b5023c540a3e"
229
+ "gitHead": "e9118ed4d0235c8643e71d0d8370987a2945f8d1"
230
230
  }
@@ -1 +0,0 @@
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-2YVIE3BK.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"]}
@@ -1,52 +0,0 @@
1
- import { checkPackageVersion } from './chunk-HBLWPOJV.js';
2
- import { writeInfo, writeSuccess } from './chunk-42Y4PTRA.js';
3
- import fs from 'node:fs';
4
- import { readFile } from 'node:fs/promises';
5
- import path from 'node:path';
6
-
7
- async function prePushHook(config, files) {
8
- writeInfo("Running pre-push hook...", config);
9
- checkPackageVersion(files);
10
- writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}", config);
11
- const errors = [];
12
- if (fs.existsSync(path.join(config.workspaceRoot ?? "./", "package-lock.json"))) {
13
- errors.push(
14
- 'Invalid occurrence of "package-lock.json" file. Please remove it and use only "pnpm-lock.yaml"'
15
- );
16
- }
17
- if (fs.existsSync(path.join(config.workspaceRoot ?? "./", "yarn.lock"))) {
18
- errors.push(
19
- 'Invalid occurrence of "yarn.lock" file. Please remove it and use only "pnpm-lock.yaml"'
20
- );
21
- }
22
- try {
23
- const content = await readFile(
24
- path.join(config.workspaceRoot ?? "./", "pnpm-lock.yaml"),
25
- {
26
- encoding: "utf8"
27
- }
28
- );
29
- if (content?.match(/localhost:487/)) {
30
- errors.push(
31
- 'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"'
32
- );
33
- }
34
- if (content?.match(/resolution: \{tarball/)) {
35
- errors.push(
36
- 'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only'
37
- );
38
- }
39
- } catch {
40
- errors.push('The "pnpm-lock.yaml" does not exist or cannot be read');
41
- }
42
- if (errors.length > 0) {
43
- throw new Error(
44
- "\u274C Lock file validation failed\n" + errors.join("\n")
45
- );
46
- }
47
- writeSuccess("\u2714 Lock file is valid for push", config);
48
- }
49
-
50
- export { prePushHook };
51
- //# sourceMappingURL=chunk-DKB6PGG3.js.map
52
- //# sourceMappingURL=chunk-DKB6PGG3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/pre-push.ts"],"names":[],"mappings":";;;;;;AASA,eAAsB,WAAA,CACpB,QACA,KAAA,EACA;AACA,EAAA,SAAA,CAAU,4BAA4B,MAAM,CAAA;AAC5C,EAAA,mBAAA,CAAoB,KAAK,CAAA;AAEzB,EAAA,SAAA,CAAU,iFAAuC,MAAM,CAAA;AAEvD,EAAA,MAAM,SAAS,EAAC;AAChB,EAAA,IACE,EAAA,CAAG,WAAW,IAAA,CAAK,IAAA,CAAK,OAAO,aAAA,IAAiB,IAAA,EAAM,mBAAmB,CAAC,CAAA,EAC1E;AACA,IAAA,MAAA,CAAO,IAAA;AAAA,MACL;AAAA,KACF;AAAA,EACF;AACA,EAAA,IAAI,EAAA,CAAG,WAAW,IAAA,CAAK,IAAA,CAAK,OAAO,aAAA,IAAiB,IAAA,EAAM,WAAW,CAAC,CAAA,EAAG;AACvE,IAAA,MAAA,CAAO,IAAA;AAAA,MACL;AAAA,KACF;AAAA,EACF;AAEA,EAAA,IAAI;AACF,IAAA,MAAM,UAAU,MAAM,QAAA;AAAA,MACpB,IAAA,CAAK,IAAA,CAAK,MAAA,CAAO,aAAA,IAAiB,MAAM,gBAAgB,CAAA;AAAA,MACxD;AAAA,QACE,QAAA,EAAU;AAAA;AACZ,KACF;AACA,IAAA,IAAI,OAAA,EAAS,KAAA,CAAM,eAAe,CAAA,EAAG;AACnC,MAAA,MAAA,CAAO,IAAA;AAAA,QACL;AAAA,OACF;AAAA,IACF;AACA,IAAA,IAAI,OAAA,EAAS,KAAA,CAAM,uBAAuB,CAAA,EAAG;AAC3C,MAAA,MAAA,CAAO,IAAA;AAAA,QACL;AAAA,OACF;AAAA,IACF;AAAA,EACF,CAAA,CAAA,MAAQ;AACN,IAAA,MAAA,CAAO,KAAK,uDAAuD,CAAA;AAAA,EACrE;AAEA,EAAA,IAAI,MAAA,CAAO,SAAS,CAAA,EAAG;AACrB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,sCAAA,GAAyC,MAAA,CAAO,IAAA,CAAK,IAAI;AAAA,KAC3D;AAAA,EACF;AAEA,EAAA,YAAA,CAAa,sCAAiC,MAAM,CAAA;AAetD","file":"chunk-DKB6PGG3.js","sourcesContent":["#!/usr/bin/env node\n\nimport { StormWorkspaceConfig } from \"@storm-software/config\";\nimport { writeInfo, writeSuccess } from \"@storm-software/config-tools\";\nimport fs from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { checkPackageVersion } from \"../utilities/check-package-version\";\n\nexport async function prePushHook(\n config: StormWorkspaceConfig,\n files: string[]\n) {\n writeInfo(\"Running pre-push hook...\", config);\n checkPackageVersion(files);\n\n writeInfo(\"🔒🔒🔒 Validating lock files 🔒🔒🔒\", config);\n\n const errors = [] as string[];\n if (\n fs.existsSync(path.join(config.workspaceRoot ?? \"./\", \"package-lock.json\"))\n ) {\n errors.push(\n 'Invalid occurrence of \"package-lock.json\" file. Please remove it and use only \"pnpm-lock.yaml\"'\n );\n }\n if (fs.existsSync(path.join(config.workspaceRoot ?? \"./\", \"yarn.lock\"))) {\n errors.push(\n 'Invalid occurrence of \"yarn.lock\" file. Please remove it and use only \"pnpm-lock.yaml\"'\n );\n }\n\n try {\n const content = await readFile(\n path.join(config.workspaceRoot ?? \"./\", \"pnpm-lock.yaml\"),\n {\n encoding: \"utf8\"\n }\n );\n if (content?.match(/localhost:487/)) {\n errors.push(\n 'The \"pnpm-lock.yaml\" has reference to local repository (\"localhost:4873\"). Please use ensure you disable local registry before running \"pnpm i\"'\n );\n }\n if (content?.match(/resolution: \\{tarball/)) {\n errors.push(\n 'The \"pnpm-lock.yaml\" has reference to tarball package. Please use npm registry only'\n );\n }\n } catch {\n errors.push('The \"pnpm-lock.yaml\" does not exist or cannot be read');\n }\n\n if (errors.length > 0) {\n throw new Error(\n \"❌ Lock file validation failed\" + \"\\n\" + errors.join(\"\\n\")\n );\n }\n\n writeSuccess(\"✔ Lock file is valid for push\", config);\n\n // run(config, \"git lfs pre-push origin\");\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/pre-push.\\nError: ${\n // (error as Error)?.message\n // }`\n // );\n // }\n\n // run(config, \"git lfs pre-push origin\");\n}\n"]}
@@ -1,59 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkYHZNDNCW_cjs = require('./chunk-YHZNDNCW.cjs');
4
- var chunkNJMSWUK7_cjs = require('./chunk-NJMSWUK7.cjs');
5
- var fs = require('fs');
6
- var promises = require('fs/promises');
7
- var path = require('path');
8
-
9
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
-
11
- var fs__default = /*#__PURE__*/_interopDefault(fs);
12
- var path__default = /*#__PURE__*/_interopDefault(path);
13
-
14
- async function prePushHook(config, files) {
15
- chunkNJMSWUK7_cjs.writeInfo("Running pre-push hook...", config);
16
- chunkYHZNDNCW_cjs.checkPackageVersion(files);
17
- chunkNJMSWUK7_cjs.writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}", config);
18
- const errors = [];
19
- if (fs__default.default.existsSync(path__default.default.join(config.workspaceRoot ?? "./", "package-lock.json"))) {
20
- errors.push(
21
- 'Invalid occurrence of "package-lock.json" file. Please remove it and use only "pnpm-lock.yaml"'
22
- );
23
- }
24
- if (fs__default.default.existsSync(path__default.default.join(config.workspaceRoot ?? "./", "yarn.lock"))) {
25
- errors.push(
26
- 'Invalid occurrence of "yarn.lock" file. Please remove it and use only "pnpm-lock.yaml"'
27
- );
28
- }
29
- try {
30
- const content = await promises.readFile(
31
- path__default.default.join(config.workspaceRoot ?? "./", "pnpm-lock.yaml"),
32
- {
33
- encoding: "utf8"
34
- }
35
- );
36
- if (content?.match(/localhost:487/)) {
37
- errors.push(
38
- 'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"'
39
- );
40
- }
41
- if (content?.match(/resolution: \{tarball/)) {
42
- errors.push(
43
- 'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only'
44
- );
45
- }
46
- } catch {
47
- errors.push('The "pnpm-lock.yaml" does not exist or cannot be read');
48
- }
49
- if (errors.length > 0) {
50
- throw new Error(
51
- "\u274C Lock file validation failed\n" + errors.join("\n")
52
- );
53
- }
54
- chunkNJMSWUK7_cjs.writeSuccess("\u2714 Lock file is valid for push", config);
55
- }
56
-
57
- exports.prePushHook = prePushHook;
58
- //# sourceMappingURL=chunk-EQSXP2RC.cjs.map
59
- //# sourceMappingURL=chunk-EQSXP2RC.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/pre-push.ts"],"names":["writeInfo","checkPackageVersion","fs","path","readFile","writeSuccess"],"mappings":";;;;;;;;;;;;;AASA,eAAsB,WAAA,CACpB,QACA,KAAA,EACA;AACA,EAAAA,2BAAA,CAAU,4BAA4B,MAAM,CAAA;AAC5C,EAAAC,qCAAA,CAAoB,KAAK,CAAA;AAEzB,EAAAD,2BAAA,CAAU,iFAAuC,MAAM,CAAA;AAEvD,EAAA,MAAM,SAAS,EAAC;AAChB,EAAA,IACEE,mBAAA,CAAG,WAAWC,qBAAA,CAAK,IAAA,CAAK,OAAO,aAAA,IAAiB,IAAA,EAAM,mBAAmB,CAAC,CAAA,EAC1E;AACA,IAAA,MAAA,CAAO,IAAA;AAAA,MACL;AAAA,KACF;AAAA,EACF;AACA,EAAA,IAAID,mBAAA,CAAG,WAAWC,qBAAA,CAAK,IAAA,CAAK,OAAO,aAAA,IAAiB,IAAA,EAAM,WAAW,CAAC,CAAA,EAAG;AACvE,IAAA,MAAA,CAAO,IAAA;AAAA,MACL;AAAA,KACF;AAAA,EACF;AAEA,EAAA,IAAI;AACF,IAAA,MAAM,UAAU,MAAMC,iBAAA;AAAA,MACpBD,qBAAA,CAAK,IAAA,CAAK,MAAA,CAAO,aAAA,IAAiB,MAAM,gBAAgB,CAAA;AAAA,MACxD;AAAA,QACE,QAAA,EAAU;AAAA;AACZ,KACF;AACA,IAAA,IAAI,OAAA,EAAS,KAAA,CAAM,eAAe,CAAA,EAAG;AACnC,MAAA,MAAA,CAAO,IAAA;AAAA,QACL;AAAA,OACF;AAAA,IACF;AACA,IAAA,IAAI,OAAA,EAAS,KAAA,CAAM,uBAAuB,CAAA,EAAG;AAC3C,MAAA,MAAA,CAAO,IAAA;AAAA,QACL;AAAA,OACF;AAAA,IACF;AAAA,EACF,CAAA,CAAA,MAAQ;AACN,IAAA,MAAA,CAAO,KAAK,uDAAuD,CAAA;AAAA,EACrE;AAEA,EAAA,IAAI,MAAA,CAAO,SAAS,CAAA,EAAG;AACrB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,sCAAA,GAAyC,MAAA,CAAO,IAAA,CAAK,IAAI;AAAA,KAC3D;AAAA,EACF;AAEA,EAAAE,8BAAA,CAAa,sCAAiC,MAAM,CAAA;AAetD","file":"chunk-EQSXP2RC.cjs","sourcesContent":["#!/usr/bin/env node\n\nimport { StormWorkspaceConfig } from \"@storm-software/config\";\nimport { writeInfo, writeSuccess } from \"@storm-software/config-tools\";\nimport fs from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { checkPackageVersion } from \"../utilities/check-package-version\";\n\nexport async function prePushHook(\n config: StormWorkspaceConfig,\n files: string[]\n) {\n writeInfo(\"Running pre-push hook...\", config);\n checkPackageVersion(files);\n\n writeInfo(\"🔒🔒🔒 Validating lock files 🔒🔒🔒\", config);\n\n const errors = [] as string[];\n if (\n fs.existsSync(path.join(config.workspaceRoot ?? \"./\", \"package-lock.json\"))\n ) {\n errors.push(\n 'Invalid occurrence of \"package-lock.json\" file. Please remove it and use only \"pnpm-lock.yaml\"'\n );\n }\n if (fs.existsSync(path.join(config.workspaceRoot ?? \"./\", \"yarn.lock\"))) {\n errors.push(\n 'Invalid occurrence of \"yarn.lock\" file. Please remove it and use only \"pnpm-lock.yaml\"'\n );\n }\n\n try {\n const content = await readFile(\n path.join(config.workspaceRoot ?? \"./\", \"pnpm-lock.yaml\"),\n {\n encoding: \"utf8\"\n }\n );\n if (content?.match(/localhost:487/)) {\n errors.push(\n 'The \"pnpm-lock.yaml\" has reference to local repository (\"localhost:4873\"). Please use ensure you disable local registry before running \"pnpm i\"'\n );\n }\n if (content?.match(/resolution: \\{tarball/)) {\n errors.push(\n 'The \"pnpm-lock.yaml\" has reference to tarball package. Please use npm registry only'\n );\n }\n } catch {\n errors.push('The \"pnpm-lock.yaml\" does not exist or cannot be read');\n }\n\n if (errors.length > 0) {\n throw new Error(\n \"❌ Lock file validation failed\" + \"\\n\" + errors.join(\"\\n\")\n );\n }\n\n writeSuccess(\"✔ Lock file is valid for push\", config);\n\n // run(config, \"git lfs pre-push origin\");\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/pre-push.\\nError: ${\n // (error as Error)?.message\n // }`\n // );\n // }\n\n // run(config, \"git lfs pre-push origin\");\n}\n"]}
@@ -1 +0,0 @@
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-FG3I2VCP.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"]}
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkYHZNDNCW_cjs = require('./chunk-YHZNDNCW.cjs');
4
- var chunkNJMSWUK7_cjs = require('./chunk-NJMSWUK7.cjs');
5
-
6
- // src/hooks/pre-commit.ts
7
- async function preCommitHook(config, files) {
8
- chunkNJMSWUK7_cjs.writeInfo("Running pre-commit hook...", config);
9
- chunkYHZNDNCW_cjs.checkPackageVersion(files);
10
- if (chunkYHZNDNCW_cjs.isPackageVersionChanged(files)) {
11
- throw new Error(
12
- "Please regenerate the package lock file before committing..."
13
- );
14
- }
15
- }
16
-
17
- exports.preCommitHook = preCommitHook;
18
- //# sourceMappingURL=chunk-FNMZLTI2.cjs.map
19
- //# sourceMappingURL=chunk-FNMZLTI2.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/pre-commit.ts"],"names":["writeInfo","checkPackageVersion","isPackageVersionChanged"],"mappings":";;;;;;AASA,eAAsB,aAAA,CACpB,QACA,KAAA,EACA;AACA,EAAAA,2BAAA,CAAU,8BAA8B,MAAM,CAAA;AAE9C,EAAAC,qCAAA,CAAoB,KAAK,CAAA;AACzB,EAAA,IAAIC,yCAAA,CAAwB,KAAK,CAAA,EAAG;AAClC,IAAA,MAAM,IAAI,KAAA;AAAA,MACR;AAAA,KACF;AAAA,EACF;AACF","file":"chunk-FNMZLTI2.cjs","sourcesContent":["#!/usr/bin/env node\n\nimport { StormWorkspaceConfig } from \"@storm-software/config\";\nimport { writeInfo } from \"@storm-software/config-tools\";\nimport {\n checkPackageVersion,\n isPackageVersionChanged\n} from \"../utilities/check-package-version\";\n\nexport async function preCommitHook(\n config: StormWorkspaceConfig,\n files: string[]\n) {\n writeInfo(\"Running pre-commit hook...\", config);\n\n checkPackageVersion(files);\n if (isPackageVersionChanged(files)) {\n throw new Error(\n \"Please regenerate the package lock file before committing...\"\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/post-commit.ts"],"names":[],"mappings":";;;;;AAMA,eAAsB,cAAA,CACpB,QACA,KAAA,EACA;AACA,EAAA,SAAA,CAAU,+BAA+B,MAAM,CAAA;AAC/C,EAAA,mBAAA,CAAoB,KAAK,CAAA;AAEzB,EAAA,IAAI;AACF,IAAA,GAAA,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,EAAA,GAAA,CAAI,QAAQ,qBAAqB,CAAA;AACnC","file":"chunk-GUKZHV4C.js","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"]}