Skip to content

Commit

Permalink
commit by Serverless devs docs 11-14-2023 11:34:54
Browse files Browse the repository at this point in the history
  • Loading branch information
serverless-devs committed Nov 14, 2023
1 parent 0fb7b65 commit d68e025
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 239 deletions.
8 changes: 4 additions & 4 deletions content/zh/fc3/command/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ category: '构建&部署'

### 参数解析

| 参数全称 | 参数缩写 | Yaml 模式下必填 | 参数含义 |
| ------------- | -------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| region | - | 选填 | 必填 | 地域名称,取值范围参见[函数计算开服地域](https://www.alibabacloud.com/help/zh/fc/product-overview/region-availability) |
| function-name | - | 选填 | 必填 | 函数名 |
| 参数全称 | 参数缩写 | Yaml 模式下必填 | Cli 模式下必填 | 参数含义 |
| ------------- | -------- | --------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------- |
| region | - | 选填 | 必填 | 地域名称,取值范围参见[函数计算开服地域](https://www.alibabacloud.com/help/zh/fc/product-overview/region-availability) |
| function-name | - | 选填 | 必填 | 函数名 |

> 当前命令还支持部分全局参数(例如`-a/--access`, `--debug`等),详情可参考 [Serverless Devs 全局参数文档](https://serverless-devs.com/serverless-devs/command/readme#全局参数)
Expand Down
2 changes: 1 addition & 1 deletion content/zh/fc3/command/sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ category: '其他功能'
| ------------- | -------- | --------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------- |
| region | - | 选填 | 必填 | 地域名称,取值范围参见[函数计算开服地域](https://www.alibabacloud.com/help/zh/fc/product-overview/region-availability) |
| function-name | - | 选填 | 必填 | 函数名 |
| target-dir | - | 选填 | 选填 | 目标路径, 默认是当前目录 |
| target-dir | - | 选填 | 选填 | 目标路径, 默认是目录是 ./sync-clone |
| qualifier | - | 选填 | 选填 | 版本或者别名 |

> 当前命令还支持部分全局参数(例如`-a/--access`, `--debug`等),详情可参考 [Serverless Devs 全局参数文档](https://serverless-devs.com/serverless-devs/command/readme#全局参数)
Expand Down
59 changes: 33 additions & 26 deletions content/zh/serverless-devs/command/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ category: '命令'
- [config: 密钥配置](./config.md)
- [init: 项目初始化](./init.md)
- [cli: 纯命令行模式](./cli.md)
- [verify: 应用校验](./verify.md)
- [edit: 应用编辑](./edit.md)
- [clean: 工具清理](./clean.md)
- [component: 组件信息](./component.md)
- [set: 工具配置](./set.md)
Expand All @@ -27,33 +25,40 @@ Serverless Devs 可以通过`-h`唤起对应命令的帮助文档,例如查看

```shell script
$ s -h
🚀 Welcome to the Serverless Devs.
😃 Welcome to the Serverless Devs

Options
--debug Open debug model.
--skip-actions Skip the extends section.
-t, --template <path> Specify the template file.
-a, --access <aliasName> Specify the access alias name.
-o, --output <outputFormat> Specify the output format: json, yaml, raw.
-v, --version Output the version number.
-h, --help Display help for command.
Usage: s [options] [command]

Commands
config 👤 Configure venders account.
init 💞 Initializing a serverless project.
cli 🐚 Command line operation without yaml mode.
verify 🔎 Verify the application.
set 🔧 Settings for the tool.
clean 💥 Clean up the environment.
component 🔌 Installed component information.
edit 🙌 Application editing.
Options:
--debug Open debug model
--skip-actions Skip the extends section
-t, --template <path> Specify the template file
-a, --access <aliasName> Specify the access alias name
-o, --output <outputFormat> Specify the output format (choices: "default", "json", "yaml", "raw")
--output-file <outputFilePath> Specify the output file path
--env <envName> Specify the env name
--no-verify Do not verify yaml
--silent Silent mode
-v, --version Output the version number
-h, --help Display help for command

Commands:
config 👤 Configure venders account
env 🌱 Environment operation
set 🔧 Settings for the tool
registry 🚢 Serverless registry platform
preview [options] 👀 Preview Yaml render results
component 🔌 Installed component information
clean [options] 💥 Clean up the environment
init [options] 💞 Initializing a serverless project
<custom> 🧭 Custom Commands

Examples
init Perform [s init] fast experience Serverless Devs.

🧭 More information: https://github.com/Serverless-Devs/Serverless-Devs
🚀 More applications: https://registry.serverless-devs.com
🙌 Quick Start: https://docs.serverless-devs.com/quick-start
🌟 Github Repo: https://github.com/Serverless-Devs/Serverless-Devs
💡 Documentation: https://docs.serverless-devs.com
🚀 Example Projects: https://registry.serverless-devs.com
📝 Feedback: https://github.com/Serverless-Devs/Serverless-Devs/issues
```

## 全局参数
Expand All @@ -67,14 +72,16 @@ Examples
| output | o | `default` | 指定数据的输出格式 | 支持`default`, `json`, `yaml`, `raw`格式 |
| version | v | - | 查看版本信息 | - |
| help | h | - | 查看帮助信息 | - |
| silent | - | - | 静默模式 | 将只输出组件运行结果 |
| env | - | - | 指定环境 | 在多环境下使用 |
| output-file | - | - | 指定输出文件路径 | - |
| no-verify | - | - | 不校验`yaml`文件 | - |

## 命令详情

- [config: 密钥配置](./config.md)
- [init: 项目初始化](./init.md)
- [cli: 纯命令行模式](./cli.md)
- [verify: 应用校验](./verify.md)
- [edit: 应用编辑](./edit.md)
- [clean: 工具清理](./clean.md)
- [set: 工具配置](./set.md)
- [component: 组件信息](./component.md)
Expand Down
10 changes: 5 additions & 5 deletions content/zh/serverless-devs/inner_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ category: '使用文档'

如果同时存在以上三个环境变量,那个这个密钥的优先级是最高的,抛出的密钥别名为 `$system_environment_access`

### `_serverless_devs_access` 结尾
在环境变量中可以命名 key 为`*********_serverless_devs_access`,例如`default_serverless_devs_access`,value 为 JSON 字符串,例如:
- Key:`default_serverless_devs_access`
### `_serverless_devs_key` 结尾
在环境变量中可以命名 key 为`*********_serverless_devs_key`,例如`default_serverless_devs_key`,value 为 JSON 字符串,例如:
- Key:`default_serverless_devs_key`
- Value:`{\"AccountID\":\"temp_accountid\",\"AccessKeyID\":\"temp_accesskeyid\",\"AccessKeySecret\":\"temp_accesskeysecret\"}`
此时,可以在配置密钥的时候指定密钥`default_serverless_devs_access`;
此时,可以在配置密钥的时候指定密钥`default_serverless_devs_key`;

`s.yaml`配置如下:

```yaml
edition: 1.0.0 # 命令行YAML规范版本,遵循语义化版本(Semantic Versioning)规范
name: app # 项目名称
access: default_serverless_devs_access # 秘钥别名
access: default_serverless_devs_key # 秘钥别名

services:
fc-deploy-test:
Expand Down
Loading

0 comments on commit d68e025

Please sign in to comment.