@eggjs/tegg-types 4.0.0-beta.9 → 4.0.2-beta.0

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 (185) 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 +28 -23
  8. package/dist/aop/Pointcut.js +10 -17
  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 +8 -4
  22. package/dist/controller-decorator/HTTPController.js +1 -2
  23. package/dist/controller-decorator/HTTPMethod.d.ts +11 -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/MCPController.d.ts +10 -0
  28. package/dist/controller-decorator/MCPController.js +1 -0
  29. package/dist/controller-decorator/MCPPromptParams.d.ts +16 -0
  30. package/dist/controller-decorator/MCPPromptParams.js +1 -0
  31. package/dist/controller-decorator/MCPResourceParams.d.ts +22 -0
  32. package/dist/controller-decorator/MCPResourceParams.js +1 -0
  33. package/dist/controller-decorator/MCPToolParams.d.ts +15 -0
  34. package/dist/controller-decorator/MCPToolParams.js +1 -0
  35. package/dist/controller-decorator/MetadataKey.d.ts +37 -20
  36. package/dist/controller-decorator/MetadataKey.js +38 -21
  37. package/dist/controller-decorator/builder.d.ts +10 -5
  38. package/dist/controller-decorator/builder.js +1 -2
  39. package/dist/controller-decorator/index.d.ts +14 -6
  40. package/dist/controller-decorator/index.js +4 -7
  41. package/dist/controller-decorator/model/ControllerMetadata.d.ts +14 -10
  42. package/dist/controller-decorator/model/ControllerMetadata.js +1 -2
  43. package/dist/controller-decorator/model/MethodMeta.d.ts +9 -5
  44. package/dist/controller-decorator/model/MethodMeta.js +1 -2
  45. package/dist/controller-decorator/model/index.d.ts +4 -3
  46. package/dist/controller-decorator/model/index.js +3 -4
  47. package/dist/controller-decorator/model/types.d.ts +58 -45
  48. package/dist/controller-decorator/model/types.js +47 -42
  49. package/dist/core-decorator/ContextProto.d.ts +9 -5
  50. package/dist/core-decorator/ContextProto.js +3 -2
  51. package/dist/core-decorator/Inject.d.ts +6 -3
  52. package/dist/core-decorator/Inject.js +1 -2
  53. package/dist/core-decorator/Metadata.d.ts +4 -1
  54. package/dist/core-decorator/Metadata.js +1 -2
  55. package/dist/core-decorator/MultiInstanceProto.d.ts +28 -23
  56. package/dist/core-decorator/MultiInstanceProto.js +1 -2
  57. package/dist/core-decorator/Prototype.d.ts +12 -7
  58. package/dist/core-decorator/Prototype.js +5 -2
  59. package/dist/core-decorator/SingletonProto.d.ts +9 -5
  60. package/dist/core-decorator/SingletonProto.js +1 -2
  61. package/dist/core-decorator/enum/AccessLevel.d.ts +8 -4
  62. package/dist/core-decorator/enum/AccessLevel.js +8 -8
  63. package/dist/core-decorator/enum/EggType.d.ts +8 -4
  64. package/dist/core-decorator/enum/EggType.js +8 -6
  65. package/dist/core-decorator/enum/InjectType.d.ts +8 -4
  66. package/dist/core-decorator/enum/InjectType.js +8 -6
  67. package/dist/core-decorator/enum/MultiInstanceType.d.ts +8 -4
  68. package/dist/core-decorator/enum/MultiInstanceType.js +8 -6
  69. package/dist/core-decorator/enum/ObjectInitType.d.ts +11 -7
  70. package/dist/core-decorator/enum/ObjectInitType.js +13 -14
  71. package/dist/core-decorator/enum/Qualifier.d.ts +10 -7
  72. package/dist/core-decorator/enum/Qualifier.js +11 -8
  73. package/dist/core-decorator/enum/index.d.ts +7 -6
  74. package/dist/core-decorator/enum/index.js +8 -7
  75. package/dist/core-decorator/index.d.ts +18 -8
  76. package/dist/core-decorator/index.js +12 -9
  77. package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +58 -53
  78. package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.js +4 -4
  79. package/dist/core-decorator/model/EggPrototypeInfo.d.ts +38 -33
  80. package/dist/core-decorator/model/EggPrototypeInfo.js +3 -3
  81. package/dist/core-decorator/model/InjectConstructorInfo.d.ts +22 -18
  82. package/dist/core-decorator/model/InjectConstructorInfo.js +1 -2
  83. package/dist/core-decorator/model/InjectObjectInfo.d.ts +17 -14
  84. package/dist/core-decorator/model/InjectObjectInfo.js +1 -2
  85. package/dist/core-decorator/model/QualifierInfo.d.ts +39 -36
  86. package/dist/core-decorator/model/QualifierInfo.js +1 -2
  87. package/dist/core-decorator/model/index.d.ts +6 -5
  88. package/dist/core-decorator/model/index.js +4 -6
  89. package/dist/dal/Qualifier.d.ts +9 -6
  90. package/dist/dal/Qualifier.js +10 -7
  91. package/dist/dal/decorator/Column.d.ts +145 -141
  92. package/dist/dal/decorator/Column.js +1 -2
  93. package/dist/dal/decorator/DataSourceQualifier.d.ts +5 -2
  94. package/dist/dal/decorator/DataSourceQualifier.js +6 -3
  95. package/dist/dal/decorator/Table.d.ts +26 -20
  96. package/dist/dal/decorator/Table.js +1 -2
  97. package/dist/dal/decorator/index.d.ts +18 -13
  98. package/dist/dal/decorator/index.js +3 -4
  99. package/dist/dal/enum/ColumnFormat.d.ts +9 -5
  100. package/dist/dal/enum/ColumnFormat.js +9 -7
  101. package/dist/dal/enum/ColumnType.d.ts +44 -40
  102. package/dist/dal/enum/ColumnType.js +44 -48
  103. package/dist/dal/enum/CompressionType.d.ts +9 -5
  104. package/dist/dal/enum/CompressionType.js +9 -7
  105. package/dist/dal/enum/IndexStoreType.d.ts +8 -4
  106. package/dist/dal/enum/IndexStoreType.js +8 -6
  107. package/dist/dal/enum/IndexType.d.ts +11 -7
  108. package/dist/dal/enum/IndexType.js +11 -9
  109. package/dist/dal/enum/InsertMethod.d.ts +9 -5
  110. package/dist/dal/enum/InsertMethod.js +9 -7
  111. package/dist/dal/enum/RowFormat.d.ts +12 -8
  112. package/dist/dal/enum/RowFormat.js +12 -10
  113. package/dist/dal/enum/SqlType.d.ts +11 -7
  114. package/dist/dal/enum/SqlType.js +11 -9
  115. package/dist/dal/enum/Templates.d.ts +9 -5
  116. package/dist/dal/enum/Templates.js +9 -7
  117. package/dist/dal/enum/index.d.ts +10 -9
  118. package/dist/dal/enum/index.js +11 -10
  119. package/dist/dal/index.d.ts +21 -4
  120. package/dist/dal/index.js +13 -5
  121. package/dist/dal/type/BaseDao.d.ts +12 -8
  122. package/dist/dal/type/BaseDao.js +1 -2
  123. package/dist/dal/type/CodeGenerator.d.ts +8 -5
  124. package/dist/dal/type/CodeGenerator.js +1 -2
  125. package/dist/dal/type/ColumnTsType.d.ts +44 -40
  126. package/dist/dal/type/ColumnTsType.js +1 -2
  127. package/dist/dal/type/DateSource.d.ts +14 -11
  128. package/dist/dal/type/DateSource.js +1 -2
  129. package/dist/dal/type/Spatial.d.ts +13 -10
  130. package/dist/dal/type/Spatial.js +1 -2
  131. package/dist/dal/type/SqlMap.d.ts +18 -14
  132. package/dist/dal/type/SqlMap.js +1 -2
  133. package/dist/dal/type/index.d.ts +7 -6
  134. package/dist/dal/type/index.js +1 -7
  135. package/dist/dynamic-inject.d.ts +15 -10
  136. package/dist/dynamic-inject.js +5 -2
  137. package/dist/index.d.ts +77 -12
  138. package/dist/index.js +38 -13
  139. package/dist/lifecycle/EggObjectLifecycle.d.ts +38 -33
  140. package/dist/lifecycle/EggObjectLifecycle.js +1 -2
  141. package/dist/lifecycle/IdenticalObject.d.ts +6 -3
  142. package/dist/lifecycle/IdenticalObject.js +1 -2
  143. package/dist/lifecycle/LifecycleHook.d.ts +14 -11
  144. package/dist/lifecycle/LifecycleHook.js +1 -2
  145. package/dist/lifecycle/index.d.ts +4 -3
  146. package/dist/lifecycle/index.js +1 -4
  147. package/dist/metadata/enum/ProtoDescriptorType.d.ts +7 -3
  148. package/dist/metadata/enum/ProtoDescriptorType.js +5 -5
  149. package/dist/metadata/enum/index.d.ts +2 -1
  150. package/dist/metadata/enum/index.js +3 -2
  151. package/dist/metadata/errors.d.ts +9 -5
  152. package/dist/metadata/errors.js +9 -7
  153. package/dist/metadata/index.d.ts +7 -3
  154. package/dist/metadata/index.js +6 -4
  155. package/dist/metadata/model/EggPrototype.d.ts +138 -129
  156. package/dist/metadata/model/EggPrototype.js +3 -4
  157. package/dist/metadata/model/LoadUnit.d.ts +32 -26
  158. package/dist/metadata/model/LoadUnit.js +9 -7
  159. package/dist/metadata/model/Loader.d.ts +10 -5
  160. package/dist/metadata/model/Loader.js +1 -2
  161. package/dist/metadata/model/ProtoDescriptor.d.ts +27 -20
  162. package/dist/metadata/model/ProtoDescriptor.js +3 -3
  163. package/dist/metadata/model/index.d.ts +5 -4
  164. package/dist/metadata/model/index.js +5 -5
  165. package/dist/orm.d.ts +28 -25
  166. package/dist/orm.js +10 -7
  167. package/dist/runtime/Factory.d.ts +11 -6
  168. package/dist/runtime/Factory.js +1 -2
  169. package/dist/runtime/index.d.ts +6 -2
  170. package/dist/runtime/index.js +3 -3
  171. package/dist/runtime/model/EggContainer.d.ts +15 -10
  172. package/dist/runtime/model/EggContainer.js +1 -2
  173. package/dist/runtime/model/EggContext.d.ts +9 -6
  174. package/dist/runtime/model/EggContext.js +1 -2
  175. package/dist/runtime/model/EggObject.d.ts +28 -22
  176. package/dist/runtime/model/EggObject.js +11 -9
  177. package/dist/runtime/model/LoadUnitInstance.d.ts +11 -7
  178. package/dist/runtime/model/LoadUnitInstance.js +1 -2
  179. package/dist/runtime/model/index.d.ts +5 -4
  180. package/dist/runtime/model/index.js +3 -5
  181. package/dist/schedule.d.ts +44 -25
  182. package/dist/schedule.js +12 -10
  183. package/dist/transaction.d.ts +25 -21
  184. package/dist/transaction.js +10 -10
  185. package/package.json +35 -31
