git-history-ui 1.0.5 → 2.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.
- package/CHANGELOG.md +51 -0
- package/README.md +7 -0
- package/build/frontend/index.html +13 -10
- package/build/frontend/main-7AXSFTJM.js +11 -0
- package/build/frontend/styles-YQ73RJ2V.css +1 -0
- package/dist/backend/dev-server.d.ts +0 -1
- package/dist/backend/dev-server.js +8 -4
- package/dist/backend/dev-server.js.map +1 -1
- package/dist/backend/gitService.d.ts +36 -11
- package/dist/backend/gitService.js +341 -197
- package/dist/backend/gitService.js.map +1 -1
- package/dist/backend/server.d.ts +8 -2
- package/dist/backend/server.js +145 -111
- package/dist/backend/server.js.map +1 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +44 -22
- package/dist/cli.js.map +1 -1
- package/package.json +43 -27
- package/build/frontend/main-44CFNHDH.js +0 -8
- package/build/frontend/main-YHO6NCZZ.js +0 -8
- package/build/frontend/styles-26JPPBSI.css +0 -1
- package/build/frontend/styles-J5I4DBTU.css +0 -1
- package/dist/__tests__/gitService.test.d.ts +0 -2
- package/dist/__tests__/gitService.test.d.ts.map +0 -1
- package/dist/__tests__/gitService.test.js +0 -427
- package/dist/__tests__/gitService.test.js.map +0 -1
- package/dist/__tests__/setup.d.ts +0 -2
- package/dist/__tests__/setup.d.ts.map +0 -1
- package/dist/__tests__/setup.js +0 -24
- package/dist/__tests__/setup.js.map +0 -1
- package/dist/backend/dev-server.d.ts.map +0 -1
- package/dist/backend/gitService.d.ts.map +0 -1
- package/dist/backend/server.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/config/paths.d.ts +0 -14
- package/dist/config/paths.d.ts.map +0 -1
- package/dist/config/paths.js +0 -35
- package/dist/config/paths.js.map +0 -1
|
@@ -1,239 +1,383 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GitService = void 0;
|
|
7
|
-
const
|
|
8
|
-
|
|
3
|
+
exports.GitService = exports.NotARepositoryError = void 0;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const util_1 = require("util");
|
|
6
|
+
const execFileAsync = (0, util_1.promisify)(child_process_1.execFile);
|
|
7
|
+
const FIELD_SEP = "\x1f"; // Unit Separator (NUL is rejected by Node argv)
|
|
8
|
+
const RECORD_SEP = '\x1e';
|
|
9
|
+
const LOG_FORMAT = ['%H', '%h', '%an', '%ae', '%aI', '%P', '%s', '%b'].join(FIELD_SEP);
|
|
10
|
+
const REF_INDEX_TTL_MS = 5_000;
|
|
11
|
+
const COUNT_CACHE_TTL_MS = 10_000;
|
|
12
|
+
class NotARepositoryError extends Error {
|
|
9
13
|
constructor() {
|
|
10
|
-
|
|
14
|
+
super('Not a git repository');
|
|
15
|
+
this.name = 'NotARepositoryError';
|
|
11
16
|
}
|
|
12
|
-
|
|
17
|
+
}
|
|
18
|
+
exports.NotARepositoryError = NotARepositoryError;
|
|
19
|
+
class GitService {
|
|
20
|
+
repoPath;
|
|
21
|
+
refIndexCache = null;
|
|
22
|
+
countCache = new Map();
|
|
23
|
+
repoCheckResult = null;
|
|
24
|
+
constructor(repoPath = process.cwd()) {
|
|
25
|
+
this.repoPath = repoPath;
|
|
26
|
+
}
|
|
27
|
+
async verifyRepository() {
|
|
28
|
+
if (this.repoCheckResult !== null)
|
|
29
|
+
return this.repoCheckResult;
|
|
13
30
|
try {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
await this.git(['rev-parse', '--is-inside-work-tree']);
|
|
32
|
+
this.repoCheckResult = true;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
this.repoCheckResult = false;
|
|
36
|
+
}
|
|
37
|
+
return this.repoCheckResult;
|
|
38
|
+
}
|
|
39
|
+
async getRefIndex() {
|
|
40
|
+
const now = Date.now();
|
|
41
|
+
if (this.refIndexCache && now - this.refIndexCache.builtAt < REF_INDEX_TTL_MS) {
|
|
42
|
+
return this.refIndexCache;
|
|
43
|
+
}
|
|
44
|
+
const branchesByCommit = new Map();
|
|
45
|
+
const tagsByCommit = new Map();
|
|
46
|
+
const out = await this.git([
|
|
47
|
+
'for-each-ref',
|
|
48
|
+
'--format=%(objectname)\t%(refname:short)\t%(refname)',
|
|
49
|
+
'refs/heads',
|
|
50
|
+
'refs/tags',
|
|
51
|
+
'refs/remotes'
|
|
52
|
+
]);
|
|
53
|
+
for (const line of out.split('\n')) {
|
|
54
|
+
if (!line)
|
|
55
|
+
continue;
|
|
56
|
+
const [hash, short, full] = line.split('\t');
|
|
57
|
+
if (!hash || !short)
|
|
58
|
+
continue;
|
|
59
|
+
if (full && full.startsWith('refs/tags/')) {
|
|
60
|
+
push(tagsByCommit, hash, short);
|
|
35
61
|
}
|
|
36
62
|
else {
|
|
37
|
-
|
|
63
|
+
push(branchesByCommit, hash, short);
|
|
38
64
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
message: commit.message,
|
|
49
|
-
files: await this.getFilesForCommit(commit.hash),
|
|
50
|
-
parents: [], // We'll get this from git show if needed
|
|
51
|
-
branches,
|
|
52
|
-
tags
|
|
53
|
-
};
|
|
54
|
-
}));
|
|
55
|
-
return commits;
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
59
|
-
throw new Error(`Failed to get commits: ${errorMessage}`);
|
|
65
|
+
}
|
|
66
|
+
this.refIndexCache = { branchesByCommit, tagsByCommit, builtAt: now };
|
|
67
|
+
return this.refIndexCache;
|
|
68
|
+
function push(map, key, value) {
|
|
69
|
+
const list = map.get(key);
|
|
70
|
+
if (list)
|
|
71
|
+
list.push(value);
|
|
72
|
+
else
|
|
73
|
+
map.set(key, [value]);
|
|
60
74
|
}
|
|
61
75
|
}
|
|
62
|
-
async
|
|
76
|
+
async getCommits(options = {}) {
|
|
77
|
+
if (!(await this.verifyRepository())) {
|
|
78
|
+
throw new NotARepositoryError();
|
|
79
|
+
}
|
|
80
|
+
const page = Math.max(1, options.page || 1);
|
|
81
|
+
const pageSize = clamp(options.pageSize || 25, 1, 500);
|
|
82
|
+
const skip = (page - 1) * pageSize;
|
|
83
|
+
const filterArgs = this.buildFilterArgs(options);
|
|
84
|
+
const cacheKey = filterArgs.join(' ');
|
|
85
|
+
const total = await this.getTotalCount(cacheKey, filterArgs);
|
|
86
|
+
const totalPages = Math.max(1, Math.ceil(total / pageSize));
|
|
87
|
+
const args = [
|
|
88
|
+
'log',
|
|
89
|
+
`--max-count=${pageSize}`,
|
|
90
|
+
`--skip=${skip}`,
|
|
91
|
+
`--pretty=format:${LOG_FORMAT}${RECORD_SEP}`,
|
|
92
|
+
...filterArgs
|
|
93
|
+
];
|
|
94
|
+
const out = await this.git(args, { maxBuffer: 64 * 1024 * 1024 });
|
|
95
|
+
const refs = await this.getRefIndex();
|
|
96
|
+
const commits = this.parseLog(out, refs);
|
|
97
|
+
return {
|
|
98
|
+
commits,
|
|
99
|
+
total,
|
|
100
|
+
page,
|
|
101
|
+
pageSize,
|
|
102
|
+
totalPages,
|
|
103
|
+
hasNext: page < totalPages,
|
|
104
|
+
hasPrevious: page > 1
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
async getTotalCount(cacheKey, filterArgs) {
|
|
108
|
+
const now = Date.now();
|
|
109
|
+
const cached = this.countCache.get(cacheKey);
|
|
110
|
+
if (cached && cached.expiresAt > now)
|
|
111
|
+
return cached.total;
|
|
112
|
+
// Insert HEAD before the pathspec separator so that --author/--since/--grep
|
|
113
|
+
// apply to the count. Otherwise rev-list would only honour pathspec filters.
|
|
114
|
+
const sepIdx = filterArgs.indexOf('--');
|
|
115
|
+
const revArgs = sepIdx >= 0
|
|
116
|
+
? [...filterArgs.slice(0, sepIdx), 'HEAD', ...filterArgs.slice(sepIdx)]
|
|
117
|
+
: [...filterArgs, 'HEAD'];
|
|
118
|
+
let total = 0;
|
|
63
119
|
try {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
120
|
+
const out = await this.git(['rev-list', '--count', ...revArgs]);
|
|
121
|
+
total = parseInt(out.trim(), 10) || 0;
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
const fallback = await this.git(['log', '--oneline', ...filterArgs]).catch(() => '');
|
|
125
|
+
total = fallback ? fallback.split('\n').filter(Boolean).length : 0;
|
|
126
|
+
}
|
|
127
|
+
this.countCache.set(cacheKey, { total, expiresAt: now + COUNT_CACHE_TTL_MS });
|
|
128
|
+
return total;
|
|
129
|
+
}
|
|
130
|
+
buildFilterArgs(options) {
|
|
131
|
+
const args = [];
|
|
132
|
+
if (options.author)
|
|
133
|
+
args.push(`--author=${options.author}`);
|
|
134
|
+
if (options.since)
|
|
135
|
+
args.push(`--since=${options.since}`);
|
|
136
|
+
if (options.until)
|
|
137
|
+
args.push(`--until=${options.until}`);
|
|
138
|
+
if (options.search)
|
|
139
|
+
args.push(`--grep=${options.search}`, '--regexp-ignore-case');
|
|
140
|
+
if (options.file)
|
|
141
|
+
args.push('--', options.file);
|
|
142
|
+
return args;
|
|
143
|
+
}
|
|
144
|
+
parseLog(raw, refs) {
|
|
145
|
+
if (!raw)
|
|
146
|
+
return [];
|
|
147
|
+
const commits = [];
|
|
148
|
+
for (const record of raw.split(RECORD_SEP)) {
|
|
149
|
+
const trimmed = record.trim();
|
|
150
|
+
if (!trimmed)
|
|
151
|
+
continue;
|
|
152
|
+
const fields = trimmed.split(FIELD_SEP);
|
|
153
|
+
if (fields.length < 8)
|
|
154
|
+
continue;
|
|
155
|
+
const [hash, shortHash, author, authorEmail, date, parentsStr, subject, ...rest] = fields;
|
|
156
|
+
const body = rest.join(FIELD_SEP);
|
|
157
|
+
const parents = parentsStr ? parentsStr.split(' ').filter(Boolean) : [];
|
|
158
|
+
const branches = refs.branchesByCommit.get(hash) ?? [];
|
|
159
|
+
const tags = refs.tagsByCommit.get(hash) ?? [];
|
|
160
|
+
commits.push({
|
|
161
|
+
hash,
|
|
162
|
+
shortHash,
|
|
163
|
+
author,
|
|
164
|
+
authorEmail,
|
|
165
|
+
date,
|
|
166
|
+
subject,
|
|
167
|
+
body,
|
|
168
|
+
message: body ? `${subject}\n\n${body}` : subject,
|
|
169
|
+
parents,
|
|
84
170
|
branches,
|
|
85
|
-
tags
|
|
86
|
-
|
|
171
|
+
tags,
|
|
172
|
+
isMerge: parents.length > 1
|
|
173
|
+
});
|
|
87
174
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
175
|
+
return commits;
|
|
176
|
+
}
|
|
177
|
+
async getCommit(hash) {
|
|
178
|
+
if (!isPlausibleHash(hash))
|
|
179
|
+
throw new Error('Invalid commit hash');
|
|
180
|
+
const out = await this.git([
|
|
181
|
+
'log',
|
|
182
|
+
'--max-count=1',
|
|
183
|
+
`--pretty=format:${LOG_FORMAT}${RECORD_SEP}`,
|
|
184
|
+
hash
|
|
185
|
+
]);
|
|
186
|
+
const refs = await this.getRefIndex();
|
|
187
|
+
const commits = this.parseLog(out, refs);
|
|
188
|
+
if (commits.length === 0)
|
|
189
|
+
throw new Error('Commit not found');
|
|
190
|
+
return commits[0];
|
|
191
|
+
}
|
|
192
|
+
async getAuthors() {
|
|
193
|
+
const out = await this.git(['log', '--all', '--pretty=format:%an']);
|
|
194
|
+
const seen = new Set();
|
|
195
|
+
for (const line of out.split('\n')) {
|
|
196
|
+
const v = line.trim();
|
|
197
|
+
if (v)
|
|
198
|
+
seen.add(v);
|
|
91
199
|
}
|
|
200
|
+
return Array.from(seen).sort((a, b) => a.localeCompare(b));
|
|
92
201
|
}
|
|
93
202
|
async getDiff(hash) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
203
|
+
if (!isPlausibleHash(hash))
|
|
204
|
+
throw new Error('Invalid commit hash');
|
|
205
|
+
const parentsOut = await this.git(['log', '-1', '--pretty=format:%P', hash]);
|
|
206
|
+
const parents = parentsOut.trim().split(/\s+/).filter(Boolean);
|
|
207
|
+
let raw;
|
|
208
|
+
if (parents.length === 0) {
|
|
209
|
+
raw = await this.git(['diff-tree', '--root', '-p', '-M', '--no-color', hash]);
|
|
97
210
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
throw new Error(`Failed to get diff: ${errorMessage}`);
|
|
211
|
+
else {
|
|
212
|
+
raw = await this.git(['diff', '-M', '--no-color', `${hash}^1`, hash]);
|
|
101
213
|
}
|
|
214
|
+
return parseUnifiedDiff(raw);
|
|
102
215
|
}
|
|
103
216
|
async getBlame(filePath) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
catch (error) {
|
|
109
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
110
|
-
throw new Error(`Failed to get blame: ${errorMessage}`);
|
|
111
|
-
}
|
|
217
|
+
if (filePath.includes('\0'))
|
|
218
|
+
throw new Error('Invalid path');
|
|
219
|
+
const raw = await this.git(['blame', '--porcelain', '--', filePath]);
|
|
220
|
+
return parsePorcelainBlame(raw);
|
|
112
221
|
}
|
|
113
222
|
async getTags() {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return tags.all;
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
120
|
-
throw new Error(`Failed to get tags: ${errorMessage}`);
|
|
121
|
-
}
|
|
223
|
+
const out = await this.git(['tag', '--list']);
|
|
224
|
+
return out.split('\n').map((s) => s.trim()).filter(Boolean);
|
|
122
225
|
}
|
|
123
226
|
async getBranches() {
|
|
227
|
+
const out = await this.git([
|
|
228
|
+
'for-each-ref',
|
|
229
|
+
'--format=%(refname:short)',
|
|
230
|
+
'refs/heads',
|
|
231
|
+
'refs/remotes'
|
|
232
|
+
]);
|
|
233
|
+
return out.split('\n').map((s) => s.trim()).filter(Boolean);
|
|
234
|
+
}
|
|
235
|
+
async git(args, opts = {}) {
|
|
124
236
|
try {
|
|
125
|
-
const
|
|
126
|
-
|
|
237
|
+
const { stdout } = await execFileAsync('git', args, {
|
|
238
|
+
cwd: this.repoPath,
|
|
239
|
+
maxBuffer: opts.maxBuffer ?? 16 * 1024 * 1024,
|
|
240
|
+
env: {
|
|
241
|
+
...process.env,
|
|
242
|
+
GIT_PAGER: 'cat',
|
|
243
|
+
GIT_TERMINAL_PROMPT: '0',
|
|
244
|
+
LC_ALL: 'C'
|
|
245
|
+
},
|
|
246
|
+
encoding: 'utf8'
|
|
247
|
+
});
|
|
248
|
+
return stdout;
|
|
127
249
|
}
|
|
128
|
-
catch (
|
|
129
|
-
const
|
|
130
|
-
|
|
250
|
+
catch (err) {
|
|
251
|
+
const e = err;
|
|
252
|
+
const msg = e.stderr?.toString().trim() || e.message;
|
|
253
|
+
throw new Error(`git ${args[0]} failed: ${msg}`);
|
|
131
254
|
}
|
|
132
255
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
256
|
+
}
|
|
257
|
+
exports.GitService = GitService;
|
|
258
|
+
function isPlausibleHash(hash) {
|
|
259
|
+
return typeof hash === 'string' && /^[0-9a-fA-F]{4,40}$/.test(hash);
|
|
260
|
+
}
|
|
261
|
+
function clamp(value, min, max) {
|
|
262
|
+
return Math.max(min, Math.min(max, value));
|
|
263
|
+
}
|
|
264
|
+
function parseUnifiedDiff(raw) {
|
|
265
|
+
const files = [];
|
|
266
|
+
if (!raw)
|
|
267
|
+
return files;
|
|
268
|
+
let current = null;
|
|
269
|
+
let currentLines = [];
|
|
270
|
+
const flush = () => {
|
|
271
|
+
if (!current)
|
|
272
|
+
return;
|
|
273
|
+
current.changes = currentLines.join('\n');
|
|
274
|
+
files.push(current);
|
|
275
|
+
current = null;
|
|
276
|
+
currentLines = [];
|
|
277
|
+
};
|
|
278
|
+
for (const line of raw.split('\n')) {
|
|
279
|
+
if (line.startsWith('diff --git ')) {
|
|
280
|
+
flush();
|
|
281
|
+
const match = line.match(/^diff --git a\/(.+?) b\/(.+?)$/);
|
|
282
|
+
const a = match?.[1];
|
|
283
|
+
const b = match?.[2];
|
|
284
|
+
current = {
|
|
285
|
+
file: b ?? a ?? '',
|
|
286
|
+
oldFile: a !== b ? a : undefined,
|
|
287
|
+
status: 'modified',
|
|
288
|
+
additions: 0,
|
|
289
|
+
deletions: 0,
|
|
290
|
+
changes: ''
|
|
291
|
+
};
|
|
292
|
+
currentLines = [line];
|
|
137
293
|
}
|
|
138
|
-
|
|
139
|
-
|
|
294
|
+
else if (!current) {
|
|
295
|
+
continue;
|
|
140
296
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const branches = await this.git.branch(['--contains', hash]);
|
|
145
|
-
return branches.all;
|
|
297
|
+
else if (line.startsWith('new file mode')) {
|
|
298
|
+
current.status = 'added';
|
|
299
|
+
currentLines.push(line);
|
|
146
300
|
}
|
|
147
|
-
|
|
148
|
-
|
|
301
|
+
else if (line.startsWith('deleted file mode')) {
|
|
302
|
+
current.status = 'deleted';
|
|
303
|
+
currentLines.push(line);
|
|
149
304
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
return tags.split('\n').filter(Boolean);
|
|
305
|
+
else if (line.startsWith('rename from ')) {
|
|
306
|
+
current.status = 'renamed';
|
|
307
|
+
current.oldFile = line.substring('rename from '.length);
|
|
308
|
+
currentLines.push(line);
|
|
155
309
|
}
|
|
156
|
-
|
|
157
|
-
|
|
310
|
+
else if (line.startsWith('rename to ')) {
|
|
311
|
+
current.file = line.substring('rename to '.length);
|
|
312
|
+
currentLines.push(line);
|
|
158
313
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
let currentFile = null;
|
|
164
|
-
let currentFileLines = [];
|
|
165
|
-
for (const line of lines) {
|
|
166
|
-
if (line.startsWith('diff --git')) {
|
|
167
|
-
if (currentFile) {
|
|
168
|
-
currentFile.changes = currentFileLines.join('\n');
|
|
169
|
-
files.push(currentFile);
|
|
170
|
-
}
|
|
171
|
-
const fileMatch = line.match(/b\/(.+)$/);
|
|
172
|
-
currentFile = {
|
|
173
|
-
file: fileMatch ? fileMatch[1] : '',
|
|
174
|
-
additions: 0,
|
|
175
|
-
deletions: 0,
|
|
176
|
-
changes: ''
|
|
177
|
-
};
|
|
178
|
-
currentFileLines = [];
|
|
179
|
-
}
|
|
180
|
-
else if (line.startsWith('+') && !line.startsWith('+++')) {
|
|
181
|
-
if (currentFile)
|
|
182
|
-
currentFile.additions++;
|
|
183
|
-
currentFileLines.push(line);
|
|
184
|
-
}
|
|
185
|
-
else if (line.startsWith('-') && !line.startsWith('---')) {
|
|
186
|
-
if (currentFile)
|
|
187
|
-
currentFile.deletions++;
|
|
188
|
-
currentFileLines.push(line);
|
|
189
|
-
}
|
|
190
|
-
else if (line.startsWith('@@') || line.startsWith('---') || line.startsWith('+++') || line.trim() === '') {
|
|
191
|
-
// Include git diff headers and context lines
|
|
192
|
-
currentFileLines.push(line);
|
|
193
|
-
}
|
|
194
|
-
else if (line.startsWith(' ')) {
|
|
195
|
-
// Context lines (unchanged)
|
|
196
|
-
currentFileLines.push(line);
|
|
197
|
-
}
|
|
314
|
+
else if (line.startsWith('copy from ')) {
|
|
315
|
+
current.status = 'copied';
|
|
316
|
+
current.oldFile = line.substring('copy from '.length);
|
|
317
|
+
currentLines.push(line);
|
|
198
318
|
}
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
|
|
319
|
+
else if (line.startsWith('Binary files')) {
|
|
320
|
+
current.status = 'binary';
|
|
321
|
+
currentLines.push(line);
|
|
322
|
+
}
|
|
323
|
+
else if (line.startsWith('+') && !line.startsWith('+++')) {
|
|
324
|
+
current.additions++;
|
|
325
|
+
currentLines.push(line);
|
|
326
|
+
}
|
|
327
|
+
else if (line.startsWith('-') && !line.startsWith('---')) {
|
|
328
|
+
current.deletions++;
|
|
329
|
+
currentLines.push(line);
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
currentLines.push(line);
|
|
202
333
|
}
|
|
203
|
-
return files;
|
|
204
334
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
line: lines.length + 1,
|
|
222
|
-
hash,
|
|
223
|
-
author,
|
|
224
|
-
date,
|
|
225
|
-
content: ''
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
else if (line.startsWith('\t') && currentLine) {
|
|
229
|
-
currentLine.content = line.substring(1);
|
|
230
|
-
}
|
|
335
|
+
flush();
|
|
336
|
+
return files;
|
|
337
|
+
}
|
|
338
|
+
function parsePorcelainBlame(raw) {
|
|
339
|
+
if (!raw)
|
|
340
|
+
return [];
|
|
341
|
+
const lines = raw.split('\n');
|
|
342
|
+
const out = [];
|
|
343
|
+
const meta = new Map();
|
|
344
|
+
let i = 0;
|
|
345
|
+
let lineNumber = 0;
|
|
346
|
+
while (i < lines.length) {
|
|
347
|
+
const header = lines[i];
|
|
348
|
+
if (!header) {
|
|
349
|
+
i++;
|
|
350
|
+
continue;
|
|
231
351
|
}
|
|
232
|
-
|
|
233
|
-
|
|
352
|
+
const m = header.match(/^([0-9a-f]{40}) \d+ (\d+)(?: \d+)?$/);
|
|
353
|
+
if (!m) {
|
|
354
|
+
i++;
|
|
355
|
+
continue;
|
|
234
356
|
}
|
|
235
|
-
|
|
357
|
+
const hash = m[1];
|
|
358
|
+
lineNumber = parseInt(m[2], 10);
|
|
359
|
+
i++;
|
|
360
|
+
let author = meta.get(hash)?.author ?? '';
|
|
361
|
+
let epoch = meta.get(hash)?.epoch ?? 0;
|
|
362
|
+
while (i < lines.length && !lines[i].startsWith('\t')) {
|
|
363
|
+
const h = lines[i];
|
|
364
|
+
if (h.startsWith('author '))
|
|
365
|
+
author = h.substring(7);
|
|
366
|
+
else if (h.startsWith('author-time '))
|
|
367
|
+
epoch = parseInt(h.substring(12), 10);
|
|
368
|
+
i++;
|
|
369
|
+
}
|
|
370
|
+
meta.set(hash, { author, epoch });
|
|
371
|
+
const content = i < lines.length && lines[i].startsWith('\t') ? lines[i].substring(1) : '';
|
|
372
|
+
out.push({
|
|
373
|
+
line: lineNumber,
|
|
374
|
+
hash,
|
|
375
|
+
author,
|
|
376
|
+
date: epoch ? new Date(epoch * 1000).toISOString() : '',
|
|
377
|
+
content
|
|
378
|
+
});
|
|
379
|
+
i++;
|
|
236
380
|
}
|
|
381
|
+
return out;
|
|
237
382
|
}
|
|
238
|
-
exports.GitService = GitService;
|
|
239
383
|
//# sourceMappingURL=gitService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitService.js","sourceRoot":"","sources":["../../src/backend/gitService.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+E;AAoC/E,MAAa,UAAU;IAGrB;QACE,IAA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,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YAC7E,CAAC,EAAE,CAAC;QACN,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAElC,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3F,GAAG,CAAC,IAAI,CAAC;YACP,IAAI,EAAE,UAAU;YAChB,IAAI;YACJ,MAAM;YACN,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;YACvD,OAAO;SACR,CAAC,CAAC;QACH,CAAC,EAAE,CAAC;IACN,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/backend/server.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import { type Server as HttpServer } from 'http';
|
|
1
2
|
export interface ServerOptions {
|
|
2
3
|
port?: number;
|
|
3
4
|
host?: string;
|
|
4
5
|
file?: string;
|
|
5
6
|
since?: string;
|
|
6
7
|
author?: string;
|
|
8
|
+
cwd?: string;
|
|
7
9
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
+
export interface BootResult {
|
|
11
|
+
server: HttpServer;
|
|
12
|
+
url: string;
|
|
13
|
+
close: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare function startServer(port?: number, host?: string, options?: Partial<ServerOptions>): Promise<BootResult>;
|