@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.
Files changed (177) hide show
  1. package/dist/aop/Advice.d.ts +39 -36
  2. package/dist/aop/Advice.js +1 -2
  3. package/dist/aop/Aspect.d.ts +15 -11
  4. package/dist/aop/Aspect.js +5 -2
  5. package/dist/aop/Crosscut.d.ts +27 -23
  6. package/dist/aop/Crosscut.js +6 -3
  7. package/dist/aop/Pointcut.d.ts +27 -23
  8. package/dist/aop/Pointcut.js +9 -15
  9. package/dist/aop/index.d.ts +5 -4
  10. package/dist/aop/index.js +5 -5
  11. package/dist/common/Graph.d.ts +5 -2
  12. package/dist/common/Graph.js +1 -2
  13. package/dist/common/Logger.d.ts +9 -6
  14. package/dist/common/Logger.js +1 -2
  15. package/dist/common/ModuleConfig.d.ts +24 -22
  16. package/dist/common/ModuleConfig.js +1 -2
  17. package/dist/common/RuntimeConfig.d.ts +17 -14
  18. package/dist/common/RuntimeConfig.js +1 -2
  19. package/dist/common/index.d.ts +5 -4
  20. package/dist/common/index.js +1 -5
  21. package/dist/controller-decorator/HTTPController.d.ts +7 -4
  22. package/dist/controller-decorator/HTTPController.js +1 -2
  23. package/dist/controller-decorator/HTTPMethod.d.ts +10 -5
  24. package/dist/controller-decorator/HTTPMethod.js +1 -2
  25. package/dist/controller-decorator/HTTPParam.d.ts +9 -6
  26. package/dist/controller-decorator/HTTPParam.js +1 -2
  27. package/dist/controller-decorator/MetadataKey.d.ts +23 -20
  28. package/dist/controller-decorator/MetadataKey.js +24 -21
  29. package/dist/controller-decorator/builder.d.ts +10 -5
  30. package/dist/controller-decorator/builder.js +1 -2
  31. package/dist/controller-decorator/index.d.ts +10 -6
  32. package/dist/controller-decorator/index.js +4 -7
  33. package/dist/controller-decorator/model/ControllerMetadata.d.ts +14 -10
  34. package/dist/controller-decorator/model/ControllerMetadata.js +1 -2
  35. package/dist/controller-decorator/model/MethodMeta.d.ts +9 -5
  36. package/dist/controller-decorator/model/MethodMeta.js +1 -2
  37. package/dist/controller-decorator/model/index.d.ts +4 -3
  38. package/dist/controller-decorator/model/index.js +3 -4
  39. package/dist/controller-decorator/model/types.d.ts +47 -44
  40. package/dist/controller-decorator/model/types.js +37 -34
  41. package/dist/core-decorator/ContextProto.d.ts +9 -5
  42. package/dist/core-decorator/ContextProto.js +3 -2
  43. package/dist/core-decorator/Inject.d.ts +6 -3
  44. package/dist/core-decorator/Inject.js +1 -2
  45. package/dist/core-decorator/Metadata.d.ts +4 -1
  46. package/dist/core-decorator/Metadata.js +1 -2
  47. package/dist/core-decorator/MultiInstanceProto.d.ts +28 -23
  48. package/dist/core-decorator/MultiInstanceProto.js +1 -2
  49. package/dist/core-decorator/Prototype.d.ts +12 -7
  50. package/dist/core-decorator/Prototype.js +5 -2
  51. package/dist/core-decorator/SingletonProto.d.ts +9 -5
  52. package/dist/core-decorator/SingletonProto.js +1 -2
  53. package/dist/core-decorator/enum/AccessLevel.d.ts +7 -4
  54. package/dist/core-decorator/enum/AccessLevel.js +7 -6
  55. package/dist/core-decorator/enum/EggType.d.ts +7 -4
  56. package/dist/core-decorator/enum/EggType.js +7 -4
  57. package/dist/core-decorator/enum/InjectType.d.ts +7 -4
  58. package/dist/core-decorator/enum/InjectType.js +7 -4
  59. package/dist/core-decorator/enum/MultiInstanceType.d.ts +7 -4
  60. package/dist/core-decorator/enum/MultiInstanceType.js +7 -4
  61. package/dist/core-decorator/enum/ObjectInitType.d.ts +10 -7
  62. package/dist/core-decorator/enum/ObjectInitType.js +12 -12
  63. package/dist/core-decorator/enum/Qualifier.d.ts +10 -7
  64. package/dist/core-decorator/enum/Qualifier.js +11 -8
  65. package/dist/core-decorator/enum/index.d.ts +7 -6
  66. package/dist/core-decorator/enum/index.js +8 -7
  67. package/dist/core-decorator/index.d.ts +18 -8
  68. package/dist/core-decorator/index.js +12 -9
  69. package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +58 -53
  70. package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.js +4 -4
  71. package/dist/core-decorator/model/EggPrototypeInfo.d.ts +38 -33
  72. package/dist/core-decorator/model/EggPrototypeInfo.js +3 -3
  73. package/dist/core-decorator/model/InjectConstructorInfo.d.ts +22 -18
  74. package/dist/core-decorator/model/InjectConstructorInfo.js +1 -2
  75. package/dist/core-decorator/model/InjectObjectInfo.d.ts +17 -14
  76. package/dist/core-decorator/model/InjectObjectInfo.js +1 -2
  77. package/dist/core-decorator/model/QualifierInfo.d.ts +39 -36
  78. package/dist/core-decorator/model/QualifierInfo.js +1 -2
  79. package/dist/core-decorator/model/index.d.ts +6 -5
  80. package/dist/core-decorator/model/index.js +4 -6
  81. package/dist/dal/Qualifier.d.ts +9 -6
  82. package/dist/dal/Qualifier.js +10 -7
  83. package/dist/dal/decorator/Column.d.ts +145 -141
  84. package/dist/dal/decorator/Column.js +1 -2
  85. package/dist/dal/decorator/DataSourceQualifier.d.ts +5 -2
  86. package/dist/dal/decorator/DataSourceQualifier.js +6 -3
  87. package/dist/dal/decorator/Table.d.ts +26 -20
  88. package/dist/dal/decorator/Table.js +1 -2
  89. package/dist/dal/decorator/index.d.ts +18 -13
  90. package/dist/dal/decorator/index.js +3 -4
  91. package/dist/dal/enum/ColumnFormat.d.ts +8 -5
  92. package/dist/dal/enum/ColumnFormat.js +8 -5
  93. package/dist/dal/enum/ColumnType.d.ts +43 -40
  94. package/dist/dal/enum/ColumnType.js +43 -46
  95. package/dist/dal/enum/CompressionType.d.ts +8 -5
  96. package/dist/dal/enum/CompressionType.js +8 -5
  97. package/dist/dal/enum/IndexStoreType.d.ts +7 -4
  98. package/dist/dal/enum/IndexStoreType.js +7 -4
  99. package/dist/dal/enum/IndexType.d.ts +10 -7
  100. package/dist/dal/enum/IndexType.js +10 -7
  101. package/dist/dal/enum/InsertMethod.d.ts +8 -5
  102. package/dist/dal/enum/InsertMethod.js +8 -5
  103. package/dist/dal/enum/RowFormat.d.ts +11 -8
  104. package/dist/dal/enum/RowFormat.js +11 -8
  105. package/dist/dal/enum/SqlType.d.ts +10 -7
  106. package/dist/dal/enum/SqlType.js +10 -7
  107. package/dist/dal/enum/Templates.d.ts +8 -5
  108. package/dist/dal/enum/Templates.js +8 -5
  109. package/dist/dal/enum/index.d.ts +10 -9
  110. package/dist/dal/enum/index.js +11 -10
  111. package/dist/dal/index.d.ts +21 -4
  112. package/dist/dal/index.js +13 -5
  113. package/dist/dal/type/BaseDao.d.ts +12 -8
  114. package/dist/dal/type/BaseDao.js +1 -2
  115. package/dist/dal/type/CodeGenerator.d.ts +8 -5
  116. package/dist/dal/type/CodeGenerator.js +1 -2
  117. package/dist/dal/type/ColumnTsType.d.ts +44 -40
  118. package/dist/dal/type/ColumnTsType.js +1 -2
  119. package/dist/dal/type/DateSource.d.ts +14 -11
  120. package/dist/dal/type/DateSource.js +1 -2
  121. package/dist/dal/type/Spatial.d.ts +13 -10
  122. package/dist/dal/type/Spatial.js +1 -2
  123. package/dist/dal/type/SqlMap.d.ts +18 -14
  124. package/dist/dal/type/SqlMap.js +1 -2
  125. package/dist/dal/type/index.d.ts +7 -6
  126. package/dist/dal/type/index.js +1 -7
  127. package/dist/dynamic-inject.d.ts +15 -10
  128. package/dist/dynamic-inject.js +5 -2
  129. package/dist/index.d.ts +73 -12
  130. package/dist/index.js +38 -13
  131. package/dist/lifecycle/EggObjectLifecycle.d.ts +38 -33
  132. package/dist/lifecycle/EggObjectLifecycle.js +1 -2
  133. package/dist/lifecycle/IdenticalObject.d.ts +6 -3
  134. package/dist/lifecycle/IdenticalObject.js +1 -2
  135. package/dist/lifecycle/LifecycleHook.d.ts +14 -11
  136. package/dist/lifecycle/LifecycleHook.js +1 -2
  137. package/dist/lifecycle/index.d.ts +4 -3
  138. package/dist/lifecycle/index.js +1 -4
  139. package/dist/metadata/enum/ProtoDescriptorType.d.ts +6 -3
  140. package/dist/metadata/enum/ProtoDescriptorType.js +5 -4
  141. package/dist/metadata/enum/index.d.ts +2 -1
  142. package/dist/metadata/enum/index.js +3 -2
  143. package/dist/metadata/errors.d.ts +8 -5
  144. package/dist/metadata/errors.js +8 -5
  145. package/dist/metadata/index.d.ts +7 -3
  146. package/dist/metadata/index.js +6 -4
  147. package/dist/metadata/model/EggPrototype.d.ts +138 -129
  148. package/dist/metadata/model/EggPrototype.js +3 -4
  149. package/dist/metadata/model/LoadUnit.d.ts +31 -26
  150. package/dist/metadata/model/LoadUnit.js +8 -5
  151. package/dist/metadata/model/Loader.d.ts +10 -5
  152. package/dist/metadata/model/Loader.js +1 -2
  153. package/dist/metadata/model/ProtoDescriptor.d.ts +27 -20
  154. package/dist/metadata/model/ProtoDescriptor.js +3 -3
  155. package/dist/metadata/model/index.d.ts +5 -4
  156. package/dist/metadata/model/index.js +5 -5
  157. package/dist/orm.d.ts +28 -25
  158. package/dist/orm.js +10 -7
  159. package/dist/runtime/Factory.d.ts +11 -6
  160. package/dist/runtime/Factory.js +1 -2
  161. package/dist/runtime/index.d.ts +6 -2
  162. package/dist/runtime/index.js +3 -3
  163. package/dist/runtime/model/EggContainer.d.ts +15 -10
  164. package/dist/runtime/model/EggContainer.js +1 -2
  165. package/dist/runtime/model/EggContext.d.ts +9 -6
  166. package/dist/runtime/model/EggContext.js +1 -2
  167. package/dist/runtime/model/EggObject.d.ts +27 -22
  168. package/dist/runtime/model/EggObject.js +10 -7
  169. package/dist/runtime/model/LoadUnitInstance.d.ts +11 -7
  170. package/dist/runtime/model/LoadUnitInstance.js +1 -2
  171. package/dist/runtime/model/index.d.ts +5 -4
  172. package/dist/runtime/model/index.js +3 -5
  173. package/dist/schedule.d.ts +42 -38
  174. package/dist/schedule.js +11 -8
  175. package/dist/transaction.d.ts +24 -21
  176. package/dist/transaction.js +9 -8
  177. package/package.json +29 -33
