@@ -2,14 +2,13 @@ import {
22 EggContainerFactory ,
33 EggContext ,
44 EggObject ,
5- EggObjectLifeCycleContext ,
65 EggObjectFactory as TEggObjectFactory ,
76} from '@eggjs/tegg-runtime' ;
87import { EggObjectFactoryPrototype } from './EggObjectFactoryPrototype' ;
98import { EggObjectName } from '@eggjs/core-decorator' ;
109import { IdenticalUtil } from '@eggjs/tegg-lifecycle' ;
1110import { EggPrototype } from '@eggjs/tegg-metadata' ;
12- import { AbstractEggObjectFactory } from './AbstractEggObjectFactory ' ;
11+ import { EggObjectFactory } from './EggObjectFactory ' ;
1312
1413const OBJ = Symbol ( 'EggObjectFactoryObject#obj' ) ;
1514
@@ -18,26 +17,24 @@ export class EggObjectFactoryObject implements EggObject {
1817 readonly name : EggObjectName ;
1918 readonly ctx ?: EggContext ;
2019 readonly id : string ;
21- private [ OBJ ] : AbstractEggObjectFactory ;
20+ private [ OBJ ] : EggObjectFactory ;
2221
23- constructor ( name : EggObjectName , proto : EggObjectFactoryPrototype , ctx ?: EggContext ) {
22+ constructor ( name : EggObjectName , proto : EggObjectFactoryPrototype ) {
2423 this . proto = proto ;
2524 this . name = name ;
26- this . ctx = ctx ;
2725 this . id = IdenticalUtil . createObjectId ( this . proto . id , this . ctx ?. id ) ;
2826 }
2927
3028 get obj ( ) {
3129 if ( ! this [ OBJ ] ) {
32- this [ OBJ ] = this . proto . constructEggObject ( ) as AbstractEggObjectFactory ;
30+ this [ OBJ ] = this . proto . constructEggObject ( ) as EggObjectFactory ;
3331 this [ OBJ ] . eggContainerFactory = EggContainerFactory ;
34- this [ OBJ ] . eggContext = this . ctx ;
3532 }
3633 return this [ OBJ ] ;
3734 }
3835
39- static async createObject ( name : EggObjectName , proto : EggPrototype , _ : EggObjectLifeCycleContext , ctx ?: EggContext ) : Promise < EggObjectFactoryObject > {
40- return new EggObjectFactoryObject ( name , proto as EggObjectFactoryPrototype , ctx ) ;
36+ static async createObject ( name : EggObjectName , proto : EggPrototype ) : Promise < EggObjectFactoryObject > {
37+ return new EggObjectFactoryObject ( name , proto as EggObjectFactoryPrototype ) ;
4138 }
4239
4340 readonly isReady : true ;
0 commit comments