UNPKG

tdd-guard

Version:

Automated Test-Driven Development enforcement for Claude Code

48 lines (47 loc) 1.34 kB
"use strict"; 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 saveInstructions(content) { this.store.set('instructions', 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 getInstructions() { return this.store.get('instructions') ?? null; } async clearTransientData() { Storage_1.TRANSIENT_DATA.forEach((key) => this.store.delete(key)); } } exports.MemoryStorage = MemoryStorage;