@eggjs/tegg-types 4.0.0-beta.8 → 4.0.1-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 +41 -1
- package/dist/aop/Advice.js +0 -2
- package/dist/aop/Aspect.d.ts +16 -22
- package/dist/aop/Aspect.js +3 -1
- package/dist/aop/Crosscut.d.ts +31 -24
- package/dist/aop/Crosscut.js +4 -1
- package/dist/aop/Pointcut.d.ts +29 -21
- package/dist/aop/Pointcut.js +8 -1
- package/dist/aop/index.d.ts +4 -25
- package/dist/aop/index.js +3 -5
- package/dist/common/Graph.d.ts +5 -1
- package/dist/common/Graph.js +0 -2
- package/dist/common/Logger.d.ts +9 -1
- package/dist/common/Logger.js +0 -2
- package/dist/common/ModuleConfig.d.ts +28 -1
- package/dist/common/ModuleConfig.js +0 -2
- package/dist/common/RuntimeConfig.d.ts +17 -1
- package/dist/common/RuntimeConfig.js +0 -2
- package/dist/common/index.d.ts +4 -5
- package/dist/common/index.js +0 -6
- package/dist/controller-decorator/HTTPController.d.ts +8 -1
- package/dist/controller-decorator/HTTPController.js +0 -2
- package/dist/controller-decorator/HTTPMethod.d.ts +11 -25
- package/dist/controller-decorator/HTTPMethod.js +0 -6
- package/dist/controller-decorator/HTTPParam.d.ts +11 -1
- package/dist/controller-decorator/HTTPParam.js +0 -2
- package/dist/controller-decorator/MCPController.d.ts +10 -0
- package/dist/controller-decorator/MCPPromptParams.d.ts +16 -0
- package/dist/controller-decorator/MCPResourceParams.d.ts +22 -0
- package/dist/controller-decorator/MCPToolParams.d.ts +15 -0
- package/dist/controller-decorator/MetadataKey.d.ts +37 -2
- package/dist/controller-decorator/MetadataKey.js +37 -2
- package/dist/controller-decorator/builder.d.ts +10 -25
- package/dist/controller-decorator/builder.js +0 -2
- package/dist/controller-decorator/index.d.ts +14 -31
- package/dist/controller-decorator/index.js +3 -11
- package/dist/controller-decorator/model/ControllerMetadata.d.ts +14 -23
- package/dist/controller-decorator/model/ControllerMetadata.js +0 -2
- package/dist/controller-decorator/model/MethodMeta.d.ts +9 -2
- package/dist/controller-decorator/model/MethodMeta.js +0 -2
- package/dist/controller-decorator/model/index.d.ts +4 -25
- package/dist/controller-decorator/model/index.js +2 -5
- package/dist/controller-decorator/model/types.d.ts +58 -2
- package/dist/controller-decorator/model/types.js +46 -2
- package/dist/core-decorator/ContextProto.d.ts +9 -8
- package/dist/core-decorator/ContextProto.js +1 -8
- package/dist/core-decorator/Inject.d.ts +6 -1
- package/dist/core-decorator/Inject.js +0 -2
- package/dist/core-decorator/Metadata.d.ts +3 -1
- package/dist/core-decorator/Metadata.js +0 -2
- package/dist/core-decorator/MultiInstanceProto.d.ts +30 -14
- package/dist/core-decorator/MultiInstanceProto.js +0 -2
- package/dist/core-decorator/Prototype.d.ts +12 -8
- package/dist/core-decorator/Prototype.js +3 -1
- package/dist/core-decorator/SingletonProto.d.ts +9 -8
- package/dist/core-decorator/SingletonProto.js +0 -2
- package/dist/core-decorator/enum/AccessLevel.d.ts +7 -1
- package/dist/core-decorator/enum/AccessLevel.js +6 -1
- package/dist/core-decorator/enum/EggType.d.ts +7 -1
- package/dist/core-decorator/enum/EggType.js +6 -1
- package/dist/core-decorator/enum/InjectType.d.ts +7 -1
- package/dist/core-decorator/enum/InjectType.js +6 -1
- package/dist/core-decorator/enum/MultiInstanceType.d.ts +7 -1
- package/dist/core-decorator/enum/MultiInstanceType.js +6 -1
- package/dist/core-decorator/enum/ObjectInitType.d.ts +10 -1
- package/dist/core-decorator/enum/ObjectInitType.js +12 -1
- package/dist/core-decorator/enum/Qualifier.d.ts +9 -1
- package/dist/core-decorator/enum/Qualifier.js +9 -1
- package/dist/core-decorator/enum/index.d.ts +6 -7
- package/dist/core-decorator/enum/index.js +6 -7
- package/dist/core-decorator/index.d.ts +17 -20
- package/dist/core-decorator/index.js +10 -20
- package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.d.ts +61 -10
- package/dist/core-decorator/model/EggMultiInstancePrototypeInfo.js +2 -10
- package/dist/core-decorator/model/EggPrototypeInfo.d.ts +38 -9
- package/dist/core-decorator/model/EggPrototypeInfo.js +1 -9
- package/dist/core-decorator/model/InjectConstructorInfo.d.ts +22 -2
- package/dist/core-decorator/model/InjectConstructorInfo.js +0 -2
- package/dist/core-decorator/model/InjectObjectInfo.d.ts +17 -1
- package/dist/core-decorator/model/InjectObjectInfo.js +0 -2
- package/dist/core-decorator/model/QualifierInfo.d.ts +40 -1
- package/dist/core-decorator/model/QualifierInfo.js +0 -2
- package/dist/core-decorator/model/index.d.ts +5 -13
- package/dist/core-decorator/model/index.js +2 -13
- package/dist/dal/Qualifier.d.ts +8 -1
- package/dist/dal/Qualifier.js +8 -1
- package/dist/dal/decorator/Column.d.ts +181 -11
- package/dist/dal/decorator/Column.js +0 -2
- package/dist/dal/decorator/DataSourceQualifier.d.ts +4 -1
- package/dist/dal/decorator/DataSourceQualifier.js +4 -1
- package/dist/dal/decorator/Table.d.ts +26 -11
- package/dist/dal/decorator/Table.js +0 -2
- package/dist/dal/decorator/index.d.ts +18 -14
- package/dist/dal/decorator/index.js +1 -4
- package/dist/dal/enum/ColumnFormat.d.ts +8 -1
- package/dist/dal/enum/ColumnFormat.js +7 -1
- package/dist/dal/enum/ColumnType.d.ts +43 -1
- package/dist/dal/enum/ColumnType.js +42 -1
- package/dist/dal/enum/CompressionType.d.ts +8 -1
- package/dist/dal/enum/CompressionType.js +7 -1
- package/dist/dal/enum/IndexStoreType.d.ts +7 -1
- package/dist/dal/enum/IndexStoreType.js +6 -1
- package/dist/dal/enum/IndexType.d.ts +10 -1
- package/dist/dal/enum/IndexType.js +9 -1
- package/dist/dal/enum/InsertMethod.d.ts +8 -1
- package/dist/dal/enum/InsertMethod.js +7 -1
- package/dist/dal/enum/RowFormat.d.ts +11 -1
- package/dist/dal/enum/RowFormat.js +10 -1
- package/dist/dal/enum/SqlType.d.ts +10 -1
- package/dist/dal/enum/SqlType.js +9 -1
- package/dist/dal/enum/Templates.d.ts +8 -1
- package/dist/dal/enum/Templates.js +7 -1
- package/dist/dal/enum/index.d.ts +9 -10
- package/dist/dal/enum/index.js +9 -10
- package/dist/dal/index.d.ts +20 -43
- package/dist/dal/index.js +11 -23
- package/dist/dal/type/BaseDao.d.ts +12 -32
- package/dist/dal/type/BaseDao.js +0 -2
- package/dist/dal/type/CodeGenerator.d.ts +8 -1
- package/dist/dal/type/CodeGenerator.js +0 -2
- package/dist/dal/type/ColumnTsType.d.ts +44 -2
- package/dist/dal/type/ColumnTsType.js +0 -2
- package/dist/dal/type/DateSource.d.ts +15 -1
- package/dist/dal/type/DateSource.js +0 -2
- package/dist/dal/type/Spatial.d.ts +13 -1
- package/dist/dal/type/Spatial.js +0 -2
- package/dist/dal/type/SqlMap.d.ts +21 -11
- package/dist/dal/type/SqlMap.js +0 -2
- package/dist/dal/type/index.d.ts +6 -37
- package/dist/dal/type/index.js +0 -8
- package/dist/dynamic-inject.d.ts +17 -21
- package/dist/dynamic-inject.js +3 -1
- package/dist/index.d.ts +77 -76
- package/dist/index.js +37 -88
- package/dist/lifecycle/EggObjectLifecycle.d.ts +39 -28
- package/dist/lifecycle/EggObjectLifecycle.js +0 -2
- package/dist/lifecycle/IdenticalObject.d.ts +6 -1
- package/dist/lifecycle/IdenticalObject.js +0 -2
- package/dist/lifecycle/LifecycleHook.d.ts +15 -2
- package/dist/lifecycle/LifecycleHook.js +0 -2
- package/dist/lifecycle/index.d.ts +3 -28
- package/dist/lifecycle/index.js +0 -5
- package/dist/metadata/enum/ProtoDescriptorType.d.ts +6 -1
- package/dist/metadata/enum/ProtoDescriptorType.js +3 -1
- package/dist/metadata/enum/index.d.ts +1 -2
- package/dist/metadata/enum/index.js +1 -2
- package/dist/metadata/errors.d.ts +8 -1
- package/dist/metadata/errors.js +7 -1
- package/dist/metadata/index.d.ts +6 -28
- package/dist/metadata/index.js +4 -33
- package/dist/metadata/model/EggPrototype.d.ts +144 -28
- package/dist/metadata/model/EggPrototype.js +1 -26
- package/dist/metadata/model/LoadUnit.d.ts +34 -28
- package/dist/metadata/model/LoadUnit.js +7 -1
- package/dist/metadata/model/Loader.d.ts +11 -21
- package/dist/metadata/model/Loader.js +0 -2
- package/dist/metadata/model/ProtoDescriptor.d.ts +28 -23
- package/dist/metadata/model/ProtoDescriptor.js +1 -23
- package/dist/metadata/model/index.d.ts +4 -28
- package/dist/metadata/model/index.js +3 -31
- package/dist/orm.d.ts +32 -1
- package/dist/orm.js +8 -1
- package/dist/runtime/Factory.d.ts +10 -28
- package/dist/runtime/Factory.js +0 -2
- package/dist/runtime/index.d.ts +5 -28
- package/dist/runtime/index.js +1 -7
- package/dist/runtime/model/EggContainer.d.ts +15 -28
- package/dist/runtime/model/EggContainer.js +0 -2
- package/dist/runtime/model/EggContext.d.ts +9 -28
- package/dist/runtime/model/EggContext.js +0 -2
- package/dist/runtime/model/EggObject.d.ts +29 -28
- package/dist/runtime/model/EggObject.js +9 -1
- package/dist/runtime/model/LoadUnitInstance.d.ts +12 -28
- package/dist/runtime/model/LoadUnitInstance.js +0 -2
- package/dist/runtime/model/index.d.ts +4 -28
- package/dist/runtime/model/index.js +1 -5
- package/dist/schedule.d.ts +48 -1
- package/dist/schedule.js +10 -1
- package/dist/transaction.d.ts +26 -1
- package/dist/transaction.js +8 -1
- package/package.json +35 -31
- package/dist/AccessLevel-BmHWkz-U.js +0 -9
- package/dist/AccessLevel-CCiGTqJJ.d.ts +0 -7
- package/dist/Advice-B4Ts38yJ.d.ts +0 -42
- package/dist/Aspect-CTW_0pmy.d.ts +0 -17
- package/dist/Aspect-DXu-kwdZ.js +0 -5
- package/dist/BaseDao-TBMMfekC.d.ts +0 -13
- package/dist/CodeGenerator-BXae3hkj.d.ts +0 -9
- package/dist/Column-JNyjCJMp.d.ts +0 -182
- package/dist/ColumnFormat-NfbFD-Qq.js +0 -10
- package/dist/ColumnFormat-YNjWfTAq.d.ts +0 -8
- package/dist/ColumnTsType-Bn82JG3Z.js +0 -1
- package/dist/ColumnTsType-C-tU6Fl2.d.ts +0 -45
- package/dist/ColumnType-Baa2fUne.js +0 -45
- package/dist/ColumnType-oCNvXvt4.d.ts +0 -43
- package/dist/CompressionType-BSzjn3NF.d.ts +0 -8
- package/dist/CompressionType-rjfbKy8y.js +0 -10
- package/dist/ContextProto-B9GGOED5.js +0 -1
- package/dist/ContextProto-DNcKWLwE.d.ts +0 -10
- package/dist/ControllerMetadata-_P0ZOday.d.ts +0 -15
- package/dist/ControllerMetadata-uOWyAhxg.js +0 -1
- package/dist/Crosscut-CFVGqlTe.d.ts +0 -32
- package/dist/Crosscut-RtDGP_jE.js +0 -6
- package/dist/DataSourceQualifier-BYTDOFX_.js +0 -6
- package/dist/DataSourceQualifier-tL1buEEH.d.ts +0 -5
- package/dist/DateSource-D9CDT4dT.d.ts +0 -16
- package/dist/DateSource-DZkuQC77.js +0 -1
- package/dist/EggContainer-SVX9XNK2.js +0 -1
- package/dist/EggContext-GNBG4Rj7.js +0 -1
- package/dist/EggMultiInstancePrototypeInfo-BqfEf8bP.d.ts +0 -62
- package/dist/EggMultiInstancePrototypeInfo-KJT1L6LW.js +0 -1
- package/dist/EggObject-BmvZuwV_.js +0 -12
- package/dist/EggObjectLifecycle-D3YqlfEg.js +0 -1
- package/dist/EggPrototype-DT7xhNEp.js +0 -1
- package/dist/EggPrototypeInfo-DB-Ka_mi.js +0 -1
- package/dist/EggPrototypeInfo-DtKJNqMh.d.ts +0 -39
- package/dist/EggType-CWiNumD0.d.ts +0 -7
- package/dist/EggType-Gbn2fclg.js +0 -9
- package/dist/Factory-NttwzKhi.js +0 -1
- package/dist/Graph-BoS2dLfr.js +0 -1
- package/dist/Graph-DV_lJFde.d.ts +0 -6
- package/dist/HTTPController-DUeli07o.js +0 -1
- package/dist/HTTPController-DWaTpXho.d.ts +0 -8
- package/dist/HTTPMethod-BXEIRfwp.d.ts +0 -10
- package/dist/HTTPMethod-hvD7QIK7.js +0 -1
- package/dist/HTTPParam-BSihwHRr.d.ts +0 -12
- package/dist/HTTPParam-Le3ct7ye.js +0 -1
- package/dist/IdenticalObject-CgLvCa4Z.js +0 -1
- package/dist/IdenticalObject-DWtk6w0C.d.ts +0 -7
- package/dist/IndexStoreType-BoZ6JVlo.js +0 -9
- package/dist/IndexStoreType-CyG2LFa7.d.ts +0 -7
- package/dist/IndexType-C2UAjKxX.js +0 -12
- package/dist/IndexType-Df7nUq-E.d.ts +0 -10
- package/dist/Inject-CJoudlde.d.ts +0 -7
- package/dist/Inject-DuZBYpk5.js +0 -1
- package/dist/InjectConstructorInfo-C2StiUhG.d.ts +0 -23
- package/dist/InjectConstructorInfo-Hnid0JYk.js +0 -1
- package/dist/InjectObjectInfo-1V6YBUpK.d.ts +0 -18
- package/dist/InjectObjectInfo-DEoSk7Pn.js +0 -1
- package/dist/InjectType-CFz0_dok.js +0 -9
- package/dist/InjectType-s8nLOlv2.d.ts +0 -7
- package/dist/InsertMethod-CK5Y5i-0.d.ts +0 -8
- package/dist/InsertMethod-CndhCMXe.js +0 -10
- package/dist/LifecycleHook-Bo14zgud.d.ts +0 -16
- package/dist/LifecycleHook-Cz0mYIGG.js +0 -1
- package/dist/LoadUnit-DHzr1WxT.js +0 -10
- package/dist/LoadUnitInstance-CU2hw0zx.js +0 -1
- package/dist/Loader-CeoaOmMk.d.ts +0 -12
- package/dist/Loader-tg663nX2.js +0 -1
- package/dist/Logger-B4gKN85p.d.ts +0 -10
- package/dist/Logger-DWAU5XJy.js +0 -1
- package/dist/Metadata-2R5ZbPIh.js +0 -1
- package/dist/Metadata-BCDj-rjy.d.ts +0 -4
- package/dist/MetadataKey-DHtJYAMe.js +0 -24
- package/dist/MetadataKey-DtGflg7d.d.ts +0 -23
- package/dist/MethodMeta-CRxnzXjS.js +0 -1
- package/dist/MethodMeta-DhgwCoNi.d.ts +0 -10
- package/dist/ModuleConfig-BAMzgp3C.d.ts +0 -29
- package/dist/ModuleConfig-cL7yqQ_U.js +0 -1
- package/dist/MultiInstanceProto-7QFGZfAk.d.ts +0 -31
- package/dist/MultiInstanceProto-FQ3UjFp4.js +0 -1
- package/dist/MultiInstanceType-BGZS96By.d.ts +0 -7
- package/dist/MultiInstanceType-ClAOva8a.js +0 -9
- package/dist/ObjectInitType-B1ZmILoP.js +0 -15
- package/dist/ObjectInitType-Bup9dZmi.d.ts +0 -10
- package/dist/Pointcut-CU11keh_.js +0 -20
- package/dist/Pointcut-Cjch6vux.d.ts +0 -29
- package/dist/ProtoDescriptor-C46l15Hq.d.ts +0 -29
- package/dist/ProtoDescriptor-C7lYBF_c.js +0 -1
- package/dist/ProtoDescriptorType-4nWZH9VX.js +0 -8
- package/dist/ProtoDescriptorType-Ccx3k2nQ.d.ts +0 -6
- package/dist/Prototype-DVMZnlzR.d.ts +0 -13
- package/dist/Prototype-DkOAbbWd.js +0 -5
- package/dist/Qualifier-BdK6CR6I.js +0 -11
- package/dist/Qualifier-DHoHs6N1.d.ts +0 -9
- package/dist/Qualifier-Do-37C7R.d.ts +0 -10
- package/dist/Qualifier-DqQ1SHGp.js +0 -10
- package/dist/QualifierInfo-BAKTckQb.d.ts +0 -41
- package/dist/QualifierInfo-BPycgg_P.js +0 -1
- package/dist/RowFormat-D9-zkd7Y.d.ts +0 -11
- package/dist/RowFormat-j0MO7-Ti.js +0 -13
- package/dist/RuntimeConfig-B8mz1XU4.js +0 -1
- package/dist/RuntimeConfig-D3ZIrFDE.d.ts +0 -18
- package/dist/SingletonProto-4_tj18YD.js +0 -1
- package/dist/SingletonProto-CwutNiFl.d.ts +0 -10
- package/dist/Spatial-Bobfh4hS.js +0 -1
- package/dist/Spatial-DR_aZctq.d.ts +0 -14
- package/dist/SqlMap-C4zS_FfM.js +0 -1
- package/dist/SqlMap-CElpXNYO.d.ts +0 -22
- package/dist/SqlType-3poChZq3.js +0 -12
- package/dist/SqlType-CTfZJaDy.d.ts +0 -10
- package/dist/Table-C7PwEyW3.js +0 -1
- package/dist/Table-y7qTEg4Y.d.ts +0 -27
- package/dist/Templates-CzZva9K4.d.ts +0 -8
- package/dist/Templates-RNDj6Xzm.js +0 -10
- package/dist/aop-DsxLLCBn.js +0 -1
- package/dist/builder-Cc8YzNyP.js +0 -1
- package/dist/builder-D5y-duIA.d.ts +0 -10
- package/dist/common-CKFqCHwu.js +0 -1
- package/dist/controller-decorator-LXQBm3FM.js +0 -1
- package/dist/core-decorator-D7IpfnBM.js +0 -1
- package/dist/dal-CxBKEWLS.js +0 -1
- package/dist/decorator-siRZOEcm.js +0 -1
- package/dist/dynamic-inject-DAPxfjab.js +0 -5
- package/dist/dynamic-inject-s2d6E4bg.d.ts +0 -18
- package/dist/enum-BLhDoXEr.js +0 -1
- package/dist/enum-DPmNBh9B.js +0 -1
- package/dist/enum-Dq4iL6Z6.js +0 -1
- package/dist/errors-D0-3zz_0.d.ts +0 -8
- package/dist/errors-f8c86iks.js +0 -10
- package/dist/index-2Mg7qf3C.d.ts +0 -1
- package/dist/index-2g6qjnfC.d.ts +0 -1
- package/dist/index-B49vchMV.d.ts +0 -1
- package/dist/index-BdAuF5sH.d.ts +0 -16
- package/dist/index-CAfgpWI7.d.ts +0 -1
- package/dist/index-CQhjd39A.d.ts +0 -1
- package/dist/index-ChT-j2Wd.d.ts +0 -1
- package/dist/index-CxtfLU1L.d.ts +0 -259
- package/dist/index-D32kgK7U.d.ts +0 -1
- package/dist/index-DAzj8jAF.d.ts +0 -1
- package/dist/index-DIk3-d3u.d.ts +0 -1
- package/dist/index-DKjTz6WE.d.ts +0 -1
- package/dist/index-LUGmBzeE.d.ts +0 -1
- package/dist/lifecycle-De43j7QN.js +0 -1
- package/dist/metadata-4rC6zz4u.js +0 -1
- package/dist/model-B2jQYVY_.js +0 -1
- package/dist/model-BGXnWY4v.js +0 -1
- package/dist/model-Cgjw7oIu.js +0 -1
- package/dist/model-CrxScfQ9.js +0 -1
- package/dist/orm-C3AVUU9c.js +0 -10
- package/dist/orm-C5YAuOG4.d.ts +0 -33
- package/dist/runtime-7iHvU3SV.js +0 -1
- package/dist/schedule-C1BbX-U_.d.ts +0 -33
- package/dist/schedule-DpXiSIJj.js +0 -13
- package/dist/transaction-BS1Kmzb9.d.ts +0 -26
- package/dist/transaction-C_PbpkW9.js +0 -13
- package/dist/type-DIfgT8T2.js +0 -1
- package/dist/types-C0VFNhau.js +0 -45
- package/dist/types-DuksKbpi.d.ts +0 -49
- /package/dist/{Advice-BwhUgRjK.js → controller-decorator/MCPController.js} +0 -0
- /package/dist/{BaseDao-kXru0LGa.js → controller-decorator/MCPPromptParams.js} +0 -0
- /package/dist/{CodeGenerator-CC1LH3Nd.js → controller-decorator/MCPResourceParams.js} +0 -0
- /package/dist/{Column-BLmjqPaT.js → controller-decorator/MCPToolParams.js} +0 -0
package/dist/aop/Advice.d.ts
CHANGED
|
@@ -1,2 +1,42 @@
|
|
|
1
|
-
|
|
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;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
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>;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
2
42
|
export { AdviceContext, IAdvice };
|
package/dist/aop/Advice.js
CHANGED
package/dist/aop/Aspect.d.ts
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "../
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import "../Metadata-BCDj-rjy.js";
|
|
18
|
-
import "../MultiInstanceProto-7QFGZfAk.js";
|
|
19
|
-
import "../Prototype-DVMZnlzR.js";
|
|
20
|
-
import "../SingletonProto-CwutNiFl.js";
|
|
21
|
-
import "../index-CQhjd39A.js";
|
|
22
|
-
import { ASPECT_LIST, AdviceInfo, AspectAdvice } from "../Aspect-CTW_0pmy.js";
|
|
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;
|
|
9
|
+
}
|
|
10
|
+
interface AspectAdvice {
|
|
11
|
+
name: string;
|
|
12
|
+
clazz: EggProtoImplClass<IAdvice>;
|
|
13
|
+
adviceParams: any;
|
|
14
|
+
}
|
|
15
|
+
declare const ASPECT_LIST: symbol;
|
|
16
|
+
//#endregion
|
|
23
17
|
export { ASPECT_LIST, AdviceInfo, AspectAdvice };
|
package/dist/aop/Aspect.js
CHANGED
package/dist/aop/Crosscut.d.ts
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { 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;
|
|
9
|
+
}
|
|
10
|
+
interface ClassCrosscutParam {
|
|
11
|
+
type: typeof PointcutType.CLASS;
|
|
12
|
+
clazz: EggProtoImplClass;
|
|
13
|
+
methodName: PropertyKey;
|
|
14
|
+
}
|
|
15
|
+
interface NameCrosscutParam {
|
|
16
|
+
type: typeof PointcutType.NAME;
|
|
17
|
+
className: RegExp;
|
|
18
|
+
methodName: RegExp;
|
|
19
|
+
}
|
|
20
|
+
interface CustomCrosscutParam {
|
|
21
|
+
type: typeof PointcutType.CUSTOM;
|
|
22
|
+
callback: CustomPointcutCallback;
|
|
23
|
+
}
|
|
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;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
25
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
|
-
|
|
1
|
+
//#region src/aop/Crosscut.ts
|
|
2
|
+
const CROSSCUT_INFO_LIST = Symbol.for("EggPrototype#crosscutInfoList");
|
|
3
|
+
const IS_CROSSCUT_ADVICE = Symbol.for("EggPrototype#isCrosscutAdvice");
|
|
2
4
|
|
|
5
|
+
//#endregion
|
|
3
6
|
export { CROSSCUT_INFO_LIST, IS_CROSSCUT_ADVICE };
|
package/dist/aop/Pointcut.d.ts
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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;
|
|
7
|
+
}
|
|
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;
|
|
26
|
+
}
|
|
27
|
+
type CustomPointcutCallback = (clazz: EggProtoImplClass, method: PropertyKey) => boolean;
|
|
28
|
+
declare const POINTCUT_ADVICE_INFO_LIAR: symbol;
|
|
29
|
+
//#endregion
|
|
22
30
|
export { CustomPointcutCallback, POINTCUT_ADVICE_INFO_LIAR, PointcutInfo, PointcutOptions, PointcutType };
|
package/dist/aop/Pointcut.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
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");
|
|
2
8
|
|
|
9
|
+
//#endregion
|
|
3
10
|
export { POINTCUT_ADVICE_INFO_LIAR, PointcutType };
|
package/dist/aop/index.d.ts
CHANGED
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
import { AdviceContext, IAdvice } from "
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "../Qualifier-Do-37C7R.js";
|
|
6
|
-
import "../InjectType-s8nLOlv2.js";
|
|
7
|
-
import "../MultiInstanceType-BGZS96By.js";
|
|
8
|
-
import "../index-D32kgK7U.js";
|
|
9
|
-
import "../QualifierInfo-BAKTckQb.js";
|
|
10
|
-
import "../EggPrototypeInfo-DtKJNqMh.js";
|
|
11
|
-
import "../EggMultiInstancePrototypeInfo-BqfEf8bP.js";
|
|
12
|
-
import "../InjectObjectInfo-1V6YBUpK.js";
|
|
13
|
-
import "../InjectConstructorInfo-C2StiUhG.js";
|
|
14
|
-
import "../index-DIk3-d3u.js";
|
|
15
|
-
import "../ContextProto-DNcKWLwE.js";
|
|
16
|
-
import "../Inject-CJoudlde.js";
|
|
17
|
-
import "../Metadata-BCDj-rjy.js";
|
|
18
|
-
import "../MultiInstanceProto-7QFGZfAk.js";
|
|
19
|
-
import "../Prototype-DVMZnlzR.js";
|
|
20
|
-
import "../SingletonProto-CwutNiFl.js";
|
|
21
|
-
import "../index-CQhjd39A.js";
|
|
22
|
-
import { ASPECT_LIST, AdviceInfo, AspectAdvice } from "../Aspect-CTW_0pmy.js";
|
|
23
|
-
import { CustomPointcutCallback, POINTCUT_ADVICE_INFO_LIAR, PointcutInfo, PointcutOptions, PointcutType } from "../Pointcut-Cjch6vux.js";
|
|
24
|
-
import { CROSSCUT_INFO_LIST, ClassCrosscutParam, CrosscutInfo, CrosscutOptions, CrosscutParam, CustomCrosscutParam, IS_CROSSCUT_ADVICE, NameCrosscutParam } from "../Crosscut-CFVGqlTe.js";
|
|
25
|
-
import "../index-ChT-j2Wd.js";
|
|
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";
|
|
26
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,7 +1,5 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { POINTCUT_ADVICE_INFO_LIAR, PointcutType } from "../Pointcut-CU11keh_.js";
|
|
5
|
-
import "../aop-DsxLLCBn.js";
|
|
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";
|
|
6
4
|
|
|
7
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
package/dist/common/Logger.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
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;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
2
10
|
export { Logger };
|
package/dist/common/Logger.js
CHANGED
|
@@ -1,2 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/common/ModuleConfig.d.ts
|
|
2
|
+
interface ModuleReference {
|
|
3
|
+
name: string;
|
|
4
|
+
path: string;
|
|
5
|
+
optional?: boolean;
|
|
6
|
+
loaderType?: string;
|
|
7
|
+
}
|
|
8
|
+
interface InlineModuleReferenceConfig {
|
|
9
|
+
path: string;
|
|
10
|
+
optional?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface NpmModuleReferenceConfig {
|
|
13
|
+
package: string;
|
|
14
|
+
optional?: boolean;
|
|
15
|
+
}
|
|
16
|
+
type ModuleReferenceConfig = InlineModuleReferenceConfig | NpmModuleReferenceConfig;
|
|
17
|
+
interface ModuleConfig {}
|
|
18
|
+
interface ReadModuleReferenceOptions {
|
|
19
|
+
deep?: number;
|
|
20
|
+
cwd?: string;
|
|
21
|
+
extraFilePattern?: string[];
|
|
22
|
+
}
|
|
23
|
+
interface ModuleConfigHolder {
|
|
24
|
+
name: string;
|
|
25
|
+
config: ModuleConfig;
|
|
26
|
+
reference: ModuleReference;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
2
29
|
export { InlineModuleReferenceConfig, ModuleConfig, ModuleConfigHolder, ModuleReference, ModuleReferenceConfig, NpmModuleReferenceConfig, ReadModuleReferenceOptions };
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
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;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
2
18
|
export { EnvType, RuntimeConfig };
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { GraphNodeObj } from "
|
|
2
|
-
import { Logger } from "
|
|
3
|
-
import { InlineModuleReferenceConfig, ModuleConfig, ModuleConfigHolder, ModuleReference, ModuleReferenceConfig, NpmModuleReferenceConfig, ReadModuleReferenceOptions } from "
|
|
4
|
-
import { EnvType, RuntimeConfig } from "
|
|
5
|
-
import "../index-CAfgpWI7.js";
|
|
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";
|
|
6
5
|
export { EnvType, GraphNodeObj, InlineModuleReferenceConfig, Logger, ModuleConfig, ModuleConfigHolder, ModuleReference, ModuleReferenceConfig, NpmModuleReferenceConfig, ReadModuleReferenceOptions, RuntimeConfig };
|
package/dist/common/index.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/controller-decorator/HTTPController.d.ts
|
|
2
|
+
interface HTTPControllerParams {
|
|
3
|
+
protoName?: string;
|
|
4
|
+
controllerName?: string;
|
|
5
|
+
path?: string;
|
|
6
|
+
timeout?: number;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
2
9
|
export { HTTPControllerParams };
|
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import "../InjectConstructorInfo-C2StiUhG.js";
|
|
13
|
-
import "../index-DIk3-d3u.js";
|
|
14
|
-
import "../ContextProto-DNcKWLwE.js";
|
|
15
|
-
import "../Inject-CJoudlde.js";
|
|
16
|
-
import "../Metadata-BCDj-rjy.js";
|
|
17
|
-
import "../MultiInstanceProto-7QFGZfAk.js";
|
|
18
|
-
import "../Prototype-DVMZnlzR.js";
|
|
19
|
-
import "../SingletonProto-CwutNiFl.js";
|
|
20
|
-
import "../index-CQhjd39A.js";
|
|
21
|
-
import "../types-DuksKbpi.js";
|
|
22
|
-
import "../MethodMeta-DhgwCoNi.js";
|
|
23
|
-
import "../ControllerMetadata-_P0ZOday.js";
|
|
24
|
-
import "../index-LUGmBzeE.js";
|
|
25
|
-
import { HTTPMethodParams } from "../HTTPMethod-BXEIRfwp.js";
|
|
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;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
26
12
|
export { HTTPMethodParams };
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/controller-decorator/HTTPParam.d.ts
|
|
2
|
+
interface HTTPQueryParams {
|
|
3
|
+
name?: string;
|
|
4
|
+
}
|
|
5
|
+
interface HTTPQueriesParams {
|
|
6
|
+
name?: string;
|
|
7
|
+
}
|
|
8
|
+
interface HTTPParamParams {
|
|
9
|
+
name?: string;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
2
12
|
export { HTTPParamParams, HTTPQueriesParams, HTTPQueryParams };
|
|
@@ -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,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,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 };
|
|
@@ -1,2 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/controller-decorator/MetadataKey.d.ts
|
|
2
|
+
declare const CONTROLLER_TYPE: symbol;
|
|
3
|
+
declare const CONTROLLER_NAME: symbol;
|
|
4
|
+
declare const CONTROLLER_HOST: symbol;
|
|
5
|
+
declare const CONTROLLER_MIDDLEWARES: symbol;
|
|
6
|
+
declare const CONTROLLER_AOP_MIDDLEWARES: symbol;
|
|
7
|
+
declare const CONTROLLER_ACL: symbol;
|
|
8
|
+
declare const CONTROLLER_META_DATA: symbol;
|
|
9
|
+
declare const CONTROLLER_HTTP_PATH: symbol;
|
|
10
|
+
declare const CONTROLLER_METHOD_METHOD_MAP: symbol;
|
|
11
|
+
declare const CONTROLLER_METHOD_PATH_MAP: symbol;
|
|
12
|
+
declare const CONTROLLER_METHOD_PARAM_TYPE_MAP: symbol;
|
|
13
|
+
declare const CONTROLLER_METHOD_PARAM_NAME_MAP: symbol;
|
|
14
|
+
declare const CONTROLLER_METHOD_PRIORITY: symbol;
|
|
15
|
+
declare const METHOD_CONTROLLER_TYPE_MAP: symbol;
|
|
16
|
+
declare const METHOD_CONTROLLER_HOST: symbol;
|
|
17
|
+
declare const METHOD_CONTEXT_INDEX: symbol;
|
|
18
|
+
declare const METHOD_MIDDLEWARES: symbol;
|
|
19
|
+
declare const METHOD_AOP_MIDDLEWARES: symbol;
|
|
20
|
+
declare const METHOD_AOP_REGISTER_MAP: symbol;
|
|
21
|
+
declare const METHOD_ACL: symbol;
|
|
22
|
+
declare const CONTROLLER_TIMEOUT_METADATA: symbol;
|
|
23
|
+
declare const CONTROLLER_MCP_NAME: symbol;
|
|
24
|
+
declare const CONTROLLER_MCP_VERSION: symbol;
|
|
25
|
+
declare const CONTROLLER_MCP_CONTROLLER_PARAMS_MAP: symbol;
|
|
26
|
+
declare const CONTROLLER_MCP_RESOURCE_MAP: symbol;
|
|
27
|
+
declare const CONTROLLER_MCP_RESOURCE_PARAMS_MAP: symbol;
|
|
28
|
+
declare const CONTROLLER_MCP_TOOL_MAP: symbol;
|
|
29
|
+
declare const CONTROLLER_MCP_TOOL_PARAMS_MAP: symbol;
|
|
30
|
+
declare const CONTROLLER_MCP_TOOL_ARGS_INDEX: symbol;
|
|
31
|
+
declare const CONTROLLER_MCP_EXTRA_INDEX: symbol;
|
|
32
|
+
declare const CONTROLLER_MCP_PROMPT_MAP: symbol;
|
|
33
|
+
declare const CONTROLLER_MCP_PROMPT_PARAMS_MAP: symbol;
|
|
34
|
+
declare const CONTROLLER_MCP_PROMPT_ARGS_INDEX: symbol;
|
|
35
|
+
declare const METHOD_TIMEOUT_METADATA: symbol;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { CONTROLLER_ACL, CONTROLLER_AOP_MIDDLEWARES, CONTROLLER_HOST, CONTROLLER_HTTP_PATH, CONTROLLER_MCP_CONTROLLER_PARAMS_MAP, CONTROLLER_MCP_EXTRA_INDEX, CONTROLLER_MCP_NAME, CONTROLLER_MCP_PROMPT_ARGS_INDEX, CONTROLLER_MCP_PROMPT_MAP, CONTROLLER_MCP_PROMPT_PARAMS_MAP, CONTROLLER_MCP_RESOURCE_MAP, CONTROLLER_MCP_RESOURCE_PARAMS_MAP, CONTROLLER_MCP_TOOL_ARGS_INDEX, CONTROLLER_MCP_TOOL_MAP, CONTROLLER_MCP_TOOL_PARAMS_MAP, CONTROLLER_MCP_VERSION, CONTROLLER_META_DATA, CONTROLLER_METHOD_METHOD_MAP, CONTROLLER_METHOD_PARAM_NAME_MAP, CONTROLLER_METHOD_PARAM_TYPE_MAP, CONTROLLER_METHOD_PATH_MAP, CONTROLLER_METHOD_PRIORITY, CONTROLLER_MIDDLEWARES, CONTROLLER_NAME, CONTROLLER_TIMEOUT_METADATA, CONTROLLER_TYPE, METHOD_ACL, METHOD_AOP_MIDDLEWARES, METHOD_AOP_REGISTER_MAP, METHOD_CONTEXT_INDEX, METHOD_CONTROLLER_HOST, METHOD_CONTROLLER_TYPE_MAP, METHOD_MIDDLEWARES, METHOD_TIMEOUT_METADATA };
|
|
@@ -1,3 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/controller-decorator/MetadataKey.ts
|
|
2
|
+
const CONTROLLER_TYPE = Symbol.for("EggPrototype#controllerType");
|
|
3
|
+
const CONTROLLER_NAME = Symbol.for("EggPrototype#controllerName");
|
|
4
|
+
const CONTROLLER_HOST = Symbol.for("EggPrototype#controllerHost");
|
|
5
|
+
const CONTROLLER_MIDDLEWARES = Symbol.for("EggPrototype#controller#middlewares");
|
|
6
|
+
const CONTROLLER_AOP_MIDDLEWARES = Symbol.for("EggPrototype#controller#aopMiddlewares");
|
|
7
|
+
const CONTROLLER_ACL = Symbol.for("EggPrototype#controller#acl");
|
|
8
|
+
const CONTROLLER_META_DATA = Symbol.for("EggPrototype#controller#metaData");
|
|
9
|
+
const CONTROLLER_HTTP_PATH = Symbol.for("EggPrototype#controller#http#path");
|
|
10
|
+
const CONTROLLER_METHOD_METHOD_MAP = Symbol.for("EggPrototype#controller#method#http#method");
|
|
11
|
+
const CONTROLLER_METHOD_PATH_MAP = Symbol.for("EggPrototype#controller#method#http#path");
|
|
12
|
+
const CONTROLLER_METHOD_PARAM_TYPE_MAP = Symbol.for("EggPrototype#controller#method#http#params#type");
|
|
13
|
+
const CONTROLLER_METHOD_PARAM_NAME_MAP = Symbol.for("EggPrototype#controller#method#http#params#name");
|
|
14
|
+
const CONTROLLER_METHOD_PRIORITY = Symbol.for("EggPrototype#controller#method#http#priority");
|
|
15
|
+
const METHOD_CONTROLLER_TYPE_MAP = Symbol.for("EggPrototype#controller#mthods");
|
|
16
|
+
const METHOD_CONTROLLER_HOST = Symbol.for("EggPrototype#controller#mthods#host");
|
|
17
|
+
const METHOD_CONTEXT_INDEX = Symbol.for("EggPrototype#controller#method#context");
|
|
18
|
+
const METHOD_MIDDLEWARES = Symbol.for("EggPrototype#method#middlewares");
|
|
19
|
+
const METHOD_AOP_MIDDLEWARES = Symbol.for("EggPrototype#method#aopMiddlewares");
|
|
20
|
+
const METHOD_AOP_REGISTER_MAP = Symbol.for("EggPrototype#method#aopMiddlewaresRegister");
|
|
21
|
+
const METHOD_ACL = Symbol.for("EggPrototype#method#acl");
|
|
22
|
+
const CONTROLLER_TIMEOUT_METADATA = Symbol.for("EggPrototype#controller#timeout");
|
|
23
|
+
const CONTROLLER_MCP_NAME = Symbol.for("EggPrototype#controller#mcp#name");
|
|
24
|
+
const CONTROLLER_MCP_VERSION = Symbol.for("EggPrototype#controller#mcp#version");
|
|
25
|
+
const CONTROLLER_MCP_CONTROLLER_PARAMS_MAP = Symbol.for("EggPrototype#controller#mcp#params");
|
|
26
|
+
const CONTROLLER_MCP_RESOURCE_MAP = Symbol.for("EggPrototype#controller#mcp#resource");
|
|
27
|
+
const CONTROLLER_MCP_RESOURCE_PARAMS_MAP = Symbol.for("EggPrototype#controller#mcp#resource#params");
|
|
28
|
+
const CONTROLLER_MCP_TOOL_MAP = Symbol.for("EggPrototype#controller#mcp#tool");
|
|
29
|
+
const CONTROLLER_MCP_TOOL_PARAMS_MAP = Symbol.for("EggPrototype#controller#mcp#tool#params");
|
|
30
|
+
const CONTROLLER_MCP_TOOL_ARGS_INDEX = Symbol.for("EggPrototype#controller#mcp#tool#args");
|
|
31
|
+
const CONTROLLER_MCP_EXTRA_INDEX = Symbol.for("EggPrototype#controller#mcp#extra");
|
|
32
|
+
const CONTROLLER_MCP_PROMPT_MAP = Symbol.for("EggPrototype#controller#mcp#prompt");
|
|
33
|
+
const CONTROLLER_MCP_PROMPT_PARAMS_MAP = Symbol.for("EggPrototype#controller#mcp#prompt#params");
|
|
34
|
+
const CONTROLLER_MCP_PROMPT_ARGS_INDEX = Symbol.for("EggPrototype#controller#mcp#prompt#args");
|
|
35
|
+
const METHOD_TIMEOUT_METADATA = Symbol.for("EggPrototype#method#timeout");
|
|
2
36
|
|
|
3
|
-
|
|
37
|
+
//#endregion
|
|
38
|
+
export { CONTROLLER_ACL, CONTROLLER_AOP_MIDDLEWARES, CONTROLLER_HOST, CONTROLLER_HTTP_PATH, CONTROLLER_MCP_CONTROLLER_PARAMS_MAP, CONTROLLER_MCP_EXTRA_INDEX, CONTROLLER_MCP_NAME, CONTROLLER_MCP_PROMPT_ARGS_INDEX, CONTROLLER_MCP_PROMPT_MAP, CONTROLLER_MCP_PROMPT_PARAMS_MAP, CONTROLLER_MCP_RESOURCE_MAP, CONTROLLER_MCP_RESOURCE_PARAMS_MAP, CONTROLLER_MCP_TOOL_ARGS_INDEX, CONTROLLER_MCP_TOOL_MAP, CONTROLLER_MCP_TOOL_PARAMS_MAP, CONTROLLER_MCP_VERSION, CONTROLLER_META_DATA, CONTROLLER_METHOD_METHOD_MAP, CONTROLLER_METHOD_PARAM_NAME_MAP, CONTROLLER_METHOD_PARAM_TYPE_MAP, CONTROLLER_METHOD_PATH_MAP, CONTROLLER_METHOD_PRIORITY, CONTROLLER_MIDDLEWARES, CONTROLLER_NAME, CONTROLLER_TIMEOUT_METADATA, CONTROLLER_TYPE, METHOD_ACL, METHOD_AOP_MIDDLEWARES, METHOD_AOP_REGISTER_MAP, METHOD_CONTEXT_INDEX, METHOD_CONTROLLER_HOST, METHOD_CONTROLLER_TYPE_MAP, METHOD_MIDDLEWARES, METHOD_TIMEOUT_METADATA };
|