tdd-guard
Version:
TDD Guard enforces Test-Driven Development principles using Claude Code hooks
42 lines (41 loc) • 1.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MemoryStorage = void 0;
const Storage_1 = require("./Storage");
class MemoryStorage {
store = new Map();
async saveTest(content) {
this.store.set('test', content);
}
async saveTodo(content) {
this.store.set('todo', content);
}
async saveModifications(content) {
this.store.set('modifications', content);
}
async saveLint(content) {
this.store.set('lint', content);
}
async saveConfig(content) {
this.store.set('config', content);
}
async getTest() {
return this.store.get('test') ?? null;
}
async getTodo() {
return this.store.get('todo') ?? null;
}
async getModifications() {
return this.store.get('modifications') ?? null;
}
async getLint() {
return this.store.get('lint') ?? null;
}
async getConfig() {
return this.store.get('config') ?? null;
}
async clearTransientData() {
Storage_1.TRANSIENT_DATA.forEach((key) => this.store.delete(key));
}
}
exports.MemoryStorage = MemoryStorage;