Skip to content

Commit

Permalink
Merge pull request #233 from GorillaStack/fix-vulns
Browse files Browse the repository at this point in the history
Update build process and fix vulnerabilities
  • Loading branch information
mjzone authored Jan 20, 2020
2 parents 5e53d76 + 2fedcbe commit 07e3edc
Show file tree
Hide file tree
Showing 6 changed files with 1,132 additions and 28 deletions.
20 changes: 9 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: node_js
node_js:
- '4'
- '8'
- '10'
- '12'

sudo: false

Expand All @@ -11,8 +13,8 @@ before_install:
- npm init --yes

install:
- npm install --save-dev serverless-offline
- npm install -g serverless@1.0.0-rc.1
- npm install --save-dev serverless-offline
- npm install --save-dev serverless@^1
- npm install aws-sdk
- npm install --save dynamodb-doc-client-wrapper
- serverless create --template aws-nodejs
Expand All @@ -25,23 +27,19 @@ install:
- sed -i '18 a plugins:' serverless.yml
- sed -i '19 a - serverless-offline' serverless.yml
- sed -i '20 a - serverless-dynamodb-local' serverless.yml
- "sed -i '21 a custom: { dynamodb: { stages: [dev] } }' serverless.yml"
- cd ..
- cd ..
- npm install --save-dev mocha
- npm install --save-dev should
- npm install --save expect
- npm install --save request
- npm install --save chai
- travis_retry npm install
- cd test/sample-template

before_script:
- sls dynamodb install
- sls offline start &
- sls offline start --stage dev &
- sleep 15
- cd ..
- cd ..
- cd ..
- npm run test

script:
- npm test
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ serverless-dynamodb-local
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## This Plugin Requires
* serverless@v1-rc.1
* serverless@^1
* Java Runtime Engine (JRE) version 6.x or newer

## Features
Expand Down Expand Up @@ -52,7 +52,7 @@ All CLI options are optional:
--delayTransientStatuses -t Causes DynamoDB to introduce delays for certain operations. DynamoDB can perform some tasks almost instantaneously, such as create/update/delete operations on tables and indexes; however, the actual DynamoDB service requires more time for these tasks. Setting this parameter helps DynamoDB simulate the behavior of the Amazon DynamoDB web service more closely. (Currently, this parameter introduces delays only for global secondary indexes that are in either CREATING or DELETING status.)
--optimizeDbBeforeStartup -o Optimizes the underlying database tables before starting up DynamoDB on your computer. You must also specify -dbPath when you use this parameter.
--migration -m After starting dynamodb local, run dynamodb migrations.
--heapInitial The initial heap size
--heapInitial The initial heap size
--heapMax The maximum heap size
--migrate -m After starting DynamoDB local, create DynamoDB tables from the Serverless configuration.
--seed -s After starting and migrating dynamodb local, injects seed data into your tables. The --seed option determines which data categories to onload.
Expand Down Expand Up @@ -200,7 +200,7 @@ Make sure that `serverless-dynamodb-local` is above `serverless-offline` so it w
Now your local DynamoDB database will be automatically started before running `serverless offline`.

### Using with serverless-offline and serverless-webpack plugin
Run `serverless offline start`. In comparison with `serverless offline`, the `start` command will fire an `init` and a `end` lifecycle hook which is needed for serverless-offline and serverless-dynamodb-local to switch off both ressources.
Run `serverless offline start`. In comparison with `serverless offline`, the `start` command will fire an `init` and a `end` lifecycle hook which is needed for serverless-offline and serverless-dynamodb-local to switch off both ressources.

Add plugins to your `serverless.yml` file:
```yaml
Expand Down
Loading

0 comments on commit 07e3edc

Please sign in to comment.