git-history-ui 1.0.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 (64) hide show
  1. package/.eslintrc.js +21 -0
  2. package/README.md +304 -0
  3. package/demo.js +45 -0
  4. package/dist/__tests__/gitService.test.d.ts +2 -0
  5. package/dist/__tests__/gitService.test.d.ts.map +1 -0
  6. package/dist/__tests__/gitService.test.js +32 -0
  7. package/dist/__tests__/gitService.test.js.map +1 -0
  8. package/dist/backend/dev-server.d.ts +2 -0
  9. package/dist/backend/dev-server.d.ts.map +1 -0
  10. package/dist/backend/dev-server.js +16 -0
  11. package/dist/backend/dev-server.js.map +1 -0
  12. package/dist/backend/gitService.d.ts +45 -0
  13. package/dist/backend/gitService.d.ts.map +1 -0
  14. package/dist/backend/gitService.js +239 -0
  15. package/dist/backend/gitService.js.map +1 -0
  16. package/dist/backend/server.d.ts +9 -0
  17. package/dist/backend/server.d.ts.map +1 -0
  18. package/dist/backend/server.js +118 -0
  19. package/dist/backend/server.js.map +1 -0
  20. package/dist/cli.d.ts +3 -0
  21. package/dist/cli.d.ts.map +1 -0
  22. package/dist/cli.js +49 -0
  23. package/dist/cli.js.map +1 -0
  24. package/frontend/.editorconfig +17 -0
  25. package/frontend/.vscode/extensions.json +4 -0
  26. package/frontend/.vscode/launch.json +20 -0
  27. package/frontend/.vscode/tasks.json +42 -0
  28. package/frontend/README.md +59 -0
  29. package/frontend/angular.json +99 -0
  30. package/frontend/package-lock.json +10566 -0
  31. package/frontend/package.json +55 -0
  32. package/frontend/proxy.conf.json +7 -0
  33. package/frontend/public/favicon.ico +0 -0
  34. package/frontend/src/app/app.component.ts +598 -0
  35. package/frontend/src/app/app.config.ts +12 -0
  36. package/frontend/src/app/app.css +0 -0
  37. package/frontend/src/app/app.html +342 -0
  38. package/frontend/src/app/app.routes.ts +3 -0
  39. package/frontend/src/app/app.spec.ts +23 -0
  40. package/frontend/src/app/app.ts +12 -0
  41. package/frontend/src/app/components/color-palette-selector/color-palette-selector.component.ts +137 -0
  42. package/frontend/src/app/components/commit-detail/commit-detail.component.ts +327 -0
  43. package/frontend/src/app/components/commit-graph/commit-graph.component.ts +294 -0
  44. package/frontend/src/app/components/commit-list/commit-list.component.ts +199 -0
  45. package/frontend/src/app/components/diff-viewer/diff-viewer.component.ts +311 -0
  46. package/frontend/src/app/models/color-palette.models.ts +229 -0
  47. package/frontend/src/app/models/git.models.ts +39 -0
  48. package/frontend/src/app/services/git.service.ts +43 -0
  49. package/frontend/src/index.html +13 -0
  50. package/frontend/src/main.ts +6 -0
  51. package/frontend/src/styles.css +397 -0
  52. package/frontend/tsconfig.app.json +15 -0
  53. package/frontend/tsconfig.json +34 -0
  54. package/frontend/tsconfig.spec.json +14 -0
  55. package/jest.config.js +13 -0
  56. package/package.json +70 -0
  57. package/public/app.js +403 -0
  58. package/public/index.html +172 -0
  59. package/src/__tests__/gitService.test.ts +35 -0
  60. package/src/backend/dev-server.ts +14 -0
  61. package/src/backend/gitService.ts +277 -0
  62. package/src/backend/server.ts +132 -0
  63. package/src/cli.ts +56 -0
  64. package/tsconfig.json +25 -0