@@ -1,136 +1,145 @@
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;
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
- 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;
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
- 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;
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
- 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;
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
- export type EggPrototypeClass = new (...args: any[]) => EggPrototype;
95
- export interface EggPrototypeLifecycleContext extends LifecycleContext {
96
- clazz: EggProtoImplClass;
97
- prototypeInfo: EggPrototypeInfo;
98
- loadUnit: LoadUnit;
101
+ type EggPrototypeClass = new (...args: any[]) => EggPrototype;
102
+ interface EggPrototypeLifecycleContext extends LifecycleContext {
103
+ clazz: EggProtoImplClass;
104
+ prototypeInfo: EggPrototypeInfo;
105
+ loadUnit: LoadUnit;
99
106
  }
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;
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
- export interface EggPrototypeWithClazz extends EggPrototype {
134
- clazz?: EggProtoImplClass;
140
+ interface EggPrototypeWithClazz extends EggPrototype {
141
+ clazz?: EggProtoImplClass;
135
142
  }
136
- export type EggPrototypeCreator = (ctx: EggPrototypeLifecycleContext) => EggPrototype;
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 { AccessLevel, InjectType, } from "../../core-decorator/index.js";
2
- import {} from "../../lifecycle/index.js";
3
- import {} from "./LoadUnit.js";
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWdnUHJvdG90eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21ldGFkYXRhL21vZGVsL0VnZ1Byb3RvdHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsV0FBVyxFQUlYLFVBQVUsR0FNWCxNQUFNLCtCQUErQixDQUFDO0FBQ3ZDLE9BQU8sRUFBK0MsTUFBTSwwQkFBMEIsQ0FBQztBQUN2RixPQUFPLEVBQWlCLE1BQU0sZUFBZSxDQUFDIn0=
1
+ import "../../core-decorator/index.js";
2
+
3
+ export { };
@@ -1,30 +1,35 @@
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 const EggLoadUnitType: {
6
- readonly MODULE: "MODULE";
7
- readonly PLUGIN: "PLUGIN";
8
- readonly APP: "APP";
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
- export type EggLoadUnitType = (typeof EggLoadUnitType)[keyof typeof EggLoadUnitType];
11
- export type EggLoadUnitTypeLike = EggLoadUnitType | string;
12
- export interface LoadUnitLifecycleContext extends LifecycleContext {
13
- unitPath: string;
14
- loader: Loader;
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
- export interface LoadUnit extends LifecycleObject<LoadUnitLifecycleContext> {
17
- readonly name: string;
18
- readonly unitPath: string;
19
- readonly type: EggLoadUnitTypeLike;
20
- iterateEggPrototype(): IterableIterator<EggPrototype>;
21
- registerEggPrototype(proto: EggPrototype): void;
22
- deletePrototype(proto: EggPrototype): void;
23
- getEggPrototype(name: EggPrototypeName, qualifiers: QualifierInfo[]): EggPrototype[];
24
- containPrototype(proto: EggPrototype): boolean;
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
- export interface LoadUnitPair {
27
- loadUnit: LoadUnit;
28
- ctx: LoadUnitLifecycleContext;
29
+ interface LoadUnitPair {
30
+ loadUnit: LoadUnit;
31
+ ctx: LoadUnitLifecycleContext;
29
32
  }
30
- export type LoadUnitCreator = (ctx: LoadUnitLifecycleContext) => LoadUnit | Promise<LoadUnit>;
33
+ type LoadUnitCreator = (ctx: LoadUnitLifecycleContext) => LoadUnit | Promise<LoadUnit>;
34
+ //#endregion
35
+ export { EggLoadUnitType, EggLoadUnitTypeLike, LoadUnit, LoadUnitCreator, LoadUnitLifecycleContext, LoadUnitPair };
@@ -1,6 +1,9 @@
1
- export const EggLoadUnitType = {
2
- MODULE: 'MODULE',
3
- PLUGIN: 'PLUGIN',
4
- APP: 'APP',
1
+ //#region src/metadata/model/LoadUnit.ts
2
+ const EggLoadUnitType = {
3
+ MODULE: "MODULE",
4
+ PLUGIN: "PLUGIN",
5
+ APP: "APP"
5
6
  };
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9hZFVuaXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbWV0YWRhdGEvbW9kZWwvTG9hZFVuaXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0EsTUFBTSxDQUFDLE1BQU0sZUFBZSxHQUFHO0lBQzdCLE1BQU0sRUFBRSxRQUFRO0lBQ2hCLE1BQU0sRUFBRSxRQUFRO0lBQ2hCLEdBQUcsRUFBRSxLQUFLO0NBQ0YsQ0FBQyJ9
7
+
8
+ //#endregion
9
+ export { EggLoadUnitType };
@@ -1,7 +1,12 @@
1
- import type { EggProtoImplClass } from '../../core-decorator/index.ts';
1
+ import { EggProtoImplClass } from "../../core-decorator/model/EggPrototypeInfo.js";
2
+
3
+ //#region src/metadata/model/Loader.d.ts
4
+
2
5
  /**
3
- * Loader to load class list in module
4
- */
5
- export interface Loader {
6
- load(): Promise<EggProtoImplClass[]>;
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, 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[];
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
- 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;
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 { AccessLevel, } from "../../core-decorator/index.js";
2
- import {} from "../enum/index.js";
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdG9EZXNjcmlwdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21ldGFkYXRhL21vZGVsL1Byb3RvRGVzY3JpcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsV0FBVyxHQUlaLE1BQU0sK0JBQStCLENBQUM7QUFDdkMsT0FBTyxFQUE0QixNQUFNLGtCQUFrQixDQUFDIn0=
1
+ import "../../core-decorator/index.js";
2
+
3
+ export { };
@@ -1,4 +1,5 @@
1
- export * from './EggPrototype.ts';
2
- export * from './Loader.ts';
3
- export * from './LoadUnit.ts';
4
- export * from './ProtoDescriptor.ts';
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
- 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=
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
- export interface AttributeOptions {
2
- name?: string;
3
- allowNull?: boolean;
4
- autoIncrement?: boolean;
5
- primary?: boolean;
6
- unique?: boolean;
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
- export interface IndexOptions {
9
- unique?: boolean;
10
- primary?: boolean;
11
- name?: string;
9
+ interface IndexOptions {
10
+ unique?: boolean;
11
+ primary?: boolean;
12
+ name?: string;
12
13
  }
13
- export interface ModelParams {
14
- tableName?: string;
15
- dataSource?: string;
14
+ interface ModelParams {
15
+ tableName?: string;
16
+ dataSource?: string;
16
17
  }
17
- export interface ModelIndexInfo {
18
- fields: string[];
19
- options?: IndexOptions;
18
+ interface ModelIndexInfo {
19
+ fields: string[];
20
+ options?: IndexOptions;
20
21
  }
21
- export interface ModelAttributeInfo {
22
- dataType: string;
23
- options?: AttributeOptions;
22
+ interface ModelAttributeInfo {
23
+ dataType: string;
24
+ options?: AttributeOptions;
24
25
  }
25
- export declare const MODEL_PROTO_IMPL_TYPE = "MODEL_PROTO";
26
- export declare const IS_MODEL: symbol;
27
- export declare const MODEL_DATA_SOURCE: symbol;
28
- export declare const MODEL_DATA_TABLE_NAME: symbol;
29
- export declare const MODEL_DATA_INDICES: symbol;
30
- export declare const MODEL_DATA_ATTRIBUTES: symbol;
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
- 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL29ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQ0EsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQUcsYUFBYSxDQUFDO0FBRW5ELE1BQU0sQ0FBQyxNQUFNLFFBQVEsR0FBVyxNQUFNLENBQUMsR0FBRyxDQUFDLDRCQUE0QixDQUFDLENBQUM7QUFDekUsTUFBTSxDQUFDLE1BQU0saUJBQWlCLEdBQVcsTUFBTSxDQUFDLEdBQUcsQ0FBQywrQkFBK0IsQ0FBQyxDQUFDO0FBQ3JGLE1BQU0sQ0FBQyxNQUFNLHFCQUFxQixHQUFXLE1BQU0sQ0FBQyxHQUFHLENBQUMsOEJBQThCLENBQUMsQ0FBQztBQUN4RixNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBVyxNQUFNLENBQUMsR0FBRyxDQUFDLDRCQUE0QixDQUFDLENBQUM7QUFDbkYsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQVcsTUFBTSxDQUFDLEdBQUcsQ0FBQywrQkFBK0IsQ0FBQyxDQUFDIn0=
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 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>;
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 };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydW50aW1lL0ZhY3RvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
1
+ export { };
@@ -1,2 +1,6 @@
1
- export * from './Factory.ts';
2
- export * from './model/index.ts';
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 };
@@ -1,3 +1,3 @@
1
- export * from "./Factory.js";
2
- export * from "./model/index.js";
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcnVudGltZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGtCQUFrQixDQUFDIn0=
1
+ import { EggObjectStatus } from "./model/EggObject.js";
2
+
3
+ export { EggObjectStatus };
@@ -1,11 +1,16 @@
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;
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 { };