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