Skip to content

Commit 16d0c0d

Browse files
author
serverless-devs
committed
commit by Serverless devs docs 3-22-2024 9:51:57
1 parent d457dba commit 16d0c0d

File tree

8 files changed

+67
-39
lines changed

8 files changed

+67
-39
lines changed

content/en/serverless-devs/command/cli.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Usage: s cli [options]
2525
Utilize Serverless Devs components for application development and management without the need for yaml configuration.
2626

2727
Examples:
28-
$ s cli fc api ListServices
29-
$ s cli fc api ListFunctions --path '{"serviceName": "serviceName"}' --body '{"K1": "V1"}'
28+
$ s cli fc3 info --region cn-hangzhou --function-name test -a myAccess
29+
$ s cli fc3 invoke --region cn-hangzhou --function-name test -e "{"key" : "val"}" -a myAccess
3030

3131
📖 Documentation: https://serverless.help/t/s/
3232
Options:
@@ -73,22 +73,34 @@ s cli devsapp/website deploy -p "{\"bucket\":\"testbucket\",\"src\":{\"codeUri\"
7373

7474
### Specific Component Support
7575

76-
Serverless Devs offers several well-designed components that are optimized for Cli mode. For example, the `fc api` component is prioritized for command line usage, facilitating quick interactions with certain Aliyun Function Compute (FC) service interfaces, such as:
76+
Serverless Devs offers several well-designed components that are optimized for Cli mode. For example, the `fc3` component is prioritized for command line usage, facilitating quick interactions with certain Aliyun Function Compute (FC) service interfaces, such as:
7777

78-
- Listing functions within a specified service and region:
78+
- Listing functions within a specified function and region:
7979

80-
```shell script
81-
s cli fc api listFunctions --service-name my-service --region cn-beijing -a myaccess
82-
```
80+
```bash
81+
s cli fc3 info --region cn-hangzhou --function-name test -a myAccess
82+
```
8383

84-
- Updating function code via the command line:
84+
- Invoking function via the command line:
8585

86-
```shell script
87-
s cli fc api updateFunction --region cn-hangzhou --serviceName fc-deploy-service --functionName http-trigger-function --code '{"zipFile":"./"}'
88-
```
86+
```bash
87+
s cli fc3 invoke --region cn-hangzhou --function-name test -e "{\"key\" : \"val\"}" -a myAccess
88+
```
8989

90-
Furthermore, several components that typically support Yaml mode may also offer an optimized pure command line interface for specific operations. An example is the `fc` component, which provides commands for resource synchronization:
90+
Furthermore, several components that typically support Yaml mode may also offer an optimized pure command line interface for specific operations. An example is the `fc3` component, which provides commands for resource synchronization:
9191

92-
```shell script
93-
s cli fc sync --region cn-shanghai --service-name myService --type config
92+
```bash
93+
$ s cli fc3 sync -h
94+
Usage: s cli fc3 sync [options]
95+
96+
Synchronize online resources to offline resources.
97+
98+
Examples with Yaml:
99+
$ s sync
100+
$ s sync --target-dir ./test --qualifier testAlias
101+
102+
Examples with CLI:
103+
$ s cli fc3 sync --region cn-hangzhou --function-name test -a default
104+
$ s cli fc3 sync --region cn-hangzhou --function-name s1\$f1 -a default
105+
...
94106
```

content/en/serverless-devs/command/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Options:
4444
-h, --help Display help for command
4545

4646
Commands:
47-
config 👤 Configure venders account
47+
config 👤 Configure vendors account
4848
env 🌱 Environment operation
4949
set 🔧 Settings for the tool
5050
registry 🚢 Serverless registry platform
@@ -56,9 +56,9 @@ Commands:
5656
<custom> 🧭 Custom Commands
5757

5858

59-
🙌 Quick Start: https://docs.serverless-devs.com/quick-start
59+
🙌 Quick Start: https://manual.serverless-devs.com/getting-started/
6060
🌟 Github Repo: https://github.com/Serverless-Devs/Serverless-Devs
61-
💡 Documentation: https://docs.serverless-devs.com
61+
💡 Documentation: https://manual.serverless-devs.com
6262
🚀 Example Projects: https://registry.serverless-devs.com
6363
📝 Feedback: https://github.com/Serverless-Devs/Serverless-Devs/issues
6464
```

