longcelot-sheet-db
Version:
Google Sheets-backed staging database adapter for Node.js with schema-first design
20 lines • 980 B
TypeScript
export type MutationResult = {
ok: true;
} | {
ok: false;
reason: string;
};
/**
* Removes a single-line `columnName: builder()...,` entry from a schema file's `columns` block.
* Only ever removes a line it can confirm is a complete, self-contained property (balanced
* brackets, and either a trailing comma or it's the last property before the closing `}`) —
* anything it can't confirm returns `ok: false` instead of guessing and corrupting the file.
*/
export declare function removeColumnLine(filePath: string, columnName: string): MutationResult;
/**
* Renames the object key of a `columns` entry in place, leaving everything else on/after that
* line untouched. Safe even for multi-line column definitions — only the key text on the
* opening line changes, nothing is deleted or re-parsed.
*/
export declare function renameColumnKey(filePath: string, oldName: string, newName: string): MutationResult;
//# sourceMappingURL=schemaFileMutator.d.ts.map