From 3156361cf45afd5d1e88b38b08dee8be6a0236b7 Mon Sep 17 00:00:00 2001 From: kodemill Date: Wed, 29 Aug 2018 10:40:24 +0200 Subject: [PATCH 1/2] feat: add nodeJs 8.10 runtime --- src/annotations/classes/aws/aws.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/annotations/classes/aws/aws.ts b/src/annotations/classes/aws/aws.ts index 599239b..3c0542a 100644 --- a/src/annotations/classes/aws/aws.ts +++ b/src/annotations/classes/aws/aws.ts @@ -1,8 +1,13 @@ import { CLASS_AWSMEMORYSIZEKEY, CLASS_AWSTIMEOUTKEY, CLASS_AWSRUNTIMEKEY } from '../../constants' import { defineMetadata } from '../../metadata' +export enum AwsType { + NodeJs6 = 'nodejs6.10', + NodeJs8 = 'nodejs8.10' +} + export const aws = (config: { - type?: 'nodejs6.10', + type?: string | AwsType, memorySize?: number, timeout?: number }) => (target: Function) => { @@ -15,4 +20,4 @@ export const aws = (config: { if (typeof config.timeout === 'number') { defineMetadata(CLASS_AWSTIMEOUTKEY, config.timeout, target); } -} \ No newline at end of file +} From 0c2972faaecb6f4489f97c33b4ce956e1a5d14bd Mon Sep 17 00:00:00 2001 From: kodemill Date: Wed, 29 Aug 2018 10:45:39 +0200 Subject: [PATCH 2/2] fix: better name --- src/annotations/classes/aws/aws.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/annotations/classes/aws/aws.ts b/src/annotations/classes/aws/aws.ts index 3c0542a..01aa5de 100644 --- a/src/annotations/classes/aws/aws.ts +++ b/src/annotations/classes/aws/aws.ts @@ -1,13 +1,13 @@ import { CLASS_AWSMEMORYSIZEKEY, CLASS_AWSTIMEOUTKEY, CLASS_AWSRUNTIMEKEY } from '../../constants' import { defineMetadata } from '../../metadata' -export enum AwsType { +export enum AwsRuntimeType { NodeJs6 = 'nodejs6.10', NodeJs8 = 'nodejs8.10' } export const aws = (config: { - type?: string | AwsType, + type?: string | AwsRuntimeType, memorySize?: number, timeout?: number }) => (target: Function) => {