feat: create tm-core and apps/cli (#1093)

- add typescript
- add npm workspaces
This commit is contained in:
Ralph Khreish
2025-09-01 21:44:43 +02:00
parent a7ad4c8e92
commit 0f3ab00f26
162 changed files with 22235 additions and 706 deletions

View File

@@ -0,0 +1,46 @@
/**
* @fileoverview Storage layer for the tm-core package
* This file exports all storage-related classes and interfaces
*/
// Export storage implementations
export { FileStorage } from './file-storage/index.js';
export { ApiStorage, type ApiStorageConfig } from './api-storage.js';
export { StorageFactory } from './storage-factory.js';
// Export storage interface and types
export type {
IStorage,
StorageStats
} from '../interfaces/storage.interface.js';
// Placeholder exports - these will be implemented in later tasks
export interface StorageAdapter {
read(path: string): Promise<string | null>;
write(path: string, data: string): Promise<void>;
exists(path: string): Promise<boolean>;
delete(path: string): Promise<void>;
}
/**
* @deprecated This is a placeholder class that will be properly implemented in later tasks
*/
export class PlaceholderStorage implements StorageAdapter {
private data = new Map<string, string>();
async read(path: string): Promise<string | null> {
return this.data.get(path) || null;
}
async write(path: string, data: string): Promise<void> {
this.data.set(path, data);
}
async exists(path: string): Promise<boolean> {
return this.data.has(path);
}
async delete(path: string): Promise<void> {
this.data.delete(path);
}
}