Skip to content

Commit 8fe4e98

Browse files
authored
Merge pull request #277 from alibaba/update-schema
update service and function schema
2 parents 08778b2 + 5f3ff5d commit 8fe4e98

File tree

13 files changed

+259
-170
lines changed

13 files changed

+259
-170
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
所有对 "Aliyun Serverless" 插件的更改都将记录在这个文件中。
44

5+
## 1.27.17 - 2021-04-27
6+
7+
### Fixed
8+
9+
1. 修复无法显示工作流的问题。
10+
11+
### Added
12+
13+
1. Service schema 中增加 TracingConfig 字段
14+
2. Function schema 中增加 InstanceLifecycleConfig 字段
15+
3. Function ros schema 中增加 InstanceType、CustomContainerConfig、CAPort 以及 AsyncConfiguration 字段
16+
517
## 1.27.16 - 2020-12-04
618

719
### Fixed

package-lock.json

Lines changed: 131 additions & 117 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"publisher": "aliyun",
55
"icon": "media/aliyun-serverless-extension.png",
66
"description": "Aliyun Function Compute extension. Lets you develop your serverless application of Aliyun within VSCode.",
7-
"version": "1.27.16",
7+
"version": "1.27.17",
88
"engines": {
99
"vscode": "^1.31.0"
1010
},

src/commands/createFunction.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import { getSupportedRuntimes, isSupportedRuntime, isNodejs, isPython } from '..
66
import { serverlessCommands, serverlessConfigs } from '../utils/constants';
77
import { isNotEmpty, checkExistsWithTimeout } from '../utils/file';
88
import { createCodeFile, isCustomRuntime } from '../utils/runtime';
9-
import { getSupportedCustomRuntimeTemplates, isSupportedCustomRuntimeTemplates, createCustomRuntimeCodeFile } from '../utils/runtime';
9+
import {
10+
getSupportedCustomRuntimeTemplates,
11+
isSupportedCustomRuntimeTemplates,
12+
createCustomRuntimeCodeFile
13+
} from '../utils/runtime';
1014
import { recordPageView } from '../utils/visitor';
1115
import { ServiceResource } from '../models/resource';
1216
import { TemplateService } from '../services/TemplateService';
@@ -37,7 +41,8 @@ async function process(context: vscode.ExtensionContext, serviceName: string, te
3741
label: 'HTTP',
3842
description: 'HTTP Trigger',
3943
}];
40-
const customRuntimeTemplates: vscode.QuickPickItem[] = getSupportedCustomRuntimeTemplates().map(label => <vscode.QuickPickItem>{ label });
44+
const customRuntimeTemplates: vscode.QuickPickItem[] =
45+
getSupportedCustomRuntimeTemplates().map(label => <vscode.QuickPickItem>{ label });
4146

4247
const runtimes: vscode.QuickPickItem[] = getSupportedRuntimes().map(label => <vscode.QuickPickItem>{ label });
4348

@@ -162,9 +167,9 @@ async function process(context: vscode.ExtensionContext, serviceName: string, te
162167
async function validateCreateFuncionState(state: State): Promise<boolean> {
163168
const functionTypes = ['NORMAL', 'HTTP'];
164169
if (!state || !state.serviceName
165-
|| !state.functionName
170+
|| !state.functionName
166171
|| (!isCustomRuntime(state.runtime) && !functionTypes.includes(state.type))
167-
|| !isSupportedRuntime(state.runtime)
172+
|| !isSupportedRuntime(state.runtime)
168173
|| (isCustomRuntime(state.runtime) && !isSupportedCustomRuntimeTemplates(state.functionTemplate))) {
169174
return false;
170175
}
@@ -194,7 +199,7 @@ async function process(context: vscode.ExtensionContext, serviceName: string, te
194199
await createCodeFile(type, runtime, codeUriPath);
195200
}
196201
}
197-
202+
198203
const state = await collectFuncInfo();
199204
if (!await validateCreateFuncionState(state)) {
200205
return;

0 commit comments

Comments
 (0)