content/en/serverless-devs/command/verify.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The functionality of the `verify` command includes two parts:
3333
1. Serverless Devs tool side: Performs basic checks on the Yaml file's format, magic variables, and versions. This part of the functionality is similar to the `preview` command.
3434
2. Component side: The component provides a method, according to certain conventions, to conduct a more detailed truth verification of all resource attribute values in the Yaml file, such as whether the type is correct and whether the value exists in the enumeration options.
3535

36-
The convention method and development examples for the component side can be found here: [Serverless Devs Component Development Specification](https://docs.serverless-devs.com/serverless-devs/development-manual/component#约定方法).
36+
The convention method and development examples for the component side can be found here: [Serverless Devs Component Development Specification](https://manual.serverless-devs.com/dev-guide/component/).
3737

3838
### Operation Examples
3939

content/zh/serverless-devs/command/cli.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Usage: s cli [options]
2626
Directly use serverless devs to use components, develop and manage applications without yaml configuration.
2727

2828
Example:
29-
$ s cli fc api ListServices
30-
$ s cli fc api ListFunctions --path '{"serviceName": "serviceName"}' --body '{"K1": "V1"}'
29+
$ s cli fc3 info --region cn-hangzhou --function-name test -a myAccess
30+
$ s cli fc3 invoke --region cn-hangzhou --function-name test -e "{"key" : "val"}" -a myAccess
3131

3232
📖 Document: https://serverless.help/t/s/cli
3333

@@ -79,18 +79,34 @@ s cli devsapp/website deploy -p "{\"bucket\":\"testbucket\",\"src\":{\"codeUri\"
7979

8080
### 特定组件的支持
8181

82-
在 Serverless Devs 目前已经存在的组件中,已经有一些比较优秀且针对 Cli 模式设计的组件,例如`fc api`组件,就是一款命令行模式优先的组件,通过该组件,可以快速的使用阿里云函数计算的一些接口,进行操作,例如:
82+
在 Serverless Devs 目前已经存在的组件中,已经有一些比较优秀且针对 Cli 模式设计的组件,例如`fc3`组件,就是一款命令行模式优先的组件,通过该组件,可以快速的使用阿里云函数计算的一些接口,进行操作,例如:
8383

84-
- 查看阿里云函数计算的某个地区下某个服务下的函数列表:
85-
```shell script
86-
s cli fc api listFunctions --service-name my-service --region cn-beijing -a myaccess
84+
- 查看阿里云函数计算的某个地区下某个函数信息:
85+
86+
```bash
87+
s cli fc3 info --region cn-hangzhou --function-name test -a myAccess
8788
```
88-
- 通过纯命令行形式,对函数进行代码更新:
89-
```shell script
90-
s cli fc api updateFunction --region cn-hangzhou --serviceName fc-deploy-service --functionName http-trigger-function --code '{"zipFile":"./"}'
89+
90+
- 调用阿里云函数计算的某个地区下某个函数:
91+
92+
```bash
93+
s cli fc3 invoke --region cn-hangzhou --function-name test -e "{\"key\" : \"val\"}" -a myAccess
9194
```
9295

93-
除此之外,很多组件可以即对 Yaml 模式有比较好的支持,也会在某些情况下对 纯命令行模式,进行额外优化设计,例如 `fc` 组件的线上线下资源同步操作:
94-
```shell script
95-
s cli fc sync --region cn-shanghai --service-name myService --type config
96-
```
96+
除此之外,很多组件既可以对 Yaml 模式有比较好的支持,也会在某些情况下对 纯命令行模式,进行额外优化设计,例如 `fc3` 组件的线上线下资源同步操作:
97+
98+
```bash
99+
$ s cli fc3 sync -h
100+
Usage: s cli fc3 sync [options]
101+
102+
Synchronize online resources to offline resources.
103+
104+
Examples with Yaml:
105+
$ s sync
106+
$ s sync --target-dir ./test --qualifier testAlias
107+
108+
Examples with CLI:
109+
$ s cli fc3 sync --region cn-hangzhou --function-name test -a default
110+
$ s cli fc3 sync --region cn-hangzhou --function-name s1\$f1 -a default
111+
...
112+
```

content/zh/serverless-devs/command/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Options:
4646
-h, --help Display help for command
4747

4848
Commands:
49-
config 👤 Configure venders account
49+
config 👤 Configure vendors account
5050
env 🌱 Environment operation
5151
set 🔧 Settings for the tool
5252
registry 🚢 Serverless registry platform
@@ -58,9 +58,9 @@ Commands:
5858
<custom> 🧭 Custom Commands
5959

6060

61-
🙌 Quick Start: https://docs.serverless-devs.com/quick-start
61+
🙌 Quick Start: https://manual.serverless-devs.com/getting-started/
6262
🌟 Github Repo: https://github.com/Serverless-Devs/Serverless-Devs
63-
💡 Documentation: https://docs.serverless-devs.com
63+
💡 Documentation: https://manual.serverless-devs.com
6464
🚀 Example Projects: https://registry.serverless-devs.com
6565
📝 Feedback: https://github.com/Serverless-Devs/Serverless-Devs/issues
6666
```

content/zh/serverless-devs/command/registry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ category: '命令'
77

88
# Registry 命令
99

10-
`registry`命令是将安利模板发到 [Serverless Registry](https://registry.serverless-devs.com) 并对相关内容进行管理的命令。
10+
`registry`命令是将案例模板发到 [Serverless Registry](https://registry.serverless-devs.com) 并对相关内容进行管理的命令。
1111

1212
- [命令解析](#命令解析)
1313
- [login 命令](#registry-login-命令)

content/zh/serverless-devs/command/verify.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Options:
3737
1. Serverless Devs 工具侧:对 Yaml 文件的格式,魔法变量,版本等进行基本校验。这部分功能与`preview`命令的功能雷同。
3838
2. 组件侧:通过组件按照一定约定提供的方法,对 Yaml 文件中所有资源的属性值进行更加细致的真值校验,例如类型是否正确,取值是否存在于枚举项中等。
3939

40-
组件侧的约定方法和开发案例可见:[Serverless Devs 组件开发规范](https://docs.serverless-devs.com/serverless-devs/development-manual/component#%E7%BA%A6%E5%AE%9A%E6%96%B9%E6%B3%95)
40+
组件侧的约定方法和开发案例可见:[Serverless Devs 组件开发规范](https://manual.serverless-devs.com/dev-guide/component/)
4141

4242
### 操作案例
4343

content/zh/serverless-devs/development-manual/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ services:
220220
component-test:
221221
component: demo
222222
props:
223-
name: {{ inputsrgs }}
223+
name: {{ inputargs }}
224224
```
225225
## 开发与调试
226226
为了兼容[spec 0.0.1](https://github.com/Serverless-Devs/Serverless-Devs/blob/master/spec/zh/0.0.1/serverless_package_model/package_model.md#%E5%BA%94%E7%94%A8%E6%A8%A1%E5%9E%8B%E8%A7%84%E8%8C%83) 中,关于`s.yaml`的特殊格式定义,在当前版本中:
@@ -238,7 +238,7 @@ services:
238238

239239
> 您可以使用固定的 dev 版本用于持续发布测试版本
240240

241-
- 首次发布需要通过 [registry](https://docs.serverless-devs.com/serverless-devs/command/registry) 命令先登录 Serverless Devs Registry。
241+
- 首次发布需要通过 [registry](https://manual.serverless-devs.com/user-guide/builtin/registry/) 命令先登录 Serverless Devs Registry。
242242

243243
```shell script
244244
s registry login
@@ -257,7 +257,7 @@ services:
257257

258258
### 查看已发布的应用
259259

260-
> 详细可见 [registry 命令文档](https://docs.serverless-devs.com/serverless-devs/command/registry)
260+
> 详细可见 [registry 命令文档](https://manual.serverless-devs.com/user-guide/builtin/registry/)
261261

262262
可以通过`s registry list`指令查看当前登陆到 [Serverless Registry](https://registry.serverless-devs.com) 账号所发布的组件。例如:
263263

0 commit comments

Comments
 (0)