zmp-cli 3.15.8 → 3.15.9
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 +97 -37
- package/build/index.js +1 -1
- package/config/index.js +1 -1
- package/create/index.js +1 -1
- package/create/utils/generate-app-config.js +1 -1
- package/create/utils/generate-npm-scripts.js +1 -1
- package/create/utils/get-options.js +1 -1
- package/create/utils/npm-scripts.js +1 -1
- package/deploy/index.js +1 -1
- package/deploy/utils/get-options.js +1 -1
- package/deploy/utils/request-upload.js +1 -1
- package/deploy/utils/upload-app.js +1 -1
- package/index.js +1 -1
- package/login/index.js +1 -1
- package/login/utils/get-options.js +1 -1
- package/login/utils/zalo-login.js +1 -1
- package/migrate/icons/update-icon-v3.js +1 -1
- package/migrate/index.js +1 -1
- package/migrate/utils/get-options.js +1 -1
- package/migrate/utils/migrate-react.js +1 -1
- package/package.json +2 -2
- package/start/index.js +1 -1
- package/sync/index-to-app-config.js +1 -1
- package/sync/index.js +1 -1
- package/utils/axios.js +1 -1
- package/utils/check-update.js +1 -1
- package/utils/constants.js +1 -1
- package/utils/env.js +1 -1
- package/utils/error.js +1 -1
- package/utils/find-files-by-ext.js +1 -1
- package/utils/find-free-port.js +1 -1
- package/utils/fs-extra.js +1 -1
- package/utils/generate-pages-map.js +1 -1
- package/utils/get-app-info.js +1 -1
- package/utils/get-current-project.js +1 -1
- package/utils/get-ip.js +1 -1
- package/utils/log.js +1 -1
- package/utils/node-blob.js +1 -1
- package/utils/resumable.d.js +1 -1
- package/utils/resumable.js +1 -1
- package/utils/spinner.js +1 -1
- package/utils/tunnel.js +1 -1
package/README.md
CHANGED
|
@@ -1,37 +1,97 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
# Zalo Mini App CLI
|
|
2
|
+
|
|
3
|
+
Zalo Mini App CLI là một công cụ dòng lệnh cung cấp các lệnh giúp bạn đăng nhập, kiểm tra và thử nghiệm Zalo Mini App, tương tự như Zalo Mini App Extension. Tuy nhiên, bạn có thể sử dụng Zalo Mini App CLI với bất kỳ IDE hoặc trình soạn thảo văn bản nào, hoặc tích hợp vào các hệ thống CI/CD để tự động hóa các bước trong quá trình phát triển Zalo Mini App.
|
|
4
|
+
|
|
5
|
+
## Cài Đặt
|
|
6
|
+
|
|
7
|
+
Để cài đặt Zalo Mini App CLI, bạn có thể thực hiện các bước sau:
|
|
8
|
+
|
|
9
|
+
1. Mở terminal hoặc command prompt trên máy tính của bạn.
|
|
10
|
+
2. Chạy lệnh:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install -g zmp-cli
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Bạn có thể kiểm tra xem quá trình cài đặt đã thành công hay không bằng cách chạy lệnh `zmp --help`.
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
## Đăng nhập
|
|
21
|
+
|
|
22
|
+
Trong quá trình phát triển Zalo Mini App, bạn sẽ thường xuyên được yêu cầu đăng nhập để xác thực tài khoản nhà phát triển Zalo Mini App. Zalo Mini App CLI cung cấp các cách để bạn đăng nhập và xác thực tài khoản sau:
|
|
23
|
+
|
|
24
|
+
| Hình thức | Mô tả |
|
|
25
|
+
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| QR Code | Một mã QR sẽ xuất hiện trên màn hình của bạn. Bạn cần sử dụng ứng dụng Zalo trên điện thoại để quét mã QR này. Sau khi quét mã QR, bạn cần nhấn vào nút Xác nhận trên ứng dụng Zalo trên điện thoại để hoàn tất quá trình đăng nhập trên Zalo Mini App CLI. |
|
|
27
|
+
| Access Token | Bạn cần cung cấp một access token hợp lệ. Để lấy access token, bạn có thể truy cập trang [Zalo for Developers](https://developers.zalo.me), sau đó chọn `Công cụ` > `API Explorer` và nhấn nút `Lấy Access Token`. Đảm bảo rằng bạn đã chọn đúng ứng dụng Zalo App mà bạn đang phát triển khi lấy access token (ở mục `Chọn ứng dụng`). |
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
## Tạo dự án
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
zmp init
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Để tạo Zalo Mini App, bạn có thể lựa chọn một trong hai cách sau:
|
|
38
|
+
|
|
39
|
+
- **Create a new ZMP project** (Tạo mới): Zalo Mini App CLI sẽ tạo ra cấu trúc thư mục cho dự án mới và cài đặt các dependencies cần thiết vào thư mục hiện hành đang sử dụng (working directory).
|
|
40
|
+
- **Use ZMP to deploy only** (Chuyển đổi ứng dụng Web có sẵn thành Zalo Mini App): Zalo Mini App CLI sẽ bổ sung các file thiết lập cần thiết để bạn có thể đưa dự án có sẵn lên Zalo Mini App. Chi tiết bạn có thể tham khảo bài viết [Hướng dẫn chuyển đổi Web App thành Zalo Mini App trong 30 phút
|
|
41
|
+
](https://mini.zalo.me/blog/huong-dan-chuyen-doi-web-app-thanh-zalo-mini-app-trong-30-phut)
|
|
42
|
+
|
|
43
|
+
### Các tuỳ chọn khi tạo dự án
|
|
44
|
+
|
|
45
|
+
| Thiết lập | Tạo mới | Chuyển đổi ứng dụng có sẵn | Mô tả |
|
|
46
|
+
| -------------------- | ------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
47
|
+
| **Zalo Mini App ID** | ✓ | ✓ | ID của Zalo Mini App mà bạn đã đăng ký. Nếu chưa có, bạn có thể tạo ID cho mini app của mình ở [mini.zalo.me](https://mini.zalo.me/developers). |
|
|
48
|
+
| **Template** | ✓ | | CLI hỗ trợ tạo dự án với hai nhóm template: `Mới` chỉ gồm các thiết lập cơ bản để bạn tự phát triển từ đầu và `Dựng sẵn` cho các Mini App nhanh như quán ăn, cà phê, cửa hàng bán lẻ,… |
|
|
49
|
+
| **Name** | ✓ | ✓ | Tên dự án. |
|
|
50
|
+
| **Folder name** | ✓ | | Với luồng **Tạo mới**, CLI sẽ tạo một thư mục mới với tên này bên trong working directory để chứa mã nguồn của dự án. Với luồng **Chuyển đổi ứng dụng có sẵn**, thiết lập bổ sung sẽ được cập nhật trực tiếp vào working directory. |
|
|
51
|
+
|
|
52
|
+
## Khởi động
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
zmp start
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Để phát triển ứng dụng, bạn có thể sử dụng Zalo Mini App CLI để khởi động dự án trên máy tính. Khi đó, Mini App của bạn sẽ chạy giống như một ứng dụng web và bạn có thể sử dụng bất kỳ trình duyệt nào để xem trước giao diện.
|
|
59
|
+
|
|
60
|
+

|
|
61
|
+
|
|
62
|
+
### Chế độ Device
|
|
63
|
+
|
|
64
|
+
Zalo Mini App CLI cũng hỗ trợ khởi động dự án ở Device mode. Các yêu cầu đối với dự án là như nhau:
|
|
65
|
+
|
|
66
|
+
> - Liên kết với một Zalo Mini App ID hợp lệ.
|
|
67
|
+
> - Sử dụng phiên bản SDK mới nhất.
|
|
68
|
+
> - Sử dụng Vite 2.x cho dự án của bạn. Dự án sử dụng Webpack sẽ không tương thích với chế độ này.
|
|
69
|
+
|
|
70
|
+
Để khởi động dự án ở chế độ Device, bạn chỉ cần thêm flag `-D` vào cuối lệnh `start`:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
zmp start -D
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Một mã QR code sẽ hiển thị và bạn cần sử dụng ứng dụng Zalo trên thiết bị thật để quét mã này.
|
|
77
|
+
|
|
78
|
+
Để sử dụng các công cụ như Elements inspector, Console log, hay Network trong Devtools, bạn cần mở trình duyệt và nhập đường dẫn `http://localhost:<PORT>` được hiển thị trong output sau khi chạy lệnh start. Lưu ý: cần sử dụng trình duyệt Google Chrome hoặc một trình duyệt khác có nhân Chromium để mở đường dẫn trên.
|
|
79
|
+
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+
## Xuất bản
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
zmp deploy
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Lệnh này sẽ giúp bạn xuất bản ứng dụng của mình lên Zalo Mini App, từ đó bạn có thể gửi xét duyệt và cho phép người dùng truy cập và sử dụng ứng dụng của bạn trên Zalo.
|
|
89
|
+
|
|
90
|
+
### Các tuỳ chọn khi xuất bản
|
|
91
|
+
|
|
92
|
+
| Thiết lập | Giá trị mặc định | Mô tả |
|
|
93
|
+
| -------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
94
|
+
| Version status | Development | <ul><li>Development: không hiển thị trên mục Quản lý phiên bản của mini app và sẽ bị ghi đè bởi bản phát triển mới mỗi khi deploy. Điều này tiện lợi khi bạn muốn kiểm tra nhanh trên Zalo khi ứng dụng vẫn đang được phát triển.</li><li>Testing: tất cả các phiên bản kiểm thử đều được đánh số và lưu trữ trên mục Quản lý phiên bản. Bạn có thể gửi phiên bản kiểm thử để xem xét và phát hành phiên bản đã được xem xét để người dùng Zalo có thể sử dụng.</li></ul> |
|
|
95
|
+
| Description | | Mô tả phiên bản |
|
|
96
|
+
|
|
97
|
+

|
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x5210db=_0xd946;function _0xd946(_0x2b2ef5,_0x1d6143){const _0x45df68=_0x45df();return _0xd946=function(_0xd9463f,_0x154fa6){_0xd9463f=_0xd9463f-0x107;let _0x282e40=_0x45df68[_0xd9463f];return _0x282e40;},_0xd946(_0x2b2ef5,_0x1d6143);}(function(_0x14bd57,_0x3ea2d5){const _0x4a9ccf=_0xd946,_0x1e7abc=_0x14bd57();while(!![]){try{const _0x522e7c=-parseInt(_0x4a9ccf(0x122))/0x1*(-parseInt(_0x4a9ccf(0x129))/0x2)+-parseInt(_0x4a9ccf(0x133))/0x3+-parseInt(_0x4a9ccf(0x136))/0x4*(parseInt(_0x4a9ccf(0x121))/0x5)+parseInt(_0x4a9ccf(0x111))/0x6*(parseInt(_0x4a9ccf(0x128))/0x7)+parseInt(_0x4a9ccf(0x11c))/0x8*(parseInt(_0x4a9ccf(0x10e))/0x9)+-parseInt(_0x4a9ccf(0x134))/0xa+parseInt(_0x4a9ccf(0x116))/0xb;if(_0x522e7c===_0x3ea2d5)break;else _0x1e7abc['push'](_0x1e7abc['shift']());}catch(_0x195fa6){_0x1e7abc['push'](_0x1e7abc['shift']());}}}(_0x45df,0x9ede8));const e=require(_0x5210db(0x108)),r=require(_0x5210db(0x10f)),t=require(_0x5210db(0x11f)),i=require('@rollup/plugin-dynamic-import-vars')['default'],o=require(_0x5210db(0x131)),{buildApp:n}=require('zmp-cli-core'),u=require('../utils/fs-extra'),a=require(_0x5210db(0x11b)),l=require('../utils/env'),{errorExit:s}=require(_0x5210db(0x110)),p=require(_0x5210db(0x12f)),g=require(_0x5210db(0x11d)),{existsSync:c}=require('fs'),w=l[_0x5210db(0x10b)]('NODE_ENV')||_0x5210db(0x12a),d=e[_0x5210db(0x10a)]('Building...\x20(Please\x20wait,\x20it\x20can\x20take\x20a\x20while)'),f=e['yellow'](_0x5210db(0x115)),m=r(_0x5210db(0x12a)===w?_0x5210db(0x135):_0x5210db(0x120));function _0x45df(){const _0x9ceacd=['3783516iPjPDS','error','appConfig','writeFileSync','Warning:\x20This\x20CLI\x20version\x20will\x20work\x20better\x20with\x20zmp-framework\x20version\x201.5.0\x20or\x20higher','11227535IAkFJv','cwd','statusError','statusStart','bold','../utils/get-app-info','11752hAxiUq','../utils/generate-pages-map','join','path','Building\x20development\x20version...','1240gBAxDl','40563QwHSkn','statusDone','Build\x20Done!\x0a','appId','latestVersion','filename','7ijHbLb','26OMiwOg','production','www/','green','node_modules','text','../config','env','@rollup/plugin-replace','Error\x20building\x20project','1994088MGRCfN','1296950LAWTwF','Building\x20for\x20production...','17256cdygNr','exports','chalk','zmp-framework','gray','getEnv','stringify','start','2061lRirhv','ora','../utils/error'];_0x45df=function(){return _0x9ceacd;};return _0x45df();}module[_0x5210db(0x107)]=async(_0x325113={},_0x5086dd)=>{const _0x2af529=_0x5210db;let _0x467ff7=_0x325113[_0x2af529(0x117)]||process[_0x2af529(0x117)](),_0x18958e=_0x466539=>t['join'](_0x467ff7,_0x466539),_0xd1a839=_0x325113['appConfigJson']||require(_0x18958e(p[_0x2af529(0x127)][_0x2af529(0x113)]));_0x5086dd||(_0x5086dd={'statusStart'(){},'statusDone'(){},'statusError'(){},'text'(){},'error'(){}}),c(t[_0x2af529(0x11e)](_0x467ff7,_0x2af529(0x12d),_0x2af529(0x109)))&&_0x5086dd['text'](f),m[_0x2af529(0x10d)](),_0x5086dd[_0x2af529(0x119)](d);try{let _0x46cce6=l[_0x2af529(0x10b)](p[_0x2af529(0x130)][_0x2af529(0x125)]),_0x12d3f2=_0x325113['nextVersion'];if(!_0x12d3f2){let _0x22fcee=await a(_0x46cce6,_0x325113),_0x10a20c=_0x22fcee&&_0x22fcee[_0x2af529(0x126)]&&Number(_0x22fcee['latestVersion']);null==_0x10a20c&&(_0x10a20c=0x0),_0x12d3f2=_0x10a20c+0x1;}let {appConfigJson:_0x3b3cfa}=await n({'cwd':_0x467ff7,'mode':w,'appId':_0x46cce6,'nextVersion':_0x12d3f2,'appConfig':_0xd1a839,'outDir':'www','vite2RollupPlugins':[o({'values':{'ZMP_IMPORT_PAGES':()=>g(_0x467ff7)}}),i({'warnOnError':!0x0})],'customLogger':{'info':_0x5086dd['text'],'warn':_0x5086dd[_0x2af529(0x12e)],'warnOnce':_0x5086dd[_0x2af529(0x12e)],'error':_0x5086dd[_0x2af529(0x112)]}});return _0x3b3cfa&&u[_0x2af529(0x114)](_0x18958e(_0x2af529(0x12b)+p['filename']['appConfig']),JSON[_0x2af529(0x10c)](_0x3b3cfa)),_0x5086dd[_0x2af529(0x123)](''+e[_0x2af529(0x11a)][_0x2af529(0x12c)](_0x2af529(0x124))),_0x3b3cfa;}catch(_0x49566b){_0x5086dd[_0x2af529(0x118)](_0x2af529(0x132)),s(_0x49566b);return;}};
|
package/config/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function _0x3763(){var _0x21c247=['1919797vBHGfM','1585944MUEbAB','136FgfFtU','cwd','zmp-cli.json','36tVpiii','31765mEBWzH','app/request-upload','App\x20config\x20not\x20found.\x20Please\x20re-init\x20project.\x20(Tips:\x20Run\x20\x27zmp\x20init\x27)','34018EzUfOD','octet','5aUTmbs','196408UhqssF','admin/get-login-status','admin/request-login','/.env','2109450mTsGMu','app/upload-chunk','app/get-info','Permission\x20denied.\x20Please\x20login\x20again.\x20(Tips:\x20Run\x20\x27zmp\x20login\x27)','Request\x20Timeout','10FbmCEV','1331400mSKlvq','https://zmp-api.developers.zalo.me/','//h5.zdn.vn/zapps/','ZMP_TOKEN','APP_ID'];_0x3763=function(){return _0x21c247;};return _0x3763();}var _0x2a9474=_0x1b39;(function(_0x20a399,_0x1e250a){var _0x5ae351=_0x1b39,_0x56f901=_0x20a399();while(!![]){try{var _0x1d01c=-parseInt(_0x5ae351(0x124))/0x1*(-parseInt(_0x5ae351(0x122))/0x2)+parseInt(_0x5ae351(0x12f))/0x3+-parseInt(_0x5ae351(0x11b))/0x4*(parseInt(_0x5ae351(0x11f))/0x5)+parseInt(_0x5ae351(0x11a))/0x6+-parseInt(_0x5ae351(0x129))/0x7+-parseInt(_0x5ae351(0x125))/0x8*(-parseInt(_0x5ae351(0x11e))/0x9)+parseInt(_0x5ae351(0x12e))/0xa*(parseInt(_0x5ae351(0x119))/0xb);if(_0x1d01c===_0x1e250a)break;else _0x56f901['push'](_0x56f901['shift']());}catch(_0x373da7){_0x56f901['push'](_0x56f901['shift']());}}}(_0x3763,0x85ec4));function _0x1b39(_0x345519,_0x4c71fe){var _0x37633f=_0x3763();return _0x1b39=function(_0x1b3981,_0x594409){_0x1b3981=_0x1b3981-0x118;var _0x13780f=_0x37633f[_0x1b3981];return _0x13780f;},_0x1b39(_0x345519,_0x4c71fe);}module['exports']={'filename':{'appConfig':'app-config.json','zmpConfig':_0x2a9474(0x11d),'packageJson':'package.json'},'api_domain':_0x2a9474(0x130),'zdn_url':_0x2a9474(0x131),'path':{'login':'admin/login','requestLogin':_0x2a9474(0x127),'checkLoginStatus':_0x2a9474(0x126),'uploadAppByChunk':_0x2a9474(0x12a),'requestUploadResumable':_0x2a9474(0x120),'getAppInfo':_0x2a9474(0x12b)},'dirname':__dirname,'root_env':()=>process[_0x2a9474(0x11c)]()+_0x2a9474(0x128),'env':{'appId':_0x2a9474(0x118),'token':_0x2a9474(0x132)},'error_code':{'app_config_not_found':-0x578,'permission_denied':-0x7d1,'request_timeout':-0x7d3},'error_msg':{'app_config_not_found':_0x2a9474(0x121),'permission_denied':_0x2a9474(0x12c),'request_timeout':_0x2a9474(0x12d)},'resumable_option':{'chunkSize':0x7d000,'simultaneousUploads':0x4,'testChunks':!0x0,'throttleProgressCallbacks':0x1,'method':_0x2a9474(0x123),'forceChunkSize':!0x1}};
|
package/create/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x47af(){const _0x5a0602=['cwd','\x20💪\x0a\x0a','bold','appConfig','npm\x20install','writeFileSync','10268220pVWeiK','log-symbols','statusError','747816PjmVRx','213yWnIKQ','(Please\x20wait,\x20it\x20can\x20take\x20a\x20while)','\x0a\x20\x20','4274914xgddWE','\x20in\x20project\x20root\x20folder\x20with\x20further\x20instructions\x0a\x20\x20','Done!','statusStart','exec-sh','promise','join','Creating\x20project\x20files','\x0a-\x20🔥\x20Run\x20\x22zmp\x20deploy\x22\x20-\x20deploy\x20mini\x20app\x20for\x20production\x0a-\x20📖\x20Visit\x20instruction\x20at\x20','statusDone','Installing\x20NPM\x20Dependencies','23804fuRVLq','gray','\x20Run\x20\x22npm\x20run\x20','folderName','resolve','chalk','Next\x20steps:','filename','path','\x22\x20-\x20','./utils/generate-app-config','Error\x20creating\x20project\x20files','info','../config','2817786ZRnXyM','128SKBFyo','271446WgBlxU','text','Generating\x20app-config.json','\x0a-\x20👉\x20Run\x20\x22cd\x20','Error\x20installing\x20NPM\x20Dependencies','10bXzBXo','newProject','\x0a-\x20📖\x20Visit\x20documentation\x20at\x20','README.md','\x20&&\x20npm\x20install','../utils/error','606834fDuDWs'];_0x47af=function(){return _0x5a0602;};return _0x47af();}const _0x4a6d57=_0x40eb;(function(_0x400655,_0x82a32d){const _0x55c8a7=_0x40eb,_0x24bdfc=_0x400655();while(!![]){try{const _0x2af876=parseInt(_0x55c8a7(0x194))/0x1+parseInt(_0x55c8a7(0x1b3))/0x2+-parseInt(_0x55c8a7(0x195))/0x3*(-parseInt(_0x55c8a7(0x1a3))/0x4)+-parseInt(_0x55c8a7(0x184))/0x5*(-parseInt(_0x55c8a7(0x1b1))/0x6)+parseInt(_0x55c8a7(0x198))/0x7+parseInt(_0x55c8a7(0x1b2))/0x8*(-parseInt(_0x55c8a7(0x18a))/0x9)+-parseInt(_0x55c8a7(0x191))/0xa;if(_0x2af876===_0x82a32d)break;else _0x24bdfc['push'](_0x24bdfc['shift']());}catch(_0x478f87){_0x24bdfc['push'](_0x24bdfc['shift']());}}}(_0x47af,0xb7332));const e=require(_0x4a6d57(0x19c)),t=require(_0x4a6d57(0x1ab)),n=require(_0x4a6d57(0x1a8)),r=require(_0x4a6d57(0x192)),{initProject:i}=require('zmp-cli-core'),o=require('../utils/fs-extra'),{errorExit:s}=require(_0x4a6d57(0x189)),a=require(_0x4a6d57(0x1b0)),c=require(_0x4a6d57(0x1ad)),l=require('./utils/generate-npm-scripts'),{renameSync:u,existsSync:p}=require('fs'),d=n[_0x4a6d57(0x1a4)](_0x4a6d57(0x196));async function f(_0x5c34d5,_0x3780c5){const _0x150ef7=_0x4a6d57;_0x3780c5[_0x150ef7(0x19b)](_0x150ef7(0x19f));try{let {cwd:_0x37d3b9,template:_0x3f695d,folderName:_0x23cd4f,name:_0x2b853e}=_0x5c34d5;await i({'cwd':_0x37d3b9,'template':_0x3f695d,'folderName':_0x23cd4f,'projectName':_0x2b853e});}catch(_0x5bac50){_0x3780c5[_0x150ef7(0x193)](_0x150ef7(0x1ae)),s(_0x5bac50);}_0x3780c5[_0x150ef7(0x1a1)](_0x150ef7(0x19f));}async function m(_0x467cfa){const _0x349bcd=_0x4a6d57;let _0x170e74=t[_0x349bcd(0x1a7)](_0x467cfa[_0x349bcd(0x18b)],'.env'),_0x33c27f=t[_0x349bcd(0x1a7)](_0x467cfa[_0x349bcd(0x18b)],_0x467cfa['folderName'],'.env');p(_0x170e74)&&!p(_0x33c27f)&&u(_0x170e74,_0x33c27f);}async function g(_0x42a109,_0x5ed2fe){const _0x4d0a8b=_0x4a6d57;let {cwd:_0x1a5ca3}=_0x42a109;_0x5ed2fe[_0x4d0a8b(0x19b)](_0x4d0a8b(0x181));let _0x4ff7be=c(_0x42a109);o[_0x4d0a8b(0x190)](t['join'](_0x1a5ca3,a[_0x4d0a8b(0x1aa)][_0x4d0a8b(0x18e)]),_0x4ff7be['content']),_0x5ed2fe[_0x4d0a8b(0x1a1)](_0x4d0a8b(0x181));}function _0x40eb(_0x132add,_0x3cb603){const _0x47afd7=_0x47af();return _0x40eb=function(_0x40eb71,_0x586096){_0x40eb71=_0x40eb71-0x181;let _0x4a353a=_0x47afd7[_0x40eb71];return _0x4a353a;},_0x40eb(_0x132add,_0x3cb603);}async function $(_0x1a3555,_0x2eb3bf){const _0x37e487=_0x4a6d57;let _0x1caad0=t['join'](_0x1a3555[_0x37e487(0x18b)],_0x1a3555['folderName']);_0x2eb3bf['statusStart']('Installing\x20NPM\x20Dependencies\x20'+d);let _0x389f39=_0x1caad0===process['cwd']();try{_0x389f39?await e[_0x37e487(0x19d)](_0x37e487(0x18f),!0x0):await e[_0x37e487(0x19d)]('cd\x20'+_0x1caad0['replace'](/ /g,'\x5c\x20')+_0x37e487(0x188),!0x0);}catch(_0xa13c6d){_0x2eb3bf[_0x37e487(0x193)](_0x37e487(0x183)),s(_0xa13c6d);return;}_0x2eb3bf['statusDone'](_0x37e487(0x1a2));}async function h(_0x27300c,_0xfb4870){const _0x1322cd=_0x4a6d57;let _0xd46f0e=l(['s','r'])['map'](_0x453867=>'-\x20'+_0x453867['icon']+_0x1322cd(0x1a5)+_0x453867['name']+_0x1322cd(0x1ac)+_0x453867['description']),_0x8833be='\x0a'+n['bold'](r['success'])+'\x20'+n[_0x1322cd(0x18d)](_0x1322cd(0x19a))+_0x1322cd(0x18c)+n[_0x1322cd(0x18d)](r[_0x1322cd(0x1af)])+'\x20'+n['bold'](_0x1322cd(0x1a9))+_0x1322cd(0x182)+_0x27300c[_0x1322cd(0x1a6)]+'\x22\x0a'+_0xd46f0e[_0x1322cd(0x19e)]('\x0a')+_0x1322cd(0x186)+n[_0x1322cd(0x18d)]('https://mini.zalo.me/')+'\x0a-\x20📖\x20Check\x20'+n[_0x1322cd(0x18d)](_0x1322cd(0x187))+_0x1322cd(0x199);_0xfb4870[_0x1322cd(0x1b4)](_0x8833be);}async function y(_0x344bd8,_0x2c87ad){const _0x5beb90=_0x4a6d57;let _0x9bc8cc='\x0a'+n[_0x5beb90(0x18d)](r['success'])+'\x20'+n[_0x5beb90(0x18d)](_0x5beb90(0x19a))+_0x5beb90(0x18c)+n[_0x5beb90(0x18d)](r[_0x5beb90(0x1af)])+'\x20'+n[_0x5beb90(0x18d)]('Next\x20steps:')+_0x5beb90(0x1a0)+n[_0x5beb90(0x18d)]('https://mini.zalo.me/blog/huong-dan-chuyen-doi-web-app-thanh-zalo-mini-app-trong-30-phut/')+_0x5beb90(0x197);_0x2c87ad[_0x5beb90(0x1b4)](_0x9bc8cc);}module['exports']=async(_0xbe7e73={},_0xfc54e2)=>{const _0x57e1d8=_0x4a6d57;for(let _0x43f2f4 of(_0xfc54e2||(_0xfc54e2={'statusStart'(){},'statusDone'(){},'statusError'(){},'text'(){},'error'(){}}),_0xbe7e73[_0x57e1d8(0x185)]?[f,m,$,h]:[g,y]))await _0x43f2f4(_0xbe7e73,_0xfc54e2);};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x2e46(){const _0x119aec=['751867xaVHVL','126dCIDWy','white','23988DVVrda','4543zjlxid','120920HuDyvI','116UrIEHR','2022vapVXl','1673QpgEnW','41138gHELHS','trim','4738100xDRkwo','back','stringify','normal','111gKRafu','504664GKjBWv'];_0x2e46=function(){return _0x119aec;};return _0x2e46();}function _0x3fed(_0x2f920d,_0x385bc3){const _0x2e465a=_0x2e46();return _0x3fed=function(_0x3fedd8,_0x1766f7){_0x3fedd8=_0x3fedd8-0x192;let _0x1856d5=_0x2e465a[_0x3fedd8];return _0x1856d5;},_0x3fed(_0x2f920d,_0x385bc3);}(function(_0x1ea12a,_0x9a48ad){const _0x498f91=_0x3fed,_0x41281c=_0x1ea12a();while(!![]){try{const _0x3fcb93=parseInt(_0x498f91(0x192))/0x1+parseInt(_0x498f91(0x19b))/0x2*(parseInt(_0x498f91(0x1a1))/0x3)+-parseInt(_0x498f91(0x198))/0x4*(parseInt(_0x498f91(0x197))/0x5)+-parseInt(_0x498f91(0x199))/0x6*(-parseInt(_0x498f91(0x19a))/0x7)+parseInt(_0x498f91(0x1a2))/0x8*(parseInt(_0x498f91(0x193))/0x9)+-parseInt(_0x498f91(0x19d))/0xa+parseInt(_0x498f91(0x196))/0xb*(-parseInt(_0x498f91(0x195))/0xc);if(_0x3fcb93===_0x9a48ad)break;else _0x41281c['push'](_0x41281c['shift']());}catch(_0xc9ad9){_0x41281c['push'](_0x41281c['shift']());}}}(_0x2e46,0x742f4));module['exports']=function(_0x33b9bb){const _0x4d9fad=_0x3fed;let {name:_0x45e10c}=_0x33b9bb,_0x35b5e4={'title':_0x45e10c,'headerTitle':_0x45e10c,'headerColor':'#1843EF','textColor':_0x4d9fad(0x194),'leftButton':_0x4d9fad(0x19e),'statusBar':_0x4d9fad(0x1a0),'actionBarHidden':!0x1,'hideAndroidBottomNavigationBar':!0x1,'hideIOSSafeAreaBottom':!0x1};return{'content':JSON[_0x4d9fad(0x19f)]({'app':_0x35b5e4,'listCSS':[],'listSyncJS':[],'listAsyncJS':[]},'',0x2)[_0x4d9fad(0x19c)](),'appConfig':_0x35b5e4};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x55e88a=_0x5d90;(function(_0x9f4cc7,_0x5eaaba){const _0x386307=_0x5d90,_0xd7ae17=_0x9f4cc7();while(!![]){try{const _0x4f379c=-parseInt(_0x386307(0x185))/0x1+-parseInt(_0x386307(0x182))/0x2+-parseInt(_0x386307(0x17d))/0x3*(parseInt(_0x386307(0x17a))/0x4)+parseInt(_0x386307(0x174))/0x5+-parseInt(_0x386307(0x175))/0x6+-parseInt(_0x386307(0x180))/0x7+-parseInt(_0x386307(0x184))/0x8*(-parseInt(_0x386307(0x181))/0x9);if(_0x4f379c===_0x5eaaba)break;else _0xd7ae17['push'](_0xd7ae17['shift']());}catch(_0xca875e){_0xd7ae17['push'](_0xd7ae17['shift']());}}}(_0x25ec,0xb5b25));function _0x25ec(){const _0xbf8d53=['script','556503vcGJWA','exports','icon','9703848WgPohV','76248HPruHu','1514532CVkCnM','map','3968tUzqBR','163334eeNYZf','3919710ibCDYJ','2705718oWLNsH','name','tailwind','./npm-scripts','default','32SNcwOE','description'];_0x25ec=function(){return _0xbf8d53;};return _0x25ec();}function _0x5d90(_0x586d8e,_0x5d78b3){const _0x25ecc9=_0x25ec();return _0x5d90=function(_0x5d901b,_0xa4ba08){_0x5d901b=_0x5d901b-0x174;let _0xc5ee5e=_0x25ecc9[_0x5d901b];return _0xc5ee5e;},_0x5d90(_0x586d8e,_0x5d78b3);}const i=require(_0x55e88a(0x178));module[_0x55e88a(0x17e)]=(_0x25cdea=['s','r'])=>_0x25cdea[_0x55e88a(0x183)](_0x1b1d36=>({'icon':i['default'][_0x1b1d36][_0x55e88a(0x17f)],'name':i[_0x55e88a(0x179)][_0x1b1d36][_0x55e88a(0x176)],'script':i['default'][_0x1b1d36][_0x55e88a(0x17c)],'description':i[_0x55e88a(0x179)][_0x1b1d36]['description']})),module[_0x55e88a(0x17e)]['generateTailWindScripts']=(_0x23abdb=['t'])=>_0x23abdb['map'](_0x44c4e7=>({'icon':i[_0x55e88a(0x177)][_0x44c4e7]['icon'],'name':i['tailwind'][_0x44c4e7][_0x55e88a(0x176)],'script':i['tailwind'][_0x44c4e7][_0x55e88a(0x17c)],'description':i[_0x55e88a(0x177)][_0x44c4e7][_0x55e88a(0x17b)]}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x90d3(){const _0x3418d7=['name','isBlank','100892HfyKSA','ZaUI\x20','input','Existing\x20project','newProject','filter','zmp-cli-core','Folder\x20name\x20is\x20required','inquirer','Choose\x20a\x20template:','map','\x20App','toLowerCase','23345UomTzU','9UdYmeU','italic','list','folderName','32890DvNTPC','9fLqWyN','43238HFAuDa','New\x20project','template','prompt','What\x20action\x20you\x20want\x20to\x20do?','App\x20name\x20is\x20required','731668sIAZyE','1647064hYPGWP','24rfXWBB','App\x20(project)\x20name:','replace','448401ENkDnN','My\x20'];_0x90d3=function(){return _0x3418d7;};return _0x90d3();}const _0x5cfb0a=_0x5a0b;function _0x5a0b(_0x38db06,_0x1ae2da){const _0x90d315=_0x90d3();return _0x5a0b=function(_0x5a0b35,_0x5dbb43){_0x5a0b35=_0x5a0b35-0x1bb;let _0x1244fe=_0x90d315[_0x5a0b35];return _0x1244fe;},_0x5a0b(_0x38db06,_0x1ae2da);}(function(_0x587555,_0x714347){const _0x1c3442=_0x5a0b,_0x888eca=_0x587555();while(!![]){try{const _0x502c06=parseInt(_0x1c3442(0x1c1))/0x1*(parseInt(_0x1c3442(0x1c7))/0x2)+-parseInt(_0x1c3442(0x1d2))/0x3+-parseInt(_0x1c3442(0x1d6))/0x4+parseInt(_0x1c3442(0x1c0))/0x5*(parseInt(_0x1c3442(0x1cf))/0x6)+-parseInt(_0x1c3442(0x1cd))/0x7+parseInt(_0x1c3442(0x1ce))/0x8*(parseInt(_0x1c3442(0x1c6))/0x9)+parseInt(_0x1c3442(0x1c5))/0xa;if(_0x502c06===_0x714347)break;else _0x888eca['push'](_0x888eca['shift']());}catch(_0x462070){_0x888eca['push'](_0x888eca['shift']());}}}(_0x90d3,0x22f65));const e=require(_0x5cfb0a(0x1bb)),r=require('chalk'),{INIT_TEMPLATES:a}=require(_0x5cfb0a(0x1dc)),t=[{'type':_0x5cfb0a(0x1c3),'name':_0x5cfb0a(0x1da),'message':_0x5cfb0a(0x1cb),'choices':[{'name':'Create\x20a\x20new\x20ZMP\x20project','value':!0x0,'short':_0x5cfb0a(0x1c8)},{'name':'Using\x20ZMP\x20to\x20deploy\x20only','value':!0x1,'short':_0x5cfb0a(0x1d9)}]},{'type':_0x5cfb0a(0x1c3),'name':_0x5cfb0a(0x1c9),'when':_0xf960eb=>_0xf960eb[_0x5cfb0a(0x1da)],'message':_0x5cfb0a(0x1bc),'choices':[...a[_0x5cfb0a(0x1db)](_0x2ad020=>_0x2ad020['isBlank'])['map'](_0x10b263=>({'name':_0x10b263['name'],'value':_0x10b263})),new e['Separator'](),...a[_0x5cfb0a(0x1db)](_0x2180b3=>!_0x2180b3[_0x5cfb0a(0x1d5)])[_0x5cfb0a(0x1bd)](_0x22e6ba=>({'name':_0x22e6ba[_0x5cfb0a(0x1d4)],'value':_0x22e6ba}))]},{'type':_0x5cfb0a(0x1d8),'name':_0x5cfb0a(0x1d4),'message':_0x5cfb0a(0x1d0),'default':_0x548a9a=>{const _0x258e89=_0x5cfb0a;let {template:_0x38cbe2}=_0x548a9a;return _0x38cbe2&&!_0x38cbe2[_0x258e89(0x1d5)]?_0x258e89(0x1d3)+_0x38cbe2[_0x258e89(0x1d4)][_0x258e89(0x1d1)](_0x258e89(0x1d7),'')+_0x258e89(0x1be):'My\x20App';},'validate':_0x38a0ff=>new Promise((_0x3d421f,_0x20ff01)=>{const _0x1aec20=_0x5cfb0a;_0x38a0ff?_0x3d421f(!0x0):_0x20ff01(Error(_0x1aec20(0x1cc)));})},{'type':'input','name':_0x5cfb0a(0x1c4),'when':_0x2f6bfa=>_0x2f6bfa[_0x5cfb0a(0x1da)],'message':'Folder\x20name:','suffix':'\x0a'+r[_0x5cfb0a(0x1c2)]('(A\x20new\x20folder\x20with\x20this\x20name\x20will\x20be\x20created\x20in\x20the\x20selected\x20directory)'),'default':_0x17dc03=>{const _0x4aec46=_0x5cfb0a;let {name:_0x897c6c}=_0x17dc03;return _0x897c6c[_0x4aec46(0x1d1)](/ /g,'-')[_0x4aec46(0x1d1)](/[^a-zA-Z0-9-]/g,'')[_0x4aec46(0x1bf)]();},'validate':_0x4e6628=>new Promise((_0x1e525e,_0x446a04)=>{const _0x1826a8=_0x5cfb0a;_0x4e6628?_0x1e525e(!0x0):_0x446a04(Error(_0x1826a8(0x1dd)));})}];module['exports']=function(){const _0x14ca77=_0x5cfb0a;return e[_0x14ca77(0x1ca)](t)['then'](_0x39d0b5=>Promise['resolve'](_0x39d0b5));};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x3ca3(){const _0x3f7f97=['4775655mwTHAn','4702768QGxwke','38011150VqBopw','prod','3051EPVnod','run\x20development\x20server','deploy\x20mini\x20app\x20for\x20production','186KmVerM','tailwind','start','1411GyyuFh','forEach','76QiFwqV','558BxOgYj','exports','zmp\x20deploy','serve','http-server\x20./www/\x20-o\x20-c\x201\x20-a\x20localhost\x20-p\x208080','build:css','zmp\x20start','postcss\x20src/css/tailwind.css\x20-o\x20src/css/styles.css','deploy','keys','dev','116557CmCuHt','default','map','7539516WyBSAB','join','name','split','httpServer','build\x20tailwind\x20css'];_0x3ca3=function(){return _0x3f7f97;};return _0x3ca3();}function _0x3b8e(_0x2ddd3f,_0xb24a37){const _0x3ca3c8=_0x3ca3();return _0x3b8e=function(_0x3b8e22,_0x2ac162){_0x3b8e22=_0x3b8e22-0xf6;let _0x2f7d4c=_0x3ca3c8[_0x3b8e22];return _0x2f7d4c;},_0x3b8e(_0x2ddd3f,_0xb24a37);}const _0x332c87=_0x3b8e;(function(_0x5680e5,_0x5b75bc){const _0x150fc5=_0x3b8e,_0x4408da=_0x5680e5();while(!![]){try{const _0x8db835=-parseInt(_0x150fc5(0x10a))/0x1*(parseInt(_0x150fc5(0x10d))/0x2)+parseInt(_0x150fc5(0x104))/0x3*(-parseInt(_0x150fc5(0x10c))/0x4)+-parseInt(_0x150fc5(0x100))/0x5+parseInt(_0x150fc5(0x107))/0x6*(-parseInt(_0x150fc5(0xf7))/0x7)+-parseInt(_0x150fc5(0x101))/0x8+-parseInt(_0x150fc5(0xfa))/0x9+parseInt(_0x150fc5(0x102))/0xa;if(_0x8db835===_0x5b75bc)break;else _0x4408da['push'](_0x4408da['shift']());}catch(_0x89c638){_0x4408da['push'](_0x4408da['shift']());}}}(_0x3ca3,0x77ee9));const e={'d':_0x332c87(0xf6),'p':_0x332c87(0x103),'s':_0x332c87(0x109),'v':_0x332c87(0x110),'r':_0x332c87(0x115),'t':_0x332c87(0x112)};function s(_0x171625){const _0x38c6ac=_0x332c87;return _0x171625[_0x38c6ac(0xfd)]('_')[0x0][_0x38c6ac(0xfd)]('')[_0x38c6ac(0xf9)](_0xf64edc=>e[_0xf64edc])[_0x38c6ac(0xfb)]('-');}const t={'default':{'s':{'icon':'🔥','script':_0x332c87(0x113),'description':_0x332c87(0x105)},'r':{'icon':'🙏','script':_0x332c87(0x10f),'description':_0x332c87(0x106)}},'httpServer':{'v':{'icon':'🔧','script':_0x332c87(0x111),'description':_0x332c87(0x105)},'s':{'icon':'🔥','script':'npm\x20run\x20serve','description':_0x332c87(0x105)}},'tailwind':{'t':{'icon':'🔧','script':_0x332c87(0x114),'description':_0x332c87(0xff)}}};Object[_0x332c87(0x116)](t[_0x332c87(0xf8)])[_0x332c87(0x10b)](_0x526eff=>{const _0x2b2b24=_0x332c87;t['default'][_0x526eff][_0x2b2b24(0xfc)]=s(_0x526eff);}),Object['keys'](t[_0x332c87(0xfe)])[_0x332c87(0x10b)](_0x4c3178=>{const _0x3632cd=_0x332c87;t[_0x3632cd(0xfe)][_0x4c3178][_0x3632cd(0xfc)]=s(_0x4c3178);}),Object[_0x332c87(0x116)](t[_0x332c87(0x108)])[_0x332c87(0x10b)](_0x3590ef=>{const _0x1b9725=_0x332c87;t[_0x1b9725(0x108)][_0x3590ef][_0x1b9725(0xfc)]=s(_0x3590ef);}),module[_0x332c87(0x10e)]=t;
|
package/deploy/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x4410(){const _0x594fb2=['versionStatus','18bcyTRu','filename','Update\x20app\x20with\x20new\x20version','7072296yJHqFz','statusDone','nextVersion','3526400IJOITo','../utils/env','data','569524aEawxr','293730frgZqX','zip','4kVFCLP','appConfig','includes','appUrl','listAsyncJS','dependencies','desc','Please\x20define\x20your\x20assets\x20output\x20at\x20app-config.json.\x20Read\x20more:\x20https://mini.zalo.me/intro/getting-started/app-config/','packageJson','listSyncJS','join','path','memory','zmp','(Please\x20wait,\x20it\x20can\x20take\x20a\x20while)','\x20View\x20app\x20at:\x0a','entries','error_msg','statusStart','length','4880172SbAOse','customProject','cwd','./utils/request-upload','../config','Error\x20deploying\x20your\x20app','Deploying\x20Your\x20App\x20','../build/index','token','exports','3996160lqzBpX','stringify','requestUploadResumable','8068770wRouvQ','green','\x20💪','info','log-symbols','bold','../utils/fs-extra','env','react','outputDir','www','Deploy\x20Done!'];_0x4410=function(){return _0x594fb2;};return _0x4410();}const _0x5c97c3=_0x5bf4;(function(_0x44d1ea,_0x340e79){const _0x3b70ab=_0x5bf4,_0x3a4517=_0x44d1ea();while(!![]){try{const _0xbe4cd2=parseInt(_0x3b70ab(0x21f))/0x1*(parseInt(_0x3b70ab(0x21d))/0x2)+-parseInt(_0x3b70ab(0x213))/0x3*(-parseInt(_0x3b70ab(0x21c))/0x4)+parseInt(_0x3b70ab(0x219))/0x5+parseInt(_0x3b70ab(0x1f9))/0x6+-parseInt(_0x3b70ab(0x203))/0x7+-parseInt(_0x3b70ab(0x216))/0x8+-parseInt(_0x3b70ab(0x206))/0x9;if(_0xbe4cd2===_0x340e79)break;else _0x3a4517['push'](_0x3a4517['shift']());}catch(_0xbe57e8){_0x3a4517['push'](_0x3a4517['shift']());}}}(_0x4410,0x94aad));function _0x5bf4(_0x5846a9,_0x8420bf){const _0x441093=_0x4410();return _0x5bf4=function(_0x5bf44f,_0x4835af){_0x5bf44f=_0x5bf44f-0x1ef;let _0x2d7360=_0x441093[_0x5bf44f];return _0x2d7360;},_0x5bf4(_0x5846a9,_0x8420bf);}const e=require('chalk'),t=require('path'),r=require('zip-local'),i=require(_0x5c97c3(0x20a)),a=require('qrcode-terminal'),s=require(_0x5c97c3(0x1fd)),n=require(_0x5c97c3(0x200)),o=require(_0x5c97c3(0x21a)),{errorExit:l}=require('../utils/error'),p=require('./utils/upload-app'),u=require(_0x5c97c3(0x20c)),c=require(_0x5c97c3(0x1fc)),d=e['gray'](_0x5c97c3(0x1f3)),f={'statusStart'(){},'statusDone'(){},'statusText'(){},'statusError'(){},'text'(){},'error'(){},'showOnUI'(){}};module[_0x5c97c3(0x202)]=async(_0x29ca49={},_0x41f636=f)=>{const _0x3836ba=_0x5c97c3;let _0x18c926,_0x55540a,_0x17d0ab,_0x4759cb=_0x29ca49[_0x3836ba(0x1fb)]||process['cwd'](),_0x393618=_0x29ca49[_0x3836ba(0x20f)]||_0x3836ba(0x210),_0xfb2c19=s['api_domain'],_0x335731=_0x45c852=>t[_0x3836ba(0x1ef)](_0x4759cb,_0x45c852),_0x5a129f=o['getEnv'](s[_0x3836ba(0x20d)][_0x3836ba(0x201)]),_0x3089f=s[_0x3836ba(0x214)][_0x3836ba(0x220)],_0x19032a=s[_0x3836ba(0x214)][_0x3836ba(0x227)],_0x4ee7e9=!0x0;try{_0x18c926=require(_0x335731(_0x3089f));}catch(_0x4d91ba){try{_0x18c926=require(_0x335731(_0x393618+'/'+_0x3089f)),_0x4ee7e9=!0x1;}catch(_0xa91a94){l(Error(s[_0x3836ba(0x1f6)]['app_config_not_found']));}}let _0x3bba46={};try{let _0x1197af=require(_0x335731(_0x19032a))[_0x3836ba(0x224)];Object[_0x3836ba(0x1f5)](_0x1197af)['forEach'](([_0x3140dc,_0x55ccc1])=>{const _0xfc24ba=_0x3836ba;(_0x3140dc[_0xfc24ba(0x221)](_0xfc24ba(0x1f2))||_0x3140dc[_0xfc24ba(0x221)](_0xfc24ba(0x20e)))&&(_0x3bba46[_0x3140dc]=_0x55ccc1);});}catch(_0x4fed5b){}let _0x57f923={'appName':_0x18c926['app']['title'],'appDesc':_0x29ca49[_0x3836ba(0x225)]||_0x3836ba(0x215),'appConfig':JSON['stringify'](_0x18c926),'frameworkVersions':JSON[_0x3836ba(0x204)](_0x3bba46)};try{let _0x2f203d=''+_0xfb2c19+s[_0x3836ba(0x1f0)][_0x3836ba(0x205)],_0x2af301=await c(_0x2f203d,_0x57f923,_0x29ca49[_0x3836ba(0x212)],_0x5a129f);_0x55540a=_0x2af301[_0x3836ba(0x218)],_0x17d0ab=_0x2af301['identifier'];}catch(_0x58aed9){l(_0x58aed9);}if(_0x29ca49[_0x3836ba(0x1fa)]){let _0x1f1a36=0x0;_0x18c926[_0x3836ba(0x228)]&&_0x18c926[_0x3836ba(0x228)][_0x3836ba(0x1f8)]>0x0&&(_0x1f1a36+=0x1),_0x18c926[_0x3836ba(0x223)]&&_0x18c926[_0x3836ba(0x223)][_0x3836ba(0x1f8)]>0x0&&(_0x1f1a36+=0x1),0x0===_0x1f1a36&&l(Error(_0x3836ba(0x226))),_0x4ee7e9&&u['writeFileSync'](_0x335731(_0x393618+'/'+s[_0x3836ba(0x214)][_0x3836ba(0x220)]),JSON['stringify'](_0x18c926));}else _0x18c926=await n({..._0x29ca49,'appConfigJson':_0x18c926,'nextVersion':_0x55540a},_0x41f636);_0x41f636[_0x3836ba(0x1f7)](_0x3836ba(0x1ff)+d);try{let _0x354425=await new Promise((_0x23b7c2,_0x3d14cc)=>{const _0x113187=_0x3836ba;r[_0x113187(0x21e)](_0x335731(_0x393618),function(_0x1579cf,_0x5e759b){const _0x515dd1=_0x113187;return _0x1579cf?_0x3d14cc(_0x1579cf):(_0x5e759b['compress'](),_0x23b7c2(_0x5e759b[_0x515dd1(0x1f1)]()));});}),_0x11f386={..._0x57f923,'appBuffer':_0x354425,'identifier':_0x17d0ab},_0x5c9b5f=await p(_0x11f386,_0x29ca49,_0x41f636),_0x1ecd98=_0x5c9b5f&&_0x5c9b5f[_0x3836ba(0x21b)]&&_0x5c9b5f['data'][_0x3836ba(0x222)];a['generate'](_0x1ecd98,{'small':!0x0},function(_0x9d42c7){const _0xb0217c=_0x3836ba;let _0x1603d5=''+e[_0xb0217c(0x20b)](i[_0xb0217c(0x209)]+_0xb0217c(0x1f4)+_0x9d42c7);_0x41f636[_0xb0217c(0x217)](e[_0xb0217c(0x20b)][_0xb0217c(0x207)](_0xb0217c(0x211))+_0xb0217c(0x208)),_0x41f636[_0xb0217c(0x217)](e['bold'][_0xb0217c(0x207)]('Version:')+'\x20'+_0x55540a),_0x41f636['text'](_0x1603d5);});}catch(_0xb59567){_0x41f636['statusError'](_0x3836ba(0x1fe)),l(_0xb59567);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const _0x1f54a4=_0x21ef;function _0x21ef(_0x2b023f,_0x3abff7){const _0x5d251f=_0x5d25();return _0x21ef=function(_0x21ef00,_0x11d4ff){_0x21ef00=_0x21ef00-0x8e;let _0x26ff67=_0x5d251f[_0x21ef00];return _0x26ff67;},_0x21ef(_0x2b023f,_0x3abff7);}(function(_0x4423ca,_0x1faa62){const _0x3fa612=_0x21ef,_0x2bfe60=_0x4423ca();while(!![]){try{const _0x2e85e6=parseInt(_0x3fa612(0xa8))/0x1+parseInt(_0x3fa612(0x9e))/0x2*(parseInt(_0x3fa612(0x8f))/0x3)+parseInt(_0x3fa612(0xa4))/0x4*(parseInt(_0x3fa612(0x9b))/0x5)+parseInt(_0x3fa612(0x92))/0x6+parseInt(_0x3fa612(0xac))/0x7*(-parseInt(_0x3fa612(0xa5))/0x8)+-parseInt(_0x3fa612(0x98))/0x9+-parseInt(_0x3fa612(0xad))/0xa;if(_0x2e85e6===_0x1faa62)break;else _0x2bfe60['push'](_0x2bfe60['shift']());}catch(_0x352cfb){_0x2bfe60['push'](_0x2bfe60['shift']());}}}(_0x5d25,0x1b1de));const e=require(_0x1f54a4(0x94)),{versionStatus:t}=require(_0x1f54a4(0x97)),i=require(_0x1f54a4(0x96)),r=[{'type':_0x1f54a4(0x9d),'name':'versionStatus','message':_0x1f54a4(0xa6),'choices':Object[_0x1f54a4(0xae)](t)[_0x1f54a4(0x99)](_0x76bfb3=>({'name':i[_0x1f54a4(0xab)](_0x76bfb3),'value':t[_0x76bfb3]})),'when':_0x5b2fc6=>!_0x5b2fc6[_0x1f54a4(0x9a)],'validate':_0x3a1ab2=>new Promise((_0x18f993,_0xad6f4)=>{const _0x31bf5a=_0x1f54a4;_0x3a1ab2&&_0x3a1ab2[_0x31bf5a(0xa2)]?_0x18f993(!0x0):_0xad6f4(Error('Server\x20type\x20is\x20required!'));})},{'type':_0x1f54a4(0x8e),'name':_0x1f54a4(0x93),'message':'Description:','when':_0x30cb59=>!_0x30cb59['quit'],'validate':_0x249051=>new Promise((_0x5785b1,_0x382c05)=>{const _0x37c311=_0x1f54a4;_0x249051&&_0x249051['length']?_0x5785b1(!0x0):_0x382c05(Error(_0x37c311(0x90)));})}],s=[{'type':_0x1f54a4(0x9d),'name':_0x1f54a4(0x9a),'message':_0x1f54a4(0x9c),'choices':[{'name':_0x1f54a4(0xaa),'value':!0x1},{'name':_0x1f54a4(0xa1),'value':!0x0}]},{'type':_0x1f54a4(0x8e),'name':'outputDir','message':_0x1f54a4(0xa7),'when':_0x25a049=>!_0x25a049[_0x1f54a4(0x9a)],'default':_0x1f54a4(0x95)}];module[_0x1f54a4(0xa3)]=async function(_0x4a7c08){const _0x1b4324=_0x1f54a4;let _0x37e301=_0x4a7c08?[...r]:[...s,...r];return e[_0x1b4324(0xa9)](_0x37e301)[_0x1b4324(0xa0)](_0x4d690c=>(_0x4d690c['customProject']=!0x1,!0x1===_0x4d690c[_0x1b4324(0x9a)]&&(_0x4d690c[_0x1b4324(0x9f)]=!0x0),Promise[_0x1b4324(0x91)](_0x4d690c)));};function _0x5d25(){const _0x591a58=['www','lodash','../../utils/constants','902061GQXJJP','map','quit','4410dCQkIy','This\x20is\x20not\x20a\x20ZMP\x20Project,\x20do\x20you\x20want\x20to\x20continue?','list','6XSOGTE','customProject','then','Quit','length','exports','808OhSlDL','8pmZYVY','What\x20version\x20status\x20are\x20you\x20deploying?','Where\x20is\x20your\x20dist\x20folder?','88609Qbcsvk','prompt','Deploy\x20your\x20existing\x20project','capitalize','1379763aXbVFm','1912400kAdvhF','keys','input','169110CncbWV','Description\x20is\x20required!','resolve','982590QLflWN','desc','inquirer'];_0x5d25=function(){return _0x591a58;};return _0x5d25();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x309b(_0x4340b9,_0x4c06aa){const _0xad748d=_0xad74();return _0x309b=function(_0x309bf3,_0x501bf3){_0x309bf3=_0x309bf3-0x167;let _0x3d75f9=_0xad748d[_0x309bf3];return _0x3d75f9;},_0x309b(_0x4340b9,_0x4c06aa);}const _0xee7f8c=_0x309b;function _0xad74(){const _0x46603b=['176guqZBm','125127NUsnfN','10aCxhJZ','214130nGtPgY','get','7694771wUuynz','exports','1415420pkMqRo','Bearer\x20','2189092HhLDkE','../../utils/axios','59123kqsuKg','err','error_code','permission_denied','3oAWBlx','6847524hMEoES','data'];_0xad74=function(){return _0x46603b;};return _0xad74();}(function(_0x58794d,_0x4e768b){const _0x3f8069=_0x309b,_0x29330c=_0x58794d();while(!![]){try{const _0x9f2c4=parseInt(_0x3f8069(0x174))/0x1+parseInt(_0x3f8069(0x170))/0x2*(-parseInt(_0x3f8069(0x178))/0x3)+-parseInt(_0x3f8069(0x172))/0x4*(-parseInt(_0x3f8069(0x16b))/0x5)+parseInt(_0x3f8069(0x167))/0x6+-parseInt(_0x3f8069(0x16e))/0x7+parseInt(_0x3f8069(0x169))/0x8*(parseInt(_0x3f8069(0x16a))/0x9)+parseInt(_0x3f8069(0x16c))/0xa;if(_0x9f2c4===_0x4e768b)break;else _0x29330c['push'](_0x29330c['shift']());}catch(_0x27e668){_0x29330c['push'](_0x29330c['shift']());}}}(_0xad74,0xc7087));const {axiosClient:r}=require(_0xee7f8c(0x173)),e=require('../../config'),i=async(_0x523b9f,_0x288600,_0x2ff1a3,_0x2ed173)=>{const _0x369ea2=_0xee7f8c;let {appName:_0x2f44dc,appDesc:_0x10cb53,appConfig:_0x11561f,frameworkVersions:_0x5d6fa7}=_0x288600,_0x1c652f={'Authorization':_0x369ea2(0x171)+_0x2ed173,'cache-control':'no-cache'},_0x284164=(await r[_0x369ea2(0x16d)](_0x523b9f,{'params':{'name':_0x2f44dc,'desc':_0x10cb53,'config':_0x11561f,'versionStatus':_0x2ff1a3,'frameworkVersions':_0x5d6fa7},'headers':_0x1c652f,'withCredentials':!0x0}))[_0x369ea2(0x168)];if(!_0x284164||_0x284164['err']<0x0){if(_0x284164&&_0x284164[_0x369ea2(0x175)]===e[_0x369ea2(0x176)]['permission_denied'])throw Error(e['error_msg'][_0x369ea2(0x177)]);throw Error(JSON['stringify'](_0x284164));}return _0x284164[_0x369ea2(0x168)];};module[_0xee7f8c(0x16f)]=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const _0x4547fd=_0x5cb4;function _0x3d27(){const _0x2df656=['path','statusText','form-data','err','config','fileSuccess','7ZAkXSw','fileAdded','10737126IeMDML','fileError','Error\x20upload\x20app:\x20cancel','statusError','13915QnKHhb','8870GsBJyb','35836260CWFYZt','1048604ZeiwiS','www.zip','append','isNumber','File','57844GfJpQz','token','16SjXmkD','15HVKApA','../../utils/env','join','zipFile','fileProgress','../../utils/resumable','addFile','Error\x20upload\x20app:\x20','api_domain','chalk','6gvXGKg','resumable_option','support','upload','Does\x20not\x20support\x20upload\x20app','round','progress','157672yRwNsr','../../config','6496205WVsvpB','exports','env','lodash','Deploying\x20Your\x20App\x20','complete','name','getEnv'];_0x3d27=function(){return _0x2df656;};return _0x3d27();}(function(_0x320832,_0x2c558a){const _0x5b1a65=_0x5cb4,_0x44d102=_0x320832();while(!![]){try{const _0x33f756=-parseInt(_0x5b1a65(0x9f))/0x1*(-parseInt(_0x5b1a65(0xa1))/0x2)+-parseInt(_0x5b1a65(0x70))/0x3*(parseInt(_0x5b1a65(0x9a))/0x4)+-parseInt(_0x5b1a65(0x83))/0x5*(parseInt(_0x5b1a65(0x7a))/0x6)+parseInt(_0x5b1a65(0x91))/0x7*(-parseInt(_0x5b1a65(0x81))/0x8)+parseInt(_0x5b1a65(0x93))/0x9+-parseInt(_0x5b1a65(0x98))/0xa*(parseInt(_0x5b1a65(0x97))/0xb)+parseInt(_0x5b1a65(0x99))/0xc;if(_0x33f756===_0x2c558a)break;else _0x44d102['push'](_0x44d102['shift']());}catch(_0x37f723){_0x44d102['push'](_0x44d102['shift']());}}}(_0x3d27,0xd95f9));const r=require(_0x4547fd(0x75)),e=require(_0x4547fd(0x79)),n=require(_0x4547fd(0x82)),o=require(_0x4547fd(0x71)),t=require('file-api')[_0x4547fd(0x9e)],a=require(_0x4547fd(0x8d)),u=require(_0x4547fd(0x86));function _0x5cb4(_0x24c757,_0x2fec9e){const _0x3d2752=_0x3d27();return _0x5cb4=function(_0x5cb4a5,_0x488f4b){_0x5cb4a5=_0x5cb4a5-0x70;let _0x23b612=_0x3d2752[_0x5cb4a5];return _0x23b612;},_0x5cb4(_0x24c757,_0x2fec9e);}module[_0x4547fd(0x84)]=async function(_0x118e3a,_0x472078,_0x44ed3c){const _0x51dc41=_0x4547fd;let _0x55c7f8=n[_0x51dc41(0x78)],_0x38077d=''+_0x55c7f8+n[_0x51dc41(0x8b)]['uploadAppByChunk'],{appName:_0x26b028,appDesc:_0x143734,appBuffer:_0x144b89,appConfig:_0xb6aef5,identifier:_0x19c440}=_0x118e3a,_0x3685d9=o[_0x51dc41(0x8a)](n[_0x51dc41(0x85)][_0x51dc41(0xa0)]),_0x3e776b=new r({...n[_0x51dc41(0x7b)],'target':_0x38077d,'headers':{'Authorization':'Bearer\x20'+_0x3685d9},'generateUniqueIdentifier':()=>_0x19c440}),_0x1a210d=new a();if(_0x1a210d['append'](_0x51dc41(0x73),_0x144b89),_0x1a210d[_0x51dc41(0x9c)](_0x51dc41(0x89),_0x26b028),_0x1a210d[_0x51dc41(0x9c)]('desc',_0x143734),_0x1a210d[_0x51dc41(0x9c)](_0x51dc41(0x8f),_0xb6aef5),_0x3e776b[_0x51dc41(0x7c)])return _0x3e776b['on'](_0x51dc41(0x74),function(_0x29b3fa){const _0x4b9c4a=_0x51dc41;let _0x502153=Array(Math[_0x4b9c4a(0x7f)](0x64*_0x29b3fa['progress']())%0x65+0x1)[_0x4b9c4a(0x72)]('|');_0x44ed3c[_0x4b9c4a(0x8c)](_0x4b9c4a(0x87)+e['gray']('\x0a'+_0x502153+'\x20'+Math[_0x4b9c4a(0x7f)](0x64*_0x29b3fa[_0x4b9c4a(0x80)]())+'%'));}),await new Promise((_0x78a82a,_0x2ed101)=>{const _0x242db9=_0x51dc41;try{var _0x107305=new t({'name':_0x242db9(0x9b),'buffer':_0x144b89});_0x3e776b['on'](_0x242db9(0x92),function(){const _0x288ca2=_0x242db9;_0x3e776b[_0x288ca2(0x7d)]();}),_0x3e776b['on'](_0x242db9(0x88),function(){return _0x78a82a();}),_0x3e776b['on'](_0x242db9(0x94),function(_0x56fe03,_0x55efec){return _0x2ed101(Error('Error\x20upload\x20app:\x20'+_0x55efec));}),_0x3e776b['on']('cancel',function(){const _0x2e5eea=_0x242db9;return _0x2ed101(Error(_0x2e5eea(0x95)));}),_0x3e776b['on'](_0x242db9(0x90),function(_0x352918,_0xcb0b94){const _0x46fc89=_0x242db9;let _0x686c91=JSON['parse'](_0xcb0b94);return u[_0x46fc89(0x9d)](_0x686c91['err'])&&_0x686c91[_0x46fc89(0x8e)]<0x0?_0x2ed101(Error(_0x46fc89(0x77)+_0xcb0b94)):_0x78a82a(_0x686c91);}),_0x3e776b[_0x242db9(0x76)](_0x107305);}catch(_0x446ce2){return _0x2ed101(_0x446ce2);}});_0x44ed3c[_0x51dc41(0x96)](_0x51dc41(0x7e));};
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
2
|
+
'use strict';const _0x38e8d4=_0x4355;(function(_0x42296d,_0x34e9f2){const _0x4badd0=_0x4355,_0x113c6d=_0x42296d();while(!![]){try{const _0x31512b=parseInt(_0x4badd0(0x1c3))/0x1+parseInt(_0x4badd0(0x1f6))/0x2*(parseInt(_0x4badd0(0x1dc))/0x3)+parseInt(_0x4badd0(0x20a))/0x4*(-parseInt(_0x4badd0(0x1dd))/0x5)+parseInt(_0x4badd0(0x204))/0x6+parseInt(_0x4badd0(0x1e1))/0x7+-parseInt(_0x4badd0(0x1c6))/0x8*(-parseInt(_0x4badd0(0x209))/0x9)+-parseInt(_0x4badd0(0x203))/0xa*(parseInt(_0x4badd0(0x20f))/0xb);if(_0x31512b===_0x34e9f2)break;else _0x113c6d['push'](_0x113c6d['shift']());}catch(_0xfcf23c){_0x113c6d['push'](_0x113c6d['shift']());}}}(_0x1a43,0x7ae2f));function _0x4355(_0x5522f0,_0x2a77a5){const _0x1a4330=_0x1a43();return _0x4355=function(_0x43550f,_0x58dab3){_0x43550f=_0x43550f-0x1b1;let _0x42e0c5=_0x1a4330[_0x43550f];return _0x42e0c5;},_0x4355(_0x5522f0,_0x2a77a5);}const e=require('chalk'),o=require(_0x38e8d4(0x1f1)),t=require(_0x38e8d4(0x1f9)),i=require(_0x38e8d4(0x1ca)),s=require(_0x38e8d4(0x1ef)),r=require('./utils/fs-extra'),n=require(_0x38e8d4(0x1c5)),a=require('./utils/spinner'),c=require('./utils/log'),p=require('./utils/get-current-project'),u=require(_0x38e8d4(0x211)),l=require(_0x38e8d4(0x1fd)),d=require('./deploy/utils/get-options'),m=require('./migrate/utils/get-options'),g=require(_0x38e8d4(0x200)),x=require('./create/index'),y=require(_0x38e8d4(0x202)),v=require('./build/index'),w=require(_0x38e8d4(0x201)),f=require(_0x38e8d4(0x1ea)),q=require('./migrate/index'),h=require('os'),M=require(_0x38e8d4(0x1ec)),P=require(_0x38e8d4(0x1f2)),{versionStatus:j}=require('./utils/constants'),Z=process[_0x38e8d4(0x206)](),D={'statusStart':_0x579c56=>a[_0x38e8d4(0x1b1)](_0x579c56),'statusDone':_0x12196e=>a[_0x38e8d4(0x1fe)](_0x12196e),'statusText':_0x44410a=>a[_0x38e8d4(0x1df)](_0x44410a),'statusError':_0x2b732e=>a[_0x38e8d4(0x1f0)](_0x2b732e),'text':_0x2cc448=>c[_0x38e8d4(0x1df)](_0x2cc448),'error':_0x210ce9=>c[_0x38e8d4(0x1f0)](_0x210ce9),'showOnUI':()=>{}};function _0x1a43(){const _0x33aa26=['Automatically\x20update\x20app-config.json\x20resources\x20list\x20based\x20on\x20index.html','-D,\x20--dev','writeFileSync','-e,\x20--existing','skipUpdate','Specify\x20server\x20hostname.\x20By\x20default\x20it\x20is\x20os.hostname','sync-config\x20<source>','cyan','.local','version','exit','zaloApp','Specify\x20UI\x20server\x20port.\x20By\x20default\x20it\x20is\x203001','log','ZMP\x20CLI','817946XmIeNY','ios','./utils/check-update','8NcazTF','Deploy\x20existing\x20project','-o,\x20--outputDir\x20<output>','deploy','commander','root_env','Version\x20description','mode','frame','\x0a\x20Unknown\x20command\x20','build','-r,\x20--root-element\x20<selector>','Custom\x20entry\x20point,\x20default\x20is\x20#app','Skip\x20checking\x20for\x20update\x20of\x20zmp-cli','iosHostName','Deploy\x20a\x20ZMP\x20project','command','Output\x20folder.\x20Default\x20www','Device\x20mode','args','login','Passive\x20mode\x20(non-interactive)','1101JtQUDu','2246740ODklNe','-iosH,\x20--ios-host-name\x20<n>','text','-ios,\x20--ios','559419SWLXzk','hostname','Version:\x20','argv','textSync','Run\x20on\x20ios','-M,\x20--mode\x20<m>','existsSync','Env\x20mode','./sync/index','Run\x20without\x20Zalo\x20frame','./package.json','usage','dev','log-symbols','error','clear','./config','Login\x20ZMP','action','\x20This\x20is\x20not\x20ZMP\x20project','3980ozIFMF','-D,\x20--device','-P,\x20--port\x20<n>','figlet','showMobileUi','Build\x20a\x20ZMP\x20project','includes','./login/utils/get-options','done','--skipUpdate','./login/index','./deploy/index','./start/index','7190ubBaaC','961230UAcUHd','-p,\x20--passive','cwd','Start\x20a\x20ZMP\x20project','description','5685705SsjnXI','8GmLiVu','Specify\x20server\x20port.\x20By\x20default\x20it\x20is\x203000','-Z,\x20--zalo-app','init','code','15576ueekuG','Deploy\x20testing\x20version','./create/utils/get-options','option','migrate','outputHelp','resolve','port','<command>\x20[options]','start','Init\x20ZMP\x20project','Deploy\x20in\x20Development\x20server'];_0x1a43=function(){return _0x33aa26;};return _0x1a43();}o(),r[_0x38e8d4(0x1e8)](P[_0x38e8d4(0x1cb)]())||r[_0x38e8d4(0x1b6)](P['root_env']()),console[_0x38e8d4(0x1c1)](e[_0x38e8d4(0x1bb)](t[_0x38e8d4(0x1e5)](_0x38e8d4(0x1c2),{'horizontalLayout':'full','verticalLayout':'full'})),e['cyan'](_0x38e8d4(0x1e3)+M[_0x38e8d4(0x1bd)]+'\x0a')),i[_0x38e8d4(0x1bd)](M['version'])[_0x38e8d4(0x1ed)](_0x38e8d4(0x217))[_0x38e8d4(0x1d6)](_0x38e8d4(0x20d))[_0x38e8d4(0x212)](_0x38e8d4(0x1ff),_0x38e8d4(0x1d3))['description'](_0x38e8d4(0x1b2))[_0x38e8d4(0x1f4)](async _0x105581=>{const _0x12fe69=_0x38e8d4;_0x105581[_0x12fe69(0x1b8)]||await n();let _0x5ad946=await l();await g({'cwd':Z,..._0x5ad946},D);let _0x5af9bc=await u();await x({'cwd':Z,..._0x5af9bc},D),process[_0x12fe69(0x1be)](0x0);}),i[_0x38e8d4(0x1ed)](_0x38e8d4(0x217))[_0x38e8d4(0x1d6)](_0x38e8d4(0x1da))['description'](_0x38e8d4(0x1f3))[_0x38e8d4(0x1f4)](async()=>{const _0x424e91=_0x38e8d4;let _0x2af0f7=await l();await g({'cwd':Z,..._0x2af0f7},D),process[_0x424e91(0x1be)](0x0);}),i[_0x38e8d4(0x1ed)]('<command>\x20[options]')[_0x38e8d4(0x1d6)]('start')['option'](_0x38e8d4(0x1de),_0x38e8d4(0x1b9))[_0x38e8d4(0x212)]('-P,\x20--port\x20<n>',_0x38e8d4(0x20b),parseInt)['option'](_0x38e8d4(0x20c),'Preview\x20on\x20Zalo')[_0x38e8d4(0x212)](_0x38e8d4(0x1e0),_0x38e8d4(0x1e6))[_0x38e8d4(0x212)]('-nF,\x20--no-frame',_0x38e8d4(0x1eb))['option'](_0x38e8d4(0x1f7),_0x38e8d4(0x1d8))[_0x38e8d4(0x212)](_0x38e8d4(0x1e7),'Env\x20mode')[_0x38e8d4(0x208)](_0x38e8d4(0x207))[_0x38e8d4(0x1f4)](async _0x2f9c3f=>{const _0x51ff29=_0x38e8d4;if(p(Z)||(c[_0x51ff29(0x1df)](s[_0x51ff29(0x1f0)]+_0x51ff29(0x1f5)),process[_0x51ff29(0x1be)](0x1)),_0x2f9c3f&&_0x2f9c3f[_0x51ff29(0x1fa)])try{console[_0x51ff29(0x1c1)](require[_0x51ff29(0x215)]('nw'));}catch(_0x64f561){console['error']('NW.js\x20module\x20is\x20not\x20found.\x20Please\x20run\x20\x22npm\x20install\x20-g\x20nw@sdk\x22'),process[_0x51ff29(0x1be)](_0x64f561[_0x51ff29(0x20e)]);}let _0x3387ce=h[_0x51ff29(0x1e2)]();_0x3387ce[_0x51ff29(0x1fc)](_0x51ff29(0x1bc))||(_0x3387ce=_0x3387ce+_0x51ff29(0x1bc)),await y({'cwd':Z,'port':_0x2f9c3f&&_0x2f9c3f[_0x51ff29(0x216)]||0xbb8,'iosHostName':_0x2f9c3f&&_0x2f9c3f[_0x51ff29(0x1d4)]||_0x3387ce,'showMobileUI':_0x2f9c3f&&_0x2f9c3f[_0x51ff29(0x1fa)]||!0x1,'previewOnZalo':_0x2f9c3f&&_0x2f9c3f[_0x51ff29(0x1bf)]||!0x1,'ios':_0x2f9c3f&&_0x2f9c3f[_0x51ff29(0x1c4)]||!0x1,'mode':_0x2f9c3f&&_0x2f9c3f[_0x51ff29(0x1cd)],'frame':!!_0x2f9c3f&&(void 0x0===_0x2f9c3f['frame']||null===_0x2f9c3f[_0x51ff29(0x1ce)])||_0x2f9c3f[_0x51ff29(0x1ce)],'deviceMode':_0x2f9c3f&&_0x2f9c3f['device']||!0x1},D),process['exit'](0x0);}),i['usage'](_0x38e8d4(0x217))['command'](_0x38e8d4(0x1d0))['description'](_0x38e8d4(0x1fb))[_0x38e8d4(0x1f4)](async()=>{const _0x457fce=_0x38e8d4;p(Z)||(c[_0x457fce(0x1df)](s[_0x457fce(0x1f0)]+_0x457fce(0x1f5)),process[_0x457fce(0x1be)](0x1)),await v({'cwd':Z},D),process[_0x457fce(0x1be)](0x0);}),i[_0x38e8d4(0x1ed)](_0x38e8d4(0x217))['command'](_0x38e8d4(0x1c9))[_0x38e8d4(0x212)](_0x38e8d4(0x1b5),_0x38e8d4(0x1b3))[_0x38e8d4(0x212)]('-M,\x20--mode\x20<m>',_0x38e8d4(0x1e9))['option'](_0x38e8d4(0x205),_0x38e8d4(0x1db))[_0x38e8d4(0x212)](_0x38e8d4(0x1b7),_0x38e8d4(0x1c7))['option']('-t,\x20--testing',_0x38e8d4(0x210))[_0x38e8d4(0x212)]('-m,\x20--desc\x20<message>',_0x38e8d4(0x1cc))['option'](_0x38e8d4(0x1c8),_0x38e8d4(0x1d7))[_0x38e8d4(0x212)](_0x38e8d4(0x1f8),_0x38e8d4(0x1c0),parseInt)['description'](_0x38e8d4(0x1d5))[_0x38e8d4(0x1f4)](async _0x415769=>{const _0x595fbc=_0x38e8d4;let _0x2a91f7=p(Z),_0xda8be2=_0x415769;_0x415769['existing']?_0xda8be2['customProject']=!0x0:_0x415769['passive']||(_0xda8be2=await d(_0x2a91f7)),_0x415769['testing']&&(_0xda8be2['versionStatus']=j['TESTING']),_0xda8be2['quit']&&process['exit'](0x1),await w({'cwd':Z,'dev':_0x415769&&_0x415769[_0x595fbc(0x1ee)],'mode':_0x415769&&_0x415769['mode'],..._0xda8be2},D),process['exit'](0x0);}),i[_0x38e8d4(0x1ed)](_0x38e8d4(0x217))['command'](_0x38e8d4(0x1ba))[_0x38e8d4(0x212)](_0x38e8d4(0x1d1),_0x38e8d4(0x1d2))[_0x38e8d4(0x208)](_0x38e8d4(0x1b4))['action'](async(_0x19240a,_0x1ae8a1)=>{const _0x543c21=_0x38e8d4;await f({'source':_0x19240a,..._0x1ae8a1},D),process[_0x543c21(0x1be)](0x0);}),i[_0x38e8d4(0x1ed)](_0x38e8d4(0x217))['command'](_0x38e8d4(0x213))[_0x38e8d4(0x1f4)](async function(){const _0x3d5588=_0x38e8d4;let _0x1f2ae8=p(Z);_0x1f2ae8||(D[_0x3d5588(0x1df)](s[_0x3d5588(0x1f0)]+'\x20This\x20is\x20not\x20ZMP\x20project'),process[_0x3d5588(0x1be)](0x1));let _0x4d76b5=await m();await q({'cwd':Z,..._0x4d76b5,..._0x1f2ae8},D),process[_0x3d5588(0x1be)](0x0);}),i['on']('command:*',_0x26744e=>{const _0x1bb5a6=_0x38e8d4;i['outputHelp'](),c[_0x1bb5a6(0x1df)](_0x1bb5a6(0x1cf)+_0x26744e);}),i['parse'](process[_0x38e8d4(0x1e4)]),i[_0x38e8d4(0x1d9)]['length']||i[_0x38e8d4(0x214)]();
|