@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.
- package/dist/aop/Advice.d.ts +39 -36
- package/dist/aop/Advice.js +1 -2
- package/dist/aop/Aspect.d.ts +15 -11
- package/dist/aop/Aspect.js +5 -2
- package/dist/aop/Crosscut.d.ts +27 -23
- package/dist/aop/Crosscut.js +6 -3
- package/dist/aop/Pointcut.d.ts +28 -23
- package/dist/aop/Pointcut.js +10 -17
- package/dist/aop/index.d.ts +5 -4
- package/dist/aop/index.js +5 -5
- package/dist/common/Graph.d.ts +5 -2
- package/dist/common/Graph.js +1 -2
- package/dist/common/Logger.d.ts +9 -6
- package/dist/common/Logger.js +1 -2
- package/dist/common/ModuleConfig.d.ts +24 -22
- package/dist/common/ModuleConfig.js +1 -2
- package/dist/common/RuntimeConfig.d.ts +17 -14
- package/dist/common/RuntimeConfig.js +1 -2
- package/dist/common/index.d.ts +5 -4
- package/dist/common/index.js +1 -5
- package/dist/controller-decorator/HTTPController.d.ts +8 -4
- package/dist/controller-decorator/HTTPController.js +1 -2
- package/dist/controller-decorator/HTTPMethod.d.ts +11 -5
- package/dist/controller-decorator/HTTPMethod.js +1 -2
- package/dist/controller-decorator/HTTPParam.d.ts +9 -6
- package/dist/controller-decorator/HTTPParam.js +1 -2
- package/dist/controller-decorator/MCPController.d.ts +10 -0
- package/dist/controller-decorator/MCPController.js +1 -0
- package/dist/controller-decorator/MCPPromptParams.d.ts +16 -0
- package/dist/controller-decorator/MCPPromptParams.js +1 -0
- package/dist/controller-decorator/MCPResourceParams.d.ts +22 -0
- package/dist/controller-decorator/MCPResourceParams.js +1 -0
- package/dist/controller-decorator/MCPToolParams.d.ts +15 -0
- package/dist/controller-decorator/MCPToolParams.js +1 -0
- package/dist/controller-decorator/MetadataKey.d.ts +37 -20
- package/dist/controller-decorator/MetadataKey.js +38 -21
- package/dist/controller-decorator/builder.d.ts +10 -5
- package/dist/controller-decorator/builder.js +1 -2
- package/dist/controller-decorator/index.d.ts +14 -6
- package/dist/controller-decorator/index.js +4 -7
- package/dist/controller-decorator/model/ControllerMetadata.d.ts +14 -10
- package/dist/controller-decorator/model/ControllerMetadata.js +1 -2
- package/dist/controller-decorator/model/MethodMeta.d.ts +9 -5
- package/dist/controller-decorator/model/MethodMeta.js +1 -2
- package/dist/controller-decorator/model/index.d.ts +4 -3
- package/dist/controller-decorator/model/index.js +3 -4
- package/dist/controller-decorator/model/types.d.ts +58 -45
- package/dist/controller-decorator/model/types.js +47 -42
- package/dist/core-decorator/ContextProto.d.ts +9 -5
- package/dist/core-decorator/ContextProto.js +3 -2
- package/dist/core-decorator/Inject.d.ts +6 -3
- package/dist/core-decorator/Inject.js +1 -2
- package/dist/core-decorator/Metadata.d.ts +4 -1
- package/dist/core-decorator/Metadata.js +1 -2
- package/dist/core-decorator/MultiInstanceProto.d.ts +28 -23
- package/dist/core-decorator/MultiInstanceProto.js +1 -2
- package/dist/core-decorator/Prototype.d.ts +12 -7
- package/dist/core-decorator/Prototype.js +5 -2
- package/dist/core-decorator/SingletonProto.d.ts +9 -5
- package/dist/core-decorator/SingletonProto.js +1 -2
- package/dist/core-decorator/enum/AccessLevel.d.ts +8 -4
- package/dist/core-decorator/enum/AccessLevel.js +8 -8
- package/dist/core-decorator/enum/EggType.d.ts +8 -4
- package/dist/core-decorator/enum/EggType.js +8 -6
- package/dist/core-decorator/enum/InjectType.d.ts +8 -4
- package/dist/core-decorator/enum/InjectType.js +8 -6
- package/dist/core-decorator/enum/MultiInstanceType.d.ts +8 -4
- package/dist/core-decorator/enum/MultiInstanceType.js +8 -6
- package/dist/core-decorator/enum/ObjectInitType.d.ts +11 -7
- package/dist/core-decorator/enum/ObjectInitType.js +13 -14
- package/dist/core-decorator/enum/Qualifier.d.ts +10 -7
- package/dist/core-decorator/enum/Qualifier.js +11 -8
- package/dist/core-decorator/enum/index.d.ts +7 -6
- package/dist/core-decorator/enum/index.js +8 -7
- package/dist/core-decorator/index.d.ts +18 -8
- package/dist/core-decorator/index.js +12 -9
- package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +58 -53
- package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.js +4 -4
- package/dist/core-decorator/model/EggPrototypeInfo.d.ts +38 -33
- package/dist/core-decorator/model/EggPrototypeInfo.js +3 -3
- package/dist/core-decorator/model/InjectConstructorInfo.d.ts +22 -18
- package/dist/core-decorator/model/InjectConstructorInfo.js +1 -2
- package/dist/core-decorator/model/InjectObjectInfo.d.ts +17 -14
- package/dist/core-decorator/model/InjectObjectInfo.js +1 -2
- package/dist/core-decorator/model/QualifierInfo.d.ts +39 -36
- package/dist/core-decorator/model/QualifierInfo.js +1 -2
- package/dist/core-decorator/model/index.d.ts +6 -5
- package/dist/core-decorator/model/index.js +4 -6
- package/dist/dal/Qualifier.d.ts +9 -6
- package/dist/dal/Qualifier.js +10 -7
- package/dist/dal/decorator/Column.d.ts +145 -141
- package/dist/dal/decorator/Column.js +1 -2
- package/dist/dal/decorator/DataSourceQualifier.d.ts +5 -2
- package/dist/dal/decorator/DataSourceQualifier.js +6 -3
- package/dist/dal/decorator/Table.d.ts +26 -20
- package/dist/dal/decorator/Table.js +1 -2
- package/dist/dal/decorator/index.d.ts +18 -13
- package/dist/dal/decorator/index.js +3 -4
- package/dist/dal/enum/ColumnFormat.d.ts +9 -5
- package/dist/dal/enum/ColumnFormat.js +9 -7
- package/dist/dal/enum/ColumnType.d.ts +44 -40
- package/dist/dal/enum/ColumnType.js +44 -48
- package/dist/dal/enum/CompressionType.d.ts +9 -5
- package/dist/dal/enum/CompressionType.js +9 -7
- package/dist/dal/enum/IndexStoreType.d.ts +8 -4
- package/dist/dal/enum/IndexStoreType.js +8 -6
- package/dist/dal/enum/IndexType.d.ts +11 -7
- package/dist/dal/enum/IndexType.js +11 -9
- package/dist/dal/enum/InsertMethod.d.ts +9 -5
- package/dist/dal/enum/InsertMethod.js +9 -7
- package/dist/dal/enum/RowFormat.d.ts +12 -8
- package/dist/dal/enum/RowFormat.js +12 -10
- package/dist/dal/enum/SqlType.d.ts +11 -7
- package/dist/dal/enum/SqlType.js +11 -9
- package/dist/dal/enum/Templates.d.ts +9 -5
- package/dist/dal/enum/Templates.js +9 -7
- package/dist/dal/enum/index.d.ts +10 -9
- package/dist/dal/enum/index.js +11 -10
- package/dist/dal/index.d.ts +21 -4
- package/dist/dal/index.js +13 -5
- package/dist/dal/type/BaseDao.d.ts +12 -8
- package/dist/dal/type/BaseDao.js +1 -2
- package/dist/dal/type/CodeGenerator.d.ts +8 -5
- package/dist/dal/type/CodeGenerator.js +1 -2
- package/dist/dal/type/ColumnTsType.d.ts +44 -40
- package/dist/dal/type/ColumnTsType.js +1 -2
- package/dist/dal/type/DateSource.d.ts +14 -11
- package/dist/dal/type/DateSource.js +1 -2
- package/dist/dal/type/Spatial.d.ts +13 -10
- package/dist/dal/type/Spatial.js +1 -2
- package/dist/dal/type/SqlMap.d.ts +18 -14
- package/dist/dal/type/SqlMap.js +1 -2
- package/dist/dal/type/index.d.ts +7 -6
- package/dist/dal/type/index.js +1 -7
- package/dist/dynamic-inject.d.ts +15 -10
- package/dist/dynamic-inject.js +5 -2
- package/dist/index.d.ts +77 -12
- package/dist/index.js +38 -13
- package/dist/lifecycle/EggObjectLifecycle.d.ts +38 -33
- package/dist/lifecycle/EggObjectLifecycle.js +1 -2
- package/dist/lifecycle/IdenticalObject.d.ts +6 -3
- package/dist/lifecycle/IdenticalObject.js +1 -2
- package/dist/lifecycle/LifecycleHook.d.ts +14 -11
- package/dist/lifecycle/LifecycleHook.js +1 -2
- package/dist/lifecycle/index.d.ts +4 -3
- package/dist/lifecycle/index.js +1 -4
- package/dist/metadata/enum/ProtoDescriptorType.d.ts +7 -3
- package/dist/metadata/enum/ProtoDescriptorType.js +5 -5
- package/dist/metadata/enum/index.d.ts +2 -1
- package/dist/metadata/enum/index.js +3 -2
- package/dist/metadata/errors.d.ts +9 -5
- package/dist/metadata/errors.js +9 -7
- package/dist/metadata/index.d.ts +7 -3
- package/dist/metadata/index.js +6 -4
- package/dist/metadata/model/EggPrototype.d.ts +138 -129
- package/dist/metadata/model/EggPrototype.js +3 -4
- package/dist/metadata/model/LoadUnit.d.ts +32 -26
- package/dist/metadata/model/LoadUnit.js +9 -7
- package/dist/metadata/model/Loader.d.ts +10 -5
- package/dist/metadata/model/Loader.js +1 -2
- package/dist/metadata/model/ProtoDescriptor.d.ts +27 -20
- package/dist/metadata/model/ProtoDescriptor.js +3 -3
- package/dist/metadata/model/index.d.ts +5 -4
- package/dist/metadata/model/index.js +5 -5
- package/dist/orm.d.ts +28 -25
- package/dist/orm.js +10 -7
- package/dist/runtime/Factory.d.ts +11 -6
- package/dist/runtime/Factory.js +1 -2
- package/dist/runtime/index.d.ts +6 -2
- package/dist/runtime/index.js +3 -3
- package/dist/runtime/model/EggContainer.d.ts +15 -10
- package/dist/runtime/model/EggContainer.js +1 -2
- package/dist/runtime/model/EggContext.d.ts +9 -6
- package/dist/runtime/model/EggContext.js +1 -2
- package/dist/runtime/model/EggObject.d.ts +28 -22
- package/dist/runtime/model/EggObject.js +11 -9
- package/dist/runtime/model/LoadUnitInstance.d.ts +11 -7
- package/dist/runtime/model/LoadUnitInstance.js +1 -2
- package/dist/runtime/model/index.d.ts +5 -4
- package/dist/runtime/model/index.js +3 -5
- package/dist/schedule.d.ts +44 -25
- package/dist/schedule.js +12 -10
- package/dist/transaction.d.ts +25 -21
- package/dist/transaction.js +10 -10
- package/package.json +35 -31
package/dist/aop/Advice.d.ts
CHANGED
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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 };
|
package/dist/aop/Advice.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWR2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FvcC9BZHZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
1
|
+
export { };
|
package/dist/aop/Aspect.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
interface AspectAdvice {
|
|
11
|
+
name: string;
|
|
12
|
+
clazz: EggProtoImplClass<IAdvice>;
|
|
13
|
+
adviceParams: any;
|
|
12
14
|
}
|
|
13
|
-
|
|
15
|
+
declare const ASPECT_LIST: symbol;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ASPECT_LIST, AdviceInfo, AspectAdvice };
|
package/dist/aop/Aspect.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/aop/Aspect.ts
|
|
2
|
+
const ASPECT_LIST = Symbol.for("EggPrototype#aspectList");
|
|
3
|
+
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ASPECT_LIST };
|
package/dist/aop/Crosscut.d.ts
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
interface ClassCrosscutParam {
|
|
11
|
+
type: typeof PointcutType.CLASS;
|
|
12
|
+
clazz: EggProtoImplClass;
|
|
13
|
+
methodName: PropertyKey;
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
interface NameCrosscutParam {
|
|
16
|
+
type: typeof PointcutType.NAME;
|
|
17
|
+
className: RegExp;
|
|
18
|
+
methodName: RegExp;
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
interface CustomCrosscutParam {
|
|
21
|
+
type: typeof PointcutType.CUSTOM;
|
|
22
|
+
callback: CustomPointcutCallback;
|
|
21
23
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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 };
|
package/dist/aop/Crosscut.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 };
|
package/dist/aop/Pointcut.d.ts
CHANGED
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 };
|
package/dist/aop/Pointcut.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 };
|
package/dist/aop/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 };
|
package/dist/common/Graph.d.ts
CHANGED
package/dist/common/Graph.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR3JhcGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbW9uL0dyYXBoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
1
|
+
export { };
|
package/dist/common/Logger.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 };
|
package/dist/common/Logger.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbW1vbi9Mb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
1
|
+
export { };
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
interface InlineModuleReferenceConfig {
|
|
9
|
+
path: string;
|
|
10
|
+
optional?: boolean;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
interface NpmModuleReferenceConfig {
|
|
13
|
+
package: string;
|
|
14
|
+
optional?: boolean;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
type ModuleReferenceConfig = InlineModuleReferenceConfig | NpmModuleReferenceConfig;
|
|
17
|
+
interface ModuleConfig {}
|
|
18
|
+
interface ReadModuleReferenceOptions {
|
|
19
|
+
deep?: number;
|
|
20
|
+
cwd?: string;
|
|
21
|
+
extraFilePattern?: string[];
|
|
17
22
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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 { };
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 };
|
package/dist/common/index.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSFRUUE1ldGhvZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cm9sbGVyLWRlY29yYXRvci9IVFRQTWV0aG9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQyJ9
|
|
1
|
+
export { };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/controller-decorator/HTTPParam.d.ts
|
|
2
|
+
interface HTTPQueryParams {
|
|
3
|
+
name?: string;
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
interface HTTPQueriesParams {
|
|
6
|
+
name?: string;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
|
|
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 @@
|
|
|
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 { };
|