@storm-software/git-tools 2.124.85 → 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,59 @@
1
+ 'use strict';
2
+
3
+ var chunkYHZNDNCW_cjs = require('./chunk-YHZNDNCW.cjs');
4
+ var chunkDFXXNV3C_cjs = require('./chunk-DFXXNV3C.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
+ chunkDFXXNV3C_cjs.writeInfo("Running pre-push hook...", config);
16
+ chunkYHZNDNCW_cjs.checkPackageVersion(files);
17
+ chunkDFXXNV3C_cjs.writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}\n", 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
+ chunkDFXXNV3C_cjs.writeSuccess(" \u2714 Lock file is valid for push", config);
55
+ }
56
+
57
+ exports.prePushHook = prePushHook;
58
+ //# sourceMappingURL=chunk-EI723ABQ.cjs.map
59
+ //# sourceMappingURL=chunk-EI723ABQ.cjs.map
@@ -0,0 +1 @@
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,mFAAyC,MAAM,CAAA;AAEzD,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,uCAAkC,MAAM,CAAA;AAevD","file":"chunk-EI723ABQ.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 🔒🔒🔒\\n\", 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,9 +1,9 @@
1
1
  // src/utilities/check-package-version.ts
2
- var isPackageVersionChanged = (fields) => fields?.some(
2
+ var isPackageVersionChanged = (files) => files?.some(
3
3
  (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")
4
4
  );
5
- var checkPackageVersion = (fields) => {
6
- if (isPackageVersionChanged(fields)) {
5
+ var checkPackageVersion = (files) => {
6
+ if (isPackageVersionChanged(files)) {
7
7
  console.warn(
8
8
  [
9
9
  "\u26A0\uFE0F ----------------------------------------------------------------------------------------- \u26A0\uFE0F",
@@ -15,5 +15,5 @@ var checkPackageVersion = (fields) => {
15
15
  };
16
16
 
17
17
  export { checkPackageVersion, isPackageVersionChanged };
18
- //# sourceMappingURL=chunk-Q3DQKTOI.js.map
19
- //# sourceMappingURL=chunk-Q3DQKTOI.js.map
18
+ //# sourceMappingURL=chunk-HBLWPOJV.js.map
19
+ //# sourceMappingURL=chunk-HBLWPOJV.js.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-HBLWPOJV.js","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,18 @@
1
+ 'use strict';
2
+
3
+ var chunkFH5OSXAJ_cjs = require('./chunk-FH5OSXAJ.cjs');
4
+ var chunkDFXXNV3C_cjs = require('./chunk-DFXXNV3C.cjs');
5
+
6
+ // src/hooks/pre-install.ts
7
+ async function preInstallHook(config) {
8
+ chunkDFXXNV3C_cjs.writeInfo("Running pre-install hook...", config);
9
+ if (Boolean(process.env.CI) || Boolean(process.env.STORM_CI)) {
10
+ chunkDFXXNV3C_cjs.writeInfo("Skipping pre-install for CI process...", config);
11
+ return;
12
+ }
13
+ chunkFH5OSXAJ_cjs.run(config, "npx -y only-allow pnpm");
14
+ }
15
+
16
+ exports.preInstallHook = preInstallHook;
17
+ //# sourceMappingURL=chunk-IA2Z3BAB.cjs.map
18
+ //# sourceMappingURL=chunk-IA2Z3BAB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/pre-install.ts"],"names":["writeInfo","run"],"mappings":";;;;;;AAKA,eAAsB,eAAe,MAAA,EAA8B;AACjE,EAAAA,2BAAA,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,IAAAA,2BAAA,CAAU,0CAA0C,MAAM,CAAA;AAC1D,IAAA;AAAA,EACF;AAEA,EAAAC,qBAAA,CAAI,QAAQ,wBAAwB,CAAA;AACtC","file":"chunk-IA2Z3BAB.cjs","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,17 @@
1
+ import { checkPackageVersion, isPackageVersionChanged } from './chunk-HBLWPOJV.js';
2
+ import { writeInfo } from './chunk-S3E6UR4Y.js';
3
+
4
+ // src/hooks/pre-commit.ts
5
+ async function preCommitHook(config, files) {
6
+ writeInfo("Running pre-commit hook...", config);
7
+ checkPackageVersion(files);
8
+ if (isPackageVersionChanged(files)) {
9
+ throw new Error(
10
+ "Please regenerate the package lock file before committing..."
11
+ );
12
+ }
13
+ }
14
+
15
+ export { preCommitHook };
16
+ //# sourceMappingURL=chunk-JE32WMBP.js.map
17
+ //# sourceMappingURL=chunk-JE32WMBP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/pre-commit.ts"],"names":[],"mappings":";;;;AASA,eAAsB,aAAA,CACpB,QACA,KAAA,EACA;AACA,EAAA,SAAA,CAAU,8BAA8B,MAAM,CAAA;AAE9C,EAAA,mBAAA,CAAoB,KAAK,CAAA;AACzB,EAAA,IAAI,uBAAA,CAAwB,KAAK,CAAA,EAAG;AAClC,IAAA,MAAM,IAAI,KAAA;AAAA,MACR;AAAA,KACF;AAAA,EACF;AACF","file":"chunk-JE32WMBP.js","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"]}
@@ -0,0 +1,22 @@
1
+ import { checkPackageVersion } from './chunk-HBLWPOJV.js';
2
+ import { run } from './chunk-G3YPGVPS.js';
3
+ import { writeInfo } from './chunk-S3E6UR4Y.js';
4
+
5
+ // src/hooks/post-merge.ts
6
+ async function postMergeHook(config, files) {
7
+ writeInfo("Running post-merge 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-merge.
14
+ Error: ${error?.message}`
15
+ );
16
+ }
17
+ run(config, "git lfs post-merge");
18
+ }
19
+
20
+ export { postMergeHook };
21
+ //# sourceMappingURL=chunk-LHPUN2YZ.js.map
22
+ //# sourceMappingURL=chunk-LHPUN2YZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/post-merge.ts"],"names":[],"mappings":";;;;;AAMA,eAAsB,aAAA,CACpB,QACA,KAAA,EACA;AACA,EAAA,SAAA,CAAU,8BAA8B,MAAM,CAAA;AAC9C,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,oBAAoB,CAAA;AAClC","file":"chunk-LHPUN2YZ.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 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,14 @@
1
+ import { run } from './chunk-G3YPGVPS.js';
2
+ import { writeInfo } from './chunk-S3E6UR4Y.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 };
13
+ //# sourceMappingURL=chunk-N7J3ORRT.js.map
14
+ //# sourceMappingURL=chunk-N7J3ORRT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/prepare.ts"],"names":[],"mappings":";;;;AAKA,eAAsB,YAAY,MAAA,EAA8B;AAC9D,EAAA,SAAA,CAAU,2BAA2B,MAAM,CAAA;AAE3C,EAAA,IAAI,CAAC,OAAA,CAAQ,GAAA,CAAI,MAAM,CAAC,OAAA,CAAQ,IAAI,QAAA,EAAU;AAC5C,IAAA,GAAA,CAAI,QAAQ,uBAAuB,CAAA;AAAA,EACrC;AACF","file":"chunk-N7J3ORRT.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 prepareHook(config: StormWorkspaceConfig) {\n writeInfo(\"Running prepare hook...\", config);\n\n if (!process.env.CI && !process.env.STORM_CI) {\n run(config, \"pnpm lefthook install\");\n }\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { checkPackageVersion } from './chunk-HBLWPOJV.js';
2
+ import { run } from './chunk-G3YPGVPS.js';
3
+ import { writeInfo } from './chunk-S3E6UR4Y.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 };
21
+ //# sourceMappingURL=chunk-ROGUZ46T.js.map
22
+ //# sourceMappingURL=chunk-ROGUZ46T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/post-checkout.ts"],"names":[],"mappings":";;;;;AAMA,eAAsB,gBAAA,CACpB,QACA,KAAA,EACA;AACA,EAAA,SAAA,CAAU,iCAAiC,MAAM,CAAA;AACjD,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,uBAAuB,CAAA;AACrC","file":"chunk-ROGUZ46T.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 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"]}
@@ -0,0 +1,22 @@
1
+ import { checkPackageVersion } from './chunk-HBLWPOJV.js';
2
+ import { run } from './chunk-G3YPGVPS.js';
3
+ import { writeInfo } from './chunk-S3E6UR4Y.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 };
21
+ //# sourceMappingURL=chunk-RZZ5UCVV.js.map
22
+ //# sourceMappingURL=chunk-RZZ5UCVV.js.map
@@ -0,0 +1 @@
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-RZZ5UCVV.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"]}
@@ -3403,6 +3403,6 @@ function getWorkspaceConfig(skipLogs = true, options = {}) {
3403
3403
  return getConfig(workspaceRoot, skipLogs);
3404
3404
  }
3405
3405
 
3406
- export { STORM_DEFAULT_RELEASE_BANNER, brandIcon, defu, exitWithError, exitWithSuccess, findWorkspaceRootSafe, getConfig, getWorkspaceConfig, handleProcess, isVerbose, joinPaths, writeDebug, writeError, writeFatal, writeInfo, writeSuccess, writeTrace, writeWarning };
3407
- //# sourceMappingURL=chunk-WQI3QHPS.js.map
3408
- //# sourceMappingURL=chunk-WQI3QHPS.js.map
3406
+ export { STORM_DEFAULT_RELEASE_BANNER, brandIcon, defu, exitWithError, exitWithSuccess, findWorkspaceRootSafe, getConfig, getWorkspaceConfig, handleProcess, isVerbose, joinPaths, writeDebug, writeFatal, writeInfo, writeSuccess, writeTrace, writeWarning };
3407
+ //# sourceMappingURL=chunk-S3E6UR4Y.js.map
3408
+ //# sourceMappingURL=chunk-S3E6UR4Y.js.map