esa-cli 0.0.2-beta.22 → 0.0.2-beta.23

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.
@@ -1,11 +1,11 @@
1
1
  ## Commands
2
2
 
3
- ### esa init [name]
3
+ ### esa-cli init [name]
4
4
 
5
- Initialize a routine with a template or a framework.
5
+ Initialize a project with a template or a framework.
6
6
 
7
7
  ```bash
8
- esa init [name]
8
+ esa-cli init [name]
9
9
  ```
10
10
 
11
11
  - Positionals:
@@ -21,16 +21,16 @@ esa init [name]
21
21
 
22
22
  ---
23
23
 
24
- ### esa dev [entry]
24
+ ### esa-cli dev [entry]
25
25
 
26
- Start a local server for developing your routine.
26
+ Start a local server for developing your project.
27
27
 
28
28
  ```bash
29
- esa dev [entry]
29
+ esa-cli dev [entry]
30
30
  ```
31
31
 
32
32
  - Positionals:
33
- - entry: Entry file of the Routine
33
+ - entry: Entry file of Functions& Pages
34
34
 
35
35
  - Options:
36
36
  - -p, --port number: Port to listen on
@@ -41,124 +41,149 @@ esa dev [entry]
41
41
 
42
42
  ---
43
43
 
44
- ### esa commit [entry]
44
+ ### esa-cli commit [entry]
45
45
 
46
46
  Commit your code and save as a new version.
47
47
 
48
48
  ```bash
49
- esa commit [entry]
49
+ esa-cli commit [entry]
50
50
  ```
51
51
 
52
52
  - Options:
53
53
  - -m, --minify boolean: Minify code before committing (default: false)
54
54
  - -a, --assets string: Assets directory
55
- - -d, --description string: Description for the routine/version (skip interactive input)
56
- - -n, --name string: Edge Routine name
55
+ - -d, --description string: Description for Functions& Pages/version (skip interactive input)
56
+ - -n, --name string: Functions& Pages name
57
57
 
58
58
  ---
59
59
 
60
- ### esa deploy [entry]
60
+ ### esa-cli deploy [entry]
61
61
 
62
62
  Deploy your project.
63
63
 
64
64
  ```bash
65
- esa deploy [entry]
65
+ esa-cli deploy [entry]
66
66
  ```
67
67
 
68
68
  - Positionals:
69
- - entry: Entry file of the Routine
69
+ - entry: Entry file of Functions& Pages
70
70
 
71
71
  - Options:
72
72
  - -v, --version string: Version to deploy (skip interactive selection)
73
73
  - -e, --environment string: Environment to deploy to. Choices: staging | production
74
- - -n, --name string: Name of the routine
74
+ - -n, --name string: Name of Functions& Pages
75
75
  - -a, --assets string: Assets directory (e.g., ./dist)
76
76
  - -d, --description string: Description of the version
77
77
  - -m, --minify boolean: Minify the code
78
78
 
79
79
  ---
80
80
 
81
- ### esa deployments [list | delete]
81
+ ### esa-cli deployments list
82
82
 
83
- Manage your deployments.
83
+ List all deployments.
84
84
 
85
85
  ```bash
86
- esa deployments list
87
- esa deployments delete [deploymentId...]
86
+ esa-cli deployments list
88
87
  ```
89
88
 
90
- - Subcommands:
91
- - list: List all deployments
92
- - delete [deploymentId...]: Delete one or more deployment versions
89
+ No additional options.
93
90
 
94
91
  ---
95
92
 
96
- ### esa routine [list | delete]
93
+ ### esa-cli deployments delete [deploymentId...]
97
94
 
98
- Manage your routines.
95
+ Delete one or more deployment versions.
99
96
 
100
97
  ```bash
101
- esa routine list
102
- esa routine delete <routineName>
98
+ esa-cli deployments delete [deploymentId...]
103
99
  ```
104
100
 
