UNPKG

mlld

Version:

mlld: a modular prompt scripting language

91 lines (89 loc) 1.99 kB
import { __name, __publicField } from './chunk-OMKLS24H.mjs'; // core/registry/NoOpLockFile.ts var _NoOpLockFile = class _NoOpLockFile { constructor(path) { __publicField(this, "path"); __publicField(this, "inMemoryLock"); this.path = path; this.inMemoryLock = { version: "1.0.0", imports: {} }; } /** * Always returns empty lock file data */ async load() { return this.inMemoryLock; } /** * No-op - doesn't persist anything */ async save() { } /** * Adds import to in-memory store only */ async addImport(importPath, entry) { this.inMemoryLock.imports[importPath] = entry; } /** * Gets import from in-memory store */ async getImport(importPath) { return this.inMemoryLock.imports[importPath]; } /** * Removes import from in-memory store */ async removeImport(importPath) { delete this.inMemoryLock.imports[importPath]; } /** * Updates import in in-memory store */ async updateImport(importPath, updates) { const existing = this.inMemoryLock.imports[importPath]; if (existing) { this.inMemoryLock.imports[importPath] = { ...existing, ...updates }; } } /** * Check if import exists in in-memory store */ async hasImport(importPath) { return importPath in this.inMemoryLock.imports; } /** * List all imports from in-memory store */ async listImports() { return Object.keys(this.inMemoryLock.imports); } /** * Clear all imports from in-memory store */ async clear() { this.inMemoryLock.imports = {}; } /** * Always returns false - no file exists */ async exists() { return false; } /** * Get lock file data (in-memory only) */ getData() { return this.inMemoryLock; } }; __name(_NoOpLockFile, "NoOpLockFile"); var NoOpLockFile = _NoOpLockFile; export { NoOpLockFile }; //# sourceMappingURL=NoOpLockFile-2OKOC753.mjs.map //# sourceMappingURL=NoOpLockFile-2OKOC753.mjs.map