Skip to content

Commit

Permalink
Merge 5b5425d into fff32dc
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuens committed May 15, 2019
2 parents fff32dc + 5b5425d commit c08983f
Show file tree
Hide file tree
Showing 60 changed files with 120 additions and 120 deletions.
4 changes: 2 additions & 2 deletions docs/providers/aws/cli-reference/print.md
Expand Up @@ -42,7 +42,7 @@ custom:

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
stage: ${opt:stage, "dev"}

functions:
Expand All @@ -66,7 +66,7 @@ custom:
bucketName: test
provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
stage: dev # <-- Resolved
functions:
hello:
Expand Down
4 changes: 2 additions & 2 deletions docs/providers/aws/events/apigateway.md
Expand Up @@ -1220,7 +1220,7 @@ service: my-api

provider:
name: aws
runtime: nodejs8.10
runtime: nodejs10.x
stage: dev
region: eu-west-2

Expand Down Expand Up @@ -1390,7 +1390,7 @@ Resource policies are policy documents that are used to control the invocation o
```yml
provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x

resourcePolicy:
- Effect: Allow
Expand Down
8 changes: 4 additions & 4 deletions docs/providers/aws/events/websocket.md
Expand Up @@ -60,7 +60,7 @@ service: serverless-ws-test

provider:
name: aws
runtime: nodejs8.10
runtime: nodejs10.x
websocketsApiName: custom-websockets-api-name
websocketsApiRouteSelectionExpression: $request.body.action # custom routes are selected by the value of the action property in the body

Expand Down Expand Up @@ -127,7 +127,7 @@ functions:
identitySource:
- 'route.request.header.Auth'
- 'route.request.querystring.Auth'

auth:
handler: handler.auth
```
Expand All @@ -147,7 +147,7 @@ functions:
identitySource:
- 'route.request.header.Auth'
- 'route.request.querystring.Auth'

auth:
handler: handler.auth
```
Expand Down Expand Up @@ -177,7 +177,7 @@ const sendMessageToClient = (url, connectionId, payload) => new Promise((resolve
module.exports.defaultHandler = async (event, context) => {
const domain = event.requestContext.domainName;
const stage = event.requestContext.stage;
const connectionId = event.requestContext.connectionId;
const connectionId = event.requestContext.connectionId;
const callbackUrlForAWS = util.format(util.format('https://%s/%s', domain, stage)); //construct the needed url
await sendMessageToClient(callbackUrlForAWS, connectionId, event);

Expand Down
Expand Up @@ -3,7 +3,7 @@ service: hello-world # Service Name

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x

functions:
helloWorld:
Expand Down
4 changes: 2 additions & 2 deletions docs/providers/aws/guide/credentials.md
Expand Up @@ -131,7 +131,7 @@ You can even set up different profiles for different accounts, which can be used
service: new-service
provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
stage: dev
profile: devProfile
```
Expand Down Expand Up @@ -176,7 +176,7 @@ This example `serverless.yml` snippet will load the profile depending upon the s
service: new-service
provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
stage: ${opt:stage, self:custom.defaultStage}
profile: ${self:custom.profiles.${self:provider.stage}}
custom:
Expand Down
14 changes: 7 additions & 7 deletions docs/providers/aws/guide/functions.md
Expand Up @@ -24,7 +24,7 @@ service: myService

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
memorySize: 512 # optional, in MB, default is 1024
timeout: 10 # optional, in seconds, default is 6
versionFunctions: false # optional, default is true
Expand Down Expand Up @@ -59,7 +59,7 @@ service: myService

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x

functions:
functionOne:
Expand All @@ -79,7 +79,7 @@ service: myService

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
memorySize: 512 # will be inherited by all functions

functions:
Expand All @@ -95,7 +95,7 @@ service: myService

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x

functions:
functionOne:
Expand Down Expand Up @@ -133,7 +133,7 @@ service: myService

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
iamRoleStatements: # permissions for all of your functions can be set here
- Effect: Allow
Action: # Gives permission to DynamoDB tables in a specific region
Expand Down Expand Up @@ -390,7 +390,7 @@ service: service

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x

functions:
hello:
Expand Down Expand Up @@ -443,7 +443,7 @@ service: myService

