New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@serverless/serverless-components-a

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/serverless-components-a - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

@@ -46,7 +46,6 @@ 'use strict';

return _context.abrupt('return', persistentRequest(function () {
var region = 'us-east-1';
if (options.region || options.r) {
region = options.region || options.r;
}
var awsService = new _awsSdk2.default[service]({ region });
var config = void 0;
config = setRegion(config);
config = setCredentials(config);
var awsService = new _awsSdk2.default[service](config);
var req = awsService[method](params);

@@ -80,3 +79,36 @@ return new _bluebird2.default(function (resolve, reject) {

// "private" functions
function setRegion(config) {
var region = 'us-east-1';
if (options.region || options.r) {
region = options.region || options.r;
}
return Object.assign({}, config, {
region
});
}
function setCredentials(config) {
var _process$env = process.env,
AWS_ACCESS_KEY_ID = _process$env.AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY = _process$env.AWS_SECRET_ACCESS_KEY,
AWS_SESSION_TOKEN = _process$env.AWS_SESSION_TOKEN;
if (!AWS_ACCESS_KEY_ID || !AWS_SECRET_ACCESS_KEY) {
return config;
}
var credentials = {
accessKeyId: AWS_ACCESS_KEY_ID,
secretAccessKey: AWS_SECRET_ACCESS_KEY
};
if (AWS_SESSION_TOKEN) {
credentials = Object.assign({}, credentials, {
sessionToken: AWS_SESSION_TOKEN
});
}
return Object.assign({}, config, credentials);
}
return {

@@ -83,0 +115,0 @@ send

{
"name": "@serverless/serverless-components-a",
"version": "0.1.1",
"version": "0.1.2",
"description": "PoC for the next version of the Serverless Framework",

@@ -21,5 +21,2 @@ "main": "dist/index.js",

"homepage": "https://github.com/serverless/serverless-components-a#readme",
"publishConfig": {
"access": "private"
},
"scripts": {

@@ -26,0 +23,0 @@ "build": "./scripts/build",

@@ -26,7 +26,12 @@ # Serverless Components A

**Note:** Please make sure that you've installed Node.js and have properly setup our AWS credentials.
Please make sure that you've installed Node.js with a recent npm version.
**Note:** If not explicitly provided, the prototype will use the `default` AWS profile on your machine.
1. Setup
1. `npm install --global @serverless/serverless-components-a`
1. Clone this repository
1. (Optionally) set your AWS credentials via env variables
* `export AWS_ACCESS_KEY_ID=my_access_key_id`
* `export AWS_SECRET_ACCESS_KEY=my_secret_access_key`
1. Configuring

@@ -158,2 +163,7 @@ 1. `cd src/examples/github-webhook`

#### Commands
* `proto deploy`
* `proto remove`
#### Example

@@ -183,2 +193,7 @@

#### Commands
* `proto deploy`
* `proto remove`
#### Example

@@ -213,2 +228,7 @@

#### Commands
* `proto deploy`
* `proto remove`
#### Example

@@ -241,2 +261,7 @@

#### Commands
* `proto deploy`
* `proto remove`
#### Example

@@ -261,3 +286,3 @@

Creates / Removes a GitHub Webhook. Uses AWS as the cloud provider.
Creates / Removes / Tests a GitHub Webhook. Uses AWS as the cloud provider.

@@ -284,2 +309,8 @@ AWS resource names created by this component:

#### Commands
* `proto deploy`
* `proto remove`
* `proto test`
#### Example

@@ -306,2 +337,6 @@

#### Commands
* None
#### Example

@@ -325,2 +360,6 @@

#### Commands
* None
#### Example

@@ -327,0 +366,0 @@

Sorry, the diff of this file is not supported yet