105
- - Subcommands:
106
- - list: List all your routines
107
- - delete <routineName>: Delete a routine
101
+ - Positionals:
102
+ - deploymentId...: Deployment version IDs to delete (one or more)
103
+
104
+ ---
105
+
106
+ ### esa-cli project list
107
+
108
+ List all your projects.
109
+
110
+ ```bash
111
+ esa-cli project list
112
+ ```
113
+
114
+ No additional options.
115
+
116
+ ---
117
+
118
+ ### esa-cli project delete <projectName>
119
+
120
+ Delete a project.
121
+
122
+ ```bash
123
+ esa-cli project delete <projectName>
124
+ ```
125
+
126
+ - Positionals:
127
+ - projectName: The name of the project to delete
128
+
129
+ ---
130
+
131
+ ### esa-cli site list
132
+
133
+ List all your sites.
134
+
135
+ ```bash
136
+ esa-cli site list
137
+ ```
138
+
139
+ No additional options.
108
140
 
109
141
  ---
110
142
 
111
- ### esa site [list]
143
+ ### esa-cli domain add <domain>
112
144
 
113
- Manage your sites.
145
+ Bind a domain to your project.
114
146
 
115
147
  ```bash
116
- esa site list
148
+ esa-cli domain add <domain>
117
149
  ```
118
150
 
119
- - Subcommands:
120
- - list: List all your sites
151
+ - Positionals:
152
+ - domain: The domain name to bind
121
153
 
122
154
  ---
123
155
 
124
- ### esa domain <add | list | delete>
156
+ ### esa-cli domain list
125
157
 
126
- Manage the domain names bound to your routine.
158
+ List all related domains.
127
159
 
128
160
  ```bash
129
- esa domain add <domain>
130
- esa domain list
131
- esa domain delete <domain>
161
+ esa-cli domain list
132
162
  ```
133
163
 
134
- - Subcommands:
135
- - add <domain>: Bind a domain to a routine
136
- - list: List all related domains
137
- - delete <domain>: Delete a related domain
164
+ No additional options.
138
165
 
139
166
  ---
140
167
 
141
- ### esa route <add | list | delete>
168
+ ### esa-cli domain delete <domain>
142
169
 
143
- Manage the routes bound to your routine.
170
+ Delete a related domain.
144
171
 
145
172
  ```bash
146
- esa route add
147
- esa route list
148
- esa route delete <routeName>
173
+ esa-cli domain delete <domain>
149
174
  ```
150
175
 
151
- - Subcommands:
152
- - add: Bind a Route to a routine
153
- - list: List all related routes
154
- - delete <routeName>: Delete a related route
176
+ - Positionals:
177
+ - domain: The domain name to delete
155
178
 
156
- #### esa route add
179
+ ---
180
+
181
+ ### esa-cli route add
157
182
 
158
- Bind a route to the current routine.
183
+ Bind a route to the current project.
159
184
 
160
185
  ```bash
161
- esa route add [route] [site] [--alias <routeName>] [--route <route>] [--site <site>]
186
+ esa-cli route add [route] [site] [--alias <routeName>] [--route <route>] [--site <site>]
162
187
  ```
163
188
 
164
189
  - Positionals (optional):
