@easyv/screen-cli 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,14 +9,15 @@ description: 使用 easyv-screen 命令操作 EasyV 大屏时的共用规则:
9
9
 
10
10
  ## 开始之前
11
11
 
12
- 1. 先看有没有环境:`easyv-screen config list --json`。没有就添加并切换:
13
- `easyv-screen config add --name <名称> --base-url <OpenAPI 地址> --web <Web 站点地址> --use`。
14
- baseURL 形如 `http://127.0.0.1:9800/api/easyv/open/v1`。可以添加多个环境,用 `config use <名称>` 切换。
15
- 2. 每个 baseURL 有自己的一组 API Key,环境之间不共用。先 `easyv-screen auth list --json` 看当前地址下的 Key。
16
- 已有 Key 时 `easyv-screen auth add --name <名称> --token <appId.secret>`,多把 Key 用 `auth use <名称>` 切换。
17
- 只能切换当前 baseURL 下的 Key;换地址要先 `config use`。
18
- 没有 Key 时运行 `easyv-screen auth login`,把输出的授权地址交给用户,等用户在浏览器确认。
19
- 3. 一把 Key 只绑定一个空间和一个团队。`easyv-screen auth status` 会返回当前 Key 绑定的空间名称、空间 ID、团队名称和团队 ID。要操作别的团队,在同一个 baseURL 下换一把 Key。
12
+ 1. 先看工作台地址:`easyv-screen config list`。
13
+ - `baseUrl` 为 null,且没有 `environments`:还没配置。运行 `easyv-screen config set --base-url <工作台地址>`。
14
+ - 没有 `environments`:只有这一个工作台,直接用 `baseUrl`。
15
+ - 有 `environments`:有多个工作台。`current` 是当前环境名。要换另一个工作台时,`easyv-screen config add --name <名称> --base-url <地址> --use`,或 `easyv-screen config use <名称>`。
16
+ baseURL 是工作台的域名地址,例如 `https://workspace.example.com` 或 `http://127.0.0.1:3000`。本地开发填前端 dev server 的地址。
17
+ 2. 每个工作台各自保存登录。有多个工作台时不共用,换地址要先 `config use`。先 `easyv-screen auth status` 看当前是否已登录。
18
+ 未登录时运行 `easyv-screen auth login`,把输出的授权地址交给用户,等用户在浏览器确认。
19
+ 同一个工作台要登录另一个空间或团队时,用 `easyv-screen auth login --name <名称>`,再用 `auth use <名称>` 切换。
20
+ 3. 一次登录只绑定一个空间和一个团队。`easyv-screen auth status` 会返回当前登录绑定的空间名称、空间 ID、团队名称和团队 ID。要操作别的团队,在同一个 baseURL 下换一个登录。
20
21
 
21
22
  ## 写入规则
22
23