@midwayjs/faas 3.7.3 → 3.8.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/framework.d.ts +1 -1
- package/dist/framework.js +4 -4
- package/dist/interface.d.ts +1 -1
- package/package.json +5 -5
package/dist/framework.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare class MidwayFaaSFramework extends BaseFramework<Application, Cont
|
|
|
32
32
|
* @param handlerMapping
|
|
33
33
|
*/
|
|
34
34
|
handleInvokeWrapper(handlerMapping: string): (...args: any[]) => Promise<any>;
|
|
35
|
-
|
|
35
|
+
invokeTriggerFunction(context: any, handlerMapping: string, options: HandlerOptions): Promise<any>;
|
|
36
36
|
wrapHttpRequest(req: http.IncomingMessage | Record<string, any>, res?: http.ServerResponse): Promise<unknown>;
|
|
37
37
|
/**
|
|
38
38
|
* @deprecated
|
package/dist/framework.js
CHANGED
|
@@ -108,7 +108,7 @@ let MidwayFaaSFramework = class MidwayFaaSFramework extends core_1.BaseFramework
|
|
|
108
108
|
if (funcInfo) {
|
|
109
109
|
return async (...args) => {
|
|
110
110
|
const context = this.app.createAnonymousContext();
|
|
111
|
-
return this.
|
|
111
|
+
return this.invokeTriggerFunction(context, funcInfo.funcHandlerName, {
|
|
112
112
|
isHttpFunction: false,
|
|
113
113
|
originContext: customContext,
|
|
114
114
|
originEvent: args[0],
|
|
@@ -119,8 +119,8 @@ let MidwayFaaSFramework = class MidwayFaaSFramework extends core_1.BaseFramework
|
|
|
119
119
|
});
|
|
120
120
|
return instance;
|
|
121
121
|
},
|
|
122
|
-
|
|
123
|
-
return this.
|
|
122
|
+
invokeTriggerFunction: (context, handlerMapping, options) => {
|
|
123
|
+
return this.invokeTriggerFunction(context, handlerMapping, options);
|
|
124
124
|
},
|
|
125
125
|
});
|
|
126
126
|
// hack use method
|
|
@@ -214,7 +214,7 @@ let MidwayFaaSFramework = class MidwayFaaSFramework extends core_1.BaseFramework
|
|
|
214
214
|
return await composeMiddleware(context);
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
|
-
async
|
|
217
|
+
async invokeTriggerFunction(context, handlerMapping, options) {
|
|
218
218
|
var _a, _b;
|
|
219
219
|
let funOptions = this.funMappingStore.get(handlerMapping);
|
|
220
220
|
const isHttpFunction = options.isHttpFunction;
|
package/dist/interface.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare type IMidwayFaaSApplication = IMidwayApplication<Context, {
|
|
|
35
35
|
getFunctionServiceName(): string;
|
|
36
36
|
useEventMiddleware(middleware: CommonMiddlewareUnion<Context, NextFunction, undefined>): void;
|
|
37
37
|
getEventMiddleware(): ContextMiddlewareManager<Context, NextFunction, undefined>;
|
|
38
|
-
|
|
38
|
+
invokeTriggerFunction(context: any, handler: string, options: HandlerOptions): Promise<any>;
|
|
39
39
|
getServerlessInstance<T>(serviceClass: ObjectIdentifier | {
|
|
40
40
|
new (...args: any[]): T;
|
|
41
41
|
}, customContext?: any): Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/faas",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"main": "dist/index",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@midwayjs/core": "^3.
|
|
7
|
+
"@midwayjs/core": "^3.8.0",
|
|
8
8
|
"@midwayjs/faas-typings": "^3.6.0",
|
|
9
9
|
"@midwayjs/logger": "^2.15.0",
|
|
10
10
|
"@midwayjs/serverless-http-parser": "^3.6.0",
|
|
11
11
|
"@midwayjs/simple-lock": "^1.1.4"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@midwayjs/mock": "^3.
|
|
15
|
-
"@midwayjs/serverless-fc-starter": "^3.
|
|
14
|
+
"@midwayjs/mock": "^3.8.0",
|
|
15
|
+
"@midwayjs/serverless-fc-starter": "^3.8.0",
|
|
16
16
|
"@midwayjs/serverless-scf-starter": "^3.7.0",
|
|
17
17
|
"mm": "3.2.0"
|
|
18
18
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"url": "git@github.com:midwayjs/midway.git"
|
|
46
46
|
},
|
|
47
47
|
"license": "MIT",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "5c640c7182923587139f9f9c0aecf50585798e1e"
|
|
49
49
|
}
|