@fzed51/git-tool 0.2.0 → 0.3.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.
- package/CHANGELOG.md +10 -0
- package/dist/git-commit.js +13 -1
- package/dist/git-commit.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.0] - 2026-02-11
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Display of staged files before commit message generation
|
|
12
|
+
- Visual feedback showing which files will be committed with colored output
|
|
13
|
+
- Warning when no files are staged, preventing empty commits
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Updated dev script to use tsx for direct execution without build step
|
|
17
|
+
|
|
8
18
|
## [0.2.0] - 2026-02-11
|
|
9
19
|
|
|
10
20
|
### Added
|
package/dist/git-commit.js
CHANGED
|
@@ -17,6 +17,19 @@ async function main() {
|
|
|
17
17
|
"▙▌▌▐▖ ▙▖▙▌▌▌▌▌▌▌▌▐▖",
|
|
18
18
|
"▄▌",
|
|
19
19
|
].join("\n")));
|
|
20
|
+
// Afficher les fichiers dans le stage
|
|
21
|
+
const git = new GitWrapper();
|
|
22
|
+
const stagedFiles = await git.getStagedFiles();
|
|
23
|
+
if (stagedFiles.length === 0) {
|
|
24
|
+
console.log(chalk.yellow("\n⚠️ Aucun fichier dans le stage!"));
|
|
25
|
+
console.log("💡 Utilisez 'git add <fichiers>' pour ajouter des fichiers.\n");
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
console.log(chalk.blue.bold("\n📋 Fichiers dans le stage:"));
|
|
29
|
+
for (const file of stagedFiles) {
|
|
30
|
+
console.log(chalk.cyan(` • ${file}`));
|
|
31
|
+
}
|
|
32
|
+
console.log();
|
|
20
33
|
console.log("🤖 Génération du message de commit...\n");
|
|
21
34
|
const message = await generateCommitMessage();
|
|
22
35
|
console.log("✅ Message de commit généré:\n");
|
|
@@ -29,7 +42,6 @@ async function main() {
|
|
|
29
42
|
rl.close();
|
|
30
43
|
if (answer.toLowerCase() === "o" || answer.toLowerCase() === "y") {
|
|
31
44
|
console.log("\n⏳ Exécution du commit...");
|
|
32
|
-
const git = new GitWrapper();
|
|
33
45
|
await git.commit(message);
|
|
34
46
|
console.log("✅ Commit effectué avec succès !");
|
|
35
47
|
}
|
package/dist/git-commit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-commit.js","sourceRoot":"","sources":["../src/git-commit.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,KAAK,CAAC,IAAI,CACd;YACE,qBAAqB;YACrB,sBAAsB;YACtB,sBAAsB;YACtB,IAAI;SACL,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CACF,CAAC;
|
|
1
|
+
{"version":3,"file":"git-commit.js","sourceRoot":"","sources":["../src/git-commit.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO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version": "0.3.0",
|
|
4
4
|
"description": "A command-line tool for Git operations with AI-powered commit message generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/lib/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build": "tsc",
|
|
28
28
|
"postbuild": "chmod +x dist/git-commit.js",
|
|
29
29
|
"prepublishOnly": "npm run build",
|
|
30
|
-
"dev": "
|
|
30
|
+
"dev": "tsx src/git-commit.ts",
|
|
31
31
|
"lint": "biome check .",
|
|
32
32
|
"lint:fix": "biome check --write ."
|
|
33
33
|
},
|