@heyhuynhgiabuu/pi-diff 0.7.2 → 0.7.4
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/core/apply-patch.d.ts +41 -0
- package/dist/core/apply-patch.d.ts.map +1 -0
- package/dist/core/apply-patch.js +208 -0
- package/dist/core/apply-patch.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +244 -279
- package/dist/index.js.map +1 -1
- package/dist/review/hunk-preview.d.ts +5 -2
- package/dist/review/hunk-preview.d.ts.map +1 -1
- package/dist/review/hunk-preview.js +16 -11
- package/dist/review/hunk-preview.js.map +1 -1
- package/package.json +60 -115
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* apply_patch — Multi-file patch engine.
|
|
3
|
+
*
|
|
4
|
+
* One call can add, update, delete, or move multiple files.
|
|
5
|
+
* Uses replace.ts cascading replacer for oldText → newText matching.
|
|
6
|
+
*/
|
|
7
|
+
export interface ApplyPatchChange {
|
|
8
|
+
/** Absolute path to the file. */
|
|
9
|
+
path: string;
|
|
10
|
+
action: "add" | "update" | "delete" | "move";
|
|
11
|
+
/** Content for new files (action=add). */
|
|
12
|
+
content?: string;
|
|
13
|
+
/** Text to find for updates (action=update). */
|
|
14
|
+
oldText?: string;
|
|
15
|
+
/** Replacement text for updates (action=update). */
|
|
16
|
+
newText?: string;
|
|
17
|
+
/** Destination path for moves (action=move). */
|
|
18
|
+
movePath?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ApplyPatchResult {
|
|
21
|
+
ok: boolean;
|
|
22
|
+
applied: AppliedChange[];
|
|
23
|
+
errors: ApplyPatchError[];
|
|
24
|
+
}
|
|
25
|
+
export interface AppliedChange {
|
|
26
|
+
path: string;
|
|
27
|
+
action: ApplyPatchChange["action"];
|
|
28
|
+
bytes?: number;
|
|
29
|
+
diff?: string;
|
|
30
|
+
movePath?: string;
|
|
31
|
+
oldContent?: string;
|
|
32
|
+
newContent?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ApplyPatchError {
|
|
35
|
+
path: string;
|
|
36
|
+
action: string;
|
|
37
|
+
error: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function executeApplyPatch(changes: ApplyPatchChange[]): Promise<ApplyPatchResult>;
|
|
40
|
+
export declare function formatApplyPatchResult(result: ApplyPatchResult): string;
|
|
41
|
+
//# sourceMappingURL=apply-patch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-patch.d.ts","sourceRoot":"","sources":["../../src/core/apply-patch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,WAAW,gBAAgB;IAChC,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC7C,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACd;AAsJD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAyC9F;AAMD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAgCvE"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* apply_patch — Multi-file patch engine.
|
|
3
|
+
*
|
|
4
|
+
* One call can add, update, delete, or move multiple files.
|
|
5
|
+
* Uses replace.ts cascading replacer for oldText → newText matching.
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from "node:fs";
|
|
8
|
+
import * as path from "node:path";
|
|
9
|
+
import { replace } from "./replace.js";
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
// Atomic file write
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
async function atomicWriteFile(filePath, content) {
|
|
14
|
+
const dir = path.dirname(filePath);
|
|
15
|
+
const tmp = path.join(dir, `.${path.basename(filePath)}.pi-apply-patch.${process.pid}.tmp`);
|
|
16
|
+
await fs.promises.writeFile(tmp, content, "utf8");
|
|
17
|
+
await fs.promises.rename(tmp, filePath);
|
|
18
|
+
}
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Individual change handlers
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
async function handleAdd(change) {
|
|
23
|
+
const content = change.content ?? "";
|
|
24
|
+
// Ensure trailing newline
|
|
25
|
+
const final = content.endsWith("\n") ? content : `${content}\n`;
|
|
26
|
+
// Create parent directories
|
|
27
|
+
const dir = path.dirname(change.path);
|
|
28
|
+
await fs.promises.mkdir(dir, { recursive: true });
|
|
29
|
+
await atomicWriteFile(change.path, final);
|
|
30
|
+
return {
|
|
31
|
+
path: change.path,
|
|
32
|
+
action: "add",
|
|
33
|
+
bytes: Buffer.byteLength(final, "utf8"),
|
|
34
|
+
newContent: final,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
async function handleUpdate(change) {
|
|
38
|
+
if (!change.oldText) {
|
|
39
|
+
throw new Error(`update requires oldText`);
|
|
40
|
+
}
|
|
41
|
+
if (change.oldText === change.newText) {
|
|
42
|
+
throw new Error(`oldText and newText are identical — no change`);
|
|
43
|
+
}
|
|
44
|
+
// Read current content
|
|
45
|
+
let content;
|
|
46
|
+
try {
|
|
47
|
+
content = await fs.promises.readFile(change.path, "utf8");
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
51
|
+
throw new Error(`cannot read ${change.path}: ${msg}`);
|
|
52
|
+
}
|
|
53
|
+
// Apply replacement using our cascading replacer
|
|
54
|
+
const result = replace(content, change.oldText, change.newText ?? "");
|
|
55
|
+
if (!result.changed) {
|
|
56
|
+
throw new Error(`oldText not found in ${change.path}`);
|
|
57
|
+
}
|
|
58
|
+
const newContent = result.content;
|
|
59
|
+
// Generate simple diff
|
|
60
|
+
const diff = generateDiff(change.path, content, newContent);
|
|
61
|
+
// Write atomically
|
|
62
|
+
await atomicWriteFile(change.path, newContent);
|
|
63
|
+
return {
|
|
64
|
+
path: change.path,
|
|
65
|
+
action: "update",
|
|
66
|
+
diff,
|
|
67
|
+
bytes: Buffer.byteLength(newContent, "utf8"),
|
|
68
|
+
oldContent: content,
|
|
69
|
+
newContent,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
async function handleDelete(change) {
|
|
73
|
+
// Verify file exists
|
|
74
|
+
try {
|
|
75
|
+
await fs.promises.access(change.path);
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
throw new Error(`file not found: ${change.path}`);
|
|
79
|
+
}
|
|
80
|
+
const oldContent = await fs.promises.readFile(change.path, "utf8");
|
|
81
|
+
await fs.promises.unlink(change.path);
|
|
82
|
+
return {
|
|
83
|
+
path: change.path,
|
|
84
|
+
action: "delete",
|
|
85
|
+
oldContent,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
async function handleMove(change) {
|
|
89
|
+
if (!change.movePath) {
|
|
90
|
+
throw new Error(`move requires movePath`);
|
|
91
|
+
}
|
|
92
|
+
// Verify source exists
|
|
93
|
+
try {
|
|
94
|
+
await fs.promises.access(change.path);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
throw new Error(`source file not found: ${change.path}`);
|
|
98
|
+
}
|
|
99
|
+
// Create parent directories for destination
|
|
100
|
+
const dir = path.dirname(change.movePath);
|
|
101
|
+
await fs.promises.mkdir(dir, { recursive: true });
|
|
102
|
+
// Move file
|
|
103
|
+
await fs.promises.rename(change.path, change.movePath);
|
|
104
|
+
return { path: change.path, action: "move", movePath: change.movePath };
|
|
105
|
+
}
|
|
106
|
+
// ---------------------------------------------------------------------------
|
|
107
|
+
// Diff generation (simple, for UI feedback)
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
function generateDiff(_filePath, oldContent, newContent) {
|
|
110
|
+
if (oldContent === newContent)
|
|
111
|
+
return undefined;
|
|
112
|
+
const oldLines = oldContent.split("\n");
|
|
113
|
+
const newLines = newContent.split("\n");
|
|
114
|
+
const maxLen = Math.max(oldLines.length, newLines.length);
|
|
115
|
+
let diff = "";
|
|
116
|
+
let hasChanges = false;
|
|
117
|
+
for (let i = 0; i < maxLen; i++) {
|
|
118
|
+
const oldLine = oldLines[i] ?? "";
|
|
119
|
+
const newLine = newLines[i] ?? "";
|
|
120
|
+
if (oldLine !== newLine) {
|
|
121
|
+
if (oldLine)
|
|
122
|
+
diff += `- ${oldLine}\n`;
|
|
123
|
+
if (newLine)
|
|
124
|
+
diff += `+ ${newLine}\n`;
|
|
125
|
+
hasChanges = true;
|
|
126
|
+
}
|
|
127
|
+
else if (oldLine) {
|
|
128
|
+
diff += ` ${oldLine}\n`;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return hasChanges ? diff : undefined;
|
|
132
|
+
}
|
|
133
|
+
// ---------------------------------------------------------------------------
|
|
134
|
+
// Main executor
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
export async function executeApplyPatch(changes) {
|
|
137
|
+
const applied = [];
|
|
138
|
+
const errors = [];
|
|
139
|
+
for (const change of changes) {
|
|
140
|
+
try {
|
|
141
|
+
let result;
|
|
142
|
+
switch (change.action) {
|
|
143
|
+
case "add":
|
|
144
|
+
result = await handleAdd(change);
|
|
145
|
+
break;
|
|
146
|
+
case "update":
|
|
147
|
+
result = await handleUpdate(change);
|
|
148
|
+
break;
|
|
149
|
+
case "delete":
|
|
150
|
+
result = await handleDelete(change);
|
|
151
|
+
break;
|
|
152
|
+
case "move":
|
|
153
|
+
result = await handleMove(change);
|
|
154
|
+
break;
|
|
155
|
+
default:
|
|
156
|
+
throw new Error(`unknown action: ${change.action}`);
|
|
157
|
+
}
|
|
158
|
+
applied.push(result);
|
|
159
|
+
}
|
|
160
|
+
catch (err) {
|
|
161
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
162
|
+
errors.push({
|
|
163
|
+
path: change.path,
|
|
164
|
+
action: change.action,
|
|
165
|
+
error: msg,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
ok: errors.length === 0,
|
|
171
|
+
applied,
|
|
172
|
+
errors,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
// ---------------------------------------------------------------------------
|
|
176
|
+
// Format result for tool output
|
|
177
|
+
// ---------------------------------------------------------------------------
|
|
178
|
+
export function formatApplyPatchResult(result) {
|
|
179
|
+
const lines = [];
|
|
180
|
+
if (result.applied.length > 0) {
|
|
181
|
+
lines.push(`Applied ${result.applied.length} change(s):`);
|
|
182
|
+
for (const change of result.applied) {
|
|
183
|
+
const rel = change.path;
|
|
184
|
+
switch (change.action) {
|
|
185
|
+
case "add":
|
|
186
|
+
lines.push(` A ${rel}`);
|
|
187
|
+
break;
|
|
188
|
+
case "update":
|
|
189
|
+
lines.push(` M ${rel}`);
|
|
190
|
+
break;
|
|
191
|
+
case "delete":
|
|
192
|
+
lines.push(` D ${rel}`);
|
|
193
|
+
break;
|
|
194
|
+
case "move":
|
|
195
|
+
lines.push(` M ${rel} -> ${change.movePath}`);
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (result.errors.length > 0) {
|
|
201
|
+
lines.push(`\nFailed ${result.errors.length} change(s):`);
|
|
202
|
+
for (const err of result.errors) {
|
|
203
|
+
lines.push(` [${err.action}] ${err.path}: ${err.error}`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return lines.join("\n");
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=apply-patch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-patch.js","sourceRoot":"","sources":["../../src/core/apply-patch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA0CvC,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,KAAK,UAAU,eAAe,CAAC,QAAgB,EAAE,OAAe;IAC/D,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,mBAAmB,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;IAC5F,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAClD,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CA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AAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC;YACxB,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;gBACvB,KAAK,KAAK;oBACT,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;oBACzB,MAAM;gBACP,KAAK,QAAQ;oBACZ,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;oBACzB,MAAM;gBACP,KAAK,QAAQ;oBACZ,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;oBACzB,MAAM;gBACP,KAAK,MAAM;oBACV,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;oBAC/C,MAAM;YACR,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,aAAa,CAAC,CAAC;QAC1D,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3D,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EACN,iBAAiB,EAEjB,WAAW,EACX,KAAK,UAAU,EACf,SAAS,EACT,eAAe,EACf,eAAe,EAGf,MAAM,gBAAgB,CAAC;AAYxB,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAmcxD,oFAAoF;AACpF,UAAU,UAAU;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAuKD,iBAAS,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIpD;AAgWD,iBAAe,aAAa,CAC3B,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,eAAe,GAAG,SAAS,EACrC,GAAG,SAAmB,EACtB,EAAE,GAAE,UAAgC,GAClC,OAAO,CAAC,MAAM,CAAC,CA+HjB;AAMD,iBAAe,WAAW,CACzB,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,eAAe,GAAG,SAAS,EACrC,GAAG,SAAoB,EACvB,EAAE,GAAE,UAAgC,GAClC,OAAO,CAAC,MAAM,CAAC,CA2JjB;AAMD,eAAO,MAAM,SAAS;;;;;;;;;CASrB,CAAC;AAEF,wBAA8B,qBAAqB,CAAC,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAggCnF"}
|