esa-cli 1.0.0 → 1.0.1

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.
package/README.md CHANGED
@@ -27,6 +27,12 @@ To ensure consistent collaboration across your team, we recommend installing `es
27
27
  npm i -D esa-cli@latest
28
28
  ```
29
29
 
30
+ Alternatively, install globally to use the `esa-cli` command system-wide:
31
+
32
+ ```bash
33
+ npm i -g esa-cli@latest
34
+ ```
35
+
30
36
  > [!TIP]
31
37
  > When `esa-cli` is not previously installed, `npx` will fetch and run the latest version from the registry.
32
38
 
@@ -1310,5 +1310,9 @@
1310
1310
  "kv_parse_failed": {
1311
1311
  "en": "kv.json parse failed, use empty local kv store.",
1312
1312
  "zh_CN": "kv.json 解析失败,使用空本地 kv 存储。"
1313
+ },
1314
+ "not_active": {
1315
+ "en": "Functions and Pages is not active, please activate it first. Visit: https://esa.console.aliyun.com/edge/pages to activate.",
1316
+ "zh_CN": ""
1313
1317
  }
1314
1318
  }
@@ -74,7 +74,15 @@ export class ApiService {
74
74
  };
75
75
  const response = yield this.client.callApi(params, request, runtime);
76
76
  if (response.statusCode === 200) {
77
- return { success: true };
77
+ if (response.body.Status === 'Running') {
78
+ return { success: true };
79
+ }
80
+ else {
81
+ return {
82
+ success: false,
83
+ message: t('not_active').d('Functions and Pages is not active, please activate it first. Visit: https://esa.console.aliyun.com/edge/pages to activate.')
84
+ };
85
+ }
78
86
  }
79
87
  else if (response.statusCode === 403) {
80
88
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esa-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A CLI for operating Alibaba Cloud ESA Functions and Pages.",
5
5
  "main": "bin/enter.cjs",
6
6
  "type": "module",
package/zh_CN.md CHANGED
@@ -27,6 +27,12 @@ ESA CLI 是用于构建阿里云 ESA Functions 与 Pages 的命令行工具。
27
27
  npm i -D esa-cli@latest
28
28
  ```
29
29
 
30
+ 或者全局安装,以便在系统范围内使用 `esa-cli` 命令:
31
+
32
+ ```
33
+ npm i -g esa-cli@latest
34
+ ```
35
+
30
36
  当尚未安装 `esa-cli` 时,`npx` 会从注册表拉取并运行最新版本。
31
37
 
32
38
  ## 查看 ESA CLI 版本