@strayl/coregit 0.2.5 → 0.2.6

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/types.ts +16 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strayl/coregit",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Official TypeScript SDK for the Coregit API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/types.ts CHANGED
@@ -162,11 +162,26 @@ export interface UpdateRefResult {
162
162
 
163
163
  // --- Commits ---
164
164
 
165
+ export interface EditOperation {
166
+ /** Replace lines [start, end] (1-based, inclusive). */
167
+ range?: [number, number];
168
+ /** Find this exact string and replace it. Must be unique in the file. */
169
+ old_string?: string;
170
+ /** Replacement content for old_string match. Omit to delete the match. */
171
+ new_string?: string;
172
+ /** New content for range-based edits. */
173
+ content?: string;
174
+ }
175
+
165
176
  export interface FileChange {
166
177
  path: string;
167
178
  content?: string;
168
179
  encoding?: "utf-8" | "base64";
169
- action?: "create" | "modify" | "delete";
180
+ action?: "create" | "edit" | "delete" | "rename";
181
+ /** Surgical edits for action: "edit". */
182
+ edits?: EditOperation[];
183
+ /** New path for action: "rename". */
184
+ new_path?: string;
170
185
  }
171
186
 
172
187
  export interface CreateCommitInput {