feat: add corestore service

This commit is contained in:
2026-05-02 15:01:41 +00:00
commit 29f0d94e86
15 changed files with 10113 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import * as plugins from './corestore.plugins.js';
import * as paths from './corestore.paths.js';
import { CoreStore } from './corestore.classes.corestore.js';
export { CoreStore };
let coreStoreInstance: CoreStore | null = null;
export const runCli = async () => {
const projectinfo = await plugins.projectinfo.ProjectInfo.create(paths.packageDir);
console.log(`corestore@v${projectinfo.npm.version}`);
coreStoreInstance = new CoreStore();
await coreStoreInstance.start();
console.log('corestore successfully started');
};
export const stop = async () => {
if (coreStoreInstance) {
await coreStoreInstance.stop();
coreStoreInstance = null;
}
};