@midwayjs/faas 3.9.1-beta.1 → 3.9.1-beta.2
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.js +4 -1
- package/dist/interface.d.ts +1 -1
- package/package.json +1 -1
package/dist/framework.js
CHANGED
|
@@ -243,7 +243,10 @@ let MidwayFaaSFramework = class MidwayFaaSFramework extends core_1.BaseFramework
|
|
|
243
243
|
return await fn(ctx, next);
|
|
244
244
|
}))(context);
|
|
245
245
|
if (isHttpFunction) {
|
|
246
|
-
if (
|
|
246
|
+
if (options.isCustomHttpResponse) {
|
|
247
|
+
return context.body;
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
247
250
|
return this.formatHttpResponse(context);
|
|
248
251
|
}
|
|
249
252
|
}
|
package/dist/interface.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface FaaSContext extends IMidwayContext<FaaSHTTPContext> {
|
|
|
14
14
|
export declare type FaaSMiddleware = ((context: Context, next: () => Promise<any>) => any) | string;
|
|
15
15
|
export interface HandlerOptions {
|
|
16
16
|
isHttpFunction?: boolean;
|
|
17
|
-
|
|
17
|
+
isCustomHttpResponse?: boolean;
|
|
18
18
|
}
|
|
19
19
|
export declare type IMidwayFaaSApplication = IMidwayApplication<Context, {
|
|
20
20
|
getInitializeContext(): any;
|