chore: seperate into packages

This commit is contained in:
Morten Olsen
2025-12-10 10:26:14 +01:00
parent f9494c88e2
commit d02102977a
40 changed files with 753 additions and 1175 deletions

View File

@@ -1 +1,4 @@
export * from './api.js';
export { Services } from './utils/utils.services.js';
export { StashRuntime } from './runtime.js';
export * from './services/documents/documents.js';
export * from './services/document-chunks/document-chunks.js';

View File

@@ -1,14 +1,32 @@
import { DocumentChunksService } from './exports.js';
import { DatabaseService } from './services/database/database.js';
import { DocumentsService } from './services/documents/documents.js';
import { WarmupService } from './services/warmup/warmup.js';
import { Services } from './utils/utils.services.js';
class StashRuntime {
#services: Services;
constructor(services: Services) { }
constructor(services = new Services()) {
this.#services = services;
services.set(StashRuntime, this);
}
public get database() {
return this.#services.get(DatabaseService);
}
public get documents() {
return this.#services.get(DocumentsService);
}
public get documentChunks() {
return this.#services.get(DocumentChunksService);
}
public get warmup() {
return this.#services.get(WarmupService);
}
}
export { StashRuntime };