Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alipay/faas-server-sdk

Package Overview
Dependencies
Maintainers
2
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alipay/faas-server-sdk - npm Package Compare versions

Comparing version 0.0.27 to 0.0.28

2

lib/requester/middlewares/call_function_middleware.d.ts
import { CallFunctionResponse } from '../../types';
import type { Next } from 'koa';
import { HttpRequestContext } from './HttpRequestContext';
export declare function callFunctionMiddleware<T>(ctx: HttpRequestContext<CallFunctionResponse<T>, T>, next: Next): Promise<void>;
export declare function callFunctionMiddleware<T>(ctx: HttpRequestContext<CallFunctionResponse | T, T>, next: Next): Promise<void>;

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.callFunctionMiddleware=void 0;async function callFunctionMiddleware(e,r){await r();const s=e.requestId;e.res.status!==200?e.result={succeed:!1,status:e.res.status,requestId:s,errCode:-1,errMsg:`code = ${e.res.data.errCode}, msg = ${e.res.data.errMsg}`}:e.result={succeed:!0,status:e.res.status,requestId:s,data:e.res.data.result}}exports.callFunctionMiddleware=callFunctionMiddleware;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.callFunctionMiddleware=void 0;async function callFunctionMiddleware(e,t){await t();const s=e.requestId;if(e.res.status!==200){const r=e.res.data;e.result={succeed:!1,status:e.res.status,requestId:s,errCode:-1,errMsg:`code = ${r.errCode}, msg = ${r.errMsg}`}}else e.result={succeed:!0,status:e.res.status,requestId:s,data:e.res.data}}exports.callFunctionMiddleware=callFunctionMiddleware;

@@ -34,5 +34,4 @@ import { RequestOptions } from 'urllib';

}
export interface CallFunctionResponse<T = object> {
export interface CallFunctionResponse {
errCode: string;
result: T;
errMsg: string;

@@ -39,0 +38,0 @@ }

{
"name": "@alipay/faas-server-sdk",
"version": "0.0.27",
"version": "0.0.28",
"description": "云函数服务 SDK",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc