@serverless-devs/s 2.0.95-beta.1 → 2.0.95

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,296 +1,20 @@
1
- # Package Awesome
1
+ # Awesome
2
2
 
3
- - [应用集合](#应用集合)
4
- - [组件集合](#组件集合)
3
+ ## 组件集合
5
4
 
5
+ - [阿里云函数计算(FC)](https://github.com/devsapp/fc)
6
+ - [阿里云Serverless应用引擎(FC)](https://github.com/devsapp/sae)
7
+ - [AWS Lambda](https://github.com/devscomp/lambda)
8
+ - [百度智能云函数计算(CFC)](https://github.com/xinwuyun/cfc)
9
+ - [华为云函数工作流(FG)](https://github.com/xinwuyun/fg)
10
+ - [腾讯云云函数(SCF)](https://github.com/devscomp/scf)
6
11
 
7
- # 应用集合
12
+ ## 应用集合
8
13
 
9
- ## Web Framework应用案例
14
+ - [阿里云相关应用合集](https://github.com/devsapp/awesome)
15
+ - [AWS Lambda](https://github.com/devscomp/start-lambda)
16
+ - [百度智能云函数计算(CFC)](https://github.com/xinwuyun/start-cfc)
17
+ - [华为云函数工作流(FG)](https://github.com/xinwuyun/start-fg)
18
+ - [腾讯云云函数(SCF)](https://github.com/devscomp/start-scf)
10
19
 
11
- <table>
12
- <tr>
13
- <th>No.</th>
14
- <th>:fire:Nodejs</th>
15
- <th>Python</th>
16
- <th>PHP</th>
17
- <th>Go</th>
18
- <th>Java</th>
19
- <th>Others</th>
20
- </tr>
21
- <tr>
22
- <td align="center">1</td>
23
- <td align="center">:fire:<a href="https://github.com/devsapp/start-express">Express</a></td>
24
- <td align="center">:fire::fire:<a href="https://github.com/devsapp/start-flask">Flask</a></td>
25
- <td align="center"><a href="https://github.com/devsapp/start-thinkphp">Think PHP</a></td>
26
- <td align="center">BeeGo</td>
27
- <td align="center">Tomcat/Jetty</td>
28
- <td align="center">Gatsby</td>
29
- </tr>
30
- <tr>
31
- <td align="center">2</td>
32
- <td align="center"><a href="https://github.com/devsapp/start-egg">Egg</a></td>
33
- <td align="center"><a href="https://github.com/devsapp/start-tornado">Tornado</a></td>
34
- <td align="center"><a href="https://github.com/devsapp/start-laravel">laravel</a></td>
35
- <td align="center">Gin</td>
36
- <td align="center"><a href="https://github.com/devsapp/start-springboot">Spring Boot</a></td><td>Hugo</td>
37
- </tr>
38
- <tr>
39
- <td align="center">3</td>
40
- <td align="center"><a href="https://github.com/devsapp/start-next">Nextjs</a></td>
41
- <td align="center"><a href="https://github.com/devsapp/start-bottle">Bottle</a></td>
42
- <td align="center"><a href="https://github.com/devsapp/start-discuz">Discuz</a></td><td></td><td align="center">Quarkus</td>
43
- <td align="center"></td>
44
- </tr>
45
- <tr>
46
- <td align="center">4</td>
47
- <td align="center"><a href="https://github.com/devsapp/start-nuxt">Nuxtjs(Container)</a><br><a href="https://github.com/devsapp/custom-nuxt">Nuxtjs(Custom)</a></td>
48
- <td align="center"><a href="https://github.com/devsapp/start-webpy">Web.py</a></td>
49
- <td align="center"> :fire::fire::fire: <a href="https://github.com/devsapp/start-wordpress" >WordPress</a></td><td></td><td></td>
50
- <td align="center"></td>
51
- </tr>
52
- <tr>
53
- <td align="center">5</td>
54
- <td align="center"> :fire::fire::fire: <a href="https://github.com/devsapp/start-hexo" >Hexo</a></td>
55
- <td align="center"><a href="https://github.com/devsapp/start-django" >Django</a></td>
56
- <td align="center"> :fire::fire::fire: <a href="https://github.com/devsapp/start-zblog" >Zblog</a></td><td></td><td></td>
57
- <td align="center"></td>
58
- </tr>
59
- <tr>
60
- <td align="center">6</td>
61
- <td align="center"><a href="https://github.com/devsapp/start-koa">Koa(Container)</a><br><a href="https://github.com/devsapp/nodejs-koa">Koa(Node.js Runtime)</a></td>
62
- <td align="center">FastAPI</td>
63
- <td align="center"><a href="https://github.com/devsapp/start-ecshop" >Ecshop</a></td><td></td><td></td><td></td>
64
- </tr>
65
- <tr>
66
- <td align="center">7</td>
67
- <td align="center"><a href="https://github.com/devsapp/start-hapi" >Hapi</a></td>
68
- <td align="center">Web2py</td>
69
- <td align="center"><a href="https://github.com/devsapp/start-metinfo" >Metinfo</a></td>
70
- <td></td><td></td><td></td>
71
- </tr>
72
- <tr>
73
- <td align="center">8</td>
74
- <td align="center"><a href="https://github.com/devsapp/start-expresscart">Expresscart</a></td>
75
- <td align="center"><a href="https://github.com/devsapp/start-pyramid" >Pyramid</a></td>
76
- <td align="center"><a href="https://github.com/devsapp/start-whatsns" >Whatsns</a></td><td></td><td></td><td></td>
77
- </tr>
78
- <tr>
79
- <td align="center">9</td>
80
- <td align="center"></td>
81
- <td align="center"></td>
82
- <td align="center"><a href="https://github.com/devsapp/start-typecho" >Typecho</a></td><td></td><td></td><td></td>
83
- </tr>
84
- </table>
85
-
86
- ## 静态网站应用案例
87
-
88
- 静态网站案例:https://github.com/devsapp/website-example
89
- - 普通静态资源应用: `s init devsapp/website-example:website-base`
90
- - react应用 `s init devsapp/website-example:website-react`
91
- - vue应用 `s init devsapp/website-example:website-vue`
92
- - hexo应用 `s init devsapp/website-example:website-hexo`
93
- - docusaurus应用 `s init devsapp/website-example:website-docusaurus`
94
- - vuepress应用 `s init devsapp/website-example:website-vuepress`
95
-
96
- ## 开源框架应用案例
97
- - Midway FaaS:https://github.com/devsapp/midway-hook-example
98
- - react模板: `s init devsapp/midway-hook-example:midway-hook-react`
99
- - vue模板 `s init devsapp/midway-hook-example:midway-hook-vue`
100
- - Malagu:https://github.com/devsapp/start-s-malagu
101
-
102
- ## 场景合集
103
-
104
- ### Blog集合
105
- - Zblog: https://github.com/devsapp/start-zblog `s init devsapp/start-zblog`
106
- - Wordpress: https://github.com/devsapp/start-wordpress `s init devsapp/start-wordpress`
107
- - Hexo: https://github.com/devsapp/start-hexo `s init devsapp/start-hexo`
108
- - Vuepress: https://github.com/devsapp/website-example `s init devsapp/website-example:website-vuepress`
109
- - Django Blog: https://github.com/devsapp/django-blog `s init devsapp/django-zblog`
110
- - Typecho: https://github.com/devsapp/start-typecho `s init devsapp/start-typecho`
111
-
112
- ### 企业官网
113
- - Metinfo: https://github.com/devsapp/start-metinfo `s init devsapp/start-metinfo`
114
-
115
- ### 社区问答
116
- - Whatsns: https://github.com/devsapp/start-whatsns `s init devsapp/start-whatsns`
117
- - Discuz: https://github.com/devsapp/start-discuz `s init devsapp/start-discuz`
118
-
119
- ### 电子商务
120
- - Echsop: https://github.com/devsapp/start-ecshop `s init devsapp/start-ecshop`
121
- - Expresscart: https://github.com/devsapp/start-expresscart `s init devsapp/start-expresscart`
122
-
123
- ### 其他
124
- - 该项目模板是一个基于 puppeteer 的截图 Web 应用:
125
- - https://github.com/devsapp/puppeteer-app `s init devsapp/puppeteer-app`
126
- - https://github.com/devsapp/start-puppeteer `s init devsapp/start-puppeteer`
127
- - 一款基于人工智能的目标检测应用: https://github.com/devsapp/image-prediction-app `s init devsapp/image-prediction-app`
128
- - 一款基于Node.JS的网页TodoList应用: https://github.com/devsapp/todolist-app `s init devsapp/todolist-app`
129
- - 基于函数计算 FC + FFmpeg 实现 Serverless 架构的弹性高可用的高度自定义音视频处理主题: https://github.com/devsapp/ffmpeg-app `s init devsapp/ffmpeg-app`
130
- - 对直播视频流截图的应用: https://github.com/devsapp/start-rtmp-snapshot `s init start-rtmp-snapshot`
131
- - 一个对浏览器全景录制: https://github.com/devsapp/start-headless-ffmpeg `s init start-headless-ffmpeg`
132
- - 一个word转pdf的应用: https://github.com/devsapp/start-word2pdf `s init start-word2pdf`
133
- - 一个pdf转图片的应用: https://github.com/devsapp/start-pdf2img `s init start-pdf2img`
134
- - 在Serverless架构玩转pyTorch: https://github.com/devsapp/start-pytorch `s init start-pytorch`
135
- - 在Serverless架构玩转Tensorflow: https://github.com/devsapp/start-tensorflow `s init start-tensorflow`
136
- - Serverless架构的OCR工具: https://github.com/devsapp/start-ocr `s init start-ocr`
137
-
138
-
139
- ## 静态网站应用案例
140
-
141
- 静态网站案例:https://github.com/devsapp/website-example
142
- - 普通静态资源应用: `s init devsapp/website-example:website-base`
143
- - react应用 `s init devsapp/website-example:website-react`
144
- - vue应用 `s init devsapp/website-example:website-vue`
145
- - hexo应用 `s init devsapp/website-example:website-hexo`
146
- - docusaurus应用 `s init devsapp/website-example:website-docusaurus`
147
- - vuepress应用 `s init devsapp/website-example:website-vuepress`
148
-
149
- ## Alinode
150
- 可观测性:
151
- - Insight: https://github.com/devsapp/alinode-faas-insight
152
- - Runtime Http: https://github.com/devsapp/alinode-runtime-http
153
- - FaaS Logs: https://github.com/devsapp/alinode-faas-sls-log
154
- - Runtime Deploy: https://github.com/devsapp/alinode-runtime-deploy
155
-
156
- ## 开源框架应用案例
157
- - Midway FaaS:https://github.com/devsapp/midway-hook-example
158
- - react模板: `s init devsapp/midway-hook-example:midway-hook-react`
159
- - vue模板 `s init devsapp/midway-hook-example:midway-hook-vue`
160
- - Malagu:https://github.com/devsapp/start-s-malagu
161
-
162
- ## 场景合集
163
-
164
- ### Blog集合
165
- - Zblog: https://github.com/devsapp/start-zblog `s init devsapp/start-zblog`
166
- - Wordpress: https://github.com/devsapp/start-wordpress `s init devsapp/start-wordpress`
167
- - Hexo: https://github.com/devsapp/start-hexo `s init devsapp/start-hexo`
168
- - Vuepress: https://github.com/devsapp/website-example `s init devsapp/website-example:website-vuepress`
169
- - Django Blog: https://github.com/devsapp/django-blog `s init devsapp/django-zblog`
170
- - Typecho: https://github.com/devsapp/start-typecho `s init devsapp/start-typecho`
171
-
172
- ### 企业官网
173
- - Metinfo: https://github.com/devsapp/start-metinfo `s init devsapp/start-metinfo`
174
-
175
- ### 社区问答
176
- - Whatsns: https://github.com/devsapp/start-whatsns `s init devsapp/start-whatsns`
177
- - Discuz: https://github.com/devsapp/start-discuz `s init devsapp/start-discuz`
178
-
179
- ### 电子商务
180
- - Echsop: https://github.com/devsapp/start-ecshop `s init devsapp/start-ecshop`
181
- - Expresscart: https://github.com/devsapp/start-expresscart `s init devsapp/start-expresscart`
182
-
183
- ### 其他
184
- - 该项目模板是一个基于 puppeteer 的截图 Web 应用:
185
- - https://github.com/devsapp/puppeteer-app `s init devsapp/puppeteer-app`
186
- - https://github.com/devsapp/start-puppeteer `s init devsapp/start-puppeteer`
187
- - 一款基于人工智能的目标检测应用: https://github.com/devsapp/image-prediction-app `s init devsapp/image-prediction-app`
188
- - 一款基于Node.JS的网页TodoList应用: https://github.com/devsapp/todolist-app `s init devsapp/todolist-app`
189
- - 基于函数计算 FC + FFmpeg 实现 Serverless 架构的弹性高可用的高度自定义音视频处理主题: https://github.com/devsapp/ffmpeg-app `s init devsapp/ffmpeg-app`
190
- - 对直播视频流截图的应用: https://github.com/devsapp/start-rtmp-snapshot `s init start-rtmp-snapshot`
191
- - 一个对浏览器全景录制: https://github.com/devsapp/start-headless-ffmpeg `s init start-headless-ffmpeg`
192
- - 一个word转pdf的应用: https://github.com/devsapp/start-word2pdf `s init start-word2pdf`
193
- - 一个pdf转图片的应用: https://github.com/devsapp/start-pdf2img `s init start-pdf2img`
194
- - 在Serverless架构玩转pyTorch: https://github.com/devsapp/start-pytorch `s init start-pytorch`
195
- - 在Serverless架构玩转Tensorflow: https://github.com/devsapp/start-tensorflow `s init start-tensorflow`
196
- - Serverless架构的OCR工具: https://github.com/devsapp/start-ocr `s init start-ocr`
197
-
198
-
199
- # 组件集合
200
-
201
- ## 基础组件
202
-
203
- - 阿里云
204
- - 函数计算(FC):
205
- - Yaml描述:https://github.com/devsapp/fc
206
- - 命令行交互:https://github.com/devsapp/fc-api (可以在无Yaml模式下直接进行使用)
207
- - Serverless工作流(FNF):https://github.com/devsapp/fnf
208
- - 腾讯云
209
- - 云函数(SCF):https://github.com/devscomp/scf
210
- - AWS
211
- - Lambda:https://github.com/devscomp/lambda
212
- - 百度云
213
- - 函数计算(CFC):https://github.com/xinwuyun/cfc
214
- - 华为云
215
- - 函数工作流(FG):https://github.com/xinwuyun/fg
216
-
217
-
218
-
219
-
220
- ## 上层组件
221
-
222
- <table>
223
- <tr>
224
- <th>No.</th>
225
- <th>:fire:Nodejs</th>
226
- <th>Python</th>
227
- <th>PHP</th>
228
- <th>Go</th>
229
- <th>Java</th>
230
- <th>Others</th>
231
- </tr>
232
- <tr>
233
- <td align="center">1</td>
234
- <td align="center">:fire:<a href="https://github.com/devsapp/express">Express</a></td>
235
- <td align="center">:fire::fire:<a href="https://github.com/devsapp/flask">Flask</a></td>
236
- <td align="center"><a href="https://github.com/devsapp/thinkphp">Think PHP</a></td>
237
- <td align="center">BeeGo</td>
238
- <td align="center">Tomcat/Jetty</td>
239
- <td align="center">Gatsby</td>
240
- </tr>
241
- <tr>
242
- <td align="center">2</td>
243
- <td align="center"><a href="https://github.com/devsapp/egg">Egg</a></td>
244
- <td align="center"><a href="https://github.com/devsapp/tornado">Tornado</a></td>
245
- <td align="center"><a href="https://github.com/devsapp/laravel">laravel</a></td>
246
- <td align="center">Gin</td>
247
- <td align="center">Spring Boot</td>
248
- <td align="center">Hugo</td>
249
- </tr>
250
- <tr>
251
- <td align="center">3</td>
252
- <td align="center"><a href="https://github.com/devsapp/next">Nextjs</a></td>
253
- <td align="center"><a href="https://github.com/devsapp/bottle">Bottle</a></td>
254
- <td align="center"><a href="https://github.com/devsapp/discuz">Discuz</a></td><td></td><td align="center">Quarkus</td>
255
- <td align="center">:fire::fire:<a href="https://github.com/devsapp/midway-hook">Midway FaaS</a></td>
256
- </tr>
257
- <tr>
258
- <td align="center">4</td>
259
- <td align="center"><a href="https://github.com/devsapp/nuxt">Nuxtjs</a></td>
260
- <td align="center"><a href="https://github.com/devsapp/webpy">Web.py</a></td>
261
- <td align="center"> :fire::fire::fire: <a href="https://github.com/devsapp/wordpress" >WordPress</a></td><td></td><td></td>
262
- <td align="center">:fire:<a href="https://github.com/devsapp/s-malagu">Malagu</a></td>
263
- </tr>
264
- <tr>
265
- <td align="center">5</td>
266
- <td align="center"> :fire::fire::fire: <a href="https://github.com/devsapp/hexo" >Hexo</a></td>
267
- <td align="center"><a href="https://github.com/devsapp/django" >Django</a></td>
268
- <td align="center"> :fire::fire::fire: <a href="https://github.com/devsapp/zblog" >Zblog</a></td><td></td><td></td>
269
- <td align="center">:fire::fire::fire:<a href="https://github.com/devsapp/website">Website</a></td>
270
- </tr>
271
- <tr>
272
- <td align="center">6</td>
273
- <td align="center"><a href="https://github.com/devsapp/koa" >Koa</a></td>
274
- <td align="center">FastAPI</td>
275
- <td align="center"><a href="https://github.com/devsapp/ecshop" >Ecshop</a></td><td></td><td></td><td></td>
276
- </tr>
277
- <tr>
278
- <td align="center">7</td>
279
- <td align="center"><a href="https://github.com/devsapp/hapi" >Hapi</a></td>
280
- <td align="center">Web2py</td>
281
- <td align="center"><a href="https://github.com/devsapp/metinfo" >Metinfo</a></td>
282
- <td></td><td></td><td></td>
283
- </tr>
284
- <tr>
285
- <td align="center">8</td>
286
- <td align="center"></td>
287
- <td align="center"><a href="https://github.com/devsapp/pyramid" >Pyramid</a></td>
288
- <td align="center"><a href="https://github.com/devsapp/whatsns" >Whatsns</a></td><td></td><td></td><td></td>
289
- </tr>
290
- <tr>
291
- <td align="center">9</td>
292
- <td align="center"></td>
293
- <td align="center"></td>
294
- <td align="center"><a href="https://github.com/devsapp/typecho" >Typecho</a></td><td></td><td></td><td></td>
295
- </tr>
296
- </table>
20
+ > 如果您有相关的案例,欢迎您提PR到本文件。
package/docs/zh/cicd.md CHANGED
@@ -3,6 +3,7 @@
3
3
  - [与 Github Action 的集成](#与-github-action-的集成)
4
4
  - [与 Gitee Go 的集成](#与-gitee-go-的集成)
5
5
  - [与 Jenkins 的集成](#与-jenkins-的集成)
6
+ - [与云效的集成](#与云效的集成)
6
7
  - [注意事项](#注意事项)
7
8
 
8
9
  ## 与 Github Action 的集成
@@ -188,6 +189,36 @@ jenkins-alicloud-access-key-secret : 阿里云 accessKeySecret
188
189
  > 关于密钥配置的部分注意内容,可以参考文末的[注意事项](#注意事项)
189
190
 
190
191
 
192
+ ## 与云效的集成
193
+
194
+ 在云效中,可以直接选择Serverless Devs开发者工具,并在自定义命令中,输入以下内容即可:
195
+
196
+ ```
197
+ # input your command here
198
+ npm install -g @serverless-devs/s
199
+ s config add --AccountID ${ACCOUNTID} --AccessKeyID ${ACCESSKEYID} --AccessKeySecret ${ACCESSKEYSECRET} -a default
200
+ s deploy
201
+ ```
202
+
203
+ 这里主要包括三个部分:
204
+
205
+ - `npm install -g @serverless-devs/s`:
206
+ 通过NPM安装最新版本的 Serverless Devs 开发者工具(虽然云效中已经拥有了相关版本的Serverless Devs,但是实际上,这个版本可能比较老旧,所以可以通过该命令安装最新版本);
207
+ - `s config add --AccountID ${ACCOUNTID} --AccessKeyID ${ACCESSKEYID} --AccessKeySecret ${ACCESSKEYSECRET} -a default`
208
+ 通过`config`命令进行密钥等信息的配置;
209
+ - `s deploy`
210
+ 执行某些命令,例如通过`deploy`进行项目的部署,或者`build`等命令进行构建等;
211
+
212
+ 效果如下:
213
+
214
+ ![image](https://user-images.githubusercontent.com/21079031/144697943-2ce9ea56-7af8-4c3b-945b-6897e6d744b5.png)
215
+
216
+ 由于在命令中,引用了三个重要的环境变量:`ACCOUNTID`, `ACCESSKEYID`, `ACCESSKEYSECRET`,所以还需要在环境变量中,增加类似的内容:
217
+
218
+ ![image](https://user-images.githubusercontent.com/21079031/144699074-3dad63d7-835f-4eb8-bd95-662de683dbbc.png)
219
+
220
+
221
+
191
222
  ## 注意事项
192
223
 
193
224
  - 在配置密钥的时候,使用了`s config add`命令,此时在最后有一个参数是`-a default`,代表的是给该密钥一个叫`default`的别名,这个别名要和项目所设定的使用密钥保持一致,例如在`s.yaml`中的`access`字段;
package/docs/zh/yaml.md CHANGED
@@ -16,7 +16,11 @@
16
16
  - 拓展名可以是`.yaml`或`.yml`
17
17
  - 格式必须符合[Yaml规范](https://yaml.org/spec/1.2.2/)
18
18
 
19
- 在默认情况下,Serverless Devs 开发者工具会默认该描述文件的名称为`s.yaml`或`s.yml`,且`s.yaml`的优先级大于`s.yml`,即在一个Serverless应用下,同时出现`s.yaml`与`s.yml`时,系统会优先识别和使用`s.yaml`。当然,开发者也可以通过`-t, --template [templatePath]`进行指定,例如,在某应用下,资源/行为描述文件名为`test.yml`,则可以在执行相关命令时,增加参数`-t test.yml`或者`--template test.yml`
19
+ 对于需要通过描述文件进行环境隔离的项目,建议将文件命名为 `s-${ENV}.yaml` 或 `s-${ENV}.yml` 格式。 例如:`s-prod.yaml`。
20
+
21
+ 在默认情况下,Serverless Devs 开发者工具会默认该描述文件的名称为`s.yaml`或`s.yml`,且`s.yaml`的优先级大于`s.yml`, 即在一个 Serverless 应用下,同时出现`s.yaml`与`s.yml`时,系统会优先识别和使用`s.yaml`。
22
+
23
+ 当然,开发者也可以通过`-t, --template [templatePath]`进行指定,例如,在某应用在生产环境下的描述文件名为`s-prod.yml`,则可以在执行相关命令时,增加参数`-t s-prod.yml`或者`--template s-prod.yml`。
20
24
 
21
25
  ## 描述文件格式/规范
22
26
 
@@ -42,7 +42,7 @@ function print() { __p += __j.call(arguments, '') }
42
42
  `)),console.log((0,No.bgRed)("ERROR:")+`
43
43
  `+s+`
44
44
  `),f!=="disable"&&console.log(on.gray("Please copy traceId: "+this.traceId+" and join Dingding group: 33947367 for consultation.")),console.log(on.gray("You can run 's clean --cache' to prune Serverless devs.")),console.log(on.gray(`And run again with the '--debug' option or 's -h' to get more logs.
45
- `))}return i.prototype.report=function(r){return pw(this,void 0,void 0,function(){return dw(this,function(s){return mw({type:"jsError",content:r.message+"||"+r.stack,traceId:this.traceId}),[2]})})},i}();te.HandleError=bw});var ih=T((oA,Cw)=>{Cw.exports={name:"@serverless-devs/s",version:"2.0.95-beta.1",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"npx jest",prebuild:"rm -rf lib",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@types/jest":"^27.0.1","@types/lodash":"^4.14.168","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1","babel-eslint":"^10.1.0",boxen:"^5.0.0",commander:"^6.0.0",dotenv:"^10.0.0",esbuild:"^0.13.6",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"^8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.1.0","latest-version":"^5.1.0","lint-staged":"^10.0.8",lodash:"^4.17.20","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.0.1","ts-node":"^9.1.1","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},jest:{coverageDirectory:"coverage",testEnvironment:"node",coverageProvider:"v8",preset:"ts-jest",testMatch:["**/test/**/*test.[jt]s"],setupFilesAfterEnv:["./jest.setup.ts"]},dependencies:{"@serverless-devs/core":"^0.1.15-beta.2"}}});var Ar=T(G=>{"use strict";var Tw=G&&G.__createBinding||(Object.create?function(i,r,s,u){u===void 0&&(u=s),Object.defineProperty(i,u,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,u){u===void 0&&(u=s),i[u]=r[s]}),Lw=G&&G.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),$w=G&&G.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&Tw(r,i,s);return Lw(r,i),r},sh=G&&G.__awaiter||function(i,r,s,u){function l(f){return f instanceof s?f:new s(function(_){_(f)})}return new(s||(s=Promise))(function(f,_){function y(S){try{d(u.next(S))}catch(b){_(b)}}function w(S){try{d(u.throw(S))}catch(b){_(b)}}function d(S){S.done?f(S.value):l(S.value).then(y,w)}d((u=u.apply(i,r||[])).next())})},oh=G&&G.__generator||function(i,r){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,l,f,_;return _={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function y(d){return function(S){return w([d,S])}}function w(d){if(u)throw new TypeError("Generator is already executing.");for(;s;)try{if(u=1,l&&(f=d[0]&2?l.return:d[0]?l.throw||((f=l.return)&&f.call(l),0):l.next)&&!(f=f.call(l,d[1])).done)return f;switch(l=0,f&&(d=[d[0]&2,f.value]),d[0]){case 0:case 1:f=d;break;case 4:return s.label++,{value:d[1],done:!1};case 5:s.label++,l=d[1],d=[0];continue;case 7:d=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(d[0]===6||d[0]===2)){s=0;continue}if(d[0]===3&&(!f||d[1]>f[0]&&d[1]<f[3])){s.label=d[1];break}if(d[0]===6&&s.label<f[1]){s.label=f[1],f=d;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(d);break}f[2]&&s.ops.pop(),s.trys.pop();continue}d=r.call(i,s)}catch(S){d=[6,S],l=0}finally{u=f=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},Hi=G&&G.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(G,"__esModule",{value:!0});G.emoji=G.mark=G.replaceTemplate=G.getTemplatekey=G.replaceFun=G.getLang=G.printn=G.checkTemplateFile=G.checkAndReturnTemplateFile=G.yamlLoad=G.getFolderSize=G.getVersion=G.bgRed=G.red=void 0;var de=Hi(require("path")),Me=Hi(require("fs")),Fo=Hi(Pc()),Dw=Hi(require("os")),Nw=rh(),Wi=$w(lt()),Mo=Wi.default.colors,qw=Wi.default.jsyaml,Gi=ih();G.red=Mo.hex("#fd5750");G.bgRed=Mo.hex("#000").bgHex("#fd5750");function Pw(){return(0,Wi.getCoreVersion)()?Gi.name+": "+Gi.version+", @serverless-devs/core: "+(0,Wi.getCoreVersion)()+", "+process.platform+"-"+process.arch+", node-"+process.version:Gi.name+": "+Gi.version+", "+process.platform+"-"+process.arch+", node-"+process.version}G.getVersion=Pw;function Fw(i){return sh(this,void 0,void 0,function(){function r(l){return sh(this,void 0,void 0,function(){var f,_;return oh(this,function(y){switch(y.label){case 0:return f=Me.default.lstatSync(l),typeof f!="object"?[2]:(s.set(f.ino,f.size),f.isDirectory()?(_=Me.default.readdirSync(l),typeof _!="object"?[2]:[4,Promise.all(_.map(function(w){return r(de.default.join(l,w))}))]):[3,2]);case 1:y.sent(),y.label=2;case 2:return[2]}})})}var s,u;return oh(this,function(l){switch(l.label){case 0:return s=new Map,[4,r(i)];case 1:return l.sent(),u=Array.from(s.values()).reduce(function(f,_){return f+_},0),[2,u]}})})}G.getFolderSize=Fw;function uh(i){var r=Me.default.readFileSync(i,"utf8");try{return qw.load(r)}catch{if(["-h","--help"].includes(process.argv[2]))return;var s=de.default.basename(i);new Nw.HumanError({errorMessage:s+" format is incorrect",tips:"Please check the configuration of "+s+", Serverless Devs' Yaml specification document can refer to\uFF1A"+Mo.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/yaml.md")}),process.exit(1)}}G.yamlLoad=uh;function Or(i,r){r===void 0&&(r=!1);var s=Me.default.readFileSync(i,"utf8"),u=r?JSON.parse(s):uh(i);if(!u)return!1;for(var l in u)if(u[l].Component&&u[l].Provider&&u[l].Properties)return!0;return u.hasOwnProperty("edition")}function ah(){if(process.env.serverless_devs_temp_template)return process.env.serverless_devs_temp_template;var i=process.cwd(),r=process.argv.includes("-t")?"-t":process.argv.includes("--template")?"--template":null,s=r?process.argv.indexOf(r):-1;if(s!==-1){var u=s+1,l=process.argv[u];if(l&&(l.endsWith(".yaml")||l.endsWith(".yml")||l.endsWith(".json"))){var f=!!l.endsWith(".json");if(Me.default.existsSync(de.default.join(i,l))&&Or(de.default.join(i,l),f)){process.argv.splice(s,2);var _=JSON.parse(process.env.serverless_devs_temp_argv);return _.splice(_.indexOf(r),2),process.env.serverless_devs_temp_argv=JSON.stringify(_),process.env.serverless_devs_temp_template=de.default.join(i,l),de.default.join(i,l)}else if(Me.default.existsSync(l)&&Or(l,f)){process.argv.splice(s,2);var _=JSON.parse(process.env.serverless_devs_temp_argv);return _.splice(_.indexOf(r),2),process.env.serverless_devs_temp_argv=JSON.stringify(_),process.env.serverless_devs_temp_template=l,l}}}return Me.default.existsSync(de.default.join(i,"s.yaml"))&&Or(de.default.join(i,"s.yaml"))?(process.env.serverless_devs_temp_template=de.default.join(i,"s.yaml"),de.default.join(i,"s.yaml")):Me.default.existsSync(de.default.join(i,"s.yml"))&&Or(de.default.join(i,"s.yml"))?(process.env.serverless_devs_temp_template=de.default.join(i,"s.yml"),de.default.join(i,"s.yml")):Me.default.existsSync(de.default.join(i,"s.json"))&&Or(de.default.join(i,"s.json"),!0)?(process.env.serverless_devs_temp_template=de.default.join(i,"s.json"),de.default.join(i,"s.json")):null}G.checkAndReturnTemplateFile=ah;function lh(i){return Me.default.existsSync(i)?i:null}G.checkTemplateFile=lh;function fh(i,r){r===void 0&&(r=" ");for(var s="",u=0;u<i;u++)s=s+r;return s}G.printn=fh;function ch(){return"en"}G.getLang=ch;function Ho(i,r){var s=/\{\{(.*?)\}\}/g,u=i.match(s);if(u)for(var l=0;l<u.length;l++){var f=u[l].replace(/{{|}}/g,""),_=Fo.default.trim(f.split("|")[0]);r[_]&&(i=i.replace(u[l],r[_]))}return i}G.replaceFun=Ho;function hh(i){var r=/\{\{(.*?)\}\}/g,s=i.match(r);return s?s.filter(function(u){return u}).map(function(u){var l=u.replace(/{{|}}/g,""),f=l.split("|");return{name:Fo.default.trim(f[0]),desc:Fo.default.trim(f[1])}}):[]}G.getTemplatekey=hh;function ph(i,r){i.forEach(function(s){if(Me.default.existsSync(s)){var u=Me.default.readFileSync(s,"utf-8"),l=Ho(u,r);Me.default.writeFileSync(s,l,"utf-8")}})}G.replaceTemplate=ph;function dh(i){if(!i)return i;var r=i.slice(-4);return"***********"+r}G.mark=dh;function Mw(i){return Dw.default.platform()==="win32"?"":i}G.emoji=Mw;G.default={checkAndReturnTemplateFile:ah,checkTemplateFile:lh,printn:fh,mark:dh,getLang:ch,replaceTemplate:ph,replaceFun:Ho,getTemplatekey:hh}});var gh=T(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var _h=T(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.default={clean_up_the_environment:"Clean up the environment",display_help_for_command:"Display help for command",remove_components:"Remove component (like: fc, fc@0.0.1)",delete_the_file_under_the_cache:"Delete the <dirname> file in the cache",record_your_log_information:"Do you record your log information?",init_pproject_deploy_tip:"Do you want to deploy the project immediately?",tip_for_a_serverless_project:"A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'",create_a_new_project:"No Serverless-Devs project is currently detected. Do you want to create a new project?",en:"English (en)",zh:"Chinese (zh)",select_current_language:"Please select current language","app-tip":"Hello, serverlesser. Which template do you like?","template-tip":"Which template do you like?","fc-runtime-starter":"fc-runtime-starter - Deploy FC function in 5 minutes","fc-custom-container-stater":"fc-custom-container-stater - Deploy FC function with custom-container",web:"web-framework-stater-Quickly deploy a web framework","static-site":"static-website-stater-Quickly deploy a static website","best-practice":"serverless-best-practice-Quickly experience serverless best practices","devs-template":"Serverless Develop scaffold","fc-http-nodejs":"fc-http-nodejs - Deploy FC nodejs12 runtime function","fc-http-python":"fc-http-python - Deploy FC python3 runtime function","fc-http-java":"fc-http-java - Deploy FC java8 runtime function","fc-custom-container-event-python3":"fc-custom-container-event-python3 - Deploy python3 event-triggered application","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - Deploy cpp event-triggered application","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - Deploy springboot HTTP Request-triggered application","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - Deploy dotnetcore HTTP Request-triggered application","express-starter":"express-starter - Deploy express application","koa-starter":"koa-starter - Deploy koa application","nuxtjs-starter":"nuxtjs-starter - Deploy nuxtjs application","eggjs-starter":"eggjs-starter - Deploy eggjs application","flask-starter":"flask-starter - Deploy flask application","SpringBoot-starter":"SpringBoot-starter - Deploy SpringBoot application","Zblog-starter":"Zblog-starter - Deploy Zblog application","website-starter":"website-starter - Deploy static website","react-starter":"react-starter - Deploy React.js application","vue-starter":"vue-starter - Deploy Vue.js application",puppeteer:"puppeteer - Deploy screenshot application base on puppeteer + fc",ffmpeg:"ffmpeg - Deploy audio and video processing application base on ffmpeg + fc",pdf2Img:"pdf2Img - Deploy pdf to images application",tensorflow:"tensorflow - Deploy tensorflow application",todoList:"todoList - Deploy todoList application"}});var vh=T(Sr=>{"use strict";var mh=Sr&&Sr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Sr,"__esModule",{value:!0});var Hw=Ar(),Ww=mh(gh()),Gw=mh(_h()),Uo={en:Gw.default,zh:Ww.default},Uw=function(i){var r=(0,Hw.getLang)(),s=Uo[r]?Uo[r][i]:Uo.en[i];return s||i};Sr.default=Uw});var Eh=T(Rr=>{"use strict";var Bw=Rr&&Rr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Rr,"__esModule",{value:!0});var yh=Bw(lt()),jw=yh.default.Logger,Xw=yh.default.spinner,un=new jw("S-CLI"),zw=function(){function i(){}return i.log=function(r){un.log(r)},i.info=function(r){un.info(r)},i.debug=function(r){un.debug(r)},i.error=function(r){un.error(r)},i.warning=function(r){un.warn(r)},i.success=function(r){un.log(r,"green")},i.spinner=function(r){return Xw(r)},i.output=function(r){return un.output(r)},i}();Rr.default=zw});"use strict";var Ir=exports&&exports.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});var Vw=Ir($l()),br=Ir(lt()),Ui=Ir(vh()),ht=Ir(require("path")),Fn=Ir(Eh()),Yw=Do(),Kw=Ar(),Mn=br.default.rimraf,Zw=br.default.minimist,Bo=br.default.fse,kw=br.default.colors,Jw=br.default.getRootHome,Qw=`Clean up the cache related functions of serverless devs. You can clean up the environment, unused dependent packages and related cache contents through this command.
45
+ `))}return i.prototype.report=function(r){return pw(this,void 0,void 0,function(){return dw(this,function(s){return mw({type:"jsError",content:r.message+"||"+r.stack,traceId:this.traceId}),[2]})})},i}();te.HandleError=bw});var ih=T((oA,Cw)=>{Cw.exports={name:"@serverless-devs/s",version:"2.0.95",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"npx jest",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@types/jest":"^27.0.1","@types/lodash":"^4.14.168","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1","babel-eslint":"^10.1.0",boxen:"^5.0.0",commander:"^6.0.0",dotenv:"^10.0.0",esbuild:"^0.13.6",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"^8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.1.0","latest-version":"^5.1.0","lint-staged":"^10.0.8",lodash:"^4.17.20","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.0.1","ts-node":"^9.1.1","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},jest:{coverageDirectory:"coverage",testEnvironment:"node",coverageProvider:"v8",preset:"ts-jest",testMatch:["**/test/**/*test.[jt]s"],setupFilesAfterEnv:["./jest.setup.ts"]},dependencies:{"@serverless-devs/core":"latest"}}});var Ar=T(G=>{"use strict";var Tw=G&&G.__createBinding||(Object.create?function(i,r,s,u){u===void 0&&(u=s),Object.defineProperty(i,u,{enumerable:!0,get:function(){return r[s]}})}:function(i,r,s,u){u===void 0&&(u=s),i[u]=r[s]}),Lw=G&&G.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),$w=G&&G.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&Tw(r,i,s);return Lw(r,i),r},sh=G&&G.__awaiter||function(i,r,s,u){function l(f){return f instanceof s?f:new s(function(_){_(f)})}return new(s||(s=Promise))(function(f,_){function y(S){try{d(u.next(S))}catch(b){_(b)}}function w(S){try{d(u.throw(S))}catch(b){_(b)}}function d(S){S.done?f(S.value):l(S.value).then(y,w)}d((u=u.apply(i,r||[])).next())})},oh=G&&G.__generator||function(i,r){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,l,f,_;return _={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function y(d){return function(S){return w([d,S])}}function w(d){if(u)throw new TypeError("Generator is already executing.");for(;s;)try{if(u=1,l&&(f=d[0]&2?l.return:d[0]?l.throw||((f=l.return)&&f.call(l),0):l.next)&&!(f=f.call(l,d[1])).done)return f;switch(l=0,f&&(d=[d[0]&2,f.value]),d[0]){case 0:case 1:f=d;break;case 4:return s.label++,{value:d[1],done:!1};case 5:s.label++,l=d[1],d=[0];continue;case 7:d=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(d[0]===6||d[0]===2)){s=0;continue}if(d[0]===3&&(!f||d[1]>f[0]&&d[1]<f[3])){s.label=d[1];break}if(d[0]===6&&s.label<f[1]){s.label=f[1],f=d;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(d);break}f[2]&&s.ops.pop(),s.trys.pop();continue}d=r.call(i,s)}catch(S){d=[6,S],l=0}finally{u=f=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},Hi=G&&G.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(G,"__esModule",{value:!0});G.emoji=G.mark=G.replaceTemplate=G.getTemplatekey=G.replaceFun=G.getLang=G.printn=G.checkTemplateFile=G.checkAndReturnTemplateFile=G.yamlLoad=G.getFolderSize=G.getVersion=G.bgRed=G.red=void 0;var de=Hi(require("path")),Me=Hi(require("fs")),Fo=Hi(Pc()),Dw=Hi(require("os")),Nw=rh(),Wi=$w(lt()),Mo=Wi.default.colors,qw=Wi.default.jsyaml,Gi=ih();G.red=Mo.hex("#fd5750");G.bgRed=Mo.hex("#000").bgHex("#fd5750");function Pw(){return(0,Wi.getCoreVersion)()?Gi.name+": "+Gi.version+", @serverless-devs/core: "+(0,Wi.getCoreVersion)()+", "+process.platform+"-"+process.arch+", node-"+process.version:Gi.name+": "+Gi.version+", "+process.platform+"-"+process.arch+", node-"+process.version}G.getVersion=Pw;function Fw(i){return sh(this,void 0,void 0,function(){function r(l){return sh(this,void 0,void 0,function(){var f,_;return oh(this,function(y){switch(y.label){case 0:return f=Me.default.lstatSync(l),typeof f!="object"?[2]:(s.set(f.ino,f.size),f.isDirectory()?(_=Me.default.readdirSync(l),typeof _!="object"?[2]:[4,Promise.all(_.map(function(w){return r(de.default.join(l,w))}))]):[3,2]);case 1:y.sent(),y.label=2;case 2:return[2]}})})}var s,u;return oh(this,function(l){switch(l.label){case 0:return s=new Map,[4,r(i)];case 1:return l.sent(),u=Array.from(s.values()).reduce(function(f,_){return f+_},0),[2,u]}})})}G.getFolderSize=Fw;function uh(i){var r=Me.default.readFileSync(i,"utf8");try{return qw.load(r)}catch{if(["-h","--help"].includes(process.argv[2]))return;var s=de.default.basename(i);new Nw.HumanError({errorMessage:s+" format is incorrect",tips:"Please check the configuration of "+s+", Serverless Devs' Yaml specification document can refer to\uFF1A"+Mo.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/yaml.md")}),process.exit(1)}}G.yamlLoad=uh;function Or(i,r){r===void 0&&(r=!1);var s=Me.default.readFileSync(i,"utf8"),u=r?JSON.parse(s):uh(i);if(!u)return!1;for(var l in u)if(u[l].Component&&u[l].Provider&&u[l].Properties)return!0;return u.hasOwnProperty("edition")}function ah(){if(process.env.serverless_devs_temp_template)return process.env.serverless_devs_temp_template;var i=process.cwd(),r=process.argv.includes("-t")?"-t":process.argv.includes("--template")?"--template":null,s=r?process.argv.indexOf(r):-1;if(s!==-1){var u=s+1,l=process.argv[u];if(l&&(l.endsWith(".yaml")||l.endsWith(".yml")||l.endsWith(".json"))){var f=!!l.endsWith(".json");if(Me.default.existsSync(de.default.join(i,l))&&Or(de.default.join(i,l),f)){process.argv.splice(s,2);var _=JSON.parse(process.env.serverless_devs_temp_argv);return _.splice(_.indexOf(r),2),process.env.serverless_devs_temp_argv=JSON.stringify(_),process.env.serverless_devs_temp_template=de.default.join(i,l),de.default.join(i,l)}else if(Me.default.existsSync(l)&&Or(l,f)){process.argv.splice(s,2);var _=JSON.parse(process.env.serverless_devs_temp_argv);return _.splice(_.indexOf(r),2),process.env.serverless_devs_temp_argv=JSON.stringify(_),process.env.serverless_devs_temp_template=l,l}}}return Me.default.existsSync(de.default.join(i,"s.yaml"))&&Or(de.default.join(i,"s.yaml"))?(process.env.serverless_devs_temp_template=de.default.join(i,"s.yaml"),de.default.join(i,"s.yaml")):Me.default.existsSync(de.default.join(i,"s.yml"))&&Or(de.default.join(i,"s.yml"))?(process.env.serverless_devs_temp_template=de.default.join(i,"s.yml"),de.default.join(i,"s.yml")):Me.default.existsSync(de.default.join(i,"s.json"))&&Or(de.default.join(i,"s.json"),!0)?(process.env.serverless_devs_temp_template=de.default.join(i,"s.json"),de.default.join(i,"s.json")):null}G.checkAndReturnTemplateFile=ah;function lh(i){return Me.default.existsSync(i)?i:null}G.checkTemplateFile=lh;function fh(i,r){r===void 0&&(r=" ");for(var s="",u=0;u<i;u++)s=s+r;return s}G.printn=fh;function ch(){return"en"}G.getLang=ch;function Ho(i,r){var s=/\{\{(.*?)\}\}/g,u=i.match(s);if(u)for(var l=0;l<u.length;l++){var f=u[l].replace(/{{|}}/g,""),_=Fo.default.trim(f.split("|")[0]);r[_]&&(i=i.replace(u[l],r[_]))}return i}G.replaceFun=Ho;function hh(i){var r=/\{\{(.*?)\}\}/g,s=i.match(r);return s?s.filter(function(u){return u}).map(function(u){var l=u.replace(/{{|}}/g,""),f=l.split("|");return{name:Fo.default.trim(f[0]),desc:Fo.default.trim(f[1])}}):[]}G.getTemplatekey=hh;function ph(i,r){i.forEach(function(s){if(Me.default.existsSync(s)){var u=Me.default.readFileSync(s,"utf-8"),l=Ho(u,r);Me.default.writeFileSync(s,l,"utf-8")}})}G.replaceTemplate=ph;function dh(i){if(!i)return i;var r=i.slice(-4);return"***********"+r}G.mark=dh;function Mw(i){return Dw.default.platform()==="win32"?"":i}G.emoji=Mw;G.default={checkAndReturnTemplateFile:ah,checkTemplateFile:lh,printn:fh,mark:dh,getLang:ch,replaceTemplate:ph,replaceFun:Ho,getTemplatekey:hh}});var gh=T(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var _h=T(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.default={clean_up_the_environment:"Clean up the environment",display_help_for_command:"Display help for command",remove_components:"Remove component (like: fc, fc@0.0.1)",delete_the_file_under_the_cache:"Delete the <dirname> file in the cache",record_your_log_information:"Do you record your log information?",init_pproject_deploy_tip:"Do you want to deploy the project immediately?",tip_for_a_serverless_project:"A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'",create_a_new_project:"No Serverless-Devs project is currently detected. Do you want to create a new project?",en:"English (en)",zh:"Chinese (zh)",select_current_language:"Please select current language","app-tip":"Hello, serverlesser. Which template do you like?","template-tip":"Which template do you like?","fc-runtime-starter":"fc-runtime-starter - Deploy FC function in 5 minutes","fc-custom-container-stater":"fc-custom-container-stater - Deploy FC function with custom-container",web:"web-framework-stater-Quickly deploy a web framework","static-site":"static-website-stater-Quickly deploy a static website","best-practice":"serverless-best-practice-Quickly experience serverless best practices","devs-template":"Serverless Develop scaffold","fc-http-nodejs":"fc-http-nodejs - Deploy FC nodejs12 runtime function","fc-http-python":"fc-http-python - Deploy FC python3 runtime function","fc-http-java":"fc-http-java - Deploy FC java8 runtime function","fc-custom-container-event-python3":"fc-custom-container-event-python3 - Deploy python3 event-triggered application","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - Deploy cpp event-triggered application","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - Deploy springboot HTTP Request-triggered application","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - Deploy dotnetcore HTTP Request-triggered application","express-starter":"express-starter - Deploy express application","koa-starter":"koa-starter - Deploy koa application","nuxtjs-starter":"nuxtjs-starter - Deploy nuxtjs application","eggjs-starter":"eggjs-starter - Deploy eggjs application","flask-starter":"flask-starter - Deploy flask application","SpringBoot-starter":"SpringBoot-starter - Deploy SpringBoot application","Zblog-starter":"Zblog-starter - Deploy Zblog application","website-starter":"website-starter - Deploy static website","react-starter":"react-starter - Deploy React.js application","vue-starter":"vue-starter - Deploy Vue.js application",puppeteer:"puppeteer - Deploy screenshot application base on puppeteer + fc",ffmpeg:"ffmpeg - Deploy audio and video processing application base on ffmpeg + fc",pdf2Img:"pdf2Img - Deploy pdf to images application",tensorflow:"tensorflow - Deploy tensorflow application",todoList:"todoList - Deploy todoList application"}});var vh=T(Sr=>{"use strict";var mh=Sr&&Sr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Sr,"__esModule",{value:!0});var Hw=Ar(),Ww=mh(gh()),Gw=mh(_h()),Uo={en:Gw.default,zh:Ww.default},Uw=function(i){var r=(0,Hw.getLang)(),s=Uo[r]?Uo[r][i]:Uo.en[i];return s||i};Sr.default=Uw});var Eh=T(Rr=>{"use strict";var Bw=Rr&&Rr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Rr,"__esModule",{value:!0});var yh=Bw(lt()),jw=yh.default.Logger,Xw=yh.default.spinner,un=new jw("S-CLI"),zw=function(){function i(){}return i.log=function(r){un.log(r)},i.info=function(r){un.info(r)},i.debug=function(r){un.debug(r)},i.error=function(r){un.error(r)},i.warning=function(r){un.warn(r)},i.success=function(r){un.log(r,"green")},i.spinner=function(r){return Xw(r)},i.output=function(r){return un.output(r)},i}();Rr.default=zw});"use strict";var Ir=exports&&exports.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});var Vw=Ir($l()),br=Ir(lt()),Ui=Ir(vh()),ht=Ir(require("path")),Fn=Ir(Eh()),Yw=Do(),Kw=Ar(),Mn=br.default.rimraf,Zw=br.default.minimist,Bo=br.default.fse,kw=br.default.colors,Jw=br.default.getRootHome,Qw=`Clean up the cache related functions of serverless devs. You can clean up the environment, unused dependent packages and related cache contents through this command.
46
46
 
47
47
  Example:
48
48
  $ s clean --component fc-api