@serverless/platform-sdk
Advanced tools
Comparing version 2.3.0 to 2.3.1-2-g39167c0
@@ -119,3 +119,3 @@ 'use strict'; | ||
if (!(!user.accessKeys || !user.accessKeys[tenant])) { | ||
_context2.next = 16; | ||
_context2.next = 17; | ||
break; | ||
@@ -125,10 +125,13 @@ } | ||
if (!user.idToken) { | ||
_context2.next = 15; | ||
_context2.next = 16; | ||
break; | ||
} | ||
_context2.next = 11; | ||
if (!user.accessKeys) { | ||
user.accessKeys = {}; | ||
} | ||
_context2.next = 12; | ||
return createAccessKeyForTenant(tenant); | ||
case 11: | ||
case 12: | ||
user.accessKeys[tenant] = _context2.sent; | ||
@@ -143,12 +146,12 @@ | ||
}); | ||
_context2.next = 16; | ||
_context2.next = 17; | ||
break; | ||
case 15: | ||
case 16: | ||
throw new Error(`Could not find an access key for tenant ${tenant}. Log out and log in again to create a new acce ss key for this tenant.`); | ||
case 16: | ||
case 17: | ||
return _context2.abrupt('return', user.accessKeys[tenant]); | ||
case 17: | ||
case 18: | ||
case 'end': | ||
@@ -155,0 +158,0 @@ return _context2.stop(); |
{ | ||
"name": "@serverless/platform-sdk", | ||
"version": "2.3.0", | ||
"version": "2.3.1-2-g39167c0", | ||
"description": "Serverless Platform SDK", | ||
@@ -5,0 +5,0 @@ "author": "Serverless, Inc.", |
@@ -1,3 +0,5 @@ | ||
# Platform SDK | ||
# Platform SDK (deprecated) | ||
_*Note*: This package is deprecated in favor of [@serverless/platform-client](https://www.npmjs.com/package/@serverless/platform-client). It accepts only bug fixes_ | ||
Functional SDK for the Serverless Platfrom. | ||
@@ -34,3 +36,5 @@ | ||
## Functions | ||
### `login` | ||
Opens a browser for the user to login, along with a running server awaiting auth data once the user logs in. | ||
@@ -63,2 +67,3 @@ | ||
### `refreshToken` | ||
Refreshes Auth0 idToken | ||
@@ -72,3 +77,2 @@ | ||
Promise resolving to the following object: | ||
@@ -91,2 +95,3 @@ | ||
### `createAccessKey` | ||
Creates a platform access key for the authenticated user. | ||
@@ -125,2 +130,3 @@ | ||
### `archiveService` | ||
Archives a service in the platform. | ||
@@ -163,2 +169,3 @@ | ||
### `getServiceUrl` | ||
Constructs a service url based on passed-in data. | ||
@@ -174,3 +181,2 @@ | ||
**Returns** | ||
@@ -197,2 +203,3 @@ | ||
### `listTenants` | ||
Lists the tenants for a given username | ||
@@ -207,3 +214,2 @@ | ||
**Returns** | ||
@@ -229,2 +235,3 @@ | ||
### `createDeploymnet` | ||
Creates a platform deployment | ||
@@ -269,2 +276,3 @@ | ||
### `updateDeployment` | ||
Updates a platform deployment | ||
@@ -284,3 +292,2 @@ | ||
**Returns** | ||
@@ -313,2 +320,3 @@ | ||
### `getApp` | ||
Gets a platform app | ||
@@ -324,3 +332,2 @@ | ||
**Returns** | ||
@@ -347,2 +354,3 @@ | ||
### `createApp` | ||
Creates a platform app | ||
@@ -358,3 +366,2 @@ | ||
**Returns** | ||
@@ -361,0 +368,0 @@ |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
190491
2122
368
2