@serverless/platform-client
Advanced tools
Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "@serverless/platform-client", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"main": "./src/index.js", | ||
@@ -5,0 +5,0 @@ "jsdelivr": "dist-web/serverless-platform-client.min.js", |
@@ -642,9 +642,24 @@ 'use strict'; | ||
* @param {*} instanceName The name of the Serverless Platform Instance. | ||
* @param {*} instanceStatus The status of the instance | ||
* @return {object} Returns a new Instance definition as a Javascript Object. | ||
*/ | ||
createInstance(orgName = null, stageName = null, appName = null, instanceName = null) { | ||
return instance.create(orgName, stageName, appName, instanceName); | ||
createInstance( | ||
orgName = null, | ||
stageName = null, | ||
appName = null, | ||
instanceName = null, | ||
instanceStatus = 'inactive' | ||
) { | ||
return instance.create(orgName, stageName, appName, instanceName, instanceStatus); | ||
} | ||
/** | ||
* Saves an instance record, defined by createInstance | ||
* @param {*} instanceRecord | ||
*/ | ||
async saveInstance(instanceRecord) { | ||
return instance.save(this, instanceRecord); | ||
} | ||
/** | ||
* Get an Instance from the Serverless Platform by it's name and the names of its Organization, Stage, Application. | ||
@@ -651,0 +666,0 @@ * @param {*} orgName The name of the Serverless Platform Organization. |
@@ -51,5 +51,6 @@ 'use strict'; | ||
const err = new Error(error.response.data.message); | ||
err.statusCode = error.response.data.statusCode || null; | ||
err.statusCode = error.response.data.statusCode || error.response.status || null; | ||
err.name = error.response.data.name || null; | ||
err.details = error.response.data.details || null; | ||
err.url = error.response.config.url || null; | ||
throw err; | ||
@@ -56,0 +57,0 @@ } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
405851
3284