@storm-software/git-tools 2.130.37 → 2.130.39
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.
- package/bin/{chunk-OVGMWXXJ.cjs → chunk-WYYIBLO2.cjs} +4 -4
- package/bin/chunk-WYYIBLO2.cjs.map +1 -0
- package/bin/{chunk-NBAUOCB4.js → chunk-XY4WATTM.js} +4 -4
- package/bin/chunk-XY4WATTM.js.map +1 -0
- package/bin/git.cjs +12 -12
- package/bin/git.cjs.map +1 -1
- package/bin/git.js +11 -11
- package/bin/git.js.map +1 -1
- package/bin/pre-push.cjs +2 -2
- package/bin/pre-push.js +1 -1
- package/dist/{chunk-O56OC5QZ.cjs → chunk-2R2374NN.cjs} +2 -2
- package/dist/{chunk-7YZQR2LH.js → chunk-4RAEKSGE.js} +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/bin/chunk-NBAUOCB4.js.map +0 -1
- package/bin/chunk-OVGMWXXJ.cjs.map +0 -1
|
@@ -14,7 +14,7 @@ var path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
14
14
|
async function prePushHook(config, files) {
|
|
15
15
|
chunkHVR76UIF_cjs.writeInfo("Running pre-push hook...", config);
|
|
16
16
|
chunkYHZNDNCW_cjs.checkPackageVersion(files);
|
|
17
|
-
chunkHVR76UIF_cjs.writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}
|
|
17
|
+
chunkHVR76UIF_cjs.writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}", config);
|
|
18
18
|
const errors = [];
|
|
19
19
|
if (fs__default.default.existsSync(path__default.default.join(config.workspaceRoot ?? "./", "package-lock.json"))) {
|
|
20
20
|
errors.push(
|
|
@@ -51,9 +51,9 @@ async function prePushHook(config, files) {
|
|
|
51
51
|
"\u274C Lock file validation failed\n" + errors.join("\n")
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
-
chunkHVR76UIF_cjs.writeSuccess("
|
|
54
|
+
chunkHVR76UIF_cjs.writeSuccess("\u2714 Lock file is valid for push", config);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
exports.prePushHook = prePushHook;
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-WYYIBLO2.cjs.map
|
|
59
|
+
//# sourceMappingURL=chunk-WYYIBLO2.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,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-WYYIBLO2.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"]}
|
|
@@ -7,7 +7,7 @@ import path from 'node:path';
|
|
|
7
7
|
async function prePushHook(config, files) {
|
|
8
8
|
writeInfo("Running pre-push hook...", config);
|
|
9
9
|
checkPackageVersion(files);
|
|
10
|
-
writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}
|
|
10
|
+
writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}", config);
|
|
11
11
|
const errors = [];
|
|
12
12
|
if (fs.existsSync(path.join(config.workspaceRoot ?? "./", "package-lock.json"))) {
|
|
13
13
|
errors.push(
|
|
@@ -44,9 +44,9 @@ async function prePushHook(config, files) {
|
|
|
44
44
|
"\u274C Lock file validation failed\n" + errors.join("\n")
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
writeSuccess("
|
|
47
|
+
writeSuccess("\u2714 Lock file is valid for push", config);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export { prePushHook };
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-XY4WATTM.js.map
|
|
52
|
+
//# sourceMappingURL=chunk-XY4WATTM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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-XY4WATTM.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"]}
|
package/bin/git.cjs
CHANGED
|
@@ -6,7 +6,7 @@ var chunk5Z6RONLO_cjs = require('./chunk-5Z6RONLO.cjs');
|
|
|
6
6
|
var chunkLOG3DPPQ_cjs = require('./chunk-LOG3DPPQ.cjs');
|
|
7
7
|
var chunkL5CIC5RM_cjs = require('./chunk-L5CIC5RM.cjs');
|
|
8
8
|
require('./chunk-HIBBA263.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkWYYIBLO2_cjs = require('./chunk-WYYIBLO2.cjs');
|
|
10
10
|
require('./chunk-YHZNDNCW.cjs');
|
|
11
11
|
var chunkPRWPYXMH_cjs = require('./chunk-PRWPYXMH.cjs');
|
|
12
12
|
var chunkFH5OSXAJ_cjs = require('./chunk-FH5OSXAJ.cjs');
|
|
@@ -3970,7 +3970,7 @@ async function commitAction({
|
|
|
3970
3970
|
);
|
|
3971
3971
|
await runCommit(config5, dryRun);
|
|
3972
3972
|
chunkHVR76UIF_cjs.writeSuccess(
|
|
3973
|
-
|
|
3973
|
+
`\u2714 Storm Commit processing completed successfully!
|
|
3974
3974
|
|
|
3975
3975
|
Note: Please run "pnpm push" to upload these changes to the remote ${_config.name ? _config.name : _config.namespace ? _config.namespace : _config.organization ? _config.organization : "Storm-Software"} Git repository at ${_config.repository}
|
|
3976
3976
|
`,
|
|
@@ -3998,7 +3998,7 @@ async function readmeAction(options) {
|
|
|
3998
3998
|
);
|
|
3999
3999
|
await runReadme(options);
|
|
4000
4000
|
chunkHVR76UIF_cjs.writeSuccess(
|
|
4001
|
-
"
|
|
4001
|
+
"\u2714 Formatting of the workspace's README.md files is complete\n",
|
|
4002
4002
|
_config
|
|
4003
4003
|
);
|
|
4004
4004
|
} catch (error) {
|
|
@@ -4027,7 +4027,7 @@ async function releaseAction({
|
|
|
4027
4027
|
base,
|
|
4028
4028
|
head
|
|
4029
4029
|
});
|
|
4030
|
-
chunkHVR76UIF_cjs.writeSuccess("
|
|
4030
|
+
chunkHVR76UIF_cjs.writeSuccess("\u2714 Release completed successfully!\n", _config);
|
|
4031
4031
|
} catch (error) {
|
|
4032
4032
|
chunkHVR76UIF_cjs.writeFatal(
|
|
4033
4033
|
`A fatal error occurred while running release action:
|
|
@@ -4049,7 +4049,7 @@ async function commitLintAction(options) {
|
|
|
4049
4049
|
);
|
|
4050
4050
|
await runCommitLint(_config, options);
|
|
4051
4051
|
chunkHVR76UIF_cjs.writeSuccess(
|
|
4052
|
-
"
|
|
4052
|
+
"\u2714 Linting the commit messages completed successfully!\n",
|
|
4053
4053
|
_config
|
|
4054
4054
|
);
|
|
4055
4055
|
} catch (error) {
|
|
@@ -4069,7 +4069,7 @@ async function postCheckoutAction({ files }) {
|
|
|
4069
4069
|
_config
|
|
4070
4070
|
);
|
|
4071
4071
|
await chunkNZCON5HN_cjs.postCheckoutHook(_config, files);
|
|
4072
|
-
chunkHVR76UIF_cjs.writeSuccess("
|
|
4072
|
+
chunkHVR76UIF_cjs.writeSuccess("\u2714 Post-checkout hook completed successfully!\n", _config);
|
|
4073
4073
|
} catch (error) {
|
|
4074
4074
|
chunkHVR76UIF_cjs.writeFatal(
|
|
4075
4075
|
`A fatal error occurred while running the post-checkout hook:
|
|
@@ -4087,7 +4087,7 @@ async function postCommitAction({ files }) {
|
|
|
4087
4087
|
_config
|
|
4088
4088
|
);
|
|
4089
4089
|
await chunk5Z6RONLO_cjs.postCommitHook(_config, files);
|
|
4090
|
-
chunkHVR76UIF_cjs.writeSuccess("
|
|
4090
|
+
chunkHVR76UIF_cjs.writeSuccess("\u2714 Post-commit hook completed successfully!\n", _config);
|
|
4091
4091
|
} catch (error) {
|
|
4092
4092
|
chunkHVR76UIF_cjs.writeFatal(
|
|
4093
4093
|
`A fatal error occurred while running the post-commit hook:
|
|
@@ -4105,7 +4105,7 @@ async function postMergeAction({ files }) {
|
|
|
4105
4105
|
_config
|
|
4106
4106
|
);
|
|
4107
4107
|
await chunkLOG3DPPQ_cjs.postMergeHook(_config, files);
|
|
4108
|
-
chunkHVR76UIF_cjs.writeSuccess("
|
|
4108
|
+
chunkHVR76UIF_cjs.writeSuccess("\u2714 Post-merge hook completed successfully!\n", _config);
|
|
4109
4109
|
} catch (error) {
|
|
4110
4110
|
chunkHVR76UIF_cjs.writeFatal(
|
|
4111
4111
|
`A fatal error occurred while running the post-merge hook:
|
|
@@ -4123,7 +4123,7 @@ async function preCommitAction({ files }) {
|
|
|
4123
4123
|
_config
|
|
4124
4124
|
);
|
|
4125
4125
|
await chunkL5CIC5RM_cjs.preCommitHook(_config, files);
|
|
4126
|
-
chunkHVR76UIF_cjs.writeSuccess("
|
|
4126
|
+
chunkHVR76UIF_cjs.writeSuccess("\u2714 Pre-commit hook completed successfully!\n", _config);
|
|
4127
4127
|
} catch (error) {
|
|
4128
4128
|
chunkHVR76UIF_cjs.writeFatal(
|
|
4129
4129
|
`A fatal error occurred while running the pre-commit hook:
|
|
@@ -4140,8 +4140,8 @@ async function prePushAction({ files }) {
|
|
|
4140
4140
|
`${chunkHVR76UIF_cjs.brandIcon(_config)} Running the Storm pre-push git hook for ${files.length} files in the workspace...`,
|
|
4141
4141
|
_config
|
|
4142
4142
|
);
|
|
4143
|
-
await
|
|
4144
|
-
chunkHVR76UIF_cjs.writeSuccess("
|
|
4143
|
+
await chunkWYYIBLO2_cjs.prePushHook(_config, files);
|
|
4144
|
+
chunkHVR76UIF_cjs.writeSuccess("\u2714 Pre-push hook completed successfully!\n", _config);
|
|
4145
4145
|
} catch (error) {
|
|
4146
4146
|
chunkHVR76UIF_cjs.writeFatal(
|
|
4147
4147
|
`A fatal error occurred while running the pre-push hook:
|
|
@@ -4159,7 +4159,7 @@ async function prepareAction() {
|
|
|
4159
4159
|
_config
|
|
4160
4160
|
);
|
|
4161
4161
|
await chunkPRWPYXMH_cjs.prepareHook(_config);
|
|
4162
|
-
chunkHVR76UIF_cjs.writeSuccess("
|
|
4162
|
+
chunkHVR76UIF_cjs.writeSuccess("\u2714 Prepare hook completed successfully!\n", _config);
|
|
4163
4163
|
} catch (error) {
|
|
4164
4164
|
chunkHVR76UIF_cjs.writeFatal(
|
|
4165
4165
|
`A fatal error occurred while running the prepare hook:
|