git-tm 0.3.0 → 0.4.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/LICENSE +1 -1
- package/README.md +4 -0
- package/package.json +5 -6
- package/src/cli.js +9 -8
package/LICENSE
CHANGED
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-tm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "An elegant visual Git history explorer with real-time commit comparison capabilities",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
"ora": "^7.0.1",
|
|
23
23
|
"simple-git": "^3.22.0"
|
|
24
24
|
},
|
|
25
|
-
"devDependencies": {},
|
|
26
25
|
"repository": {
|
|
27
26
|
"type": "git",
|
|
28
|
-
"url": "git+https://
|
|
27
|
+
"url": "git+https://gitlab.com/nandhu-44/Git-Time-Machine.git"
|
|
29
28
|
},
|
|
30
29
|
"keywords": [
|
|
31
30
|
"git-tm",
|
|
@@ -35,12 +34,12 @@
|
|
|
35
34
|
"commits",
|
|
36
35
|
"commit-history",
|
|
37
36
|
"source-control",
|
|
38
|
-
"
|
|
37
|
+
"gitlab"
|
|
39
38
|
],
|
|
40
39
|
"author": "nandhu-44",
|
|
41
40
|
"license": "MIT",
|
|
42
41
|
"bugs": {
|
|
43
|
-
"url": "https://
|
|
42
|
+
"url": "https://gitlab.com/nandhu-44/Git-Time-Machine/issues"
|
|
44
43
|
},
|
|
45
|
-
"homepage": "https://
|
|
44
|
+
"homepage": "https://gitlab.com/nandhu-44/Git-Time-Machine#readme"
|
|
46
45
|
}
|
package/src/cli.js
CHANGED
|
@@ -62,10 +62,8 @@ function createSpinner(text) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
async function showErrorAndHelp(errorMessage, exitCode = 1) {
|
|
65
|
-
await displayBanner();
|
|
66
65
|
console.log(chalk.yellow(`⚠️ Error: ${errorMessage}\n`));
|
|
67
66
|
console.log(await getHelpText() + "\n");
|
|
68
|
-
console.log(chalk.red("Exiting...\n"));
|
|
69
67
|
process.exit(exitCode);
|
|
70
68
|
}
|
|
71
69
|
|
|
@@ -86,7 +84,7 @@ async function validateGitRepo(repoPath) {
|
|
|
86
84
|
if (!fs.existsSync(gitPath)) {
|
|
87
85
|
spinner.fail(chalk.red("Repository validation failed"));
|
|
88
86
|
await showErrorAndHelp(
|
|
89
|
-
`Not a git repository: ${chalk.
|
|
87
|
+
`Not a git repository: ${chalk.white(
|
|
90
88
|
fullPath
|
|
91
89
|
)}\nMake sure the directory contains a .git folder`
|
|
92
90
|
);
|
|
@@ -98,7 +96,10 @@ async function validateGitRepo(repoPath) {
|
|
|
98
96
|
|
|
99
97
|
async function getHelpText() {
|
|
100
98
|
return [
|
|
101
|
-
|
|
99
|
+
"",
|
|
100
|
+
chalk.bold("Git Time Machine"),
|
|
101
|
+
chalk.dim("Interactive Git repository visualization tool"),
|
|
102
|
+
"",
|
|
102
103
|
chalk.bold("Usage:"),
|
|
103
104
|
` $ ${chalk.hex(GIT_ORANGE)("git-tm")} ${chalk.cyan(
|
|
104
105
|
"<repository-path>"
|
|
@@ -111,9 +112,9 @@ async function getHelpText() {
|
|
|
111
112
|
` $ ${chalk.hex(GIT_ORANGE)("git-tm")} ./my-project ${chalk.dim(
|
|
112
113
|
"Start with specific repository"
|
|
113
114
|
)}`,
|
|
114
|
-
` $ ${chalk.hex(GIT_ORANGE)("git-tm")} ${chalk.cyan(
|
|
115
|
-
"
|
|
116
|
-
)}`,
|
|
115
|
+
` $ ${chalk.hex(GIT_ORANGE)("git-tm")} ${chalk.cyan(
|
|
116
|
+
"-p"
|
|
117
|
+
)} 8000 ./repo ${chalk.dim("Start with custom port")}`,
|
|
117
118
|
"",
|
|
118
119
|
chalk.bold("Options:"),
|
|
119
120
|
` ${chalk.cyan("-p, --port")} <number> ${chalk.dim(
|
|
@@ -127,7 +128,7 @@ async function getHelpText() {
|
|
|
127
128
|
)}`,
|
|
128
129
|
"",
|
|
129
130
|
chalk.bold("More Info:"),
|
|
130
|
-
` ${chalk.
|
|
131
|
+
` ${chalk.yellow("https://gitlab.com/nandhu-44/Git-Time-Machine")}`,
|
|
131
132
|
].join("\n");
|
|
132
133
|
}
|
|
133
134
|
|