Skip to content

Commit

Permalink
Update package definition
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericbarthelet committed Sep 21, 2020
1 parent 8939273 commit 9e25629
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/configSchema.js
Expand Up @@ -126,7 +126,7 @@ const schema = {
required: ['provider', 'service'],
definitions: {
// TODO: awsKmsArn & awsKmsArnString definitions to be moved to lib/plugins/aws/provider/awsProvider.js once service.awsKmsKeyArn moved to provider.awsKmsKeyArn, see https://github.com/serverless/serverless/issues/8261
// TODO: awsKmsArn to include #/definitions/awsKmsArnString instead of type: object as one of the possible definition, see https://github.com/serverless/serverless/issues/8261
// TODO: awsKmsArn to include #/definitions/awsCfFunction instead of type: object as one of the possible definition, see https://github.com/serverless/serverless/issues/8261
awsKmsArn: {
anyOf: [{ type: 'object' }, { $ref: '#/definitions/awsKmsArnString' }],
},
Expand Down
23 changes: 10 additions & 13 deletions lib/plugins/aws/provider/awsProvider.js
Expand Up @@ -240,17 +240,6 @@ class AwsProvider {
items: { $ref: '#/definitions/awsArn' },
},
awsLambdaMemorySize: { type: 'integer', multipleOf: 64, minimum: 128, maximum: 3008 },
awsLambdaPackage: {
type: 'object',
properties: {
include: { type: 'array', items: { type: 'string' } },
exclude: { type: 'array', items: { type: 'string' } },
excludeDevDependencies: { type: 'boolean' },
artifact: { type: 'string' },
individually: { type: 'boolean' },
},
additionalProperties: false,
},
awsLambdaRole: {
anyOf: [
{ type: 'string', minLength: 1 },
Expand Down Expand Up @@ -423,7 +412,6 @@ class AwsProvider {
},
},
memorySize: { $ref: '#/definitions/awsLambdaMemorySize' },
package: { $ref: '#/definitions/awsLambdaPackage' },
resourcePolicy: {
type: 'array',
items: {
Expand Down Expand Up @@ -485,7 +473,16 @@ class AwsProvider {
{ $ref: '#/definitions/awsCfFunction' },
],
},
package: { $ref: '#/definitions/awsLambdaPackage' },
package: {
type: 'object',
properties: {
include: { type: 'array', items: { type: 'string' } },
exclude: { type: 'array', items: { type: 'string' } },
artifact: { type: 'string' },
individually: { type: 'boolean' },
},
additionalProperties: false,
},
provisionedConcurrency: { type: 'integer', minimum: 1 },
reservedConcurrency: { type: 'integer', minimum: 0 },
role: { $ref: '#/definitions/awsLambdaRole' },
Expand Down

0 comments on commit 9e25629

Please sign in to comment.