mpserverless-sdk-core
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -13,2 +13,3 @@ import Client from './client'; | ||
authToken?: string; | ||
appAuthToken?: string; | ||
} | ||
@@ -31,2 +32,4 @@ export interface FunctionResponse<R> { | ||
params: T & BaseParams; | ||
appId?: string; | ||
isvAppId?: string; | ||
} | ||
@@ -33,0 +36,0 @@ export interface ServerlessFunction { |
@@ -83,6 +83,12 @@ "use strict"; | ||
var _a = this.config, _b = _a.notify, notify = _b === void 0 ? null : _b, _c = _a.env, env = _c === void 0 ? null : _c; | ||
var authToken = params.authToken; | ||
var authToken = params.authToken, appAuthToken = params.appAuthToken, appId = params.appId, isvAppId = params.isvAppId; | ||
delete params.appAuthToken; | ||
delete params.appId; | ||
delete params.isvAppId; | ||
delete params.authToken; | ||
var args = { | ||
method: method, | ||
params: __assign({ $config: {} }, params) | ||
params: __assign({ $config: {} }, params), | ||
appId: undefined, | ||
isvAppId: undefined | ||
}; | ||
@@ -95,2 +101,11 @@ if (notify && notify.url) { | ||
} | ||
if (appAuthToken) { | ||
args.params.$config.appAuthToken = appAuthToken; | ||
} | ||
if (appId) { | ||
args.appId = appId; | ||
} | ||
if (isvAppId) { | ||
args.isvAppId = isvAppId; | ||
} | ||
if (env) { | ||
@@ -97,0 +112,0 @@ args.params.$config.env = env; |
{ | ||
"name": "mpserverless-sdk-core", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Alipay mini program Serverless SDK Core", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -17,2 +17,3 @@ import Client from './client'; | ||
authToken?: string; | ||
appAuthToken?: string; | ||
} | ||
@@ -38,2 +39,4 @@ | ||
params: T & BaseParams; | ||
appId?: string; | ||
isvAppId?: string; | ||
} | ||
@@ -67,3 +70,7 @@ | ||
} = this.config; | ||
const { authToken } = params; | ||
const { authToken, appAuthToken, appId, isvAppId } = params; | ||
delete params.appAuthToken; | ||
delete params.appId; | ||
delete params.isvAppId; | ||
delete params.authToken; | ||
const args = { | ||
@@ -74,3 +81,5 @@ method, | ||
...params, | ||
} | ||
}, | ||
appId: undefined, | ||
isvAppId: undefined | ||
}; | ||
@@ -85,2 +94,11 @@ if (notify && notify.url) { | ||
} | ||
if(appAuthToken) { | ||
args.params.$config.appAuthToken = appAuthToken; | ||
} | ||
if(appId) { | ||
args.appId = appId; | ||
} | ||
if(isvAppId) { | ||
args.isvAppId = isvAppId; | ||
} | ||
if (env) { | ||
@@ -87,0 +105,0 @@ args.params.$config.env = env; |
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
20405
430
0