@storm-software/git-tools 2.106.1 → 2.107.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/git.ts +29 -0
- package/bin/post-checkout.ts +46 -0
- package/bin/post-commit.ts +46 -0
- package/bin/post-merge.ts +46 -0
- package/bin/pre-commit.ts +42 -0
- package/bin/pre-install.ts +36 -0
- package/bin/pre-push.ts +102 -0
- package/bin/prepare.ts +33 -0
- package/bin/version-warning.ts +25 -0
- package/{bin → dist/bin}/git.cjs +0 -0
- package/{bin → dist/bin}/git.js +0 -0
- package/{bin → dist/bin}/post-checkout.cjs +0 -0
- package/{bin → dist/bin}/post-checkout.js +0 -0
- package/{bin → dist/bin}/post-commit.cjs +0 -0
- package/{bin → dist/bin}/post-commit.js +0 -0
- package/{bin → dist/bin}/post-merge.cjs +0 -0
- package/{bin → dist/bin}/post-merge.js +0 -0
- package/{bin → dist/bin}/pre-commit.cjs +0 -0
- package/{bin → dist/bin}/pre-commit.js +0 -0
- package/{bin → dist/bin}/pre-install.cjs +0 -0
- package/{bin → dist/bin}/pre-install.js +0 -0
- package/{bin → dist/bin}/pre-push.cjs +0 -0
- package/{bin → dist/bin}/pre-push.js +0 -0
- package/{bin → dist/bin}/prepare.cjs +0 -0
- package/{bin → dist/bin}/prepare.js +0 -0
- package/{bin → dist/bin}/version-warning.cjs +0 -0
- package/{bin → dist/bin}/version-warning.js +0 -0
- package/dist/changelog-renderer/changelog-renderer.cjs +87080 -0
- package/dist/changelog-renderer/changelog-renderer.js +92050 -0
- package/package.json +1 -1
- package/dist/lefthook/config.yml +0 -115
- package/dist/lint-staged/config.cjs +0 -52
- package/dist/readme/templates/README.footer.md +0 -161
- package/dist/readme/templates/README.header.md +0 -41
- /package/{bin → dist/bin}/chunk-23TCSI67.js +0 -0
- /package/{bin → dist/bin}/chunk-34R4PCUS.cjs +0 -0
- /package/{bin → dist/bin}/chunk-3XEEEMLV.js +0 -0
- /package/{bin → dist/bin}/chunk-3YZZSIRA.cjs +0 -0
- /package/{bin → dist/bin}/chunk-5DZECCFZ.js +0 -0
- /package/{bin → dist/bin}/chunk-A3QVIDKR.cjs +0 -0
- /package/{bin → dist/bin}/chunk-ANR3M366.cjs +0 -0
- /package/{bin → dist/bin}/chunk-AQDYBQBF.cjs +0 -0
- /package/{bin → dist/bin}/chunk-BJYW7ISD.js +0 -0
- /package/{bin → dist/bin}/chunk-FY5QB5MQ.cjs +0 -0
- /package/{bin → dist/bin}/chunk-GIYWTOX5.js +0 -0
- /package/{bin → dist/bin}/chunk-H6RJC2EU.cjs +0 -0
- /package/{bin → dist/bin}/chunk-KTLBDGE7.js +0 -0
- /package/{bin → dist/bin}/chunk-M3SPNRDT.js +0 -0
- /package/{bin → dist/bin}/chunk-MRCW7ZWW.cjs +0 -0
- /package/{bin → dist/bin}/chunk-OQNZFKFJ.cjs +0 -0
- /package/{bin → dist/bin}/chunk-PAW5GJNL.js +0 -0
- /package/{bin → dist/bin}/chunk-QROY5223.js +0 -0
- /package/{bin → dist/bin}/chunk-REUY4MDC.js +0 -0
- /package/{bin → dist/bin}/chunk-RHY34RLE.cjs +0 -0
- /package/{bin → dist/bin}/chunk-V3UDZCED.js +0 -0
- /package/{bin → dist/bin}/chunk-VNWRUK6N.cjs +0 -0
- /package/{bin → dist/bin}/chunk-W2TU25OT.js +0 -0
- /package/{bin → dist/bin}/chunk-Z3K5JTIC.cjs +0 -0
- /package/{bin → dist/bin}/dist-3B7RDNKI.cjs +0 -0
- /package/{bin → dist/bin}/dist-BGCQPBHL.js +0 -0
- /package/{bin → dist/bin}/dist-WGGNNSDG.cjs +0 -0
- /package/{bin → dist/bin}/dist-YM6D424K.js +0 -0
- /package/{bin → dist/bin}/esm-6GE5MI4G.cjs +0 -0
- /package/{bin → dist/bin}/esm-WLHP7RVO.js +0 -0
- /package/{bin → dist/bin}/json5-ELADGSSP.js +0 -0
- /package/{bin → dist/bin}/json5-FQPHMSAC.cjs +0 -0
- /package/{bin → dist/bin}/jsonc-CTYQYPBR.cjs +0 -0
- /package/{bin → dist/bin}/jsonc-RUGZP2X2.js +0 -0
- /package/{bin → dist/bin}/multipart-parser-I4Y55UNL.cjs +0 -0
- /package/{bin → dist/bin}/multipart-parser-MFV7BRF2.js +0 -0
- /package/{bin → dist/bin}/toml-IRXKI45Y.cjs +0 -0
- /package/{bin → dist/bin}/toml-U3J6BEAR.js +0 -0
- /package/{bin → dist/bin}/utils-6O4EJJM3.js +0 -0
- /package/{bin → dist/bin}/utils-GJRPR6GZ.cjs +0 -0
- /package/{bin → dist/bin}/yaml-CPOMXZOK.js +0 -0
- /package/{bin → dist/bin}/yaml-WGJNEJ7V.cjs +0 -0
- /package/dist/{chunk-3MA2SHAT.js → src/chunk-3MA2SHAT.js} +0 -0
- /package/dist/{chunk-3V3F7TB7.cjs → src/chunk-3V3F7TB7.cjs} +0 -0
- /package/dist/{chunk-D7HN6Y5M.js → src/chunk-D7HN6Y5M.js} +0 -0
- /package/dist/{chunk-EQZ3BKYL.cjs → src/chunk-EQZ3BKYL.cjs} +0 -0
- /package/dist/{chunk-FX5G24P6.cjs → src/chunk-FX5G24P6.cjs} +0 -0
- /package/dist/{chunk-JVIJRTGD.js → src/chunk-JVIJRTGD.js} +0 -0
- /package/dist/{commit → src/commit}/config.cjs +0 -0
- /package/dist/{commit → src/commit}/config.d.cts +0 -0
- /package/dist/{commit → src/commit}/config.d.ts +0 -0
- /package/dist/{commit → src/commit}/config.js +0 -0
- /package/dist/{commitlint → src/commitlint}/config.cjs +0 -0
- /package/dist/{commitlint → src/commitlint}/config.d.cts +0 -0
- /package/dist/{commitlint → src/commitlint}/config.d.ts +0 -0
- /package/dist/{commitlint → src/commitlint}/config.js +0 -0
- /package/dist/{index.cjs → src/index.cjs} +0 -0
- /package/dist/{index.d.cts → src/index.d.cts} +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{release → src/release}/config.cjs +0 -0
- /package/dist/{release → src/release}/config.d.cts +0 -0
- /package/dist/{release → src/release}/config.d.ts +0 -0
- /package/dist/{release → src/release}/config.js +0 -0
- /package/dist/{types.cjs → src/types.cjs} +0 -0
- /package/dist/{types.d.cts → src/types.d.cts} +0 -0
- /package/dist/{types.d.ts → src/types.d.ts} +0 -0
- /package/dist/{types.js → src/types.js} +0 -0
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/git.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
exitWithSuccess,
|
|
6
|
+
getConfig,
|
|
7
|
+
handleProcess,
|
|
8
|
+
writeSuccess
|
|
9
|
+
} from "@storm-software/config-tools";
|
|
10
|
+
import { createProgram } from "../src/cli";
|
|
11
|
+
|
|
12
|
+
void (async () => {
|
|
13
|
+
const config = await getConfig();
|
|
14
|
+
try {
|
|
15
|
+
handleProcess(config);
|
|
16
|
+
|
|
17
|
+
const program = createProgram(config);
|
|
18
|
+
await program.parseAsync(process.argv);
|
|
19
|
+
|
|
20
|
+
writeSuccess(
|
|
21
|
+
`🎉 Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`,
|
|
22
|
+
config
|
|
23
|
+
);
|
|
24
|
+
exitWithSuccess(config);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
exitWithError(config);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
exitWithSuccess,
|
|
6
|
+
getConfig,
|
|
7
|
+
handleProcess,
|
|
8
|
+
run,
|
|
9
|
+
writeError,
|
|
10
|
+
writeFatal,
|
|
11
|
+
writeInfo,
|
|
12
|
+
} from "@storm-software/config-tools";
|
|
13
|
+
import { checkPackageVersion } from "../src/utilities/check-package-version";
|
|
14
|
+
|
|
15
|
+
void (async () => {
|
|
16
|
+
const config = await getConfig();
|
|
17
|
+
try {
|
|
18
|
+
handleProcess(config);
|
|
19
|
+
|
|
20
|
+
writeInfo("Running post-checkout hook...", config);
|
|
21
|
+
checkPackageVersion(process.argv?.slice(1));
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
run(config, "git-lfs version");
|
|
25
|
+
} catch (error) {
|
|
26
|
+
writeError(
|
|
27
|
+
`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: ${
|
|
28
|
+
(error as Error)?.message
|
|
29
|
+
}`,
|
|
30
|
+
config,
|
|
31
|
+
);
|
|
32
|
+
exitWithError(config);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
run(config, "git lfs post-checkout");
|
|
36
|
+
|
|
37
|
+
exitWithSuccess(config);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
writeFatal(
|
|
40
|
+
`A fatal error occurred while running the program: ${error.message}`,
|
|
41
|
+
config,
|
|
42
|
+
);
|
|
43
|
+
exitWithError(config);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
})();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
exitWithSuccess,
|
|
6
|
+
getConfig,
|
|
7
|
+
handleProcess,
|
|
8
|
+
run,
|
|
9
|
+
writeError,
|
|
10
|
+
writeFatal,
|
|
11
|
+
writeInfo,
|
|
12
|
+
} from "@storm-software/config-tools";
|
|
13
|
+
import { checkPackageVersion } from "../src/utilities/check-package-version";
|
|
14
|
+
|
|
15
|
+
void (async () => {
|
|
16
|
+
const config = await getConfig();
|
|
17
|
+
try {
|
|
18
|
+
handleProcess(config);
|
|
19
|
+
|
|
20
|
+
writeInfo("Running post-commit hook...", config);
|
|
21
|
+
checkPackageVersion(process.argv?.slice(1));
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
run(config, "git-lfs version");
|
|
25
|
+
} catch (error) {
|
|
26
|
+
writeError(
|
|
27
|
+
`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: ${
|
|
28
|
+
(error as Error)?.message
|
|
29
|
+
}`,
|
|
30
|
+
config,
|
|
31
|
+
);
|
|
32
|
+
exitWithError(config);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
run(config, "git lfs post-commit");
|
|
36
|
+
|
|
37
|
+
exitWithSuccess(config);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
writeFatal(
|
|
40
|
+
`A fatal error occurred while running the program: ${error.message}`,
|
|
41
|
+
config,
|
|
42
|
+
);
|
|
43
|
+
exitWithError(config);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
})();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
exitWithSuccess,
|
|
6
|
+
getConfig,
|
|
7
|
+
handleProcess,
|
|
8
|
+
run,
|
|
9
|
+
writeError,
|
|
10
|
+
writeFatal,
|
|
11
|
+
writeInfo,
|
|
12
|
+
} from "@storm-software/config-tools";
|
|
13
|
+
import { checkPackageVersion } from "../src/utilities/check-package-version";
|
|
14
|
+
|
|
15
|
+
void (async () => {
|
|
16
|
+
const config = await getConfig();
|
|
17
|
+
try {
|
|
18
|
+
handleProcess(config);
|
|
19
|
+
|
|
20
|
+
writeInfo("Running post-merge hook...", config);
|
|
21
|
+
checkPackageVersion(process.argv?.slice(1));
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
run(config, "git-lfs version");
|
|
25
|
+
} catch (error) {
|
|
26
|
+
writeError(
|
|
27
|
+
`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: ${
|
|
28
|
+
(error as Error)?.message
|
|
29
|
+
}`,
|
|
30
|
+
config,
|
|
31
|
+
);
|
|
32
|
+
exitWithError(config);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
run(config, "git lfs post-merge");
|
|
36
|
+
|
|
37
|
+
exitWithSuccess(config);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
writeFatal(
|
|
40
|
+
`A fatal error occurred while running the program: ${error.message}`,
|
|
41
|
+
config,
|
|
42
|
+
);
|
|
43
|
+
exitWithError(config);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
})();
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
exitWithSuccess,
|
|
6
|
+
getConfig,
|
|
7
|
+
handleProcess,
|
|
8
|
+
writeError,
|
|
9
|
+
writeFatal,
|
|
10
|
+
writeInfo,
|
|
11
|
+
} from "@storm-software/config-tools";
|
|
12
|
+
import {
|
|
13
|
+
checkPackageVersion,
|
|
14
|
+
isPackageVersionChanged,
|
|
15
|
+
} from "../src/utilities/check-package-version";
|
|
16
|
+
|
|
17
|
+
void (async () => {
|
|
18
|
+
const config = await getConfig();
|
|
19
|
+
try {
|
|
20
|
+
handleProcess(config);
|
|
21
|
+
|
|
22
|
+
writeInfo("Running pre-commit hook...", config);
|
|
23
|
+
|
|
24
|
+
checkPackageVersion(process.argv.slice(1));
|
|
25
|
+
if (isPackageVersionChanged(process.argv?.slice(1))) {
|
|
26
|
+
writeError(
|
|
27
|
+
"Please regenerate the package lock file before committing...",
|
|
28
|
+
config,
|
|
29
|
+
);
|
|
30
|
+
exitWithError(config);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
exitWithSuccess(config);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
writeFatal(
|
|
36
|
+
`A fatal error occurred while running the program: ${error.message}`,
|
|
37
|
+
config,
|
|
38
|
+
);
|
|
39
|
+
exitWithError(config);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
})();
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
exitWithSuccess,
|
|
6
|
+
getConfig,
|
|
7
|
+
handleProcess,
|
|
8
|
+
run,
|
|
9
|
+
writeFatal,
|
|
10
|
+
writeInfo,
|
|
11
|
+
} from "@storm-software/config-tools";
|
|
12
|
+
|
|
13
|
+
void (async () => {
|
|
14
|
+
const config = await getConfig();
|
|
15
|
+
try {
|
|
16
|
+
handleProcess(config);
|
|
17
|
+
|
|
18
|
+
writeInfo("Running pre-install hook...", config);
|
|
19
|
+
|
|
20
|
+
if (Boolean(process.env.CI) || Boolean(process.env.STORM_CI)) {
|
|
21
|
+
writeInfo("Skipping pre-install for CI process...", config);
|
|
22
|
+
exitWithSuccess(config);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
run(config, "npx -y only-allow pnpm");
|
|
26
|
+
|
|
27
|
+
exitWithSuccess(config);
|
|
28
|
+
} catch (error) {
|
|
29
|
+
writeFatal(
|
|
30
|
+
`A fatal error occurred while running the program: ${error.message}`,
|
|
31
|
+
config,
|
|
32
|
+
);
|
|
33
|
+
exitWithError(config);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
})();
|
package/bin/pre-push.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
exitWithSuccess,
|
|
6
|
+
getConfig,
|
|
7
|
+
handleProcess,
|
|
8
|
+
run,
|
|
9
|
+
writeError,
|
|
10
|
+
writeFatal,
|
|
11
|
+
writeInfo,
|
|
12
|
+
writeSuccess,
|
|
13
|
+
} from "@storm-software/config-tools";
|
|
14
|
+
import fs from "node:fs";
|
|
15
|
+
import { readFile } from "node:fs/promises";
|
|
16
|
+
import path from "node:path";
|
|
17
|
+
import { checkPackageVersion } from "../src/utilities/check-package-version";
|
|
18
|
+
|
|
19
|
+
void (async () => {
|
|
20
|
+
const config = await getConfig();
|
|
21
|
+
try {
|
|
22
|
+
handleProcess(config);
|
|
23
|
+
|
|
24
|
+
writeInfo("Running pre-push hook...", config);
|
|
25
|
+
checkPackageVersion(process.argv?.slice(1));
|
|
26
|
+
|
|
27
|
+
writeInfo("🔒🔒🔒 Validating lock files 🔒🔒🔒\n", config);
|
|
28
|
+
|
|
29
|
+
const errors = [] as string[];
|
|
30
|
+
|
|
31
|
+
if (
|
|
32
|
+
fs.existsSync(
|
|
33
|
+
path.join(config.workspaceRoot ?? "./", "package-lock.json"),
|
|
34
|
+
)
|
|
35
|
+
) {
|
|
36
|
+
errors.push(
|
|
37
|
+
'Invalid occurrence of "package-lock.json" file. Please remove it and use only "pnpm-lock.yaml"',
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
if (fs.existsSync(path.join(config.workspaceRoot ?? "./", "yarn.lock"))) {
|
|
41
|
+
errors.push(
|
|
42
|
+
'Invalid occurrence of "yarn.lock" file. Please remove it and use only "pnpm-lock.yaml"',
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const content = await readFile(
|
|
48
|
+
path.join(config.workspaceRoot ?? "./", "pnpm-lock.yaml"),
|
|
49
|
+
{
|
|
50
|
+
encoding: "utf8",
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
if (content.match(/localhost:487/)) {
|
|
54
|
+
errors.push(
|
|
55
|
+
'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"',
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
if (content.match(/resolution: \{tarball/)) {
|
|
59
|
+
errors.push(
|
|
60
|
+
'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only',
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
} catch {
|
|
64
|
+
errors.push('The "pnpm-lock.yaml" does not exist or cannot be read');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (errors.length > 0) {
|
|
68
|
+
writeError("❌ Lock file validation failed", config);
|
|
69
|
+
for (const error of errors) {
|
|
70
|
+
console.error(error);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
exitWithError(config);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
writeSuccess("Lock file is valid ✅", config);
|
|
77
|
+
run(config, "git lfs pre-push origin");
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
run(config, "git-lfs version");
|
|
81
|
+
} catch (error) {
|
|
82
|
+
writeError(
|
|
83
|
+
`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: ${
|
|
84
|
+
(error as Error)?.message
|
|
85
|
+
}`,
|
|
86
|
+
config,
|
|
87
|
+
);
|
|
88
|
+
exitWithError(config);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
run(config, "git lfs pre-push origin");
|
|
92
|
+
|
|
93
|
+
exitWithSuccess(config);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
writeFatal(
|
|
96
|
+
`A fatal error occurred while running the program: ${error.message}`,
|
|
97
|
+
config,
|
|
98
|
+
);
|
|
99
|
+
exitWithError(config);
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
})();
|
package/bin/prepare.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
exitWithSuccess,
|
|
6
|
+
getConfig,
|
|
7
|
+
handleProcess,
|
|
8
|
+
run,
|
|
9
|
+
writeFatal,
|
|
10
|
+
writeInfo,
|
|
11
|
+
} from "@storm-software/config-tools";
|
|
12
|
+
|
|
13
|
+
void (async () => {
|
|
14
|
+
const config = await getConfig();
|
|
15
|
+
try {
|
|
16
|
+
handleProcess(config);
|
|
17
|
+
|
|
18
|
+
writeInfo("Running prepare hook...", config);
|
|
19
|
+
|
|
20
|
+
if (!process.env.CI && !process.env.STORM_CI) {
|
|
21
|
+
run(config, "lefthook install");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exitWithSuccess(config);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
writeFatal(
|
|
27
|
+
`A fatal error occurred while running the program: ${error.message}`,
|
|
28
|
+
config,
|
|
29
|
+
);
|
|
30
|
+
exitWithError(config);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
})();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
exitWithError,
|
|
5
|
+
getConfig,
|
|
6
|
+
handleProcess,
|
|
7
|
+
writeFatal,
|
|
8
|
+
} from "@storm-software/config-tools";
|
|
9
|
+
import { checkPackageVersion } from "../src/utilities/check-package-version";
|
|
10
|
+
|
|
11
|
+
void (async () => {
|
|
12
|
+
const config = await getConfig();
|
|
13
|
+
try {
|
|
14
|
+
handleProcess(config);
|
|
15
|
+
|
|
16
|
+
checkPackageVersion(process.argv.slice(1));
|
|
17
|
+
} catch (error) {
|
|
18
|
+
writeFatal(
|
|
19
|
+
`A fatal error occurred while running the program: ${error.message}`,
|
|
20
|
+
config,
|
|
21
|
+
);
|
|
22
|
+
exitWithError(config);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
})();
|
package/{bin → dist/bin}/git.cjs
RENAMED
|
File without changes
|
package/{bin → dist/bin}/git.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|