From 43010ec43dcdd9b92b742bd034ca1ad05944d0e5 Mon Sep 17 00:00:00 2001 From: tanhe123 Date: Fri, 13 Jul 2018 10:37:56 +0800 Subject: [PATCH 1/3] fix document demo code indentation --- docs/specs/2018-04-03-zh-cn.md | 12 ++++++------ docs/specs/2018-04-03.md | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/specs/2018-04-03-zh-cn.md b/docs/specs/2018-04-03-zh-cn.md index b62e39f28..5cb9fa4be 100644 --- a/docs/specs/2018-04-03-zh-cn.md +++ b/docs/specs/2018-04-03-zh-cn.md @@ -49,12 +49,12 @@ Resources: Handler: index.handler Runtime: nodejs6 CodeUri: './' - Events: - http-test: # trigger name - Type: HTTP # http trigger - Properties: - AuthType: ANONYMOUS - Methods: ['GET', 'POST', 'PUT'] + Events: + http-test: # trigger name + Type: HTTP # http trigger + Properties: + AuthType: ANONYMOUS + Methods: ['GET', 'POST', 'PUT'] ``` 阿里云 Fun 中的所有属性名称都**区分大小写**。 diff --git a/docs/specs/2018-04-03.md b/docs/specs/2018-04-03.md index fc4bcfc08..a690f16e7 100644 --- a/docs/specs/2018-04-03.md +++ b/docs/specs/2018-04-03.md @@ -49,12 +49,12 @@ Resources: Handler: index.handler Runtime: nodejs6 CodeUri: './' - Events: - http-test: # trigger name + Events: + http-test: # trigger name Type: HTTP # http trigger Properties: - AuthType: ANONYMOUS - Methods: ['GET', 'POST', 'PUT'] + AuthType: ANONYMOUS + Methods: ['GET', 'POST', 'PUT'] ``` All property names in Aliyun Fun are **case sensitive**. From 5aaa853d276edd8fe82783fa5089bd802bc6a34e Mon Sep 17 00:00:00 2001 From: tanhe123 Date: Fri, 13 Jul 2018 10:38:20 +0800 Subject: [PATCH 2/3] sync region choices of fun config --- lib/commands/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/commands/config.js b/lib/commands/config.js index 35061e72b..1b066e0fa 100644 --- a/lib/commands/config.js +++ b/lib/commands/config.js @@ -40,8 +40,8 @@ async function config() { type: 'list', name: 'defaultRegion', message: 'Default region name', - choices: ['cn-beijing', 'cn-shanghai', 'cn-shenzhen', 'cn-hangzhou', 'cn-zhangjiakou', 'cn-hongkong', - 'ap-southeast-1', 'ap-southeast-2'], + choices: ['cn-beijing', 'cn-hangzhou', 'cn-shanghai', 'cn-shenzhen' , 'cn-hongkong', + 'ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'eu-central-1'], default: profile.defaultRegion } ]; From 5ff73cb47d302ec3980130ac10ac10c8ca8d27ce Mon Sep 17 00:00:00 2001 From: tanhe123 Date: Fri, 13 Jul 2018 10:38:41 +0800 Subject: [PATCH 3/3] add code packing log --- lib/deploy/deploy-support.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/deploy/deploy-support.js b/lib/deploy/deploy-support.js index 5fd095bbb..42598e770 100644 --- a/lib/deploy/deploy-support.js +++ b/lib/deploy/deploy-support.js @@ -274,7 +274,7 @@ async function getFunCodeAsBase64(codeUri) { } else { codeUri = './'; } - + return await zip.file(codeUri); } @@ -316,9 +316,9 @@ async function makeFunction({ if (codeUri && codeUri.startsWith('oss://')) { code = extractOssCodeUri(codeUri); } else { - debug(`package function ${functionName}.`); + console.log(`\t\tWaiting for packaging function ${functionName} code...`); const base64 = await getFunCodeAsBase64(codeUri); - debug(`package function ${functionName}. done.`); + console.log(green(`\t\tpackage function ${functionName} code done`)); code = { zipFile: base64