feat/deno (#219)

* update bun version

* fix module manager's em reference

* add basic deno example

* finalize
This commit is contained in:
dswbx
2025-07-22 20:32:07 +02:00
committed by GitHub
parent ca55503e66
commit bebf9e0411
6 changed files with 33 additions and 2 deletions
+7
View File
@@ -67,6 +67,13 @@ export class EntityManager<TBD extends object = DefaultDB> {
return new EntityManager(this._entities, this.connection, this._relations, this._indices);
}
clear(): this {
this._entities = [];
this._relations = [];
this._indices = [];
return this;
}
get entities(): Entity[] {
return this._entities;
}
+3 -1
View File
@@ -267,7 +267,9 @@ export class ModuleManager {
ctx(rebuild?: boolean): ModuleBuildContext {
if (rebuild) {
this.rebuildServer();
this.em = new EntityManager([], this.connection, [], [], this.emgr);
this.em = this.em
? this.em.clear()
: new EntityManager([], this.connection, [], [], this.emgr);
this.guard = new Guard();
}