@@ -172,28 +197,39 @@ esa route add [route] [site] [--alias <routeName>] [--route <route>] [--site <si
172
197
  - -s, --site string: Site name (must be an active site)
173
198
  - -a, --alias string: Route name (alias)
174
199
 
175
- - Interactive behavior:
176
- - If `--alias` is missing, you will be prompted to input a route name
177
- - If `--site` is missing, you will be prompted to choose from active sites
178
- - If `--route` is missing, you will be prompted to input the route value
200
+ ---
201
+
202
+ ### esa-cli route list
203
+
204
+ List all related routes.
179
205
 
180
- - Route matching notes:
181
- - Host supports `*` prefix: `*.example.com` matches any host ending with `.example.com`
182
- - Path supports `*` suffix: `/api/*` matches any path starting with `/api/`
183
- - Examples: `example.com/*`, `*.example.com/`, `*.example.com/api/*`
206
+ ```bash
207
+ esa-cli route list
208
+ ```
209
+
210
+ No additional options.
211
+
212
+ ---
213
+
214
+ ### esa-cli route delete <routeName>
184
215
 
185
- - Examples:
186
- - `esa route add -a home -s example.com -r example.com/*`
187
- - `esa route add example.com/* example.com -a home`
216
+ Delete a related route.
217
+
218
+ ```bash
219
+ esa-cli route delete <routeName>
220
+ ```
221
+
222
+ - Positionals:
223
+ - routeName: The name of the route to delete
188
224
 
189
225
  ---
190
226
 
191
- ### esa login
227
+ ### esa-cli login
192
228
 
193
229
  Login to the server.
194
230
 
195
231
  ```bash
196
- esa login
232
+ esa-cli login
197
233
  ```
198
234
 
199
235
  - Options:
@@ -202,22 +238,22 @@ esa login
202
238
 
203
239
  ---
204
240
 
205
- ### esa logout
241
+ ### esa-cli logout
206
242
 
207
243
  Logout.
208
244
 
209
245
  ```bash
210
- esa logout
246
+ esa-cli logout
211
247
  ```
212
248
 
213
249
  ---
214
250
 
215
- ### esa config [-l | -g]
251
+ ### esa-cli config [-l | -g]
216
252
 
217
253
  Modify your local or global configuration.
218
254
 
219
255
  ```bash
220
- esa config [--local] [--global]
256
+ esa-cli config [--local] [--global]
221
257
  ```
222
258
 
223
259
  - Options:
@@ -226,10 +262,10 @@ esa config [--local] [--global]
226
262
 
227
263
  ---
228
264
 
229
- ### esa lang
265
+ ### esa-cli lang
230
266
 
231
267
  Set the language of the CLI.
232
268
 
233
269
  ```bash
234
- esa lang
270
+ esa-cli lang
235
271
  ```
@@ -1,11 +1,11 @@
1
1
  ## 命令一览
2
2
 
3
- ### esa init [name]
3
+ ### esa-cli init [name]
4
4
 
5
- 初始化一个边缘函数项目(支持框架或模板)。
5
+ 初始化一个函数和Pages项目(支持框架或模板)。
6
6
 
7
7
  ```bash
8
- esa init [name]
8
+ esa-cli init [name]
9
9
  ```
10
10
 
11
11
  - 位置参数:
@@ -21,16 +21,16 @@ esa init [name]
21
21
 
22
22
  ---
23
23
 
24
- ### esa dev [entry]
24
+ ### esa-cli dev [entry]
25
25
 
26
26
  启动本地开发服务器。
27
27
 
28
28
  ```bash
29
- esa dev [entry]
29
+ esa-cli dev [entry]
30
30
  ```
31
31
 
32
32
  - 位置参数:
33
- - entry:边缘函数入口文件
33
+ - entry:函数和Pages入口文件
34
34
 
35
35
  - 选项:
36
36
  - -p, --port number:监听端口
@@ -41,122 +41,147 @@ esa dev [entry]
41
41
 
42
42
  ---
43
43
 
44
- ### esa commit [entry]
44
+ ### esa-cli commit [entry]
45
45
 
46
46
  提交代码并保存为新版本。
47
47
 
48
48
  ```bash
49
- esa commit [entry]
49
+ esa-cli commit [entry]
50
50
  ```
51
51
 
52
52
  - 选项:
53
53
  - -m, --minify boolean:提交前压缩代码(默认 false)
54
54
  - -a, --assets string:静态资源目录
55
55
  - -d, --description string:版本/例程描述(跳过交互输入)
56
- - -n, --name string:边缘函数名称
56
+ - -n, --name string:函数和Pages名称
57
57
 
58
58
  ---
59
59
 
60
- ### esa deploy [entry]
60
+ ### esa-cli deploy [entry]
61
61
 
62
- 部署项目。
62
+ 生成一个代码版本,并同时部署项目到仿真和线上环境
63
63
 
64
64
  ```bash
65
- esa deploy [entry]
65
+ esa-cli deploy [entry]
66
66
  ```
67
67
 
68
68
  - 选项:
69
- - entry 可选参数,默认以`esa.jsonc`中entry配置为准
69
+ - entry 可选参数,默认以 `esa.jsonc`中entry配置为准
70
70
  - -v, --version string:指定要部署的版本(跳过交互选择)
71
71
  - -e, --environment string:部署环境。可选:staging | production
72
- - -n, --name string:边缘函数名称
72
+ - -n, --name string:函数和Pages名称
73
73
  - -a, --assets string:静态资源目录(例如:./dist)
74
74
  - -d, --description string:版本描述
75
75
  - -m, --minify boolean:是否压缩代码
76
76
 
77
77
  ---
78
78
 
79
- ### esa deployments [list | delete]
79
+ ### esa-cli deployments list
80
80
 
81
- 管理部署版本。
81
+ 列出当前函数和Pages下所有代码版本。
82
82
 
83
83
  ```bash
84
- esa deployments list
85
- esa deployments delete [deploymentId...]
84
+ esa-cli deployments list
86
85
  ```
87
86
 
88
- - 子命令:
89
- - list:列出所有部署
90
- - delete [deploymentId...]:删除一个或多个部署版本
87
+ 无额外选项。
91
88
 
92
89
  ---
93
90
 
94
- ### esa routine [list | delete]
91
+ ### esa-cli deployments delete [deploymentId...]
95
92
 
96
- 管理边缘函数。
93
+ 删除当前函数和Pages的一个或多个代码版本。
97
94
 
98
95
  ```bash
99
- esa routine list
100
- esa routine delete <routineName>
96
+ esa-cli deployments delete [deploymentId...]
101
97
  ```
102
98
 
103
- - 子命令:
104
- - list:列出所有边缘函数
105
- - delete `<routineName>`:删除指定边缘函数
99
+ - 位置参数:
100
+ - deploymentId...:要删除的部署版本ID(可一次传多个)
101
+
102
+ ---
103
+
104
+ ### esa-cli project list
105
+
106
+ 列出账号下所有的函数和Pages。
107
+
108
+ ```bash
109
+ esa-cli project list
110
+ ```
111
+
112
+ 无额外选项。
113
+
114
+ ---
115
+
116
+ ### esa-cli project delete <projectName>
117
+
118
+ 删除指定函数和Pages。
119
+
120
+ ```bash
121
+ esa-cli project delete <projectName>
122
+ ```
123
+
124
+ - 位置参数:
125
+ - projectName:要删除的函数或Pages名称
126
+
127
+ ---
128
+
129
+ ### esa-cli site list
130
+
131
+ 列出账号下所有已激活站点。
132
+
133
+ ```bash
134
+ esa-cli site list
135
+ ```
136
+
137
+ 无额外选项。
106
138
 
107
139
  ---
108
140
 
109
- ### esa site [list]
141
+ ### esa-cli domain add <domain>
110
142
 
111
- 管理站点。
143
+ 绑定域名到当前函数和Pages。
112
144
 
113
145
  ```bash
114
- esa site list
146
+ esa-cli domain add <domain>
115
147
  ```
116
148
 
117
- - 子命令:
118
- - list:列出所有已激活站点
149
+ - 位置参数:
150
+ - domain:要绑定的域名
119
151
 
120
152
  ---
121
153
 
122
- ### esa domain <add | list | delete>
154
+ ### esa-cli domain list
123
155
 
124
- 管理与边缘函数绑定的域名。
156
+ 查看当前函数和Pages所有已绑定域名。
125
157
 
126
158
  ```bash
127
- esa domain add <domain>
128
- esa domain list
129
- esa domain delete <domain>
159
+ esa-cli domain list
130
160
  ```
131
161
 
132
- - 子命令:
133
- - add `<domain>`:绑定域名
134
- - list:查看所有已绑定域名
135
- - delete `<domain>`:删除已绑定域名
162
+ 无额外选项。
136
163
 
137
164
  ---
138
165
 
139
- ### esa route <add | list | delete>
166
+ ### esa-cli domain delete <domain>
140
167
 
141
- 管理与边缘函数绑定的路由。
168
+ 删除当前函数和Pages下已绑定域名。
142
169
 
143
170
  ```bash
144
- esa route add
145
- esa route list
146
- esa route delete <routeName>
171
+ esa-cli domain delete <domain>
147
172
  ```
148
173
 
149
- - 子命令:
150
- - add:绑定路由
151
- - list:查看所有已绑定路由
152
- - delete `<routeName>`:删除已绑定路由
174
+ - 位置参数:
175
+ - domain:要删除绑定的域名
153
176
 
154
- #### esa route add
177
+ ---
178
+
179
+ #### esa-cli route add
155
180
 
156
- 为当前边缘函数绑定一个路由。
181
+ 为当前函数和Pages绑定一个路由。
157
182
 
158
183
  ```bash
159
- esa route add [route] [site] [--alias <routeName>] [--route <route>] [--site <site>]
184
+ esa-cli route add [route] [site] [--alias <routeName>] [--route <route>] [--site <site>]
160
185
  ```
161
186
 
162
187
  - 位置参数(可选):
@@ -168,30 +193,41 @@ esa route add [route] [site] [--alias <routeName>] [--route <route>] [--site <si
168
193
  - 主机名支持以 `*` 开头表示后缀匹配(如:`*.example.com`)
169
194
  - 路径支持以 `*` 结尾表示前缀匹配(如:`/api/*`)
170
195
  - -s, --site string:站点名称(需为已激活站点)
171
- - -a, --alias string:路由名称(别名)
196
+ - -a, --alias string:路由名称(别名) 例如:apple、orange等
197
+
198
+ ---
199
+
200
+ ### esa-cli route list
172
201
 
173
- - 交互提示:
174
- - 未提供 `--alias` 时,会提示输入路由名称
175
- - 未提供 `--site` 时,会列出账号下已激活站点供选择
176
- - 未提供 `--route` 时,会提示输入路由值
202
+ 查看函数和Pages所有已绑定路由。
177
203
 
178
- - 路由匹配说明:
179
- - host 支持前缀 `*`:`*.example.com` 表示匹配所有以 `.example.com` 结尾的域名
180
- - path 支持后缀 `*`:`/api/*` 表示匹配以 `/api/` 开头的路径
181
- - 示例:`example.com/*`、`*.example.com/`、`*.example.com/api/*`
204
+ ```bash
205
+ esa-cli route list
206
+ ```
207
+
208
+ 无额外选项。
209
+
210
+ ---
211
+
212
+ ### esa-cli route delete <routeName>
182
213
 
183
- - 示例:
184
- - `esa route add -a home -s example.com -r example.com/*`
185
- - `esa route add example.com/* example.com -a home`
214
+ 删除函数和Pages下已绑定路由。
215
+
216
+ ```bash
217
+ esa-cli route delete <routeName>
218
+ ```
219
+
220
+ - 位置参数:
221
+ - routeName:要删除的路由名称
186
222
 
187
223
  ---
188
224
 
189
- ### esa login
225
+ ### esa-cli login
190
226
 
191
227
  登录。
192
228
 
193
229
  ```bash
194
- esa login
230
+ esa-cli login
195
231
  ```
196
232
 
197
233
  - 选项:
@@ -203,22 +239,22 @@ esa login
203
239
 
204
240
  ---
205
241
 
206
- ### esa logout
242
+ ### esa-cli logout
207
243
 
208
244
  退出登录。
209
245
 
210
246
  ```bash
211
- esa logout
247
+ esa-cli logout
212
248
  ```
213
249
 
214
250
  ---
215
251
 
216
- ### esa config [-l | -g]
252
+ ### esa-cli config [-l | -g]
217
253
 
218
254
  修改本地或全局配置。
219
255
 
220
256
  ```bash
221
- esa config [--local] [--global]
257
+ esa-cli config [--local] [--global]
222
258
  ```
223
259
 
224
260
  - 选项:
@@ -227,10 +263,10 @@ esa config [--local] [--global]
227
263
 
228
264
  ---
229
265
 
230
- ### esa lang
266
+ ### esa-cli lang
231
267
 
232
268
  设置 CLI 语言。
233
269
 
234
270
  ```bash
235
- esa lang
271
+ esa-cli lang
236
272
  ```