@@ -1,39 +1,42 @@
1
- export interface AdviceContext<T = object, K = any> {
2
- that: T;
3
- method: PropertyKey;
4
- args: any[];
5
- adviceParams?: K;
6
- get(key: PropertyKey): any | undefined;
7
- set(set: PropertyKey, value: any): this;
1
+ //#region src/aop/Advice.d.ts
2
+ interface AdviceContext<T = object, K = any> {
3
+ that: T;
4
+ method: PropertyKey;
5
+ args: any[];
6
+ adviceParams?: K;
7
+ get(key: PropertyKey): any | undefined;
8
+ set(set: PropertyKey, value: any): this;
8
9
  }
9
10
  /**
10
- * execute order:
11
- * 1. beforeCall
12
- * 1. around
13
- * 1. afterReturn/afterThrow
14
- * 1. afterFinally
15
- */
16
- export interface IAdvice<T = object, K = any> {
17
- /**
18
- * call before function
19
- * @param ctx
20
- */
21
- beforeCall?(ctx: AdviceContext<T, K>): Promise<void>;
22
- /**
23
- * call after function succeed
24
- */
25
- afterReturn?(ctx: AdviceContext<T, K>, result: any): Promise<void>;
26
- /**
27
- * call after function throw error
28
- */
29
- afterThrow?(ctx: AdviceContext<T, K>, error: Error): Promise<void>;
30
- /**
31
- * always call after function done
32
- */
33
- afterFinally?(ctx: AdviceContext<T, K>): Promise<void>;
34
- /**
35
- * execute the function
36
- * the only one can modify the function return value
37
- */
38
- around?(ctx: AdviceContext<T, K>, next: () => Promise<any>): Promise<any>;
11
+ * execute order:
12
+ * 1. beforeCall
13
+ * 1. around
14
+ * 1. afterReturn/afterThrow
15
+ * 1. afterFinally
16
+ */
17
+ interface IAdvice<T = object, K = any> {
18
+ /**
19
+ * call before function
20
+ * @param ctx
21
+ */
22
+ beforeCall?(ctx: AdviceContext<T, K>): Promise<void>;
23
+ /**
24
+ * call after function succeed
25
+ */
26
+ afterReturn?(ctx: AdviceContext<T, K>, result: any): Promise<void>;
27
+ /**
28
+ * call after function throw error
29
+ */
30
+ afterThrow?(ctx: AdviceContext<T, K>, error: Error): Promise<void>;
31
+ /**
32
+ * always call after function done
33
+ */
34
+ afterFinally?(ctx: AdviceContext<T, K>): Promise<void>;
35
+ /**
36
+ * execute the function
37
+ * the only one can modify the function return value
38
+ */
39
+ around?(ctx: AdviceContext<T, K>, next: () => Promise<any>): Promise<any>;
39
40
  }
41
+ //#endregion
42
+ export { AdviceContext, IAdvice };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWR2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FvcC9BZHZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
1
+ export { };
@@ -1,13 +1,17 @@
1
- import type { EggProtoImplClass } from '../core-decorator/index.ts';
2
- import type { IAdvice } from './Advice.ts';
3
- export interface AdviceInfo {
4
- clazz: EggProtoImplClass<IAdvice>;
5
- order: number;
6
- adviceParams: any;
1
+ import { IAdvice } from "./Advice.js";
2
+ import { EggProtoImplClass } from "../core-decorator/model/EggPrototypeInfo.js";
3
+
4
+ //#region src/aop/Aspect.d.ts
5
+ interface AdviceInfo {
6
+ clazz: EggProtoImplClass<IAdvice>;
7
+ order: number;
8
+ adviceParams: any;
7
9
  }
8
- export interface AspectAdvice {
9
- name: string;
10
- clazz: EggProtoImplClass<IAdvice>;
11
- adviceParams: any;
10
+ interface AspectAdvice {
11
+ name: string;
12
+ clazz: EggProtoImplClass<IAdvice>;
13
+ adviceParams: any;
12
14
  }
13
- export declare const ASPECT_LIST: unique symbol;
15
+ declare const ASPECT_LIST: symbol;
16
+ //#endregion
17
+ export { ASPECT_LIST, AdviceInfo, AspectAdvice };
@@ -1,2 +1,5 @@
1
- export const ASPECT_LIST = Symbol.for('EggPrototype#aspectList');
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXNwZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FvcC9Bc3BlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZUEsTUFBTSxDQUFDLE1BQU0sV0FBVyxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMseUJBQXlCLENBQUMsQ0FBQyJ9
1
+ //#region src/aop/Aspect.ts
2
+ const ASPECT_LIST = Symbol.for("EggPrototype#aspectList");
3
+
4
+ //#endregion
5
+ export { ASPECT_LIST };
@@ -1,28 +1,32 @@
1
- import type { EggProtoImplClass } from '../core-decorator/index.ts';
2
- import type { AdviceInfo } from './Aspect.ts';
3
- import type { CustomPointcutCallback, PointcutInfo, PointcutType } from './Pointcut.ts';
4
- export interface CrosscutOptions {
5
- order?: number;
6
- adviceParams?: any;
1
+ import { EggProtoImplClass } from "../core-decorator/model/EggPrototypeInfo.js";
2
+ import { AdviceInfo } from "./Aspect.js";
3
+ import { CustomPointcutCallback, PointcutInfo, PointcutType } from "./Pointcut.js";
4
+
5
+ //#region src/aop/Crosscut.d.ts
6
+ interface CrosscutOptions {
7
+ order?: number;
8
+ adviceParams?: any;
7
9
  }
8
- export interface ClassCrosscutParam {
9
- type: PointcutType.CLASS;
10
- clazz: EggProtoImplClass;
11
- methodName: PropertyKey;
10
+ interface ClassCrosscutParam {
11
+ type: typeof PointcutType.CLASS;
12
+ clazz: EggProtoImplClass;
13
+ methodName: PropertyKey;
12
14
  }
13
- export interface NameCrosscutParam {
14
- type: PointcutType.NAME;
15
- className: RegExp;
16
- methodName: RegExp;
15
+ interface NameCrosscutParam {
16
+ type: typeof PointcutType.NAME;
17
+ className: RegExp;
18
+ methodName: RegExp;
17
19
  }
18
- export interface CustomCrosscutParam {
19
- type: PointcutType.CUSTOM;
20
- callback: CustomPointcutCallback;
20
+ interface CustomCrosscutParam {
21
+ type: typeof PointcutType.CUSTOM;
22
+ callback: CustomPointcutCallback;
21
23
  }
22
- export type CrosscutParam = ClassCrosscutParam | NameCrosscutParam | CustomCrosscutParam;
23
- export declare const CROSSCUT_INFO_LIST: unique symbol;
24
- export declare const IS_CROSSCUT_ADVICE: unique symbol;
25
- export interface CrosscutInfo {
26
- pointcutInfo: PointcutInfo;
27
- adviceInfo: AdviceInfo;
24
+ type CrosscutParam = ClassCrosscutParam | NameCrosscutParam | CustomCrosscutParam;
25
+ declare const CROSSCUT_INFO_LIST: symbol;
26
+ declare const IS_CROSSCUT_ADVICE: symbol;
27
+ interface CrosscutInfo {
28
+ pointcutInfo: PointcutInfo;
29
+ adviceInfo: AdviceInfo;
28
30
  }
31
+ //#endregion
32
+ export { CROSSCUT_INFO_LIST, ClassCrosscutParam, CrosscutInfo, CrosscutOptions, CrosscutParam, CustomCrosscutParam, IS_CROSSCUT_ADVICE, NameCrosscutParam };
@@ -1,3 +1,6 @@
1
- export const CROSSCUT_INFO_LIST = Symbol.for('EggPrototype#crosscutInfoList');
2
- export const IS_CROSSCUT_ADVICE = Symbol.for('EggPrototype#isCrosscutAdvice');
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3Jvc3NjdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYW9wL0Nyb3NzY3V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQStCQSxNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLCtCQUErQixDQUFDLENBQUM7QUFDOUUsTUFBTSxDQUFDLE1BQU0sa0JBQWtCLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQywrQkFBK0IsQ0FBQyxDQUFDIn0=
1
+ //#region src/aop/Crosscut.ts
2
+ const CROSSCUT_INFO_LIST = Symbol.for("EggPrototype#crosscutInfoList");
3
+ const IS_CROSSCUT_ADVICE = Symbol.for("EggPrototype#isCrosscutAdvice");
4
+
5
+ //#endregion
6
+ export { CROSSCUT_INFO_LIST, IS_CROSSCUT_ADVICE };
@@ -1,25 +1,30 @@
1
- import type { EggProtoImplClass } from '../core-decorator/index.ts';
2
- export interface PointcutOptions<K = any> {
3
- order?: number;
4
- adviceParams?: K;
1
+ import { EggProtoImplClass } from "../core-decorator/model/EggPrototypeInfo.js";
2
+
3
+ //#region src/aop/Pointcut.d.ts
4
+ interface PointcutOptions<K = any> {
5
+ order?: number;
6
+ adviceParams?: K;
5
7
  }
6
- export declare enum PointcutType {
7
- /**
8
- * use class type to match
9
- */
10
- CLASS = "CLASS",
11
- /**
12
- * use regexp to match className and methodName
13
- */
14
- NAME = "NAME",
15
- /**
16
- * use custom function to match
17
- */
18
- CUSTOM = "CUSTOM"
8
+ declare const PointcutType: {
9
+ /**
10
+ * use class type to match
11
+ */
12
+ readonly CLASS: "CLASS";
13
+ /**
14
+ * use regexp to match className and methodName
15
+ */
16
+ readonly NAME: "NAME";
17
+ /**
18
+ * use custom function to match
19
+ */
20
+ readonly CUSTOM: "CUSTOM";
21
+ };
22
+ type PointcutType = (typeof PointcutType)[keyof typeof PointcutType];
23
+ interface PointcutInfo {
24
+ type: PointcutType;
25
+ match(clazz: EggProtoImplClass, method: PropertyKey): boolean;
19
26
  }
20
- export interface PointcutInfo {
21
- type: PointcutType;
22
- match(clazz: EggProtoImplClass, method: PropertyKey): boolean;
23
- }
24
- export type CustomPointcutCallback = (clazz: EggProtoImplClass, method: PropertyKey) => boolean;
25
- export declare const POINTCUT_ADVICE_INFO_LIAR: unique symbol;
27
+ type CustomPointcutCallback = (clazz: EggProtoImplClass, method: PropertyKey) => boolean;
28
+ declare const POINTCUT_ADVICE_INFO_LIAR: symbol;
29
+ //#endregion
30
+ export { CustomPointcutCallback, POINTCUT_ADVICE_INFO_LIAR, PointcutInfo, PointcutOptions, PointcutType };
@@ -1,17 +1,10 @@
1
- export var PointcutType;
2
- (function (PointcutType) {
3
- /**
4
- * use class type to match
5
- */
6
- PointcutType["CLASS"] = "CLASS";
7
- /**
8
- * use regexp to match className and methodName
9
- */
10
- PointcutType["NAME"] = "NAME";
11
- /**
12
- * use custom function to match
13
- */
14
- PointcutType["CUSTOM"] = "CUSTOM";
15
- })(PointcutType || (PointcutType = {}));
16
- export const POINTCUT_ADVICE_INFO_LIAR = Symbol.for('EggPrototype#pointcutAdviceInfoList');
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9pbnRjdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYW9wL1BvaW50Y3V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFBLE1BQU0sQ0FBTixJQUFZLFlBYVg7QUFiRCxXQUFZLFlBQVk7SUFDdEI7O09BRUc7SUFDSCwrQkFBZSxDQUFBO0lBQ2Y7O09BRUc7SUFDSCw2QkFBYSxDQUFBO0lBQ2I7O09BRUc7SUFDSCxpQ0FBaUIsQ0FBQTtBQUNuQixDQUFDLEVBYlcsWUFBWSxLQUFaLFlBQVksUUFhdkI7QUFVRCxNQUFNLENBQUMsTUFBTSx5QkFBeUIsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLHFDQUFxQyxDQUFDLENBQUMifQ==
1
+ //#region src/aop/Pointcut.ts
2
+ const PointcutType = {
3
+ CLASS: "CLASS",
4
+ NAME: "NAME",
5
+ CUSTOM: "CUSTOM"
6
+ };
7
+ const POINTCUT_ADVICE_INFO_LIAR = Symbol.for("EggPrototype#pointcutAdviceInfoList");
8
+
9
+ //#endregion
10
+ export { POINTCUT_ADVICE_INFO_LIAR, PointcutType };
@@ -1,4 +1,5 @@
1
- export * from './Advice.ts';
2
- export * from './Aspect.ts';
3
- export * from './Crosscut.ts';
4
- export * from './Pointcut.ts';
1
+ import { AdviceContext, IAdvice } from "./Advice.js";
2
+ import { ASPECT_LIST, AdviceInfo, AspectAdvice } from "./Aspect.js";
3
+ import { CustomPointcutCallback, POINTCUT_ADVICE_INFO_LIAR, PointcutInfo, PointcutOptions, PointcutType } from "./Pointcut.js";
4
+ import { CROSSCUT_INFO_LIST, ClassCrosscutParam, CrosscutInfo, CrosscutOptions, CrosscutParam, CustomCrosscutParam, IS_CROSSCUT_ADVICE, NameCrosscutParam } from "./Crosscut.js";
5
+ export { ASPECT_LIST, AdviceContext, AdviceInfo, AspectAdvice, CROSSCUT_INFO_LIST, ClassCrosscutParam, CrosscutInfo, CrosscutOptions, CrosscutParam, CustomCrosscutParam, CustomPointcutCallback, IAdvice, IS_CROSSCUT_ADVICE, NameCrosscutParam, POINTCUT_ADVICE_INFO_LIAR, PointcutInfo, PointcutOptions, PointcutType };
package/dist/aop/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export * from "./Advice.js";
2
- export * from "./Aspect.js";
3
- export * from "./Crosscut.js";
4
- export * from "./Pointcut.js";
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYW9wL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsZUFBZSxDQUFDIn0=
1
+ import { ASPECT_LIST } from "./Aspect.js";
2
+ import { CROSSCUT_INFO_LIST, IS_CROSSCUT_ADVICE } from "./Crosscut.js";
3
+ import { POINTCUT_ADVICE_INFO_LIAR, PointcutType } from "./Pointcut.js";
4
+
5
+ export { ASPECT_LIST, CROSSCUT_INFO_LIST, IS_CROSSCUT_ADVICE, POINTCUT_ADVICE_INFO_LIAR, PointcutType };
@@ -1,3 +1,6 @@
1
- export interface GraphNodeObj {
2
- readonly id: string;
1
+ //#region src/common/Graph.d.ts
2
+ interface GraphNodeObj {
3
+ readonly id: string;
3
4
  }
5
+ //#endregion
6
+ export { GraphNodeObj };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR3JhcGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbW9uL0dyYXBoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
1
+ export { };
@@ -1,7 +1,10 @@
1
- export interface Logger {
2
- debug(message?: any, ...optionalParams: any[]): void;
3
- log(message?: any, ...optionalParams: any[]): void;
4
- info(message?: any, ...optionalParams: any[]): void;
5
- warn(message?: any, ...optionalParams: any[]): void;
6
- error(message?: any, ...optionalParams: any[]): void;
1
+ //#region src/common/Logger.d.ts
2
+ interface Logger {
3
+ debug(message?: any, ...optionalParams: any[]): void;
4
+ log(message?: any, ...optionalParams: any[]): void;
5
+ info(message?: any, ...optionalParams: any[]): void;
6
+ warn(message?: any, ...optionalParams: any[]): void;
7
+ error(message?: any, ...optionalParams: any[]): void;
7
8
  }
9
+ //#endregion
10
+ export { Logger };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbW1vbi9Mb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
1
+ export { };
@@ -1,27 +1,29 @@
1
- export interface ModuleReference {
2
- name: string;
3
- path: string;
4
- optional?: boolean;
5
- loaderType?: string;
1
+ //#region src/common/ModuleConfig.d.ts
2
+ interface ModuleReference {
3
+ name: string;
4
+ path: string;
5
+ optional?: boolean;
6
+ loaderType?: string;
6
7
  }
7
- export interface InlineModuleReferenceConfig {
8
- path: string;
9
- optional?: boolean;
8
+ interface InlineModuleReferenceConfig {
9
+ path: string;
10
+ optional?: boolean;
10
11
  }
11
- export interface NpmModuleReferenceConfig {
12
- package: string;
13
- optional?: boolean;
12
+ interface NpmModuleReferenceConfig {
13
+ package: string;
14
+ optional?: boolean;
14
15
  }
15
- export type ModuleReferenceConfig = InlineModuleReferenceConfig | NpmModuleReferenceConfig;
16
- export interface ModuleConfig {
16
+ type ModuleReferenceConfig = InlineModuleReferenceConfig | NpmModuleReferenceConfig;
17
+ interface ModuleConfig {}
18
+ interface ReadModuleReferenceOptions {
19
+ deep?: number;
20
+ cwd?: string;
21
+ extraFilePattern?: string[];
17
22
  }
18
- export interface ReadModuleReferenceOptions {
19
- deep?: number;
20
- cwd?: string;
21
- extraFilePattern?: string[];
22
- }
23
- export interface ModuleConfigHolder {
24
- name: string;
25
- config: ModuleConfig;
26
- reference: ModuleReference;
23
+ interface ModuleConfigHolder {
24
+ name: string;
25
+ config: ModuleConfig;
26
+ reference: ModuleReference;
27
27
  }
28
+ //#endregion
29
+ export { InlineModuleReferenceConfig, ModuleConfig, ModuleConfigHolder, ModuleReference, ModuleReferenceConfig, NpmModuleReferenceConfig, ReadModuleReferenceOptions };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTW9kdWxlQ29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbW1vbi9Nb2R1bGVDb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
1
+ export { };
@@ -1,15 +1,18 @@
1
- export type EnvType = 'local' | 'unittest' | 'prod' | string;
2
- export interface RuntimeConfig {
3
- /**
4
- * Application name
5
- */
6
- name: string;
7
- /**
8
- * Application environment
9
- */
10
- env: EnvType;
11
- /**
12
- * Application directory
13
- */
14
- baseDir: string;
1
+ //#region src/common/RuntimeConfig.d.ts
2
+ type EnvType = "local" | "unittest" | "prod" | string;
3
+ interface RuntimeConfig {
4
+ /**
5
+ * Application name
6
+ */
7
+ name: string;
8
+ /**
9
+ * Application environment
10
+ */
11
+ env: EnvType;
12
+ /**
13
+ * Application directory
14
+ */
15
+ baseDir: string;
15
16
  }
17
+ //#endregion
18
+ export { EnvType, RuntimeConfig };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUnVudGltZUNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vUnVudGltZUNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
1
+ export { };
@@ -1,4 +1,5 @@
1
- export * from './Graph.ts';
2
- export * from './ModuleConfig.ts';
3
- export * from './RuntimeConfig.ts';
4
- export * from './Logger.ts';
1
+ import { GraphNodeObj } from "./Graph.js";
2
+ import { Logger } from "./Logger.js";
3
+ import { InlineModuleReferenceConfig, ModuleConfig, ModuleConfigHolder, ModuleReference, ModuleReferenceConfig, NpmModuleReferenceConfig, ReadModuleReferenceOptions } from "./ModuleConfig.js";
4
+ import { EnvType, RuntimeConfig } from "./RuntimeConfig.js";
5
+ export { EnvType, GraphNodeObj, InlineModuleReferenceConfig, Logger, ModuleConfig, ModuleConfigHolder, ModuleReference, ModuleReferenceConfig, NpmModuleReferenceConfig, ReadModuleReferenceOptions, RuntimeConfig };
@@ -1,5 +1 @@
1
- export * from "./Graph.js";
2
- export * from "./ModuleConfig.js";
3
- export * from "./RuntimeConfig.js";
4
- export * from "./Logger.js";
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLGFBQWEsQ0FBQyJ9
1
+ export { };
@@ -1,5 +1,9 @@
1
- export interface HTTPControllerParams {
2
- protoName?: string;
3
- controllerName?: string;
4
- path?: string;
1
+ //#region src/controller-decorator/HTTPController.d.ts
2
+ interface HTTPControllerParams {
3
+ protoName?: string;
4
+ controllerName?: string;
5
+ path?: string;
6
+ timeout?: number;
5
7
  }
8
+ //#endregion
9
+ export { HTTPControllerParams };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSFRUUENvbnRyb2xsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJvbGxlci1kZWNvcmF0b3IvSFRUUENvbnRyb2xsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
1
+ export { };
@@ -1,6 +1,12 @@
1
- import { HTTPMethodEnum } from './model/index.ts';
2
- export interface HTTPMethodParams {
3
- method: HTTPMethodEnum;
4
- path: string;
5
- priority?: number;
1
+ import { HTTPMethodEnum } from "./model/types.js";
2
+ import "./model/index.js";
3
+
4
+ //#region src/controller-decorator/HTTPMethod.d.ts
5
+ interface HTTPMethodParams {
6
+ method: HTTPMethodEnum;
7
+ path: string;
8
+ priority?: number;
9
+ timeout?: number;
6
10
  }
11
+ //#endregion
12
+ export { HTTPMethodParams };
@@ -1,2 +1 @@
1
- import { HTTPMethodEnum } from "./model/index.js";
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSFRUUE1ldGhvZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cm9sbGVyLWRlY29yYXRvci9IVFRQTWV0aG9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQyJ9
1
+ export { };
@@ -1,9 +1,12 @@
1
- export interface HTTPQueryParams {
2
- name?: string;
1
+ //#region src/controller-decorator/HTTPParam.d.ts
2
+ interface HTTPQueryParams {
3
+ name?: string;
3
4
  }
4
- export interface HTTPQueriesParams {
5
- name?: string;
5
+ interface HTTPQueriesParams {
6
+ name?: string;
6
7
  }
7
- export interface HTTPParamParams {
8
- name?: string;
8
+ interface HTTPParamParams {
9
+ name?: string;
9
10
  }
11
+ //#endregion
12
+ export { HTTPParamParams, HTTPQueriesParams, HTTPQueryParams };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSFRUUFBhcmFtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyb2xsZXItZGVjb3JhdG9yL0hUVFBQYXJhbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
1
+ export { };
@@ -0,0 +1,10 @@
1
+ //#region src/controller-decorator/MCPController.d.ts
2
+ interface MCPControllerParams {
3
+ protoName?: string;
4
+ controllerName?: string;
5
+ name?: string;
6
+ version?: string;
7
+ timeout?: number;
8
+ }
9
+ //#endregion
10
+ export { MCPControllerParams };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,16 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ShapeOutput } from "@modelcontextprotocol/sdk/server/zod-compat.js";
3
+ import { GetPromptResult } from "@modelcontextprotocol/sdk/types.js";
4
+
5
+ //#region src/controller-decorator/MCPPromptParams.d.ts
6
+ type PromptArgs<T extends Parameters<McpServer["prompt"]>["2"]> = ShapeOutput<T>;
7
+ type PromptExtra = Parameters<Parameters<McpServer["prompt"]>["3"]>["1"];
8
+ type MCPPromptResponse = GetPromptResult;
9
+ interface MCPPromptParams {
10
+ name?: string;
11
+ description?: string;
12
+ timeout?: number;
13
+ title?: string;
14
+ }
15
+ //#endregion
16
+ export { MCPPromptParams, MCPPromptResponse, PromptArgs, PromptExtra };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,22 @@
1
+ import { McpServer, ResourceMetadata, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ReadResourceResult } from "@modelcontextprotocol/sdk/types.js";
3
+
4
+ //#region src/controller-decorator/MCPResourceParams.d.ts
5
+ interface MCPResourceUriParams {
6
+ name?: string;
7
+ uri: string;
8
+ metadata?: ResourceMetadata;
9
+ timeout?: number;
10
+ }
11
+ interface MCPResourceTemplateParams {
12
+ name?: string;
13
+ template: ConstructorParameters<typeof ResourceTemplate>;
14
+ metadata?: ResourceMetadata;
15
+ timeout?: number;
16
+ }
17
+ type ResourceExtra = Parameters<Parameters<McpServer["resource"]>["3"]>["2"];
18
+ type ResourceVariables = Parameters<Parameters<McpServer["resource"]>["3"]>["1"];
19
+ type MCPResourceParams = MCPResourceUriParams | MCPResourceTemplateParams;
20
+ type MCPResourceResponse = ReadResourceResult;
21
+ //#endregion
22
+ export { MCPResourceParams, MCPResourceResponse, MCPResourceTemplateParams, MCPResourceUriParams, ResourceExtra, ResourceVariables };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,15 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ShapeOutput } from "@modelcontextprotocol/sdk/server/zod-compat.js";
3
+ import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
4
+
5
+ //#region src/controller-decorator/MCPToolParams.d.ts
6
+ type ToolArgs<T extends Parameters<McpServer["tool"]>["2"]> = ShapeOutput<T>;
7
+ type ToolExtra = Parameters<Parameters<McpServer["tool"]>["4"]>["1"];
8
+ type MCPToolResponse = CallToolResult;
9
+ interface MCPToolParams {
10
+ name?: string;
11
+ description?: string;
12
+ timeout?: number;
13
+ }
14
+ //#endregion
15
+ export { MCPToolParams, MCPToolResponse, ToolArgs, ToolExtra };
@@ -0,0 +1 @@
1
+ export { };