33 lines
822 B
TypeScript
33 lines
822 B
TypeScript
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 = 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 };
|