provider:
name: aws
runtime: nodejs8.10
runtime: nodejs10.x
tracing:
lambda: true
```
Expand Down
4 changes: 2 additions & 2 deletions docs/providers/aws/guide/serverless.yml.md
Expand Up @@ -25,7 +25,7 @@ frameworkVersion: ">=1.0.0 <2.0.0"

provider:
name: aws
runtime: nodejs8.10
runtime: nodejs10.x
stage: ${opt:stage, 'dev'} # Set the default stage used. Default is dev
region: ${opt:region, 'us-east-1'} # Overwrite the default region used. Default is us-east-1
stackName: custom-stack-name # Use a custom name for the CloudFormation stack
Expand Down Expand Up @@ -148,7 +148,7 @@ functions:
description: My function # The description of your function.
memorySize: 512 # memorySize for this specific function.
reservedConcurrency: 5 # optional, reserved concurrency limit for this function. By default, AWS uses account concurrency limit
runtime: nodejs6.10 # Runtime for this specific function. Overrides the default which is set on the provider level
runtime: nodejs10.x # Runtime for this specific function. Overrides the default which is set on the provider level
timeout: 10 # Timeout for this specific function. Overrides the default set above.
role: arn:aws:iam::XXXXXX:role/role # IAM role which will be used for this function
onError: arn:aws:sns:us-east-1:XXXXXX:sns-topic # Optional SNS topic / SQS arn (Ref, Fn::GetAtt and Fn::ImportValue are supported as well) which will be used for the DeadLetterConfig
Expand Down
6 changes: 3 additions & 3 deletions docs/providers/aws/guide/services.md
Expand Up @@ -99,7 +99,7 @@ service: users

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
stage: dev # Set the default stage used. Default is dev
region: us-east-1 # Overwrite the default region used. Default is us-east-1
stackName: my-custom-stack-name-${self:provider.stage} # Overwrite default CloudFormation stack name. Default is ${self:service}-${self:provider.stage}
Expand Down Expand Up @@ -229,7 +229,7 @@ service: users

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
memorySize: 512

Expand All @@ -246,7 +246,7 @@ service: users

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
memorySize: 512

Expand Down
4 changes: 2 additions & 2 deletions docs/providers/aws/guide/variables.md
Expand Up @@ -183,7 +183,7 @@ You can add such custom output to CloudFormation stack. For example:
service: another-service
provider:
name: aws
runtime: nodejs8.10
runtime: nodejs10.x
region: ap-northeast-1
memorySize: 512
functions:
Expand Down Expand Up @@ -562,7 +562,7 @@ service: new-service

provider:
name: aws
runtime: nodejs6.10
runtime: nodejs10.x
variableSyntax: "\\${{([ ~:a-zA-Z0-9._@\\'\",\\-\\/\\(\\)]+?)}}" # notice the double quotes for yaml to ignore the escape characters!
# variableSyntax: "\\${((?!AWS)[ ~:a-zA-Z0-9._@'\",\\-\\/\\(\\)]+?)}" # Use this for allowing CloudFormation Pseudo-Parameters in your serverless.yml -- e.g. ${AWS::Region}. All other Serverless variables work as usual.

Expand Down
4 changes: 2 additions & 2 deletions lib/classes/Service.test.js
Expand Up @@ -97,14 +97,14 @@ describe('Service', () => {
const data = {
provider: {
name: 'testProvider',
runtime: 'nodejs6.10',
runtime: 'nodejs10.x',
},
};

const serviceInstance = new Service(serverless, data);

expect(serviceInstance.provider.name).to.be.equal('testProvider');
expect(serviceInstance.provider.runtime).to.be.equal('nodejs6.10');
expect(serviceInstance.provider.runtime).to.be.equal('nodejs10.x');
});
});

Expand Down
2 changes: 1 addition & 1 deletion lib/classes/Utils.test.js
Expand Up @@ -728,7 +728,7 @@ describe('Utils', () => {
service: 'new-service',
provider: {
name: 'aws',
runtime: 'nodejs6.10',
runtime: 'nodejs10.x',
stage: 'dev',
region: 'us-east-1',
variableSyntax: '\\${foo}',
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/aws/invokeLocal/index.js
Expand Up @@ -38,7 +38,7 @@ class AwsInvokeLocal {
getRuntime() {
return this.options.functionObj.runtime
|| this.serverless.service.provider.runtime
|| 'nodejs4.3';
|| 'nodejs10.x';
}

validateFile(filePath, key) {
Expand Down
12 changes: 6 additions & 6 deletions lib/plugins/aws/invokeLocal/index.test.js
Expand Up @@ -382,7 +382,7 @@ describe('AwsInvokeLocal', () => {
);

it('should call invokeLocalNodeJs for any node.js runtime version', () => {
awsInvokeLocal.options.functionObj.runtime = 'nodejs6.10';
awsInvokeLocal.options.functionObj.runtime = 'nodejs10.x';
return awsInvokeLocal.invokeLocal().then(() => {
expect(invokeLocalNodeJsStub.calledOnce).to.be.equal(true);
expect(invokeLocalNodeJsStub.calledWithExactly(
Expand Down Expand Up @@ -482,8 +482,8 @@ describe('AwsInvokeLocal', () => {
});
});

it('should call invokeLocalDocker if using --docker option with nodejs8.10', () => {
awsInvokeLocal.options.functionObj.runtime = 'nodejs8.10';
it('should call invokeLocalDocker if using --docker option with nodejs10.x', () => {
awsInvokeLocal.options.functionObj.runtime = 'nodejs10.x';
awsInvokeLocal.options.functionObj.handler = 'handler.foobar';
awsInvokeLocal.options.docker = true;
return awsInvokeLocal.invokeLocal().then(() => {
Expand Down Expand Up @@ -1163,7 +1163,7 @@ describe('AwsInvokeLocal', () => {
handler: 'handler.hello',
name: 'hello',
timeout: 4,
runtime: 'nodejs8.10',
runtime: 'nodejs10.x',
environment: {
functionVar: 'functionValue',
},
Expand All @@ -1190,9 +1190,9 @@ describe('AwsInvokeLocal', () => {
expect(pluginMangerSpawnPackageStub.calledOnce).to.equal(true);
expect(spawnStub.getCall(0).args).to.deep.equal(['docker', ['version']]);
expect(spawnStub.getCall(1).args).to.deep.equal(['docker',
['images', '-q', 'lambci/lambda:nodejs8.10']]);
['images', '-q', 'lambci/lambda:nodejs10.x']]);
expect(spawnStub.getCall(2).args).to.deep.equal(['docker',
['pull', 'lambci/lambda:nodejs8.10']]);
['pull', 'lambci/lambda:nodejs10.x']]);
expect(spawnStub.getCall(3).args).to.deep.equal(['docker', [
'build',
'-t',
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/aws/package/compile/functions/index.js
Expand Up @@ -115,7 +115,7 @@ class AwsCompileFunctions {
|| 6;
const Runtime = functionObject.runtime
|| this.serverless.service.provider.runtime
|| 'nodejs4.3';
|| 'nodejs10.x';

newFunction.Properties.Handler = Handler;
newFunction.Properties.FunctionName = FunctionName;
Expand Down

0 comments on commit c08983f

Please sign in to comment.