@eggjs/tegg-types 4.0.0-beta.4 → 4.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/aop/Advice.d.ts +42 -0
- package/dist/aop/Advice.js +1 -0
- package/dist/aop/Aspect.d.ts +17 -0
- package/dist/aop/Aspect.js +5 -0
- package/dist/aop/Crosscut.d.ts +32 -0
- package/dist/aop/Crosscut.js +6 -0
- package/dist/aop/Pointcut.d.ts +29 -0
- package/dist/aop/Pointcut.js +20 -0
- package/dist/aop/index.d.ts +5 -0
- package/dist/aop/index.js +5 -0
- package/dist/common/Graph.d.ts +6 -0
- package/dist/common/Graph.js +1 -0
- package/dist/common/Logger.d.ts +10 -0
- package/dist/common/Logger.js +1 -0
- package/dist/common/ModuleConfig.d.ts +29 -0
- package/dist/common/ModuleConfig.js +1 -0
- package/dist/common/RuntimeConfig.d.ts +18 -0
- package/dist/common/RuntimeConfig.js +1 -0
- package/dist/common/index.d.ts +5 -0
- package/dist/common/index.js +1 -0
- package/dist/controller-decorator/HTTPController.d.ts +8 -0
- package/dist/controller-decorator/HTTPController.js +1 -0
- package/dist/controller-decorator/HTTPMethod.d.ts +10 -0
- package/dist/controller-decorator/HTTPMethod.js +1 -0
- package/dist/controller-decorator/HTTPParam.d.ts +12 -0
- package/dist/controller-decorator/HTTPParam.js +1 -0
- package/dist/controller-decorator/MetadataKey.d.ts +23 -0
- package/dist/controller-decorator/MetadataKey.js +24 -0
- package/dist/controller-decorator/builder.d.ts +10 -0
- package/dist/controller-decorator/builder.js +1 -0
- package/dist/controller-decorator/index.d.ts +9 -0
- package/dist/controller-decorator/index.js +4 -0
- package/dist/controller-decorator/model/ControllerMetadata.d.ts +15 -0
- package/dist/controller-decorator/model/ControllerMetadata.js +1 -0
- package/dist/controller-decorator/model/MethodMeta.d.ts +10 -0
- package/dist/controller-decorator/model/MethodMeta.js +1 -0
- package/dist/controller-decorator/model/index.d.ts +4 -0
- package/dist/controller-decorator/model/index.js +3 -0
- package/dist/controller-decorator/model/types.d.ts +49 -0
- package/dist/controller-decorator/model/types.js +45 -0
- package/dist/core-decorator/ContextProto.d.ts +10 -0
- package/dist/core-decorator/ContextProto.js +3 -0
- package/dist/core-decorator/Inject.d.ts +7 -0
- package/dist/core-decorator/Inject.js +1 -0
- package/dist/core-decorator/Metadata.d.ts +4 -0
- package/dist/core-decorator/Metadata.js +1 -0
- package/dist/core-decorator/MultiInstanceProto.d.ts +31 -0
- package/dist/core-decorator/MultiInstanceProto.js +1 -0
- package/dist/core-decorator/Prototype.d.ts +13 -0
- package/dist/core-decorator/Prototype.js +5 -0
- package/dist/core-decorator/SingletonProto.d.ts +10 -0
- package/dist/core-decorator/SingletonProto.js +1 -0
- package/dist/core-decorator/enum/AccessLevel.d.ts +7 -0
- package/dist/core-decorator/enum/AccessLevel.js +9 -0
- package/dist/core-decorator/enum/EggType.d.ts +7 -0
- package/dist/core-decorator/enum/EggType.js +9 -0
- package/dist/core-decorator/enum/InjectType.d.ts +7 -0
- package/dist/core-decorator/enum/InjectType.js +9 -0
- package/dist/core-decorator/enum/MultiInstanceType.d.ts +7 -0
- package/dist/core-decorator/enum/MultiInstanceType.js +9 -0
- package/dist/core-decorator/enum/ObjectInitType.d.ts +10 -0
- package/dist/core-decorator/enum/ObjectInitType.js +15 -0
- package/dist/core-decorator/enum/Qualifier.d.ts +10 -0
- package/dist/core-decorator/enum/Qualifier.js +11 -0
- package/dist/core-decorator/enum/index.d.ts +7 -0
- package/dist/core-decorator/enum/index.js +8 -0
- package/dist/core-decorator/index.d.ts +18 -0
- package/dist/core-decorator/index.js +12 -0
- package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +62 -0
- package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.js +4 -0
- package/dist/core-decorator/model/EggPrototypeInfo.d.ts +39 -0
- package/dist/core-decorator/model/EggPrototypeInfo.js +3 -0
- package/dist/core-decorator/model/InjectConstructorInfo.d.ts +23 -0
- package/dist/core-decorator/model/InjectConstructorInfo.js +1 -0
- package/dist/core-decorator/model/InjectObjectInfo.d.ts +18 -0
- package/dist/core-decorator/model/InjectObjectInfo.js +1 -0
- package/{core-decorator → dist/core-decorator}/model/QualifierInfo.d.ts +8 -5
- package/dist/core-decorator/model/QualifierInfo.js +1 -0
- package/dist/core-decorator/model/index.d.ts +6 -0
- package/dist/core-decorator/model/index.js +4 -0
- package/dist/dal/Qualifier.d.ts +9 -0
- package/dist/dal/Qualifier.js +10 -0
- package/dist/dal/decorator/Column.d.ts +182 -0
- package/dist/dal/decorator/Column.js +1 -0
- package/dist/dal/decorator/DataSourceQualifier.d.ts +5 -0
- package/dist/dal/decorator/DataSourceQualifier.js +6 -0
- package/dist/dal/decorator/Table.d.ts +27 -0
- package/dist/dal/decorator/Table.js +1 -0
- package/dist/dal/decorator/index.d.ts +19 -0
- package/dist/dal/decorator/index.js +3 -0
- package/dist/dal/enum/ColumnFormat.d.ts +8 -0
- package/dist/dal/enum/ColumnFormat.js +10 -0
- package/dist/dal/enum/ColumnType.d.ts +43 -0
- package/dist/dal/enum/ColumnType.js +45 -0
- package/dist/dal/enum/CompressionType.d.ts +8 -0
- package/dist/dal/enum/CompressionType.js +10 -0
- package/dist/dal/enum/IndexStoreType.d.ts +7 -0
- package/dist/dal/enum/IndexStoreType.js +9 -0
- package/dist/dal/enum/IndexType.d.ts +10 -0
- package/dist/dal/enum/IndexType.js +12 -0
- package/dist/dal/enum/InsertMethod.d.ts +8 -0
- package/dist/dal/enum/InsertMethod.js +10 -0
- package/dist/dal/enum/RowFormat.d.ts +11 -0
- package/dist/dal/enum/RowFormat.js +13 -0
- package/dist/dal/enum/SqlType.d.ts +10 -0
- package/dist/dal/enum/SqlType.js +12 -0
- package/dist/dal/enum/Templates.d.ts +8 -0
- package/dist/dal/enum/Templates.js +10 -0
- package/dist/dal/enum/index.d.ts +10 -0
- package/dist/dal/enum/index.js +11 -0
- package/dist/dal/index.d.ts +21 -0
- package/dist/dal/index.js +14 -0
- package/dist/dal/type/BaseDao.d.ts +13 -0
- package/dist/dal/type/BaseDao.js +1 -0
- package/dist/dal/type/CodeGenerator.d.ts +9 -0
- package/dist/dal/type/CodeGenerator.js +1 -0
- package/dist/dal/type/ColumnTsType.d.ts +45 -0
- package/dist/dal/type/ColumnTsType.js +1 -0
- package/dist/dal/type/DateSource.d.ts +16 -0
- package/dist/dal/type/DateSource.js +1 -0
- package/dist/dal/type/Spatial.d.ts +14 -0
- package/dist/dal/type/Spatial.js +1 -0
- package/dist/dal/type/SqlMap.d.ts +22 -0
- package/dist/dal/type/SqlMap.js +1 -0
- package/dist/dal/type/index.d.ts +7 -0
- package/dist/dal/type/index.js +1 -0
- package/dist/dynamic-inject.d.ts +18 -0
- package/dist/dynamic-inject.js +5 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.js +38 -0
- package/dist/lifecycle/EggObjectLifecycle.d.ts +40 -0
- package/dist/lifecycle/EggObjectLifecycle.js +1 -0
- package/dist/lifecycle/IdenticalObject.d.ts +7 -0
- package/dist/lifecycle/IdenticalObject.js +1 -0
- package/dist/lifecycle/LifecycleHook.d.ts +16 -0
- package/dist/lifecycle/LifecycleHook.js +1 -0
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.js +1 -0
- package/dist/metadata/enum/ProtoDescriptorType.d.ts +6 -0
- package/dist/metadata/enum/ProtoDescriptorType.js +8 -0
- package/dist/metadata/enum/index.d.ts +2 -0
- package/dist/metadata/enum/index.js +3 -0
- package/dist/metadata/errors.d.ts +8 -0
- package/dist/metadata/errors.js +10 -0
- package/dist/metadata/index.d.ts +7 -0
- package/dist/metadata/index.js +6 -0
- package/dist/metadata/model/EggPrototype.d.ts +145 -0
- package/dist/metadata/model/EggPrototype.js +3 -0
- package/dist/metadata/model/LoadUnit.d.ts +34 -0
- package/dist/metadata/model/LoadUnit.js +10 -0
- package/dist/metadata/model/Loader.d.ts +12 -0
- package/dist/metadata/model/Loader.js +1 -0
- package/dist/metadata/model/ProtoDescriptor.d.ts +29 -0
- package/dist/metadata/model/ProtoDescriptor.js +3 -0
- package/dist/metadata/model/index.d.ts +5 -0
- package/dist/metadata/model/index.js +5 -0
- package/dist/orm.d.ts +33 -0
- package/dist/orm.js +10 -0
- package/dist/runtime/Factory.d.ts +11 -0
- package/dist/runtime/Factory.js +1 -0
- package/dist/runtime/index.d.ts +6 -0
- package/dist/runtime/index.js +3 -0
- package/dist/runtime/model/EggContainer.d.ts +16 -0
- package/dist/runtime/model/EggContainer.js +1 -0
- package/dist/runtime/model/EggContext.d.ts +10 -0
- package/dist/runtime/model/EggContext.js +1 -0
- package/dist/runtime/model/EggObject.d.ts +29 -0
- package/dist/runtime/model/EggObject.js +12 -0
- package/dist/runtime/model/LoadUnitInstance.d.ts +13 -0
- package/dist/runtime/model/LoadUnitInstance.js +1 -0
- package/dist/runtime/model/index.d.ts +5 -0
- package/dist/runtime/model/index.js +3 -0
- package/dist/schedule.d.ts +33 -0
- package/dist/schedule.js +13 -0
- package/dist/transaction.d.ts +26 -0
- package/dist/transaction.js +13 -0
- package/package.json +109 -67
- package/aop/Advice.d.ts +0 -39
- package/aop/Advice.js +0 -2
- package/aop/Aspect.d.ts +0 -13
- package/aop/Aspect.js +0 -2
- package/aop/Crosscut.d.ts +0 -28
- package/aop/Crosscut.js +0 -3
- package/aop/Pointcut.d.ts +0 -25
- package/aop/Pointcut.js +0 -17
- package/aop/index.d.ts +0 -4
- package/aop/index.js +0 -5
- package/common/Graph.d.ts +0 -3
- package/common/Graph.js +0 -2
- package/common/Logger.d.ts +0 -7
- package/common/Logger.js +0 -2
- package/common/ModuleConfig.d.ts +0 -27
- package/common/ModuleConfig.js +0 -2
- package/common/RuntimeConfig.d.ts +0 -15
- package/common/RuntimeConfig.js +0 -2
- package/common/index.d.ts +0 -4
- package/common/index.js +0 -5
- package/controller-decorator/HTTPController.d.ts +0 -5
- package/controller-decorator/HTTPController.js +0 -2
- package/controller-decorator/HTTPMethod.d.ts +0 -6
- package/controller-decorator/HTTPMethod.js +0 -2
- package/controller-decorator/HTTPParam.d.ts +0 -9
- package/controller-decorator/HTTPParam.js +0 -2
- package/controller-decorator/MetadataKey.d.ts +0 -20
- package/controller-decorator/MetadataKey.js +0 -21
- package/controller-decorator/builder.d.ts +0 -6
- package/controller-decorator/builder.js +0 -2
- package/controller-decorator/index.d.ts +0 -6
- package/controller-decorator/index.js +0 -7
- package/controller-decorator/model/ControllerMetadata.d.ts +0 -11
- package/controller-decorator/model/ControllerMetadata.js +0 -2
- package/controller-decorator/model/MethodMeta.d.ts +0 -6
- package/controller-decorator/model/MethodMeta.js +0 -2
- package/controller-decorator/model/index.d.ts +0 -3
- package/controller-decorator/model/index.js +0 -4
- package/controller-decorator/model/types.d.ts +0 -45
- package/controller-decorator/model/types.js +0 -42
- package/core-decorator/ContextProto.d.ts +0 -6
- package/core-decorator/ContextProto.js +0 -2
- package/core-decorator/Inject.d.ts +0 -4
- package/core-decorator/Inject.js +0 -2
- package/core-decorator/Metadata.d.ts +0 -1
- package/core-decorator/Metadata.js +0 -2
- package/core-decorator/MultiInstanceProto.d.ts +0 -26
- package/core-decorator/MultiInstanceProto.js +0 -2
- package/core-decorator/Prototype.d.ts +0 -8
- package/core-decorator/Prototype.js +0 -2
- package/core-decorator/SingletonProto.d.ts +0 -6
- package/core-decorator/SingletonProto.js +0 -2
- package/core-decorator/enum/AccessLevel.d.ts +0 -4
- package/core-decorator/enum/AccessLevel.js +0 -8
- package/core-decorator/enum/EggType.d.ts +0 -4
- package/core-decorator/enum/EggType.js +0 -6
- package/core-decorator/enum/InjectType.d.ts +0 -4
- package/core-decorator/enum/InjectType.js +0 -6
- package/core-decorator/enum/MultiInstanceType.d.ts +0 -4
- package/core-decorator/enum/MultiInstanceType.js +0 -6
- package/core-decorator/enum/ObjectInitType.d.ts +0 -7
- package/core-decorator/enum/ObjectInitType.js +0 -15
- package/core-decorator/enum/Qualifier.d.ts +0 -7
- package/core-decorator/enum/Qualifier.js +0 -8
- package/core-decorator/enum/index.d.ts +0 -6
- package/core-decorator/enum/index.js +0 -7
- package/core-decorator/index.d.ts +0 -8
- package/core-decorator/index.js +0 -9
- package/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +0 -57
- package/core-decorator/model/EggMultiInstancePrototypeInfo.js +0 -2
- package/core-decorator/model/EggPrototypeInfo.d.ts +0 -34
- package/core-decorator/model/EggPrototypeInfo.js +0 -2
- package/core-decorator/model/InjectConstructorInfo.d.ts +0 -19
- package/core-decorator/model/InjectConstructorInfo.js +0 -2
- package/core-decorator/model/InjectObjectInfo.d.ts +0 -15
- package/core-decorator/model/InjectObjectInfo.js +0 -2
- package/core-decorator/model/QualifierInfo.js +0 -2
- package/core-decorator/model/index.d.ts +0 -5
- package/core-decorator/model/index.js +0 -6
- package/dal/Qualifier.d.ts +0 -6
- package/dal/Qualifier.js +0 -7
- package/dal/decorator/Column.d.ts +0 -178
- package/dal/decorator/Column.js +0 -2
- package/dal/decorator/DataSourceQualifier.d.ts +0 -2
- package/dal/decorator/DataSourceQualifier.js +0 -3
- package/dal/decorator/Table.d.ts +0 -21
- package/dal/decorator/Table.js +0 -2
- package/dal/decorator/index.d.ts +0 -14
- package/dal/decorator/index.js +0 -4
- package/dal/enum/ColumnFormat.d.ts +0 -5
- package/dal/enum/ColumnFormat.js +0 -7
- package/dal/enum/ColumnType.d.ts +0 -40
- package/dal/enum/ColumnType.js +0 -48
- package/dal/enum/CompressionType.d.ts +0 -5
- package/dal/enum/CompressionType.js +0 -7
- package/dal/enum/IndexStoreType.d.ts +0 -4
- package/dal/enum/IndexStoreType.js +0 -6
- package/dal/enum/IndexType.d.ts +0 -7
- package/dal/enum/IndexType.js +0 -9
- package/dal/enum/InsertMethod.d.ts +0 -5
- package/dal/enum/InsertMethod.js +0 -7
- package/dal/enum/RowFormat.d.ts +0 -8
- package/dal/enum/RowFormat.js +0 -10
- package/dal/enum/SqlType.d.ts +0 -7
- package/dal/enum/SqlType.js +0 -9
- package/dal/enum/Templates.d.ts +0 -5
- package/dal/enum/Templates.js +0 -7
- package/dal/enum/index.d.ts +0 -9
- package/dal/enum/index.js +0 -10
- package/dal/index.d.ts +0 -4
- package/dal/index.js +0 -5
- package/dal/type/BaseDao.d.ts +0 -9
- package/dal/type/BaseDao.js +0 -2
- package/dal/type/CodeGenerator.d.ts +0 -6
- package/dal/type/CodeGenerator.js +0 -2
- package/dal/type/ColumnTsType.d.ts +0 -41
- package/dal/type/ColumnTsType.js +0 -2
- package/dal/type/DateSource.d.ts +0 -13
- package/dal/type/DateSource.js +0 -2
- package/dal/type/Spatial.d.ts +0 -11
- package/dal/type/Spatial.js +0 -2
- package/dal/type/SqlMap.d.ts +0 -18
- package/dal/type/SqlMap.js +0 -2
- package/dal/type/index.d.ts +0 -6
- package/dal/type/index.js +0 -7
- package/dynamic-inject.d.ts +0 -13
- package/dynamic-inject.js +0 -2
- package/index.d.ts +0 -12
- package/index.js +0 -13
- package/lifecycle/EggObjectLifecycle.d.ts +0 -35
- package/lifecycle/EggObjectLifecycle.js +0 -2
- package/lifecycle/IdenticalObject.d.ts +0 -4
- package/lifecycle/IdenticalObject.js +0 -2
- package/lifecycle/LifecycleHook.d.ts +0 -13
- package/lifecycle/LifecycleHook.js +0 -2
- package/lifecycle/index.d.ts +0 -3
- package/lifecycle/index.js +0 -4
- package/metadata/enum/ProtoDescriptorType.d.ts +0 -3
- package/metadata/enum/ProtoDescriptorType.js +0 -5
- package/metadata/enum/index.d.ts +0 -1
- package/metadata/enum/index.js +0 -2
- package/metadata/errors.d.ts +0 -5
- package/metadata/errors.js +0 -7
- package/metadata/index.d.ts +0 -3
- package/metadata/index.js +0 -4
- package/metadata/model/EggPrototype.d.ts +0 -136
- package/metadata/model/EggPrototype.js +0 -2
- package/metadata/model/LoadUnit.d.ts +0 -29
- package/metadata/model/LoadUnit.js +0 -7
- package/metadata/model/Loader.d.ts +0 -7
- package/metadata/model/Loader.js +0 -2
- package/metadata/model/ProtoDescriptor.d.ts +0 -22
- package/metadata/model/ProtoDescriptor.js +0 -2
- package/metadata/model/index.d.ts +0 -4
- package/metadata/model/index.js +0 -5
- package/orm.d.ts +0 -30
- package/orm.js +0 -7
- package/runtime/Factory.d.ts +0 -6
- package/runtime/Factory.js +0 -2
- package/runtime/index.d.ts +0 -2
- package/runtime/index.js +0 -3
- package/runtime/model/EggContainer.d.ts +0 -11
- package/runtime/model/EggContainer.js +0 -2
- package/runtime/model/EggContext.d.ts +0 -7
- package/runtime/model/EggContext.js +0 -2
- package/runtime/model/EggObject.d.ts +0 -24
- package/runtime/model/EggObject.js +0 -9
- package/runtime/model/LoadUnitInstance.d.ts +0 -9
- package/runtime/model/LoadUnitInstance.js +0 -2
- package/runtime/model/index.d.ts +0 -4
- package/runtime/model/index.js +0 -5
- package/schedule.d.ts +0 -30
- package/schedule.js +0 -10
- package/transaction.d.ts +0 -23
- package/transaction.js +0 -10
package/dal/type/DateSource.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface PaginateData<T> {
|
|
2
|
-
total: number;
|
|
3
|
-
pageNum: number;
|
|
4
|
-
rows: Array<T>;
|
|
5
|
-
}
|
|
6
|
-
export interface DataSource<T> {
|
|
7
|
-
execute(sqlName: string, data?: any): Promise<Array<T>>;
|
|
8
|
-
executeScalar(sqlName: string, data?: any): Promise<T | null>;
|
|
9
|
-
executeRaw(sqlName: string, data?: any): Promise<Array<any>>;
|
|
10
|
-
executeRawScalar(sqlName: string, data?: any): Promise<any | null>;
|
|
11
|
-
paginate(sqlName: string, data: any, currentPage: number, perPageCount: number): Promise<PaginateData<T>>;
|
|
12
|
-
count(sqlName: string, data?: any): Promise<number>;
|
|
13
|
-
}
|
package/dal/type/DateSource.js
DELETED
package/dal/type/Spatial.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface Point {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
5
|
-
export type Line = Array<Point>;
|
|
6
|
-
export type Polygon = Array<Line>;
|
|
7
|
-
export type Geometry = Point | Line | Polygon;
|
|
8
|
-
export type MultiPoint = Array<Point>;
|
|
9
|
-
export type MultiLine = Array<Line>;
|
|
10
|
-
export type MultiPolygon = Array<Polygon>;
|
|
11
|
-
export type GeometryCollection = Array<Point | Line | Polygon>;
|
package/dal/type/Spatial.js
DELETED
package/dal/type/SqlMap.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { SqlType } from '../enum/index.js';
|
|
2
|
-
export interface BaseSqlMap {
|
|
3
|
-
type?: SqlType;
|
|
4
|
-
}
|
|
5
|
-
export interface FullSqlMap extends BaseSqlMap {
|
|
6
|
-
type: SqlType.DELETE | SqlType.INSERT | SqlType.UPDATE | SqlType.SELECT;
|
|
7
|
-
sql: string;
|
|
8
|
-
}
|
|
9
|
-
export interface BlockSqlMap extends BaseSqlMap {
|
|
10
|
-
type: SqlType.BLOCK;
|
|
11
|
-
content: string;
|
|
12
|
-
}
|
|
13
|
-
export type SqlMap = FullSqlMap | BlockSqlMap;
|
|
14
|
-
export interface GenerateSqlMap {
|
|
15
|
-
name: string;
|
|
16
|
-
type: SqlType.DELETE | SqlType.UPDATE | SqlType.INSERT | SqlType.SELECT;
|
|
17
|
-
sql: string;
|
|
18
|
-
}
|
package/dal/type/SqlMap.js
DELETED
package/dal/type/index.d.ts
DELETED
package/dal/type/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './BaseDao.js';
|
|
2
|
-
export * from './CodeGenerator.js';
|
|
3
|
-
export * from './ColumnTsType.js';
|
|
4
|
-
export * from './DateSource.js';
|
|
5
|
-
export * from './Spatial.js';
|
|
6
|
-
export * from './SqlMap.js';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGFBQWEsQ0FBQyJ9
|
package/dynamic-inject.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EggProtoImplClass, QualifierValue } from './core-decorator/index.js';
|
|
2
|
-
export type EggAbstractClazz<T extends object = object> = Function & {
|
|
3
|
-
prototype: T;
|
|
4
|
-
};
|
|
5
|
-
export type ImplTypeEnum = {
|
|
6
|
-
[id: string]: QualifierValue;
|
|
7
|
-
};
|
|
8
|
-
export type ImplDecorator<T extends object, Enum extends ImplTypeEnum> = (type: Enum[keyof Enum]) => ((clazz: EggProtoImplClass<T>) => void);
|
|
9
|
-
export interface EggObjectFactory {
|
|
10
|
-
getEggObject<T extends object>(abstractClazz: EggAbstractClazz<T>, qualifierValue: QualifierValue): Promise<T>;
|
|
11
|
-
getEggObjects<T extends object>(abstractClazz: EggAbstractClazz<T>): Promise<AsyncIterable<T>>;
|
|
12
|
-
}
|
|
13
|
-
export declare const QUALIFIER_IMPL_MAP: unique symbol;
|
package/dynamic-inject.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const QUALIFIER_IMPL_MAP = Symbol.for('EggPrototype#qualifierImplMap');
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHluYW1pYy1pbmplY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkeW5hbWljLWluamVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjQSxNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLCtCQUErQixDQUFDLENBQUMifQ==
|
package/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './aop/index.js';
|
|
2
|
-
export * from './common/index.js';
|
|
3
|
-
export * from './controller-decorator/index.js';
|
|
4
|
-
export * from './core-decorator/index.js';
|
|
5
|
-
export * from './dal/index.js';
|
|
6
|
-
export * from './dynamic-inject.js';
|
|
7
|
-
export * from './lifecycle/index.js';
|
|
8
|
-
export * from './metadata/index.js';
|
|
9
|
-
export * from './orm.js';
|
|
10
|
-
export * from './runtime/index.js';
|
|
11
|
-
export * from './schedule.js';
|
|
12
|
-
export * from './transaction.js';
|
package/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './aop/index.js';
|
|
2
|
-
export * from './common/index.js';
|
|
3
|
-
export * from './controller-decorator/index.js';
|
|
4
|
-
export * from './core-decorator/index.js';
|
|
5
|
-
export * from './dal/index.js';
|
|
6
|
-
export * from './dynamic-inject.js';
|
|
7
|
-
export * from './lifecycle/index.js';
|
|
8
|
-
export * from './metadata/index.js';
|
|
9
|
-
export * from './orm.js';
|
|
10
|
-
export * from './runtime/index.js';
|
|
11
|
-
export * from './schedule.js';
|
|
12
|
-
export * from './transaction.js';
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGdCQUFnQixDQUFDO0FBQy9CLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLGtCQUFrQixDQUFDIn0=
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { EggObject, EggObjectLifeCycleContext } from '../runtime/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* lifecycle hook interface for egg object
|
|
4
|
-
*/
|
|
5
|
-
export interface EggObjectLifecycle {
|
|
6
|
-
/**
|
|
7
|
-
* call before project load
|
|
8
|
-
*/
|
|
9
|
-
preLoad?(ctx: EggObjectLifeCycleContext): Promise<void>;
|
|
10
|
-
/**
|
|
11
|
-
* call after construct
|
|
12
|
-
*/
|
|
13
|
-
postConstruct?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* call before inject deps
|
|
16
|
-
*/
|
|
17
|
-
preInject?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* call after inject deps
|
|
20
|
-
*/
|
|
21
|
-
postInject?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* before object is ready
|
|
24
|
-
*/
|
|
25
|
-
init?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* call before destroy
|
|
28
|
-
*/
|
|
29
|
-
preDestroy?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* destroy the object
|
|
32
|
-
*/
|
|
33
|
-
destroy?(ctx: EggObjectLifeCycleContext, eggObj: EggObject): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
export type LifecycleHookName = keyof EggObjectLifecycle;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IdenticalObject } from './IdenticalObject.js';
|
|
2
|
-
export interface LifecycleContext {
|
|
3
|
-
}
|
|
4
|
-
export interface LifecycleObject<T extends LifecycleContext> extends IdenticalObject {
|
|
5
|
-
preLoad?(): Promise<void>;
|
|
6
|
-
init?(ctx: T): Promise<void>;
|
|
7
|
-
destroy?(ctx: T): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
export interface LifecycleHook<T extends LifecycleContext, R extends LifecycleObject<T>> {
|
|
10
|
-
preCreate?(ctx: T, obj: R): Promise<void>;
|
|
11
|
-
postCreate?(ctx: T, obj: R): Promise<void>;
|
|
12
|
-
preDestroy?(ctx: T, obj: R): Promise<void>;
|
|
13
|
-
}
|
package/lifecycle/index.d.ts
DELETED
package/lifecycle/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export * from './EggObjectLifecycle.js';
|
|
2
|
-
export * from './IdenticalObject.js';
|
|
3
|
-
export * from './LifecycleHook.js';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxvQkFBb0IsQ0FBQyJ9
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export var ProtoDescriptorType;
|
|
2
|
-
(function (ProtoDescriptorType) {
|
|
3
|
-
ProtoDescriptorType["CLASS"] = "CLASS";
|
|
4
|
-
})(ProtoDescriptorType || (ProtoDescriptorType = {}));
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdG9EZXNjcmlwdG9yVHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlByb3RvRGVzY3JpcHRvclR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksbUJBRVg7QUFGRCxXQUFZLG1CQUFtQjtJQUM3QixzQ0FBZSxDQUFBO0FBQ2pCLENBQUMsRUFGVyxtQkFBbUIsS0FBbkIsbUJBQW1CLFFBRTlCIn0=
|
package/metadata/enum/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ProtoDescriptorType.js';
|
package/metadata/enum/index.js
DELETED
package/metadata/errors.d.ts
DELETED
package/metadata/errors.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export var ErrorCodes;
|
|
2
|
-
(function (ErrorCodes) {
|
|
3
|
-
ErrorCodes["EGG_PROTO_NOT_FOUND"] = "EGG_PROTO_NOT_FOUND";
|
|
4
|
-
ErrorCodes["MULTI_PROTO_FOUND"] = "MULTI_PROTO_FOUND";
|
|
5
|
-
ErrorCodes["INCOMPATIBLE_PROTO_INJECT"] = "INCOMPATIBLE_PROTO_INJECT";
|
|
6
|
-
})(ErrorCodes || (ErrorCodes = {}));
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXJyb3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLFVBSVg7QUFKRCxXQUFZLFVBQVU7SUFDcEIseURBQTJDLENBQUE7SUFDM0MscURBQXVDLENBQUE7SUFDdkMscUVBQXVELENBQUE7QUFDekQsQ0FBQyxFQUpXLFVBQVUsS0FBVixVQUFVLFFBSXJCIn0=
|
package/metadata/index.d.ts
DELETED
package/metadata/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export * from './errors.js';
|
|
2
|
-
export * from './model/index.js';
|
|
3
|
-
export * from './enum/index.js';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsaUJBQWlCLENBQUMifQ==
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { AccessLevel, EggProtoImplClass, EggPrototypeInfo, EggPrototypeName, InjectType, MetaDataKey, ObjectInitTypeLike, QualifierAttribute, QualifierInfo, QualifierValue } from '../../core-decorator/index.js';
|
|
2
|
-
import { LifecycleContext, LifecycleObject } from '../../lifecycle/index.js';
|
|
3
|
-
import { LoadUnit } from './LoadUnit.js';
|
|
4
|
-
export interface InjectObjectProto {
|
|
5
|
-
/**
|
|
6
|
-
* property name obj inject to
|
|
7
|
-
*/
|
|
8
|
-
refName: PropertyKey;
|
|
9
|
-
/**
|
|
10
|
-
* obj's name will be injected
|
|
11
|
-
*/
|
|
12
|
-
objName: PropertyKey;
|
|
13
|
-
/**
|
|
14
|
-
* inject qualifiers
|
|
15
|
-
*/
|
|
16
|
-
qualifiers: QualifierInfo[];
|
|
17
|
-
/**
|
|
18
|
-
* optional inject
|
|
19
|
-
*/
|
|
20
|
-
optional?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* inject prototype
|
|
23
|
-
*/
|
|
24
|
-
proto: EggPrototype;
|
|
25
|
-
}
|
|
26
|
-
export interface InjectConstructorProto {
|
|
27
|
-
/**
|
|
28
|
-
* inject args index
|
|
29
|
-
*/
|
|
30
|
-
refIndex: number;
|
|
31
|
-
/**
|
|
32
|
-
* property name obj inject to
|
|
33
|
-
*/
|
|
34
|
-
refName: PropertyKey;
|
|
35
|
-
/**
|
|
36
|
-
* obj's name will be injected
|
|
37
|
-
*/
|
|
38
|
-
objName: PropertyKey;
|
|
39
|
-
/**
|
|
40
|
-
* inject qualifiers
|
|
41
|
-
*/
|
|
42
|
-
qualifiers: QualifierInfo[];
|
|
43
|
-
/**
|
|
44
|
-
* optional inject
|
|
45
|
-
*/
|
|
46
|
-
optional?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* inject prototype
|
|
49
|
-
*/
|
|
50
|
-
proto: EggPrototype;
|
|
51
|
-
}
|
|
52
|
-
export interface InjectObject {
|
|
53
|
-
/**
|
|
54
|
-
* property name obj inject to
|
|
55
|
-
*/
|
|
56
|
-
refName: PropertyKey;
|
|
57
|
-
/**
|
|
58
|
-
* obj's name will be injected
|
|
59
|
-
*/
|
|
60
|
-
objName: PropertyKey;
|
|
61
|
-
/**
|
|
62
|
-
* obj's initType will be injected
|
|
63
|
-
* if null same as current obj
|
|
64
|
-
*/
|
|
65
|
-
initType?: ObjectInitTypeLike;
|
|
66
|
-
/**
|
|
67
|
-
* optional inject
|
|
68
|
-
*/
|
|
69
|
-
optional?: boolean;
|
|
70
|
-
}
|
|
71
|
-
export interface InjectConstructor {
|
|
72
|
-
/**
|
|
73
|
-
* property name obj inject to
|
|
74
|
-
*/
|
|
75
|
-
refIndex: number;
|
|
76
|
-
/**
|
|
77
|
-
* property name obj inject to
|
|
78
|
-
*/
|
|
79
|
-
refName: PropertyKey;
|
|
80
|
-
/**
|
|
81
|
-
* obj's name will be injected
|
|
82
|
-
*/
|
|
83
|
-
objName: PropertyKey;
|
|
84
|
-
/**
|
|
85
|
-
* obj's initType will be injected
|
|
86
|
-
* if null same as current obj
|
|
87
|
-
*/
|
|
88
|
-
initType?: ObjectInitTypeLike;
|
|
89
|
-
/**
|
|
90
|
-
* optional inject
|
|
91
|
-
*/
|
|
92
|
-
optional?: boolean;
|
|
93
|
-
}
|
|
94
|
-
export type EggPrototypeClass = new (...args: any[]) => EggPrototype;
|
|
95
|
-
export interface EggPrototypeLifecycleContext extends LifecycleContext {
|
|
96
|
-
clazz: EggProtoImplClass;
|
|
97
|
-
prototypeInfo: EggPrototypeInfo;
|
|
98
|
-
loadUnit: LoadUnit;
|
|
99
|
-
}
|
|
100
|
-
export interface EggPrototype extends LifecycleObject<EggPrototypeLifecycleContext> {
|
|
101
|
-
[key: symbol]: PropertyDescriptor;
|
|
102
|
-
readonly name: EggPrototypeName;
|
|
103
|
-
readonly initType: ObjectInitTypeLike;
|
|
104
|
-
readonly accessLevel: AccessLevel;
|
|
105
|
-
readonly loadUnitId: string;
|
|
106
|
-
readonly injectObjects: Array<InjectObjectProto | InjectConstructorProto>;
|
|
107
|
-
readonly injectType?: InjectType;
|
|
108
|
-
readonly className?: string;
|
|
109
|
-
readonly multiInstanceConstructorIndex?: number;
|
|
110
|
-
readonly multiInstanceConstructorAttributes?: QualifierAttribute[];
|
|
111
|
-
/**
|
|
112
|
-
* get metadata for key
|
|
113
|
-
* @param {MetaDataKey} metadataKey
|
|
114
|
-
*/
|
|
115
|
-
getMetaData<T>(metadataKey: MetaDataKey): T | undefined;
|
|
116
|
-
/**
|
|
117
|
-
* verify proto is satisfied with qualifier
|
|
118
|
-
*
|
|
119
|
-
* default qualifier:
|
|
120
|
-
* - load unit name
|
|
121
|
-
* - init type
|
|
122
|
-
*
|
|
123
|
-
* @param qualifier
|
|
124
|
-
*/
|
|
125
|
-
verifyQualifier(qualifier: QualifierInfo): boolean;
|
|
126
|
-
verifyQualifiers(qualifiers: QualifierInfo[]): boolean;
|
|
127
|
-
getQualifier(attribute: QualifierAttribute): QualifierValue | undefined;
|
|
128
|
-
/**
|
|
129
|
-
* construct egg object, not trigger lifecycle method/hook
|
|
130
|
-
*/
|
|
131
|
-
constructEggObject(...args: any): object;
|
|
132
|
-
}
|
|
133
|
-
export interface EggPrototypeWithClazz extends EggPrototype {
|
|
134
|
-
clazz?: EggProtoImplClass;
|
|
135
|
-
}
|
|
136
|
-
export type EggPrototypeCreator = (ctx: EggPrototypeLifecycleContext) => EggPrototype;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { EggPrototypeName, QualifierInfo } from '../../core-decorator/index.js';
|
|
2
|
-
import { LifecycleContext, LifecycleObject } from '../../lifecycle/index.js';
|
|
3
|
-
import type { EggPrototype } from './EggPrototype.js';
|
|
4
|
-
import { Loader } from './Loader.js';
|
|
5
|
-
export declare enum EggLoadUnitType {
|
|
6
|
-
MODULE = "MODULE",
|
|
7
|
-
PLUGIN = "PLUGIN",
|
|
8
|
-
APP = "APP"
|
|
9
|
-
}
|
|
10
|
-
export type EggLoadUnitTypeLike = EggLoadUnitType | string;
|
|
11
|
-
export interface LoadUnitLifecycleContext extends LifecycleContext {
|
|
12
|
-
unitPath: string;
|
|
13
|
-
loader: Loader;
|
|
14
|
-
}
|
|
15
|
-
export interface LoadUnit extends LifecycleObject<LoadUnitLifecycleContext> {
|
|
16
|
-
readonly name: string;
|
|
17
|
-
readonly unitPath: string;
|
|
18
|
-
readonly type: EggLoadUnitTypeLike;
|
|
19
|
-
iterateEggPrototype(): IterableIterator<EggPrototype>;
|
|
20
|
-
registerEggPrototype(proto: EggPrototype): void;
|
|
21
|
-
deletePrototype(proto: EggPrototype): void;
|
|
22
|
-
getEggPrototype(name: EggPrototypeName, qualifiers: QualifierInfo[]): EggPrototype[];
|
|
23
|
-
containPrototype(proto: EggPrototype): boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface LoadUnitPair {
|
|
26
|
-
loadUnit: LoadUnit;
|
|
27
|
-
ctx: LoadUnitLifecycleContext;
|
|
28
|
-
}
|
|
29
|
-
export type LoadUnitCreator = (ctx: LoadUnitLifecycleContext) => LoadUnit;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export var EggLoadUnitType;
|
|
2
|
-
(function (EggLoadUnitType) {
|
|
3
|
-
EggLoadUnitType["MODULE"] = "MODULE";
|
|
4
|
-
EggLoadUnitType["PLUGIN"] = "PLUGIN";
|
|
5
|
-
EggLoadUnitType["APP"] = "APP";
|
|
6
|
-
})(EggLoadUnitType || (EggLoadUnitType = {}));
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9hZFVuaXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJMb2FkVW5pdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSxNQUFNLENBQU4sSUFBWSxlQUlYO0FBSkQsV0FBWSxlQUFlO0lBQ3pCLG9DQUFpQixDQUFBO0lBQ2pCLG9DQUFpQixDQUFBO0lBQ2pCLDhCQUFXLENBQUE7QUFDYixDQUFDLEVBSlcsZUFBZSxLQUFmLGVBQWUsUUFJMUIifQ==
|
package/metadata/model/Loader.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AccessLevel, EggPrototypeInfo, ObjectInitTypeLike, QualifierInfo } from '../../core-decorator/index.js';
|
|
2
|
-
import { ProtoDescriptorType } from '../enum/index.js';
|
|
3
|
-
export type ProtoDescriptorTypeLike = ProtoDescriptorType | string;
|
|
4
|
-
export interface InjectObjectDescriptor {
|
|
5
|
-
refName: PropertyKey;
|
|
6
|
-
objName: PropertyKey;
|
|
7
|
-
qualifiers: QualifierInfo[];
|
|
8
|
-
}
|
|
9
|
-
export interface ProtoDescriptor extends EggPrototypeInfo {
|
|
10
|
-
name: PropertyKey;
|
|
11
|
-
accessLevel: AccessLevel;
|
|
12
|
-
initType: ObjectInitTypeLike;
|
|
13
|
-
qualifiers: QualifierInfo[];
|
|
14
|
-
injectObjects: InjectObjectDescriptor[];
|
|
15
|
-
protoImplType: string;
|
|
16
|
-
properQualifiers: Record<PropertyKey, QualifierInfo[]>;
|
|
17
|
-
defineModuleName: string;
|
|
18
|
-
defineUnitPath: string;
|
|
19
|
-
instanceModuleName: string;
|
|
20
|
-
instanceDefineUnitPath: string;
|
|
21
|
-
equal(protoDescriptor: ProtoDescriptor): boolean;
|
|
22
|
-
}
|
package/metadata/model/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * from './EggPrototype.js';
|
|
2
|
-
export * from './Loader.js';
|
|
3
|
-
export * from './LoadUnit.js';
|
|
4
|
-
export * from './ProtoDescriptor.js';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsc0JBQXNCLENBQUMifQ==
|
package/orm.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface AttributeOptions {
|
|
2
|
-
name?: string;
|
|
3
|
-
allowNull?: boolean;
|
|
4
|
-
autoIncrement?: boolean;
|
|
5
|
-
primary?: boolean;
|
|
6
|
-
unique?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface IndexOptions {
|
|
9
|
-
unique?: boolean;
|
|
10
|
-
primary?: boolean;
|
|
11
|
-
name?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ModelParams {
|
|
14
|
-
tableName?: string;
|
|
15
|
-
dataSource?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ModelIndexInfo {
|
|
18
|
-
fields: string[];
|
|
19
|
-
options?: IndexOptions;
|
|
20
|
-
}
|
|
21
|
-
export interface ModelAttributeInfo {
|
|
22
|
-
dataType: string;
|
|
23
|
-
options?: AttributeOptions;
|
|
24
|
-
}
|
|
25
|
-
export declare const MODEL_PROTO_IMPL_TYPE = "MODEL_PROTO";
|
|
26
|
-
export declare const IS_MODEL: unique symbol;
|
|
27
|
-
export declare const MODEL_DATA_SOURCE: unique symbol;
|
|
28
|
-
export declare const MODEL_DATA_TABLE_NAME: unique symbol;
|
|
29
|
-
export declare const MODEL_DATA_INDICES: unique symbol;
|
|
30
|
-
export declare const MODEL_DATA_ATTRIBUTES: unique symbol;
|
package/orm.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const MODEL_PROTO_IMPL_TYPE = 'MODEL_PROTO';
|
|
2
|
-
export const IS_MODEL = Symbol.for('EggPrototype#model#isModel');
|
|
3
|
-
export const MODEL_DATA_SOURCE = Symbol.for('EggPrototype#model#dataSource');
|
|
4
|
-
export const MODEL_DATA_TABLE_NAME = Symbol.for('EggPrototype#model#tableName');
|
|
5
|
-
export const MODEL_DATA_INDICES = Symbol.for('EggPrototype#model#indices');
|
|
6
|
-
export const MODEL_DATA_ATTRIBUTES = Symbol.for('EggPrototype#model#attributes');
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsib3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtDQSxNQUFNLENBQUMsTUFBTSxxQkFBcUIsR0FBRyxhQUFhLENBQUM7QUFFbkQsTUFBTSxDQUFDLE1BQU0sUUFBUSxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsNEJBQTRCLENBQUMsQ0FBQztBQUNqRSxNQUFNLENBQUMsTUFBTSxpQkFBaUIsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLCtCQUErQixDQUFDLENBQUM7QUFDN0UsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyw4QkFBOEIsQ0FBQyxDQUFDO0FBQ2hGLE1BQU0sQ0FBQyxNQUFNLGtCQUFrQixHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsNEJBQTRCLENBQUMsQ0FBQztBQUMzRSxNQUFNLENBQUMsTUFBTSxxQkFBcUIsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLCtCQUErQixDQUFDLENBQUMifQ==
|
package/runtime/Factory.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { EggObjectName } from '../core-decorator/index.js';
|
|
2
|
-
import type { LifecycleContext } from '../lifecycle/index.js';
|
|
3
|
-
import type { EggPrototype } from '../metadata/index.js';
|
|
4
|
-
import type { EggContainer, EggObject, EggObjectLifeCycleContext } from './model/index.js';
|
|
5
|
-
export type ContainerGetMethod = (proto: EggPrototype) => EggContainer<LifecycleContext>;
|
|
6
|
-
export type CreateObjectMethod = (name: EggObjectName, proto: EggPrototype, lifecycleContext: EggObjectLifeCycleContext) => Promise<EggObject>;
|
package/runtime/Factory.js
DELETED
package/runtime/index.d.ts
DELETED
package/runtime/index.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export * from './Factory.js';
|
|
2
|
-
export * from './model/index.js';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGtCQUFrQixDQUFDIn0=
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EggObjectName, EggPrototypeName } from '../../core-decorator/index.js';
|
|
2
|
-
import { LifecycleContext, LifecycleObject } from '../../lifecycle/index.js';
|
|
3
|
-
import { EggPrototype } from '../../metadata/index.js';
|
|
4
|
-
import { EggObject } from './EggObject.js';
|
|
5
|
-
export interface EggContainer<T extends LifecycleContext> extends LifecycleObject<T> {
|
|
6
|
-
iterateProtoToCreate(): IterableIterator<[EggObjectName, EggPrototype]>;
|
|
7
|
-
addProtoToCreate(name: EggPrototypeName, proto: EggPrototype): void;
|
|
8
|
-
deleteProtoToCreate(name: EggPrototypeName): void;
|
|
9
|
-
getOrCreateEggObject(name: EggPrototypeName, proto: EggPrototype): Promise<EggObject>;
|
|
10
|
-
getEggObject(name: EggPrototypeName, proto: EggPrototype): EggObject;
|
|
11
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { EggContainer } from './EggContainer.js';
|
|
2
|
-
export interface EggContextLifecycleContext {
|
|
3
|
-
}
|
|
4
|
-
export interface EggRuntimeContext extends EggContainer<EggContextLifecycleContext> {
|
|
5
|
-
get(key: string | symbol): any | undefined;
|
|
6
|
-
set(key: string | symbol, val: any): void;
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { EggPrototypeName } from '../../core-decorator/index.js';
|
|
2
|
-
import { LifecycleContext, LifecycleObject } from '../../lifecycle/index.js';
|
|
3
|
-
import { EggPrototype, LoadUnit } from '../../metadata/index.js';
|
|
4
|
-
import type { EggRuntimeContext } from './EggContext.js';
|
|
5
|
-
import type { LoadUnitInstance } from './LoadUnitInstance.js';
|
|
6
|
-
export declare enum EggObjectStatus {
|
|
7
|
-
PENDING = "PENDING",
|
|
8
|
-
READY = "READY",
|
|
9
|
-
ERROR = "ERROR",
|
|
10
|
-
DESTROYING = "DESTROYING",
|
|
11
|
-
DESTROYED = "DESTROYED"
|
|
12
|
-
}
|
|
13
|
-
export interface EggObjectLifeCycleContext extends LifecycleContext {
|
|
14
|
-
readonly loadUnit: LoadUnit;
|
|
15
|
-
readonly loadUnitInstance: LoadUnitInstance;
|
|
16
|
-
}
|
|
17
|
-
export interface EggObject extends LifecycleObject<EggObjectLifeCycleContext> {
|
|
18
|
-
readonly isReady: boolean;
|
|
19
|
-
readonly obj: Record<string | symbol, any>;
|
|
20
|
-
readonly proto: EggPrototype;
|
|
21
|
-
readonly name: EggPrototypeName;
|
|
22
|
-
readonly ctx?: EggRuntimeContext;
|
|
23
|
-
injectProperty(name: string, descriptor: PropertyDescriptor): void;
|
|
24
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export var EggObjectStatus;
|
|
2
|
-
(function (EggObjectStatus) {
|
|
3
|
-
EggObjectStatus["PENDING"] = "PENDING";
|
|
4
|
-
EggObjectStatus["READY"] = "READY";
|
|
5
|
-
EggObjectStatus["ERROR"] = "ERROR";
|
|
6
|
-
EggObjectStatus["DESTROYING"] = "DESTROYING";
|
|
7
|
-
EggObjectStatus["DESTROYED"] = "DESTROYED";
|
|
8
|
-
})(EggObjectStatus || (EggObjectStatus = {}));
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWdnT2JqZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiRWdnT2JqZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU1BLE1BQU0sQ0FBTixJQUFZLGVBTVg7QUFORCxXQUFZLGVBQWU7SUFDekIsc0NBQW1CLENBQUE7SUFDbkIsa0NBQWUsQ0FBQTtJQUNmLGtDQUFlLENBQUE7SUFDZiw0Q0FBeUIsQ0FBQTtJQUN6QiwwQ0FBdUIsQ0FBQTtBQUN6QixDQUFDLEVBTlcsZUFBZSxLQUFmLGVBQWUsUUFNMUIifQ==
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { LoadUnit } from '../../metadata/index.js';
|
|
2
|
-
import type { EggContainer } from './EggContainer.js';
|
|
3
|
-
export interface LoadUnitInstanceLifecycleContext {
|
|
4
|
-
loadUnit: LoadUnit;
|
|
5
|
-
}
|
|
6
|
-
export interface LoadUnitInstance extends EggContainer<LoadUnitInstanceLifecycleContext> {
|
|
7
|
-
readonly name: string;
|
|
8
|
-
readonly loadUnit: LoadUnit;
|
|
9
|
-
}
|