@vibe-validate/git 0.19.0-rc.10 → 0.19.0-rc.12
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/dist/git-notes.d.ts +43 -13
- package/dist/git-notes.d.ts.map +1 -1
- package/dist/git-notes.js +67 -217
- package/dist/git-notes.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/git-notes.d.ts
CHANGED
|
@@ -8,31 +8,61 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { TreeHash, NotesRef } from './types.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Strategy for merging note content when a note already exists.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
*
|
|
13
|
+
* Pure function: given existing note content and incoming content, produce merged output.
|
|
14
|
+
* Each strategy is independently testable.
|
|
15
|
+
*/
|
|
16
|
+
export type NoteMergeStrategy = (existing: string, incoming: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Merge strategy: replace existing note entirely with incoming content.
|
|
19
|
+
*
|
|
20
|
+
* Used by run cache where each entry is deterministic (same tree + command = same result).
|
|
21
|
+
*/
|
|
22
|
+
export declare const mergeReplace: NoteMergeStrategy;
|
|
23
|
+
/**
|
|
24
|
+
* Merge strategy: append runs arrays from both notes, new fields win.
|
|
25
|
+
*
|
|
26
|
+
* Used by validation history where multiple runs accumulate per tree hash.
|
|
27
|
+
* Parses YAML with `uniqueKeys: false` to tolerate corrupted notes with duplicate keys.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* // Existing note has run-1, incoming has run-2 → merged has both
|
|
32
|
+
* const merged = mergeAppendRuns(existingYaml, incomingYaml);
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare const mergeAppendRuns: NoteMergeStrategy;
|
|
36
|
+
/**
|
|
37
|
+
* Add or update a git note
|
|
20
38
|
*
|
|
21
|
-
*
|
|
39
|
+
* One code path for all callers:
|
|
40
|
+
* 1. Try `git notes add` (fast path for new notes — no merge needed)
|
|
41
|
+
* 2. If note exists: read → apply merge strategy → `git notes add -f`
|
|
42
|
+
*
|
|
43
|
+
* The merge strategy controls what happens when a note already exists.
|
|
44
|
+
* Default is `mergeReplace` (incoming content wins). Use `mergeAppendRuns`
|
|
45
|
+
* for validation history where runs accumulate per tree hash.
|
|
46
|
+
*
|
|
47
|
+
* Note: There is a small TOCTOU window between read and force-write.
|
|
48
|
+
* This is acceptable for history/cache data.
|
|
22
49
|
*
|
|
23
50
|
* @param notesRef - The notes reference (e.g., 'vibe-validate/validate')
|
|
24
51
|
* @param object - The git tree hash to attach the note to (must be from getGitTreeHash())
|
|
25
52
|
* @param content - The note content
|
|
26
|
-
* @param
|
|
53
|
+
* @param merge - Strategy for merging with existing note (default: mergeReplace)
|
|
27
54
|
* @returns true if note was added successfully
|
|
28
55
|
*
|
|
29
56
|
* @example
|
|
30
57
|
* ```typescript
|
|
31
|
-
*
|
|
32
|
-
* addNote('vibe-validate/
|
|
58
|
+
* // Run cache: replace existing (default)
|
|
59
|
+
* addNote('vibe-validate/run/abc/key', treeHash, cacheYaml);
|
|
60
|
+
*
|
|
61
|
+
* // Validation history: append runs
|
|
62
|
+
* addNote('vibe-validate/validate', treeHash, historyYaml, mergeAppendRuns);
|
|
33
63
|
* ```
|
|
34
64
|
*/
|
|
35
|
-
export declare function addNote(notesRef: NotesRef, object: TreeHash, content: string,
|
|
65
|
+
export declare function addNote(notesRef: NotesRef, object: TreeHash, content: string, merge?: NoteMergeStrategy): boolean;
|
|
36
66
|
/**
|
|
37
67
|
* Read a git note
|
|
38
68
|
*
|
package/dist/git-notes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAczD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAgCzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAWrD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAa9D"}
|
package/dist/git-notes.js
CHANGED
|
@@ -10,265 +10,115 @@ import { toForwardSlash } from '@vibe-validate/utils';
|
|
|
10
10
|
import { parse as parseYaml, stringify as stringifyYaml } from 'yaml';
|
|
11
11
|
import { executeGitCommand, tryGitCommand, validateNotesRef, validateTreeHash, } from './git-executor.js';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Merge strategy: replace existing note entirely with incoming content.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* @returns The blob SHA
|
|
15
|
+
* Used by run cache where each entry is deterministic (same tree + command = same result).
|
|
17
16
|
*/
|
|
18
|
-
|
|
19
|
-
const result = executeGitCommand(['hash-object', '-w', '--stdin'], {
|
|
20
|
-
stdin: content,
|
|
21
|
-
});
|
|
22
|
-
return result.stdout;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Read tree entries from a commit
|
|
26
|
-
*
|
|
27
|
-
* @param commitSha - The commit SHA to read the tree from
|
|
28
|
-
* @returns Array of tree entries
|
|
29
|
-
*/
|
|
30
|
-
function readTreeEntries(commitSha) {
|
|
31
|
-
const result = executeGitCommand(['ls-tree', commitSha], {
|
|
32
|
-
ignoreErrors: true,
|
|
33
|
-
});
|
|
34
|
-
if (!result.success || !result.stdout) {
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
const entries = [];
|
|
38
|
-
for (const line of result.stdout.split('\n')) {
|
|
39
|
-
if (!line)
|
|
40
|
-
continue;
|
|
41
|
-
// Format: "MODE TYPE SHA\tNAME" (note: TAB before name, not space)
|
|
42
|
-
// Use split to avoid backtracking regex issues
|
|
43
|
-
const parts = line.split(/\s+/);
|
|
44
|
-
if (parts.length < 4)
|
|
45
|
-
continue;
|
|
46
|
-
const mode = parts[0];
|
|
47
|
-
const type = parts[1];
|
|
48
|
-
const sha = parts[2];
|
|
49
|
-
// Name may contain spaces, so join the rest
|
|
50
|
-
const name = parts.slice(3).join(' ');
|
|
51
|
-
// Validate format
|
|
52
|
-
if (!/^\d+$/.test(mode))
|
|
53
|
-
continue;
|
|
54
|
-
if (type !== 'blob' && type !== 'tree')
|
|
55
|
-
continue;
|
|
56
|
-
if (!/^[0-9a-f]+$/.test(sha))
|
|
57
|
-
continue;
|
|
58
|
-
entries.push({
|
|
59
|
-
mode,
|
|
60
|
-
type,
|
|
61
|
-
sha,
|
|
62
|
-
name,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return entries;
|
|
66
|
-
}
|
|
17
|
+
export const mergeReplace = (_existing, incoming) => incoming;
|
|
67
18
|
/**
|
|
68
|
-
*
|
|
19
|
+
* Merge strategy: append runs arrays from both notes, new fields win.
|
|
69
20
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
function createTree(entries) {
|
|
74
|
-
// Format for mktree: "MODE TYPE SHA\tNAME"
|
|
75
|
-
const input = entries
|
|
76
|
-
.map((e) => `${e.mode} ${e.type} ${e.sha}\t${e.name}`)
|
|
77
|
-
.join('\n');
|
|
78
|
-
const result = executeGitCommand(['mktree'], {
|
|
79
|
-
stdin: input,
|
|
80
|
-
});
|
|
81
|
-
return result.stdout;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Create a notes commit using git commit-tree
|
|
21
|
+
* Used by validation history where multiple runs accumulate per tree hash.
|
|
22
|
+
* Parses YAML with `uniqueKeys: false` to tolerate corrupted notes with duplicate keys.
|
|
85
23
|
*
|
|
86
|
-
* @
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* // Existing note has run-1, incoming has run-2 → merged has both
|
|
27
|
+
* const merged = mergeAppendRuns(existingYaml, incomingYaml);
|
|
28
|
+
* ```
|
|
90
29
|
*/
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
30
|
+
export const mergeAppendRuns = (existing, incoming) => {
|
|
31
|
+
try {
|
|
32
|
+
const existingData = parseYaml(existing, { uniqueKeys: false });
|
|
33
|
+
const newData = parseYaml(incoming, { uniqueKeys: false });
|
|
34
|
+
const existingRuns = Array.isArray(existingData?.runs) ? existingData.runs : [];
|
|
35
|
+
const newRuns = Array.isArray(newData?.runs) ? newData.runs : [];
|
|
36
|
+
const merged = {
|
|
37
|
+
...existingData,
|
|
38
|
+
...newData,
|
|
39
|
+
};
|
|
40
|
+
// Only include runs when at least one side has them (avoids spurious runs: [] on cache notes)
|
|
41
|
+
if (existingRuns.length > 0 || newRuns.length > 0) {
|
|
42
|
+
merged.runs = [...existingRuns, ...newRuns];
|
|
43
|
+
}
|
|
44
|
+
return stringifyYaml(merged);
|
|
95
45
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Atomically update a ref using compare-and-swap
|
|
101
|
-
*
|
|
102
|
-
* @param ref - The ref to update (e.g., 'refs/notes/vibe-validate/validate')
|
|
103
|
-
* @param newSha - The new commit SHA
|
|
104
|
-
* @param oldSha - The expected current commit SHA (or null for new ref)
|
|
105
|
-
* @returns true if update succeeded, false if ref changed (CAS failure)
|
|
106
|
-
*/
|
|
107
|
-
function atomicUpdateRef(ref, newSha, oldSha) {
|
|
108
|
-
const args = ['update-ref', ref, newSha];
|
|
109
|
-
if (oldSha) {
|
|
110
|
-
args.push(oldSha);
|
|
46
|
+
catch {
|
|
47
|
+
// If parsing fails, prefer new note (latest data)
|
|
48
|
+
return incoming;
|
|
111
49
|
}
|
|
112
|
-
|
|
113
|
-
ignoreErrors: true,
|
|
114
|
-
suppressStderr: true,
|
|
115
|
-
});
|
|
116
|
-
return result.success;
|
|
117
|
-
}
|
|
50
|
+
};
|
|
118
51
|
/**
|
|
119
|
-
* Attempt
|
|
52
|
+
* Attempt to merge an existing note with new content
|
|
53
|
+
*
|
|
54
|
+
* Uses `git notes add -f` for the write, which correctly handles
|
|
55
|
+
* git notes fan-out (2-character subdirectories).
|
|
120
56
|
*
|
|
121
57
|
* @param notesRef - The notes reference
|
|
122
|
-
* @param fullRef - The full ref path (refs/notes/...)
|
|
123
58
|
* @param object - The object to attach the note to
|
|
124
59
|
* @param content - The new note content to merge
|
|
125
|
-
* @
|
|
60
|
+
* @param merge - The merge strategy to apply
|
|
61
|
+
* @returns true if merge succeeded, false on error
|
|
126
62
|
*/
|
|
127
|
-
function
|
|
128
|
-
// Step 1:
|
|
129
|
-
const currentCommitSha = getNotesRefSha(notesRef);
|
|
130
|
-
if (!currentCommitSha) {
|
|
131
|
-
return false; // Ref disappeared (benign race condition)
|
|
132
|
-
}
|
|
133
|
-
// Step 2: Read existing note and merge
|
|
63
|
+
function attemptMerge(notesRef, object, content, merge = mergeAppendRuns) {
|
|
64
|
+
// Step 1: Read existing note
|
|
134
65
|
const existingNote = readNote(notesRef, object);
|
|
135
66
|
if (existingNote === null) {
|
|
136
67
|
return false; // Note disappeared (benign race condition)
|
|
137
68
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
const newEntry = {
|
|
148
|
-
mode: '100644',
|
|
149
|
-
type: 'blob',
|
|
150
|
-
sha: blobSha,
|
|
151
|
-
name: object,
|
|
152
|
-
};
|
|
153
|
-
if (existingEntryIndex >= 0) {
|
|
154
|
-
entries[existingEntryIndex] = newEntry;
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
entries.push(newEntry);
|
|
158
|
-
}
|
|
159
|
-
// Create new tree
|
|
160
|
-
const treeSha = createTree(entries);
|
|
161
|
-
// Create new commit
|
|
162
|
-
const commitSha = createNotesCommit(treeSha, currentCommitSha, 'Notes added by vibe-validate');
|
|
163
|
-
// Step 4: Atomically update ref (compare-and-swap)
|
|
164
|
-
return atomicUpdateRef(fullRef, commitSha, currentCommitSha);
|
|
165
|
-
}
|
|
166
|
-
catch {
|
|
167
|
-
return false; // Git plumbing operation failed (will retry)
|
|
168
|
-
}
|
|
69
|
+
// Step 2: Apply merge strategy
|
|
70
|
+
const merged = merge(existingNote, content);
|
|
71
|
+
// Step 3: Force-write merged content (git handles fan-out correctly)
|
|
72
|
+
const result = executeGitCommand(['notes', `--ref=${notesRef}`, 'add', '-f', '-F', '-', object], {
|
|
73
|
+
stdin: merged,
|
|
74
|
+
ignoreErrors: true,
|
|
75
|
+
suppressStderr: true,
|
|
76
|
+
});
|
|
77
|
+
return result.success;
|
|
169
78
|
}
|
|
170
79
|
/**
|
|
171
|
-
*
|
|
80
|
+
* Add or update a git note
|
|
172
81
|
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
82
|
+
* One code path for all callers:
|
|
83
|
+
* 1. Try `git notes add` (fast path for new notes — no merge needed)
|
|
84
|
+
* 2. If note exists: read → apply merge strategy → `git notes add -f`
|
|
175
85
|
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*/
|
|
180
|
-
function mergeNotes(existingNote, newNote) {
|
|
181
|
-
try {
|
|
182
|
-
const existing = parseYaml(existingNote);
|
|
183
|
-
const newData = parseYaml(newNote);
|
|
184
|
-
// Extract runs arrays (handle both single object and array formats)
|
|
185
|
-
const existingRuns = Array.isArray(existing.runs) ? existing.runs : [];
|
|
186
|
-
const newRuns = Array.isArray(newData.runs) ? newData.runs : [];
|
|
187
|
-
// Merge: append new runs to existing
|
|
188
|
-
const merged = {
|
|
189
|
-
...existing,
|
|
190
|
-
runs: [...existingRuns, ...newRuns],
|
|
191
|
-
};
|
|
192
|
-
return stringifyYaml(merged);
|
|
193
|
-
}
|
|
194
|
-
catch {
|
|
195
|
-
// If parsing fails, prefer new note (latest data)
|
|
196
|
-
return newNote;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Add or update a git note with atomic compare-and-swap
|
|
201
|
-
*
|
|
202
|
-
* Implements atomic optimistic locking using git plumbing commands.
|
|
203
|
-
* When a conflict is detected:
|
|
204
|
-
* 1. Read the current notes ref commit SHA (snapshot)
|
|
205
|
-
* 2. Read and merge the existing note
|
|
206
|
-
* 3. Build a new notes commit with merged content
|
|
207
|
-
* 4. Atomically update the ref only if it hasn't changed (compare-and-swap)
|
|
208
|
-
* 5. If ref changed, retry from step 1
|
|
86
|
+
* The merge strategy controls what happens when a note already exists.
|
|
87
|
+
* Default is `mergeReplace` (incoming content wins). Use `mergeAppendRuns`
|
|
88
|
+
* for validation history where runs accumulate per tree hash.
|
|
209
89
|
*
|
|
210
|
-
*
|
|
90
|
+
* Note: There is a small TOCTOU window between read and force-write.
|
|
91
|
+
* This is acceptable for history/cache data.
|
|
211
92
|
*
|
|
212
93
|
* @param notesRef - The notes reference (e.g., 'vibe-validate/validate')
|
|
213
94
|
* @param object - The git tree hash to attach the note to (must be from getGitTreeHash())
|
|
214
95
|
* @param content - The note content
|
|
215
|
-
* @param
|
|
96
|
+
* @param merge - Strategy for merging with existing note (default: mergeReplace)
|
|
216
97
|
* @returns true if note was added successfully
|
|
217
98
|
*
|
|
218
99
|
* @example
|
|
219
100
|
* ```typescript
|
|
220
|
-
*
|
|
221
|
-
* addNote('vibe-validate/
|
|
101
|
+
* // Run cache: replace existing (default)
|
|
102
|
+
* addNote('vibe-validate/run/abc/key', treeHash, cacheYaml);
|
|
103
|
+
*
|
|
104
|
+
* // Validation history: append runs
|
|
105
|
+
* addNote('vibe-validate/validate', treeHash, historyYaml, mergeAppendRuns);
|
|
222
106
|
* ```
|
|
223
107
|
*/
|
|
224
|
-
export function addNote(notesRef, object, content,
|
|
108
|
+
export function addNote(notesRef, object, content, merge = mergeReplace) {
|
|
225
109
|
validateNotesRef(notesRef);
|
|
226
110
|
validateTreeHash(object);
|
|
227
|
-
//
|
|
228
|
-
const fullRef = notesRef.startsWith('refs/')
|
|
229
|
-
? notesRef
|
|
230
|
-
: `refs/notes/${notesRef}`;
|
|
231
|
-
// If force is true, skip optimistic locking (legacy behavior)
|
|
232
|
-
if (force) {
|
|
233
|
-
const args = ['notes', `--ref=${notesRef}`, 'add', '-f', '-F', '-', object];
|
|
234
|
-
const result = executeGitCommand(args, {
|
|
235
|
-
stdin: content,
|
|
236
|
-
ignoreErrors: true,
|
|
237
|
-
suppressStderr: true,
|
|
238
|
-
});
|
|
239
|
-
return result.success;
|
|
240
|
-
}
|
|
241
|
-
// Fast path: Try to add note without force (for new notes)
|
|
111
|
+
// Fast path: Try to add note (works for new notes — no merge needed)
|
|
242
112
|
const addResult = executeGitCommand(['notes', `--ref=${notesRef}`, 'add', '-F', '-', object], {
|
|
243
113
|
stdin: content,
|
|
244
114
|
ignoreErrors: true,
|
|
245
115
|
suppressStderr: true,
|
|
246
116
|
});
|
|
247
117
|
if (addResult.success) {
|
|
248
|
-
return true; //
|
|
249
|
-
}
|
|
250
|
-
// Fast path failed - assume conflict and try atomic merge
|
|
251
|
-
// No need to parse stderr strings (fragile, locale-dependent, breaks across git versions)
|
|
252
|
-
// The atomic merge will fail safely if it's not actually a conflict
|
|
253
|
-
// Try atomic merge path with retry
|
|
254
|
-
const maxRetries = 3;
|
|
255
|
-
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
256
|
-
const success = attemptAtomicMerge(notesRef, fullRef, object, content);
|
|
257
|
-
if (success) {
|
|
258
|
-
// Success! Log for debugging if we had to retry (indicates concurrent writes)
|
|
259
|
-
if (attempt > 1) {
|
|
260
|
-
console.error(`[vibe-validate] Atomic merge succeeded on attempt ${attempt}/${maxRetries}`);
|
|
261
|
-
}
|
|
262
|
-
return true;
|
|
263
|
-
}
|
|
264
|
-
// Failed - retry if not last attempt
|
|
265
|
-
if (attempt === maxRetries) {
|
|
266
|
-
// All retries exhausted - log for debugging
|
|
267
|
-
console.error(`[vibe-validate] Atomic merge failed after ${maxRetries} attempts for ${object.slice(0, 12)}`);
|
|
268
|
-
return false;
|
|
269
|
-
}
|
|
118
|
+
return true; // Note didn't exist, added cleanly
|
|
270
119
|
}
|
|
271
|
-
|
|
120
|
+
// Note exists — read, apply merge strategy, force-write
|
|
121
|
+
return attemptMerge(notesRef, object, content, merge);
|
|
272
122
|
}
|
|
273
123
|
/**
|
|
274
124
|
* Read a git note
|
package/dist/git-notes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-notes.js","sourceRoot":"","sources":["../src/git-notes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAEtE,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"git-notes.js","sourceRoot":"","sources":["../src/git-notes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAEtE,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAW3B;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsB,CAAC,SAAS,EAAE,QAAQ,EAAE,EAA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AE3B,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;QAC1C,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,cAAc,QAAQ,EAAE,CAAC;IAE7B,MAAM,MAAM,GAAG,iBAAiB,CAAC,CAAC,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE;QACnE,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;KACrB,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ export { encodeRunCacheKey } from './cache-key.js';
|
|
|
14
14
|
export { extractYamlContent, extractYamlWithPreamble } from './yaml-detection.js';
|
|
15
15
|
export { isGitRepository, getGitDir, getRepositoryRoot, getCurrentBranch, getRemoteUrl, getHeadCommitSha, getHeadTreeSha, verifyRef, verifyRefOrThrow, hasNotesRef, isMergeInProgress, getDiffStats, getCommitCount, getNotesRefs } from './git-commands.js';
|
|
16
16
|
export { executeGitCommand, execGitCommand, tryGitCommand, validateGitRef, validateNotesRef, validateTreeHash, type GitExecutionOptions, type GitExecutionResult } from './git-executor.js';
|
|
17
|
-
export { addNote, readNote, removeNote, listNoteObjects, hasNote, listNotesRefs, removeNotesRefs, getNotesRefSha } from './git-notes.js';
|
|
17
|
+
export { addNote, readNote, removeNote, listNoteObjects, hasNote, listNotesRefs, removeNotesRefs, getNotesRefSha, mergeReplace, mergeAppendRuns, } from './git-notes.js';
|
|
18
|
+
export type { NoteMergeStrategy } from './git-notes.js';
|
|
18
19
|
export { getStagedFiles, getPartiallyStagedFiles } from './staging.js';
|
|
19
20
|
export { isCurrentBranchBehindTracking } from './tracking-branch.js';
|
|
20
21
|
export { fetchPRDetails, fetchPRChecks, getCurrentPR, listPullRequests, fetchRunLogs, fetchRunDetails, fetchRunJobs, listWorkflowRuns, type GitHubPullRequest, type GitHubRun, type GitHubJob } from './gh-commands.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGhF,OAAO,EACL,cAAc,EACd,eAAe,EACf,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,eAAe,EACf,OAAO,EACP,aAAa,EACb,eAAe,EACf,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;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EAChB,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAGhF,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export { isGitRepository, getGitDir, getRepositoryRoot, getCurrentBranch, getRem
|
|
|
21
21
|
// Secure git command execution (low-level - use high-level APIs when possible)
|
|
22
22
|
export { executeGitCommand, execGitCommand, tryGitCommand, validateGitRef, validateNotesRef, validateTreeHash } from './git-executor.js';
|
|
23
23
|
// Git notes operations (high-level abstraction)
|
|
24
|
-
export { addNote, readNote, removeNote, listNoteObjects, hasNote, listNotesRefs, removeNotesRefs, getNotesRefSha } from './git-notes.js';
|
|
24
|
+
export { addNote, readNote, removeNote, listNoteObjects, hasNote, listNotesRefs, removeNotesRefs, getNotesRefSha, mergeReplace, mergeAppendRuns, } from './git-notes.js';
|
|
25
25
|
// Git staging detection (prevent partially staged files in pre-commit)
|
|
26
26
|
export { getStagedFiles, getPartiallyStagedFiles } from './staging.js';
|
|
27
27
|
// Git tracking branch detection (check if current branch is behind remote)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,uDAAuD;AACvD,OAAO,EACL,cAAc,EACd,eAAe,EACf,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB,6CAA6C;AAC7C,OAAO,EACL,iBAAiB,EACjB,eAAe,EAGhB,MAAM,kBAAkB,CAAC;AAE1B,8CAA8C;AAC9C,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EAGtB,MAAM,yBAAyB,CAAC;AAEjC,qCAAqC;AACrC,OAAO,EACL,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB,wBAAwB;AACxB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,4DAA4D;AAC5D,OAAO,EACL,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,mBAAmB,CAAC;AAE3B,+EAA+E;AAC/E,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAGjB,MAAM,mBAAmB,CAAC;AAE3B,gDAAgD;AAChD,OAAO,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,eAAe,EACf,OAAO,EACP,aAAa,EACb,eAAe,EACf,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,uDAAuD;AACvD,OAAO,EACL,cAAc,EACd,eAAe,EACf,qBAAqB,EACtB,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AW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EAOhB,MAAM,qBAAqB,CAAC;AAK7B,4EAA4E;AAC5E,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibe-validate/git",
|
|
3
|
-
"version": "0.19.0-rc.
|
|
3
|
+
"version": "0.19.0-rc.12",
|
|
4
4
|
"description": "Git utilities for vibe-validate - tree hash calculation, branch sync, and post-merge cleanup",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"yaml": "^2.8.2",
|
|
42
|
-
"@vibe-validate/utils": "0.19.0-rc.
|
|
42
|
+
"@vibe-validate/utils": "0.19.0-rc.12"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^22.19.2",
|