package/.eslintrc.js ADDED
@@ -0,0 +1,21 @@
1
+ module.exports = {
2
+ parser: '@typescript-eslint/parser',
3
+ extends: [
4
+ 'eslint:recommended',
5
+ '@typescript-eslint/recommended',
6
+ ],
7
+ parserOptions: {
8
+ ecmaVersion: 2020,
9
+ sourceType: 'module',
10
+ },
11
+ env: {
12
+ node: true,
13
+ es6: true,
14
+ },
15
+ rules: {
16
+ '@typescript-eslint/no-unused-vars': 'error',
17
+ '@typescript-eslint/explicit-function-return-type': 'off',
18
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
19
+ '@typescript-eslint/no-explicit-any': 'warn',
20
+ },
21
+ };
package/README.md ADDED
@@ -0,0 +1,304 @@
1
+ # Git History UI
2
+
3
+ [![npm version](https://badge.fury.io/js/git-history-ui.svg)](https://badge.fury.io/js/git-history-ui)
4
+ [![npm downloads](https://img.shields.io/npm/dm/git-history-ui.svg)](https://www.npmjs.com/package/git-history-ui)
5
+ [![npm license](https://img.shields.io/npm/l/git-history-ui.svg)](https://www.npmjs.com/package/git-history-ui)
6
+ [![Node.js version](https://img.shields.io/node/v/git-history-ui.svg)](https://www.npmjs.com/package/git-history-ui)
7
+ [![GitHub stars](https://img.shields.io/github/stars/ankit-sharma/git-history-ui.svg)](https://github.com/ankit-sharma/git-history-ui)
8
+ [![GitHub issues](https://img.shields.io/github/issues/ankit-sharma/git-history-ui.svg)](https://github.com/ankit-sharma/git-history-ui/issues)
9
+
10
+ A beautiful, modern web UI for visualizing git history with interactive commit graphs, search, filtering, and diff visualization. Built with Angular and Node.js.
11
+
12
+ **Author:** Ankit Sharma (ankit.sharma199803@gmail.com)
13
+
14
+ ## šŸ“‹ Requirements
15
+
16
+ - **Node.js**: 18.0.0 or higher
17
+ - **Angular**: 20.2.1
18
+ - **Git**: Any version (must be in a git repository)
19
+
20
+ ## ✨ Features
21
+
22
+ - **šŸŽØ Interactive Commit Graph** - Beautiful D3.js-powered visualizations with branch tracking and merge detection
23
+ - **šŸ” Advanced Search & Filtering** - Search by author, date range, commit message, or specific files
24
+ - **šŸ“Š Dual View Modes** - Switch between graph view and list view
25
+ - **šŸŽØ Color Palette System** - Choose from 6 light and 6 dark themes
26
+ - **šŸŒ™ Dark/Light Mode** - Toggle between themes with persistent preferences
27
+ - **šŸ“± Responsive Design** - Works on desktop and mobile devices
28
+ - **⚔ Real-time Search** - Live filtering and search results
29
+ - **šŸ”§ Modern Tech Stack** - Angular 20 frontend with Node.js backend
30
+
31
+ ## šŸš€ Quick Start (1 Step!)
32
+
33
+ ### Prerequisites
34
+ - **Node.js 18.0.0+** - [Download here](https://nodejs.org/)
35
+ - **Git repository** - Must be in a git repository
36
+
37
+ ### Step 1: Run the Application
38
+ ```bash
39
+ # Run directly with npx (no installation needed)
40
+ npx git-history-ui
41
+ ```
42
+
43
+ That's it! šŸŽ‰ The application will automatically:
44
+ - Start the backend server on port 3000
45
+ - Start the frontend server on port 4200
46
+ - Open your browser to `http://localhost:4200`
47
+
48
+ ## šŸ“– Usage Examples
49
+
50
+ ### Basic Usage
51
+ ```bash
52
+ # Run directly with npx (no installation needed)
53
+ npx git-history-ui
54
+ ```
55
+
56
+ ### CLI Options
57
+ ```bash
58
+ # Custom port
59
+ npx git-history-ui --port 8080
60
+
61
+ # Filter by specific file
62
+ npx git-history-ui --file src/app.js
63
+
64
+ # Filter by author
65
+ npx git-history-ui --author "your-name"
66
+
67
+ # Filter by date range
68
+ npx git-history-ui --since 2024-01-01
69
+
70
+ # Don't auto-open browser
71
+ npx git-history-ui --no-open
72
+
73
+ # Show help
74
+ npx git-history-ui --help
75
+ ```
76
+
77
+ ### Advanced Usage
78
+ ```bash
79
+ # Use in specific directory
80
+ cd /path/to/your/repo
81
+ npx git-history-ui
82
+
83
+ # Use with environment variables
84
+ PORT=8080 npx git-history-ui
85
+
86
+ # Use with different host
87
+ HOST=0.0.0.0 npx git-history-ui
88
+ ```
89
+
90
+ ## šŸŽÆ Key Features Explained
91
+
92
+ ### šŸ“Š Graph View
93
+ - **Interactive Commit Graph**: Click any commit node to view details
94
+ - **Branch Visualization**: Different colors for different branches
95
+ - **Merge Detection**: Purple nodes indicate merge commits
96
+ - **Force-Directed Layout**: Automatic positioning for optimal viewing
97
+
98
+ ### šŸ“‹ List View
99
+ - **Organized Commit List**: Clean, readable commit information
100
+ - **File Change Summary**: See how many files were changed
101
+ - **Author & Date Info**: Quick access to commit metadata
102
+ - **Search Integration**: Real-time filtering as you type
103
+
104
+ ### šŸ” Search & Filtering
105
+ - **Real-time Search**: Search across commit messages, authors, and hashes
106
+ - **Date Range Filter**: Use the date picker to filter by specific dates
107
+ - **Author Filter**: Dropdown to filter by specific authors
108
+ - **File Filter**: Search for commits that touched specific files
109
+
110
+ ### šŸŽØ Theme System
111
+ - **6 Light Themes**: Default, Ocean, Forest, Sunset, Monochrome, Neon
112
+ - **6 Dark Themes**: Matching dark versions of all themes
113
+ - **Persistent Preferences**: Your theme choice is saved automatically
114
+ - **Dark Mode Toggle**: Quick switch between light and dark modes
115
+
116
+ ## šŸ› ļø Development Setup
117
+
118
+ ### Prerequisites
119
+ - **Node.js 18.0.0+** - [Download here](https://nodejs.org/)
120
+ - **Git repository** - Must be in a git repository
121
+
122
+ ### Project Structure
123
+ ```
124
+ git-history-ui/
125
+ ā”œā”€ā”€ frontend/ # Angular 20 application
126
+ │ ā”œā”€ā”€ src/app/
127
+ │ │ ā”œā”€ā”€ components/ # UI components
128
+ │ │ │ ā”œā”€ā”€ commit-graph/ # D3.js graph visualization
129
+ │ │ │ ā”œā”€ā”€ commit-list/ # List view component
130
+ │ │ │ ā”œā”€ā”€ commit-detail/ # Commit details modal
131
+ │ │ │ └── color-palette-selector/ # Theme selector
132
+ │ │ ā”œā”€ā”€ services/ # Angular services
133
+ │ │ └── models/ # TypeScript interfaces
134
+ │ └── angular.json # Angular configuration
135
+ ā”œā”€ā”€ src/backend/ # Node.js backend
136
+ │ ā”œā”€ā”€ server.ts # Express server
137
+ │ └── gitService.ts # Git operations
138
+ ā”œā”€ā”€ package.json # Dependencies and scripts
139
+ └── README.md # This file
140
+ ```
141
+
142
+ ## šŸŽÆ Use Cases & Examples
143
+
144
+ ### Code Review Workflow
145
+ ```bash
146
+ # 1. Start the application
147
+ npx git-history-ui
148
+
149
+ # 2. Open http://localhost:4200
150
+
151
+ # 3. Use the search bar to find specific commits
152
+ # Example: Search for "bug fix" or "feature"
153
+
154
+ # 4. Filter by date to review recent changes
155
+ # Use the date picker to select "Last week"
156
+
157
+ # 5. Switch to graph view to see branch structure
158
+ # Click "Graph View" button
159
+
160
+ # 6. Click any commit to see detailed changes
161
+ # View file diffs and commit information
162
+ ```
163
+
164
+ ### Release Planning
165
+ ```bash
166
+ # 1. Filter commits since last release
167
+ # Use date picker to select release date
168
+
169
+ # 2. Review all changes in list view
170
+ # See commit messages and file changes
171
+
172
+ # 3. Switch to graph view for branch overview
173
+ # Identify feature branches and merges
174
+
175
+ # 4. Copy commit information for release notes
176
+ # Manually copy relevant commit details
177
+ ```
178
+
179
+ ### Bug Investigation
180
+ ```bash
181
+ # 1. Search for specific file changes
182
+ # Use file filter: "src/app.js"
183
+
184
+ # 2. Filter by author if you know who made changes
185
+ # Select author from dropdown
186
+
187
+ # 3. Use date range to narrow down timeframe
188
+ # Select date range around when bug appeared
189
+
190
+ # 4. Review commit details and diffs
191
+ # Click commits to see exact changes made
192
+ ```
193
+
194
+ ## šŸ”§ Configuration & Customization
195
+
196
+ ### Environment Variables
197
+ ```bash
198
+ # Custom port for backend (default: 3000)
199
+ PORT=8080 npm run dev
200
+
201
+ # Custom host (default: localhost)
202
+ HOST=0.0.0.0 npm run dev
203
+ ```
204
+
205
+ ### Theme Customization
206
+ - **Light Themes**: Default, Ocean, Forest, Sunset, Monochrome, Neon
207
+ - **Dark Themes**: Matching dark versions of all themes
208
+ - **Auto-save**: Your theme preference is automatically saved
209
+ - **System Integration**: Respects system dark mode preference
210
+
211
+ ### Browser Compatibility
212
+ - **Chrome/Edge**: Full support with all features
213
+ - **Firefox**: Full support with all features
214
+ - **Safari**: Full support with all features
215
+ - **Mobile**: Basic responsive design support
216
+
217
+ ## šŸš€ Development Setup
218
+
219
+ ### For Contributors
220
+ ```bash
221
+ # Clone the repository
222
+ git clone https://github.com/ankit-sharma/git-history-ui.git
223
+ cd git-history-ui
224
+
225
+ # Install dependencies
226
+ npm install
227
+
228
+ # Start development servers
229
+ npm run dev
230
+
231
+ # Build for production
232
+ npm run build
233
+ ```
234
+
235
+ ### Docker Deployment (Planned)
236
+ ```bash
237
+ # Build Docker image
238
+ docker build -t git-history-ui .
239
+
240
+ # Run container
241
+ docker run -p 3000:3000 git-history-ui
242
+ ```
243
+
244
+ ## šŸ¤ Contributing
245
+
246
+ We welcome contributions! Here's how to get started:
247
+
248
+ ### Development Setup
249
+ ```bash
250
+ # 1. Fork and clone the repository
251
+ git clone https://github.com/ankit-sharma/git-history-ui.git
252
+ cd git-history-ui
253
+
254
+ # 2. Install dependencies
255
+ npm install
256
+
257
+ # 3. Start development servers
258
+ npm run dev
259
+
260
+ # 4. Make your changes
261
+ # 5. Test your changes
262
+ # 6. Submit a pull request
263
+ ```
264
+
265
+ ### Areas for Contribution
266
+ - **UI/UX Improvements**: Better visualizations, animations, or user experience
267
+ - **New Features**: Additional filtering options, blame visualization UI, etc.
268
+ - **Performance**: Optimize graph rendering, search performance
269
+ - **Documentation**: Improve README, add code comments
270
+ - **Testing**: Add unit tests, integration tests
271
+
272
+ ## šŸ“„ License
273
+
274
+ MIT License - see [LICENSE](LICENSE) file for details
275
+
276
+ ## šŸ™ Acknowledgments
277
+
278
+ - **[D3.js](https://d3js.org/)** - Beautiful data visualizations
279
+ - **[Angular](https://angular.io/)** - Modern frontend framework
280
+ - **[simple-git](https://github.com/steveukx/git-js)** - Git operations
281
+ - **[Express](https://expressjs.com/)** - Backend server framework
282
+
283
+ ## šŸ› Issues & Support
284
+
285
+ - **šŸ› Bug Reports**: Please include steps to reproduce and browser information
286
+ - **šŸ’” Feature Requests**: Describe the use case and expected behavior
287
+ - **ā“ Questions**: Open a discussion for general questions
288
+
289
+ ## šŸ“Š Project Status
290
+
291
+ - āœ… **Core Features**: Complete
292
+ - āœ… **Dark Mode**: Complete
293
+ - āœ… **Theme System**: Complete
294
+ - āœ… **Search & Filtering**: Complete
295
+ - āœ… **Commit Graph Visualization**: Complete
296
+ - āœ… **Diff Viewer**: Complete
297
+ - 🚧 **Performance Optimization**: In Progress
298
+ - šŸ“‹ **Export Features**: Planned
299
+ - šŸ“‹ **Blame Visualization**: Backend ready, UI pending
300
+ - šŸ“‹ **npm Package**: Ready for publishing
301
+
302
+ ---
303
+
304
+ Made with ā¤ļø for developers who love beautiful git visualizations
package/demo.js ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Simple demo script to test the git-history-ui functionality
4
+ const { execSync } = require('child_process');
5
+ const path = require('path');
6
+
7
+ console.log('šŸš€ Git History UI Demo');
8
+ console.log('=====================');
9
+
10
+ // Check if we're in a git repository
11
+ try {
12
+ execSync('git status', { stdio: 'pipe' });
13
+ console.log('āœ… Git repository detected');
14
+ } catch (error) {
15
+ console.log('āŒ Not in a git repository');
16
+ console.log('Please run this script from a git repository');
17
+ process.exit(1);
18
+ }
19
+
20
+ // Test the CLI
21
+ console.log('\nšŸ“‹ Testing CLI...');
22
+ try {
23
+ const result = execSync('node dist/cli.js --help', { encoding: 'utf8' });
24
+ console.log('āœ… CLI help command works');
25
+ console.log(result);
26
+ } catch (error) {
27
+ console.log('āŒ CLI help command failed');
28
+ console.log(error.message);
29
+ }
30
+
31
+ // Test the server
32
+ console.log('\n🌐 Testing server...');
33
+ try {
34
+ const server = require('./dist/backend/server');
35
+ console.log('āœ… Server module loads successfully');
36
+ } catch (error) {
37
+ console.log('āŒ Server module failed to load');
38
+ console.log(error.message);
39
+ }
40
+
41
+ console.log('\nšŸŽ‰ Demo completed!');
42
+ console.log('\nTo start the server, run:');
43
+ console.log(' npm start');
44
+ console.log('\nOr use the CLI:');
45
+ console.log(' node dist/cli.js');
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gitService.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitService.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/gitService.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const gitService_1 = require("../backend/gitService");
4
+ describe('GitService', () => {
5
+ let gitService;
6
+ beforeEach(() => {
7
+ gitService = new gitService_1.GitService();
8
+ });
9
+ describe('getCommits', () => {
10
+ it('should return an array of commits', async () => {
11
+ const commits = await gitService.getCommits({ limit: 5 });
12
+ expect(Array.isArray(commits)).toBe(true);
13
+ });
14
+ it('should respect the limit parameter', async () => {
15
+ const commits = await gitService.getCommits({ limit: 3 });
16
+ expect(commits.length).toBeLessThanOrEqual(3);
17
+ });
18
+ });
19
+ describe('getTags', () => {
20
+ it('should return an array of tags', async () => {
21
+ const tags = await gitService.getTags();
22
+ expect(Array.isArray(tags)).toBe(true);
23
+ });
24
+ });
25
+ describe('getBranches', () => {
26
+ it('should return an array of branches', async () => {
27
+ const branches = await gitService.getBranches();
28
+ expect(Array.isArray(branches)).toBe(true);
29
+ });
30
+ });
31
+ });
32
+ //# sourceMappingURL=gitService.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitService.test.js","sourceRoot":"","sources":["../../src/__tests__/gitService.test.ts"],"names":[],"mappings":";;AAAA,sDAAmD;AAEnD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,IAAI,UAAsB,CAAC;IAE3B,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,GAAG,IAAI,uBAAU,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QAC1B,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;YACjD,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;YAC1D,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;YAClD,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;YAC1D,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACvB,EAAE,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;YAC9C,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QAC3B,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;YAClD,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,WAAW,EAAE,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dev-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/backend/dev-server.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const server_1 = require("./server");
4
+ async function main() {
5
+ try {
6
+ console.log('šŸš€ Starting Git History UI Development Server...');
7
+ await (0, server_1.startServer)(3000, 'localhost');
8
+ console.log('āœ… Development server running at http://localhost:3000');
9
+ }
10
+ catch (error) {
11
+ console.error('āŒ Error starting development server:', error);
12
+ process.exit(1);
13
+ }
14
+ }
15
+ main();
16
+ //# sourceMappingURL=dev-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-server.js","sourceRoot":"","sources":["../../src/backend/dev-server.ts"],"names":[],"mappings":";;AAAA,qCAAuC;AAEvC,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;QAChE,MAAM,IAAA,oBAAW,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;IACvE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ export interface Commit {
2
+ hash: string;
3
+ author: string;
4
+ date: string;
5
+ message: string;
6
+ files: string[];
7
+ parents: string[];
8
+ branches: string[];
9
+ tags: string[];
10
+ }
11
+ export interface DiffFile {
12
+ file: string;
13
+ additions: number;
14
+ deletions: number;
15
+ changes: string;
16
+ }
17
+ export interface BlameLine {
18
+ line: number;
19
+ hash: string;
20
+ author: string;
21
+ date: string;
22
+ content: string;
23
+ }
24
+ export interface GitOptions {
25
+ file?: string;
26
+ since?: string;
27
+ author?: string;
28
+ limit?: number;
29
+ }
30
+ export declare class GitService {
31
+ private git;
32
+ constructor();
33
+ getCommits(options?: GitOptions): Promise<Commit[]>;
34
+ getCommit(hash: string): Promise<Commit>;
35
+ getDiff(hash: string): Promise<DiffFile[]>;
36
+ getBlame(filePath: string): Promise<BlameLine[]>;
37
+ getTags(): Promise<string[]>;
38
+ getBranches(): Promise<string[]>;
39
+ private getFilesForCommit;
40
+ private getBranchesForCommit;
41
+ private getTagsForCommit;
42
+ private parseDiff;
43
+ private parseBlame;
44
+ }
45
+ //# sourceMappingURL=gitService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitService.d.ts","sourceRoot":"","sources":["../../src/backend/gitService.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAAY;;IAMjB,UAAU,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAsDvD,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAkCxC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAU1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAUhD,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAU5B,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YAUxB,iBAAiB;YASjB,oBAAoB;YASpB,gBAAgB;IAS9B,OAAO,CAAC,SAAS;IA2CjB,OAAO,CAAC,UAAU;CAmCnB"}