mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 00:26:01 +00:00
feat/deno (#219)
* update bun version * fix module manager's em reference * add basic deno example * finalize
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/bknd-io/bknd/issues"
|
||||
},
|
||||
"packageManager": "bun@1.2.19",
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user