@eggjs/tegg-types 4.0.0-beta.34 → 4.0.0-beta.36
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/dist/aop/Advice.d.ts +39 -36
- package/dist/aop/Advice.js +1 -2
- package/dist/aop/Aspect.d.ts +15 -11
- package/dist/aop/Aspect.js +5 -2
- package/dist/aop/Crosscut.d.ts +27 -23
- package/dist/aop/Crosscut.js +6 -3
- package/dist/aop/Pointcut.d.ts +27 -23
- package/dist/aop/Pointcut.js +9 -15
- package/dist/aop/index.d.ts +5 -4
- package/dist/aop/index.js +5 -5
- package/dist/common/Graph.d.ts +5 -2
- package/dist/common/Graph.js +1 -2
- package/dist/common/Logger.d.ts +9 -6
- package/dist/common/Logger.js +1 -2
- package/dist/common/ModuleConfig.d.ts +24 -22
- package/dist/common/ModuleConfig.js +1 -2
- package/dist/common/RuntimeConfig.d.ts +17 -14
- package/dist/common/RuntimeConfig.js +1 -2
- package/dist/common/index.d.ts +5 -4
- package/dist/common/index.js +1 -5
- package/dist/controller-decorator/HTTPController.d.ts +7 -4
- package/dist/controller-decorator/HTTPController.js +1 -2
- package/dist/controller-decorator/HTTPMethod.d.ts +10 -5
- package/dist/controller-decorator/HTTPMethod.js +1 -2
- package/dist/controller-decorator/HTTPParam.d.ts +9 -6
- package/dist/controller-decorator/HTTPParam.js +1 -2
- package/dist/controller-decorator/MetadataKey.d.ts +23 -20
- package/dist/controller-decorator/MetadataKey.js +24 -21
- package/dist/controller-decorator/builder.d.ts +10 -5
- package/dist/controller-decorator/builder.js +1 -2
- package/dist/controller-decorator/index.d.ts +10 -6
- package/dist/controller-decorator/index.js +4 -7
- package/dist/controller-decorator/model/ControllerMetadata.d.ts +14 -10
- package/dist/controller-decorator/model/ControllerMetadata.js +1 -2
- package/dist/controller-decorator/model/MethodMeta.d.ts +9 -5
- package/dist/controller-decorator/model/MethodMeta.js +1 -2
- package/dist/controller-decorator/model/index.d.ts +4 -3
- package/dist/controller-decorator/model/index.js +3 -4
- package/dist/controller-decorator/model/types.d.ts +47 -44
- package/dist/controller-decorator/model/types.js +37 -34
- package/dist/core-decorator/ContextProto.d.ts +9 -5
- package/dist/core-decorator/ContextProto.js +3 -2
- package/dist/core-decorator/Inject.d.ts +6 -3
- package/dist/core-decorator/Inject.js +1 -2
- package/dist/core-decorator/Metadata.d.ts +4 -1
- package/dist/core-decorator/Metadata.js +1 -2
- package/dist/core-decorator/MultiInstanceProto.d.ts +28 -23
- package/dist/core-decorator/MultiInstanceProto.js +1 -2
- package/dist/core-decorator/Prototype.d.ts +12 -7
- package/dist/core-decorator/Prototype.js +5 -2
- package/dist/core-decorator/SingletonProto.d.ts +9 -5
- package/dist/core-decorator/SingletonProto.js +1 -2
- package/dist/core-decorator/enum/AccessLevel.d.ts +7 -4
- package/dist/core-decorator/enum/AccessLevel.js +7 -6
- package/dist/core-decorator/enum/EggType.d.ts +7 -4
- package/dist/core-decorator/enum/EggType.js +7 -4
- package/dist/core-decorator/enum/InjectType.d.ts +7 -4
- package/dist/core-decorator/enum/InjectType.js +7 -4
- package/dist/core-decorator/enum/MultiInstanceType.d.ts +7 -4
- package/dist/core-decorator/enum/MultiInstanceType.js +7 -4
- package/dist/core-decorator/enum/ObjectInitType.d.ts +10 -7
- package/dist/core-decorator/enum/ObjectInitType.js +12 -12
- package/dist/core-decorator/enum/Qualifier.d.ts +10 -7
- package/dist/core-decorator/enum/Qualifier.js +11 -8
- package/dist/core-decorator/enum/index.d.ts +7 -6
- package/dist/core-decorator/enum/index.js +8 -7
- package/dist/core-decorator/index.d.ts +18 -8
- package/dist/core-decorator/index.js +12 -9
- package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +58 -53
- package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.js +4 -4
- package/dist/core-decorator/model/EggPrototypeInfo.d.ts +38 -33
- package/dist/core-decorator/model/EggPrototypeInfo.js +3 -3
- package/dist/core-decorator/model/InjectConstructorInfo.d.ts +22 -18
- package/dist/core-decorator/model/InjectConstructorInfo.js +1 -2
- package/dist/core-decorator/model/InjectObjectInfo.d.ts +17 -14
- package/dist/core-decorator/model/InjectObjectInfo.js +1 -2
- package/dist/core-decorator/model/QualifierInfo.d.ts +39 -36
- package/dist/core-decorator/model/QualifierInfo.js +1 -2
- package/dist/core-decorator/model/index.d.ts +6 -5
- package/dist/core-decorator/model/index.js +4 -6
- package/dist/dal/Qualifier.d.ts +9 -6
- package/dist/dal/Qualifier.js +10 -7
- package/dist/dal/decorator/Column.d.ts +145 -141
- package/dist/dal/decorator/Column.js +1 -2
- package/dist/dal/decorator/DataSourceQualifier.d.ts +5 -2
- package/dist/dal/decorator/DataSourceQualifier.js +6 -3
- package/dist/dal/decorator/Table.d.ts +26 -20
- package/dist/dal/decorator/Table.js +1 -2
- package/dist/dal/decorator/index.d.ts +18 -13
- package/dist/dal/decorator/index.js +3 -4
- package/dist/dal/enum/ColumnFormat.d.ts +8 -5
- package/dist/dal/enum/ColumnFormat.js +8 -5
- package/dist/dal/enum/ColumnType.d.ts +43 -40
- package/dist/dal/enum/ColumnType.js +43 -46
- package/dist/dal/enum/CompressionType.d.ts +8 -5
- package/dist/dal/enum/CompressionType.js +8 -5
- package/dist/dal/enum/IndexStoreType.d.ts +7 -4
- package/dist/dal/enum/IndexStoreType.js +7 -4
- package/dist/dal/enum/IndexType.d.ts +10 -7
- package/dist/dal/enum/IndexType.js +10 -7
- package/dist/dal/enum/InsertMethod.d.ts +8 -5
- package/dist/dal/enum/InsertMethod.js +8 -5
- package/dist/dal/enum/RowFormat.d.ts +11 -8
- package/dist/dal/enum/RowFormat.js +11 -8
- package/dist/dal/enum/SqlType.d.ts +10 -7
- package/dist/dal/enum/SqlType.js +10 -7
- package/dist/dal/enum/Templates.d.ts +8 -5
- package/dist/dal/enum/Templates.js +8 -5
- package/dist/dal/enum/index.d.ts +10 -9
- package/dist/dal/enum/index.js +11 -10
- package/dist/dal/index.d.ts +21 -4
- package/dist/dal/index.js +13 -5
- package/dist/dal/type/BaseDao.d.ts +12 -8
- package/dist/dal/type/BaseDao.js +1 -2
- package/dist/dal/type/CodeGenerator.d.ts +8 -5
- package/dist/dal/type/CodeGenerator.js +1 -2
- package/dist/dal/type/ColumnTsType.d.ts +44 -40
- package/dist/dal/type/ColumnTsType.js +1 -2
- package/dist/dal/type/DateSource.d.ts +14 -11
- package/dist/dal/type/DateSource.js +1 -2
- package/dist/dal/type/Spatial.d.ts +13 -10
- package/dist/dal/type/Spatial.js +1 -2
- package/dist/dal/type/SqlMap.d.ts +18 -14
- package/dist/dal/type/SqlMap.js +1 -2
- package/dist/dal/type/index.d.ts +7 -6
- package/dist/dal/type/index.js +1 -7
- package/dist/dynamic-inject.d.ts +15 -10
- package/dist/dynamic-inject.js +5 -2
- package/dist/index.d.ts +73 -12
- package/dist/index.js +38 -13
- package/dist/lifecycle/EggObjectLifecycle.d.ts +38 -33
- package/dist/lifecycle/EggObjectLifecycle.js +1 -2
- package/dist/lifecycle/IdenticalObject.d.ts +6 -3
- package/dist/lifecycle/IdenticalObject.js +1 -2
- package/dist/lifecycle/LifecycleHook.d.ts +14 -11
- package/dist/lifecycle/LifecycleHook.js +1 -2
- package/dist/lifecycle/index.d.ts +4 -3
- package/dist/lifecycle/index.js +1 -4
- package/dist/metadata/enum/ProtoDescriptorType.d.ts +6 -3
- package/dist/metadata/enum/ProtoDescriptorType.js +5 -4
- package/dist/metadata/enum/index.d.ts +2 -1
- package/dist/metadata/enum/index.js +3 -2
- package/dist/metadata/errors.d.ts +8 -5
- package/dist/metadata/errors.js +8 -5
- package/dist/metadata/index.d.ts +7 -3
- package/dist/metadata/index.js +6 -4
- package/dist/metadata/model/EggPrototype.d.ts +138 -129
- package/dist/metadata/model/EggPrototype.js +3 -4
- package/dist/metadata/model/LoadUnit.d.ts +31 -26
- package/dist/metadata/model/LoadUnit.js +8 -5
- package/dist/metadata/model/Loader.d.ts +10 -5
- package/dist/metadata/model/Loader.js +1 -2
- package/dist/metadata/model/ProtoDescriptor.d.ts +27 -20
- package/dist/metadata/model/ProtoDescriptor.js +3 -3
- package/dist/metadata/model/index.d.ts +5 -4
- package/dist/metadata/model/index.js +5 -5
- package/dist/orm.d.ts +28 -25
- package/dist/orm.js +10 -7
- package/dist/runtime/Factory.d.ts +11 -6
- package/dist/runtime/Factory.js +1 -2
- package/dist/runtime/index.d.ts +6 -2
- package/dist/runtime/index.js +3 -3
- package/dist/runtime/model/EggContainer.d.ts +15 -10
- package/dist/runtime/model/EggContainer.js +1 -2
- package/dist/runtime/model/EggContext.d.ts +9 -6
- package/dist/runtime/model/EggContext.js +1 -2
- package/dist/runtime/model/EggObject.d.ts +27 -22
- package/dist/runtime/model/EggObject.js +10 -7
- package/dist/runtime/model/LoadUnitInstance.d.ts +11 -7
- package/dist/runtime/model/LoadUnitInstance.js +1 -2
- package/dist/runtime/model/index.d.ts +5 -4
- package/dist/runtime/model/index.js +3 -5
- package/dist/schedule.d.ts +42 -38
- package/dist/schedule.js +11 -8
- package/dist/transaction.d.ts +24 -21
- package/dist/transaction.js +9 -8
- package/package.json +29 -33
|
@@ -1,136 +1,145 @@
|
|
|
1
|
-
import { AccessLevel
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { AccessLevel } from "../../core-decorator/enum/AccessLevel.js";
|
|
2
|
+
import { ObjectInitTypeLike } from "../../core-decorator/enum/ObjectInitType.js";
|
|
3
|
+
import { InjectType } from "../../core-decorator/enum/InjectType.js";
|
|
4
|
+
import { QualifierAttribute, QualifierInfo, QualifierValue } from "../../core-decorator/model/QualifierInfo.js";
|
|
5
|
+
import { EggProtoImplClass, EggPrototypeInfo, EggPrototypeName } from "../../core-decorator/model/EggPrototypeInfo.js";
|
|
6
|
+
import { MetaDataKey } from "../../core-decorator/Metadata.js";
|
|
7
|
+
import { LoadUnit } from "./LoadUnit.js";
|
|
8
|
+
import { LifecycleContext, LifecycleObject } from "../../lifecycle/LifecycleHook.js";
|
|
9
|
+
|
|
10
|
+
//#region src/metadata/model/EggPrototype.d.ts
|
|
11
|
+
interface InjectObjectProto {
|
|
12
|
+
/**
|
|
13
|
+
* property name obj inject to
|
|
14
|
+
*/
|
|
15
|
+
refName: PropertyKey;
|
|
16
|
+
/**
|
|
17
|
+
* obj's name will be injected
|
|
18
|
+
*/
|
|
19
|
+
objName: PropertyKey;
|
|
20
|
+
/**
|
|
21
|
+
* inject qualifiers
|
|
22
|
+
*/
|
|
23
|
+
qualifiers: QualifierInfo[];
|
|
24
|
+
/**
|
|
25
|
+
* optional inject
|
|
26
|
+
*/
|
|
27
|
+
optional?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* inject prototype
|
|
30
|
+
*/
|
|
31
|
+
proto: EggPrototype;
|
|
25
32
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
33
|
+
interface InjectConstructorProto {
|
|
34
|
+
/**
|
|
35
|
+
* inject args index
|
|
36
|
+
*/
|
|
37
|
+
refIndex: number;
|
|
38
|
+
/**
|
|
39
|
+
* property name obj inject to
|
|
40
|
+
*/
|
|
41
|
+
refName: PropertyKey;
|
|
42
|
+
/**
|
|
43
|
+
* obj's name will be injected
|
|
44
|
+
*/
|
|
45
|
+
objName: PropertyKey;
|
|
46
|
+
/**
|
|
47
|
+
* inject qualifiers
|
|
48
|
+
*/
|
|
49
|
+
qualifiers: QualifierInfo[];
|
|
50
|
+
/**
|
|
51
|
+
* optional inject
|
|
52
|
+
*/
|
|
53
|
+
optional?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* inject prototype
|
|
56
|
+
*/
|
|
57
|
+
proto: EggPrototype;
|
|
51
58
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
interface InjectObject {
|
|
60
|
+
/**
|
|
61
|
+
* property name obj inject to
|
|
62
|
+
*/
|
|
63
|
+
refName: PropertyKey;
|
|
64
|
+
/**
|
|
65
|
+
* obj's name will be injected
|
|
66
|
+
*/
|
|
67
|
+
objName: PropertyKey;
|
|
68
|
+
/**
|
|
69
|
+
* obj's initType will be injected
|
|
70
|
+
* if null same as current obj
|
|
71
|
+
*/
|
|
72
|
+
initType?: ObjectInitTypeLike;
|
|
73
|
+
/**
|
|
74
|
+
* optional inject
|
|
75
|
+
*/
|
|
76
|
+
optional?: boolean;
|
|
70
77
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
interface InjectConstructor {
|
|
79
|
+
/**
|
|
80
|
+
* property name obj inject to
|
|
81
|
+
*/
|
|
82
|
+
refIndex: number;
|
|
83
|
+
/**
|
|
84
|
+
* property name obj inject to
|
|
85
|
+
*/
|
|
86
|
+
refName: PropertyKey;
|
|
87
|
+
/**
|
|
88
|
+
* obj's name will be injected
|
|
89
|
+
*/
|
|
90
|
+
objName: PropertyKey;
|
|
91
|
+
/**
|
|
92
|
+
* obj's initType will be injected
|
|
93
|
+
* if null same as current obj
|
|
94
|
+
*/
|
|
95
|
+
initType?: ObjectInitTypeLike;
|
|
96
|
+
/**
|
|
97
|
+
* optional inject
|
|
98
|
+
*/
|
|
99
|
+
optional?: boolean;
|
|
93
100
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
type EggPrototypeClass = new (...args: any[]) => EggPrototype;
|
|
102
|
+
interface EggPrototypeLifecycleContext extends LifecycleContext {
|
|
103
|
+
clazz: EggProtoImplClass;
|
|
104
|
+
prototypeInfo: EggPrototypeInfo;
|
|
105
|
+
loadUnit: LoadUnit;
|
|
99
106
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
107
|
+
interface EggPrototype extends LifecycleObject<EggPrototypeLifecycleContext> {
|
|
108
|
+
[key: symbol]: PropertyDescriptor;
|
|
109
|
+
readonly name: EggPrototypeName;
|
|
110
|
+
readonly initType: ObjectInitTypeLike;
|
|
111
|
+
readonly accessLevel: AccessLevel;
|
|
112
|
+
readonly loadUnitId: string;
|
|
113
|
+
readonly injectObjects: Array<InjectObjectProto | InjectConstructorProto>;
|
|
114
|
+
readonly injectType?: InjectType;
|
|
115
|
+
readonly className?: string;
|
|
116
|
+
readonly multiInstanceConstructorIndex?: number;
|
|
117
|
+
readonly multiInstanceConstructorAttributes?: QualifierAttribute[];
|
|
118
|
+
/**
|
|
119
|
+
* get metadata for key
|
|
120
|
+
* @param {MetaDataKey} metadataKey
|
|
121
|
+
*/
|
|
122
|
+
getMetaData<T>(metadataKey: MetaDataKey): T | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* verify proto is satisfied with qualifier
|
|
125
|
+
*
|
|
126
|
+
* default qualifier:
|
|
127
|
+
* - load unit name
|
|
128
|
+
* - init type
|
|
129
|
+
*
|
|
130
|
+
* @param qualifier
|
|
131
|
+
*/
|
|
132
|
+
verifyQualifier(qualifier: QualifierInfo): boolean;
|
|
133
|
+
verifyQualifiers(qualifiers: QualifierInfo[]): boolean;
|
|
134
|
+
getQualifier(attribute: QualifierAttribute): QualifierValue | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* construct egg object, not trigger lifecycle method/hook
|
|
137
|
+
*/
|
|
138
|
+
constructEggObject(...args: any): object;
|
|
132
139
|
}
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
interface EggPrototypeWithClazz extends EggPrototype {
|
|
141
|
+
clazz?: EggProtoImplClass;
|
|
135
142
|
}
|
|
136
|
-
|
|
143
|
+
type EggPrototypeCreator = (ctx: EggPrototypeLifecycleContext) => EggPrototype;
|
|
144
|
+
//#endregion
|
|
145
|
+
export { EggPrototype, EggPrototypeClass, EggPrototypeCreator, EggPrototypeLifecycleContext, EggPrototypeWithClazz, InjectConstructor, InjectConstructorProto, InjectObject, InjectObjectProto };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWdnUHJvdG90eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21ldGFkYXRhL21vZGVsL0VnZ1Byb3RvdHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsV0FBVyxFQUlYLFVBQVUsR0FNWCxNQUFNLCtCQUErQixDQUFDO0FBQ3ZDLE9BQU8sRUFBK0MsTUFBTSwwQkFBMEIsQ0FBQztBQUN2RixPQUFPLEVBQWlCLE1BQU0sZUFBZSxDQUFDIn0=
|
|
1
|
+
import "../../core-decorator/index.js";
|
|
2
|
+
|
|
3
|
+
export { };
|
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { QualifierInfo } from "../../core-decorator/model/QualifierInfo.js";
|
|
2
|
+
import { EggPrototypeName } from "../../core-decorator/model/EggPrototypeInfo.js";
|
|
3
|
+
import { Loader } from "./Loader.js";
|
|
4
|
+
import { EggPrototype } from "./EggPrototype.js";
|
|
5
|
+
import { LifecycleContext, LifecycleObject } from "../../lifecycle/LifecycleHook.js";
|
|
6
|
+
|
|
7
|
+
//#region src/metadata/model/LoadUnit.d.ts
|
|
8
|
+
declare const EggLoadUnitType: {
|
|
9
|
+
readonly MODULE: "MODULE";
|
|
10
|
+
readonly PLUGIN: "PLUGIN";
|
|
11
|
+
readonly APP: "APP";
|
|
9
12
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
type EggLoadUnitType = (typeof EggLoadUnitType)[keyof typeof EggLoadUnitType];
|
|
14
|
+
type EggLoadUnitTypeLike = EggLoadUnitType | string;
|
|
15
|
+
interface LoadUnitLifecycleContext extends LifecycleContext {
|
|
16
|
+
unitPath: string;
|
|
17
|
+
loader: Loader;
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
interface LoadUnit extends LifecycleObject<LoadUnitLifecycleContext> {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly unitPath: string;
|
|
22
|
+
readonly type: EggLoadUnitTypeLike;
|
|
23
|
+
iterateEggPrototype(): IterableIterator<EggPrototype>;
|
|
24
|
+
registerEggPrototype(proto: EggPrototype): void;
|
|
25
|
+
deletePrototype(proto: EggPrototype): void;
|
|
26
|
+
getEggPrototype(name: EggPrototypeName, qualifiers: QualifierInfo[]): EggPrototype[];
|
|
27
|
+
containPrototype(proto: EggPrototype): boolean;
|
|
25
28
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
interface LoadUnitPair {
|
|
30
|
+
loadUnit: LoadUnit;
|
|
31
|
+
ctx: LoadUnitLifecycleContext;
|
|
29
32
|
}
|
|
30
|
-
|
|
33
|
+
type LoadUnitCreator = (ctx: LoadUnitLifecycleContext) => LoadUnit | Promise<LoadUnit>;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { EggLoadUnitType, EggLoadUnitTypeLike, LoadUnit, LoadUnitCreator, LoadUnitLifecycleContext, LoadUnitPair };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region src/metadata/model/LoadUnit.ts
|
|
2
|
+
const EggLoadUnitType = {
|
|
3
|
+
MODULE: "MODULE",
|
|
4
|
+
PLUGIN: "PLUGIN",
|
|
5
|
+
APP: "APP"
|
|
5
6
|
};
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { EggLoadUnitType };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EggProtoImplClass } from "../../core-decorator/model/EggPrototypeInfo.js";
|
|
2
|
+
|
|
3
|
+
//#region src/metadata/model/Loader.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
* Loader to load class list in module
|
|
7
|
+
*/
|
|
8
|
+
interface Loader {
|
|
9
|
+
load(): Promise<EggProtoImplClass[]>;
|
|
7
10
|
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Loader };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9hZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21ldGFkYXRhL21vZGVsL0xvYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
1
|
+
export { };
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import { AccessLevel
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { AccessLevel } from "../../core-decorator/enum/AccessLevel.js";
|
|
2
|
+
import { ObjectInitTypeLike } from "../../core-decorator/enum/ObjectInitType.js";
|
|
3
|
+
import { QualifierInfo } from "../../core-decorator/model/QualifierInfo.js";
|
|
4
|
+
import { EggPrototypeInfo } from "../../core-decorator/model/EggPrototypeInfo.js";
|
|
5
|
+
import { ProtoDescriptorType } from "../enum/ProtoDescriptorType.js";
|
|
6
|
+
|
|
7
|
+
//#region src/metadata/model/ProtoDescriptor.d.ts
|
|
8
|
+
type ProtoDescriptorTypeLike = ProtoDescriptorType | string;
|
|
9
|
+
interface InjectObjectDescriptor {
|
|
10
|
+
refName: PropertyKey;
|
|
11
|
+
objName: PropertyKey;
|
|
12
|
+
qualifiers: QualifierInfo[];
|
|
8
13
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
interface ProtoDescriptor extends EggPrototypeInfo {
|
|
15
|
+
name: PropertyKey;
|
|
16
|
+
accessLevel: AccessLevel;
|
|
17
|
+
initType: ObjectInitTypeLike;
|
|
18
|
+
qualifiers: QualifierInfo[];
|
|
19
|
+
injectObjects: InjectObjectDescriptor[];
|
|
20
|
+
protoImplType: string;
|
|
21
|
+
properQualifiers: Record<PropertyKey, QualifierInfo[]>;
|
|
22
|
+
defineModuleName: string;
|
|
23
|
+
defineUnitPath: string;
|
|
24
|
+
instanceModuleName: string;
|
|
25
|
+
instanceDefineUnitPath: string;
|
|
26
|
+
equal(protoDescriptor: ProtoDescriptor): boolean;
|
|
22
27
|
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { InjectObjectDescriptor, ProtoDescriptor, ProtoDescriptorTypeLike };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import "../../core-decorator/index.js";
|
|
2
|
+
|
|
3
|
+
export { };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Loader } from "./Loader.js";
|
|
2
|
+
import { EggLoadUnitType, EggLoadUnitTypeLike, LoadUnit, LoadUnitCreator, LoadUnitLifecycleContext, LoadUnitPair } from "./LoadUnit.js";
|
|
3
|
+
import { EggPrototype, EggPrototypeClass, EggPrototypeCreator, EggPrototypeLifecycleContext, EggPrototypeWithClazz, InjectConstructor, InjectConstructorProto, InjectObject, InjectObjectProto } from "./EggPrototype.js";
|
|
4
|
+
import { InjectObjectDescriptor, ProtoDescriptor, ProtoDescriptorTypeLike } from "./ProtoDescriptor.js";
|
|
5
|
+
export { EggLoadUnitType, EggLoadUnitTypeLike, EggPrototype, EggPrototypeClass, EggPrototypeCreator, EggPrototypeLifecycleContext, EggPrototypeWithClazz, InjectConstructor, InjectConstructorProto, InjectObject, InjectObjectDescriptor, InjectObjectProto, LoadUnit, LoadUnitCreator, LoadUnitLifecycleContext, LoadUnitPair, Loader, ProtoDescriptor, ProtoDescriptorTypeLike };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { EggLoadUnitType } from "./LoadUnit.js";
|
|
2
|
+
import "./EggPrototype.js";
|
|
3
|
+
import "./ProtoDescriptor.js";
|
|
4
|
+
|
|
5
|
+
export { EggLoadUnitType };
|
package/dist/orm.d.ts
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
//#region src/orm.d.ts
|
|
2
|
+
interface AttributeOptions {
|
|
3
|
+
name?: string;
|
|
4
|
+
allowNull?: boolean;
|
|
5
|
+
autoIncrement?: boolean;
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
unique?: boolean;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
interface IndexOptions {
|
|
10
|
+
unique?: boolean;
|
|
11
|
+
primary?: boolean;
|
|
12
|
+
name?: string;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
interface ModelParams {
|
|
15
|
+
tableName?: string;
|
|
16
|
+
dataSource?: string;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
interface ModelIndexInfo {
|
|
19
|
+
fields: string[];
|
|
20
|
+
options?: IndexOptions;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
interface ModelAttributeInfo {
|
|
23
|
+
dataType: string;
|
|
24
|
+
options?: AttributeOptions;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
declare const MODEL_PROTO_IMPL_TYPE = "MODEL_PROTO";
|
|
27
|
+
declare const IS_MODEL: symbol;
|
|
28
|
+
declare const MODEL_DATA_SOURCE: symbol;
|
|
29
|
+
declare const MODEL_DATA_TABLE_NAME: symbol;
|
|
30
|
+
declare const MODEL_DATA_INDICES: symbol;
|
|
31
|
+
declare const MODEL_DATA_ATTRIBUTES: symbol;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { AttributeOptions, IS_MODEL, IndexOptions, MODEL_DATA_ATTRIBUTES, MODEL_DATA_INDICES, MODEL_DATA_SOURCE, MODEL_DATA_TABLE_NAME, MODEL_PROTO_IMPL_TYPE, ModelAttributeInfo, ModelIndexInfo, ModelParams };
|
package/dist/orm.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/orm.ts
|
|
2
|
+
const MODEL_PROTO_IMPL_TYPE = "MODEL_PROTO";
|
|
3
|
+
const IS_MODEL = Symbol.for("EggPrototype#model#isModel");
|
|
4
|
+
const MODEL_DATA_SOURCE = Symbol.for("EggPrototype#model#dataSource");
|
|
5
|
+
const MODEL_DATA_TABLE_NAME = Symbol.for("EggPrototype#model#tableName");
|
|
6
|
+
const MODEL_DATA_INDICES = Symbol.for("EggPrototype#model#indices");
|
|
7
|
+
const MODEL_DATA_ATTRIBUTES = Symbol.for("EggPrototype#model#attributes");
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { IS_MODEL, MODEL_DATA_ATTRIBUTES, MODEL_DATA_INDICES, MODEL_DATA_SOURCE, MODEL_DATA_TABLE_NAME, MODEL_PROTO_IMPL_TYPE };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { EggObjectName } from "../core-decorator/model/InjectObjectInfo.js";
|
|
2
|
+
import { EggPrototype } from "../metadata/model/EggPrototype.js";
|
|
3
|
+
import { EggObject, EggObjectLifeCycleContext } from "./model/EggObject.js";
|
|
4
|
+
import { EggContainer } from "./model/EggContainer.js";
|
|
5
|
+
import { LifecycleContext } from "../lifecycle/LifecycleHook.js";
|
|
6
|
+
|
|
7
|
+
//#region src/runtime/Factory.d.ts
|
|
8
|
+
type ContainerGetMethod = (proto: EggPrototype) => EggContainer<LifecycleContext>;
|
|
9
|
+
type CreateObjectMethod = (name: EggObjectName, proto: EggPrototype, lifecycleContext: EggObjectLifeCycleContext) => Promise<EggObject>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ContainerGetMethod, CreateObjectMethod };
|
package/dist/runtime/Factory.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydW50aW1lL0ZhY3RvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
1
|
+
export { };
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { EggContextLifecycleContext, EggRuntimeContext } from "./model/EggContext.js";
|
|
2
|
+
import { LoadUnitInstance, LoadUnitInstanceLifecycleContext } from "./model/LoadUnitInstance.js";
|
|
3
|
+
import { EggObject, EggObjectLifeCycleContext, EggObjectStatus } from "./model/EggObject.js";
|
|
4
|
+
import { EggContainer } from "./model/EggContainer.js";
|
|
5
|
+
import { ContainerGetMethod, CreateObjectMethod } from "./Factory.js";
|
|
6
|
+
export { ContainerGetMethod, CreateObjectMethod, EggContainer, EggContextLifecycleContext, EggObject, EggObjectLifeCycleContext, EggObjectStatus, EggRuntimeContext, LoadUnitInstance, LoadUnitInstanceLifecycleContext };
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { EggObjectStatus } from "./model/EggObject.js";
|
|
2
|
+
|
|
3
|
+
export { EggObjectStatus };
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { EggPrototypeName } from "../../core-decorator/model/EggPrototypeInfo.js";
|
|
2
|
+
import { EggObjectName } from "../../core-decorator/model/InjectObjectInfo.js";
|
|
3
|
+
import { EggPrototype } from "../../metadata/model/EggPrototype.js";
|
|
4
|
+
import { EggObject } from "./EggObject.js";
|
|
5
|
+
import { LifecycleContext, LifecycleObject } from "../../lifecycle/LifecycleHook.js";
|
|
6
|
+
|
|
7
|
+
//#region src/runtime/model/EggContainer.d.ts
|
|
8
|
+
interface EggContainer<T extends LifecycleContext> extends LifecycleObject<T> {
|
|
9
|
+
iterateProtoToCreate(): IterableIterator<[EggObjectName, EggPrototype]>;
|
|
10
|
+
addProtoToCreate(name: EggPrototypeName, proto: EggPrototype): void;
|
|
11
|
+
deleteProtoToCreate(name: EggPrototypeName): void;
|
|
12
|
+
getOrCreateEggObject(name: EggPrototypeName, proto: EggPrototype): Promise<EggObject>;
|
|
13
|
+
getEggObject(name: EggPrototypeName, proto: EggPrototype): EggObject;
|
|
11
14
|
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { EggContainer };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWdnQ29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3J1bnRpbWUvbW9kZWwvRWdnQ29udGFpbmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
1
|
+
export { };
|