zmp-cli 3.15.7 → 3.15.8
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 +37 -1
- 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 +3 -2
- package/start/frame/index.html +264 -254
- 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/create/init-zmp-ui.js +0 -1
- package/create/templates/app-parameters.js +0 -17
- package/create/templates/common/css/icons.css +0 -60
- package/create/templates/common/icons/512x512.png +0 -0
- package/create/templates/common/icons/apple-touch-icon.png +0 -0
- package/create/templates/common/icons/favicon.png +0 -0
- package/create/templates/common/postcss.config.js +0 -5
- package/create/templates/common/splash-2732x2732.png +0 -0
- package/create/templates/common/tailwind/postcss.config.js +0 -5
- package/create/templates/common/tailwind/tailwind.config.js +0 -9
- package/create/templates/common/tailwind/tailwind.css +0 -3
- package/create/templates/common/webpack/build.js +0 -3
- package/create/templates/copy-assets.js +0 -1
- package/create/templates/core/babel.config.js +0 -11
- package/create/templates/core/copy-assets.js +0 -15
- package/create/templates/core/generate-home-page.js +0 -121
- package/create/templates/core/generate-root.js +0 -248
- package/create/templates/core/generate-routes.js +0 -129
- package/create/templates/core/generate-scripts.js +0 -45
- package/create/templates/core/pages/404.html +0 -20
- package/create/templates/core/pages/about.html +0 -26
- package/create/templates/core/pages/catalog.html +0 -40
- package/create/templates/core/pages/dynamic-route.html +0 -115
- package/create/templates/core/pages/form.html +0 -258
- package/create/templates/core/pages/left-page-1.html +0 -24
- package/create/templates/core/pages/left-page-2.html +0 -23
- package/create/templates/core/pages/product.html +0 -36
- package/create/templates/core/pages/request-and-load.html +0 -35
- package/create/templates/core/pages/settings.html +0 -252
- package/create/templates/create-folders.js +0 -1
- package/create/templates/generate-config-xml.js +0 -11
- package/create/templates/generate-index.js +0 -24
- package/create/templates/generate-manifest.js +0 -1
- package/create/templates/generate-recoil.js +0 -44
- package/create/templates/generate-routes.js +0 -1
- package/create/templates/generate-scripts.js +0 -1
- package/create/templates/generate-service-worker.js +0 -120
- package/create/templates/generate-store.js +0 -77
- package/create/templates/generate-styles.js +0 -56
- package/create/templates/generate-webpack-config.js +0 -253
- package/create/templates/generate-zmp-custom.js +0 -23
- package/create/templates/react/babel.config.js +0 -12
- package/create/templates/react/components/app-items.jsx +0 -44
- package/create/templates/react/components/navbar-back.jsx +0 -25
- package/create/templates/react/components/user-card.jsx +0 -18
- package/create/templates/react/copy-assets.js +0 -1
- package/create/templates/react/generate-home-page.js +0 -81
- package/create/templates/react/generate-root.js +0 -55
- package/create/templates/react/generate-routes.js +0 -1
- package/create/templates/react/generate-scripts.js +0 -42
- package/create/templates/react/pages/404.js +0 -19
- package/create/templates/react/pages/about.js +0 -44
- package/create/templates/react/pages/catalog.js +0 -98
- package/create/templates/react/pages/dynamic-route.js +0 -72
- package/create/templates/react/pages/form.js +0 -132
- package/create/templates/react/pages/index copy.js +0 -1
- package/create/templates/react/pages/index.js +0 -1
- package/create/templates/react/pages/settings.js +0 -62
- package/create/templates/react/pages/user.js +0 -37
- package/create/templates/react/vite.config.js +0 -11
- package/create/templates/react-typescript/_tsconfig.json +0 -33
- package/create/templates/react-typescript/components/app-items.js +0 -46
- package/create/templates/react-typescript/components/index.js +0 -1
- package/create/templates/react-typescript/components/navbar-back.js +0 -33
- package/create/templates/react-typescript/components/user-card.js +0 -25
- package/create/templates/react-typescript/copy-assets.js +0 -1
- package/create/templates/react-typescript/generate-home-page.js +0 -81
- package/create/templates/react-typescript/generate-root.js +0 -50
- package/create/templates/react-typescript/generate-routes.js +0 -1
- package/create/templates/react-typescript/generate-scripts.js +0 -42
- package/create/templates/react-typescript/pages/404.js +0 -19
- package/create/templates/react-typescript/pages/about.js +0 -44
- package/create/templates/react-typescript/pages/catalog.js +0 -98
- package/create/templates/react-typescript/pages/dynamic-route.js +0 -72
- package/create/templates/react-typescript/pages/form.js +0 -132
- package/create/templates/react-typescript/pages/index.js +0 -1
- package/create/templates/react-typescript/pages/settings.js +0 -62
- package/create/templates/react-typescript/pages/user.js +0 -37
- package/create/templates/react-typescript/vite.config.js +0 -21
- package/create/templates/svelte/babel.config.js +0 -10
- package/create/templates/svelte/copy-assets.js +0 -1
- package/create/templates/svelte/generate-home-page.js +0 -122
- package/create/templates/svelte/generate-root.js +0 -177
- package/create/templates/svelte/generate-routes.js +0 -76
- package/create/templates/svelte/generate-scripts.js +0 -31
- package/create/templates/svelte/pages/404.svelte +0 -10
- package/create/templates/svelte/pages/about.svelte +0 -16
- package/create/templates/svelte/pages/catalog.svelte +0 -31
- package/create/templates/svelte/pages/dynamic-route.svelte +0 -34
- package/create/templates/svelte/pages/form.svelte +0 -175
- package/create/templates/svelte/pages/left-page-1.svelte +0 -13
- package/create/templates/svelte/pages/left-page-2.svelte +0 -12
- package/create/templates/svelte/pages/product.svelte +0 -21
- package/create/templates/svelte/pages/request-and-load.svelte +0 -21
- package/create/templates/svelte/pages/settings.svelte +0 -175
- package/create/templates/vue/babel.config.js +0 -10
- package/create/templates/vue/components/header.vue +0 -28
- package/create/templates/vue/components/sun-and-moon.vue +0 -34
- package/create/templates/vue/copy-assets.js +0 -1
- package/create/templates/vue/generate-home-page.js +0 -50
- package/create/templates/vue/generate-root.js +0 -40
- package/create/templates/vue/generate-routes.js +0 -1
- package/create/templates/vue/generate-scripts.js +0 -46
- package/create/templates/vue/global-components.d.js +0 -1
- package/create/templates/vue/global-components.d.ts +0 -121
- package/create/templates/vue/icons/moon.svg +0 -3
- package/create/templates/vue/icons/sun.svg +0 -3
- package/create/templates/vue/pages/404.vue +0 -12
- package/create/templates/vue/pages/about.vue +0 -15
- package/create/templates/vue/pages/catalog.vue +0 -39
- package/create/templates/vue/pages/dynamic-route.vue +0 -34
- package/create/templates/vue/pages/form.vue +0 -162
- package/create/templates/vue/pages/left-page-1.vue +0 -14
- package/create/templates/vue/pages/left-page-2.vue +0 -11
- package/create/templates/vue/pages/product.vue +0 -31
- package/create/templates/vue/pages/request-and-load.vue +0 -25
- package/create/templates/vue/pages/settings.vue +0 -18
- package/create/templates/vue/vite.config.js +0 -11
- package/create/templates/zaui/_tsconfig.json +0 -33
- package/create/templates/zaui/babel.config.js +0 -12
- package/create/templates/zaui/components/user-card.jsx +0 -16
- package/create/templates/zaui/copy-assets.js +0 -1
- package/create/templates/zaui/generate-home-page.js +0 -91
- package/create/templates/zaui/generate-root.js +0 -33
- package/create/templates/zaui/generate-routes.js +0 -1
- package/create/templates/zaui/generate-scripts.js +0 -25
- package/create/templates/zaui/generate-user-card.js +0 -40
- package/create/templates/zaui/pages/about.js +0 -112
- package/create/templates/zaui/pages/form.js +0 -106
- package/create/templates/zaui/pages/index.js +0 -1
- package/create/templates/zaui/pages/user.js +0 -92
- package/create/templates/zaui/vite.config.js +0 -11
- package/create/utils/colors.js +0 -1
- package/create/utils/generate-gitignore.js +0 -1
- package/create/utils/generate-package-json.js +0 -1
- package/create/utils/generate-readme.js +0 -1
- package/create/utils/indent.js +0 -1
- package/create/utils/string.js +0 -1
- package/create/utils/styles-extension.js +0 -1
- package/create/utils/template-if.js +0 -1
- package/start/generate-hr-config.js +0 -1
package/README.md
CHANGED
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
# ZMP-CLI
|
|
2
|
+
CLI dùng để start, build, deploy Zalo Mini App
|
|
3
|
+
|
|
4
|
+
## Contribute
|
|
5
|
+
Project bao gồm các nhánh:
|
|
6
|
+
- master: nhánh chính tương ứng với version đang release
|
|
7
|
+
- develop: nhánh chính, source code mới nhất bao gồm các tính năng chuẩn bị cho lần release tiếp theo
|
|
8
|
+
- feature/*: nhánh tương ứng với chức năng đang phát triển (xoá sau khi hoàn thành)
|
|
9
|
+
- release/*-rc: nhánh tương ứng với các release candidate (xoá sau khi hoàn thành)
|
|
10
|
+
- hotfix/*: nhánh tương ứng với bug cần fix cho version đang release (xoá sau khi hoàn thành)
|
|
11
|
+
|
|
12
|
+
Suggest sử dụng git flow để quản lí các nhánh:
|
|
13
|
+
1. Cài đặt và tìm hiểu git flow theo [hướng dẫn](https://danielkummer.github.io/git-flow-cheatsheet/index.vi_VN.html)
|
|
14
|
+
2. Init git flow tương ứng với các branch trên: ```git flow init```
|
|
15
|
+
|
|
16
|
+
Phát triển một tính năng mới:
|
|
17
|
+
1. Để bắt đầu code tính năng mới: ```git flow feature start feature_1```
|
|
18
|
+
2. Sau khi code và test xong: ```git flow feature finish feature_1```, tính năng sẽ được merge vào nhánh develop
|
|
19
|
+
|
|
20
|
+
Tạo một release candidate (suffix "-rc"):
|
|
21
|
+
1. ```git flow release start <major>.<minor>.<patch>-rc```
|
|
22
|
+
2. Sau khi test xong: ```git flow release finish <major>.<minor>.<patch>-rc```, tính năng sẽ được merge vào nhánh master để chờ release và nhánh develop
|
|
23
|
+
|
|
24
|
+
Để fix bug trên bản release:
|
|
25
|
+
1. ```git flow hotfix start bug-a```
|
|
26
|
+
2. Sau khi fix xong: ```git flow hotfix finish bug-a```, tính năng sẽ được merge vào nhánh master để chờ release và nhánh develop
|
|
27
|
+
|
|
28
|
+
Để fix bug trên bản release-candidate:
|
|
29
|
+
1. Tạo nhánh mới từ nhánh rc muốn fix với refix: ```git branch ```
|
|
30
|
+
2. Sau khi fix xong: ```git flow hotfix finish bug-a```, tính năng sẽ được merge vào nhánh master để chờ release và nhánh develop
|
|
31
|
+
|
|
32
|
+
Để release nhánh master:
|
|
33
|
+
1. ```npm run release```
|
|
34
|
+
2. Nhập version:
|
|
35
|
+
- patch: fix bug
|
|
36
|
+
- minor: thêm tính năng
|
|
37
|
+
- major: thay đổi lớn có ảnh hưởng tới version cũ
|
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x309964=_0x1432;(function(_0x11c86c,_0x15d438){const _0x24b6f7=_0x1432,_0x5e6ba5=_0x11c86c();while(!![]){try{const _0x5e1f17=-parseInt(_0x24b6f7(0x205))/0x1+-parseInt(_0x24b6f7(0x208))/0x2*(parseInt(_0x24b6f7(0x1f3))/0x3)+parseInt(_0x24b6f7(0x211))/0x4+parseInt(_0x24b6f7(0x206))/0x5+-parseInt(_0x24b6f7(0x1fe))/0x6+-parseInt(_0x24b6f7(0x1fc))/0x7+parseInt(_0x24b6f7(0x1fa))/0x8;if(_0x5e1f17===_0x15d438)break;else _0x5e6ba5['push'](_0x5e6ba5['shift']());}catch(_0x237d14){_0x5e6ba5['push'](_0x5e6ba5['shift']());}}}(_0x4323,0x743ae));function _0x1432(_0x5a7de1,_0xfc557e){const _0x4323f0=_0x4323();return _0x1432=function(_0x143283,_0x494574){_0x143283=_0x143283-0x1e8;let _0x4ffc72=_0x4323f0[_0x143283];return _0x4ffc72;},_0x1432(_0x5a7de1,_0xfc557e);}const e=require('chalk'),r=require(_0x309964(0x20b)),t=require(_0x309964(0x20a)),i=require(_0x309964(0x1ff))['default'],o=require(_0x309964(0x1ee)),{buildApp:n}=require(_0x309964(0x214)),u=require(_0x309964(0x203)),a=require(_0x309964(0x1ea)),l=require(_0x309964(0x1eb)),{errorExit:s}=require('../utils/error'),p=require(_0x309964(0x1f5)),g=require(_0x309964(0x1f0)),{existsSync:c}=require('fs'),w=l[_0x309964(0x1fb)]('NODE_ENV')||_0x309964(0x215),d=e[_0x309964(0x200)](_0x309964(0x213)),f=e[_0x309964(0x207)]('Warning:\x20This\x20CLI\x20version\x20will\x20work\x20better\x20with\x20zmp-framework\x20version\x201.5.0\x20or\x20higher'),m=r('production'===w?_0x309964(0x1f6):_0x309964(0x202));function _0x4323(){const _0x4b28ce=['217976yNFMCS','Error\x20building\x20project','Building...\x20(Please\x20wait,\x20it\x20can\x20take\x20a\x20while)','zmp-cli-core','production','exports','nextVersion','../utils/get-app-info','../utils/env','statusError','bold','@rollup/plugin-replace','latestVersion','../utils/generate-pages-map','statusDone','join','80643ulOfrT','text','../config','Building\x20for\x20production...','start','green','writeFileSync','17862824flUkVf','getEnv','757960hlYrlv','node_modules','5045952vWgBuv','@rollup/plugin-dynamic-import-vars','gray','Build\x20Done!\x0a','Building\x20development\x20version...','../utils/fs-extra','www/','800165RzEXuv','2110130ICRyiQ','yellow','36fLVumk','filename','path','ora','cwd','statusStart','appConfig','zmp-framework','www'];_0x4323=function(){return _0x4b28ce;};return _0x4323();}module[_0x309964(0x1e8)]=async(_0x3766c4={},_0x4e3c21)=>{const _0x9f488e=_0x309964;let _0x14310d=_0x3766c4[_0x9f488e(0x20c)]||process['cwd'](),_0x1a6837=_0xd09c84=>t[_0x9f488e(0x1f2)](_0x14310d,_0xd09c84),_0x5cf312=_0x3766c4['appConfigJson']||require(_0x1a6837(p[_0x9f488e(0x209)][_0x9f488e(0x20e)]));_0x4e3c21||(_0x4e3c21={'statusStart'(){},'statusDone'(){},'statusError'(){},'text'(){},'error'(){}}),c(t[_0x9f488e(0x1f2)](_0x14310d,_0x9f488e(0x1fd),_0x9f488e(0x20f)))&&_0x4e3c21[_0x9f488e(0x1f4)](f),m[_0x9f488e(0x1f7)](),_0x4e3c21[_0x9f488e(0x20d)](d);try{let _0x52b0ca=l[_0x9f488e(0x1fb)](p['env']['appId']),_0x3b9aca=_0x3766c4[_0x9f488e(0x1e9)];if(!_0x3b9aca){let _0x54592f=await a(_0x52b0ca,_0x3766c4),_0x3366dd=_0x54592f&&_0x54592f[_0x9f488e(0x1ef)]&&Number(_0x54592f[_0x9f488e(0x1ef)]);null==_0x3366dd&&(_0x3366dd=0x0),_0x3b9aca=_0x3366dd+0x1;}let {appConfigJson:_0x5e6a48}=await n({'cwd':_0x14310d,'mode':w,'appId':_0x52b0ca,'nextVersion':_0x3b9aca,'appConfig':_0x5cf312,'outDir':_0x9f488e(0x210),'vite2RollupPlugins':[o({'values':{'ZMP_IMPORT_PAGES':()=>g(_0x14310d)}}),i({'warnOnError':!0x0})],'customLogger':{'info':_0x4e3c21[_0x9f488e(0x1f4)],'warn':_0x4e3c21[_0x9f488e(0x1f4)],'warnOnce':_0x4e3c21['text'],'error':_0x4e3c21['error']}});return _0x5e6a48&&u[_0x9f488e(0x1f9)](_0x1a6837(_0x9f488e(0x204)+p[_0x9f488e(0x209)][_0x9f488e(0x20e)]),JSON['stringify'](_0x5e6a48)),_0x4e3c21[_0x9f488e(0x1f1)](''+e[_0x9f488e(0x1ed)][_0x9f488e(0x1f8)](_0x9f488e(0x201))),_0x5e6a48;}catch(_0x4fa4ac){_0x4e3c21[_0x9f488e(0x1ec)](_0x9f488e(0x212)),s(_0x4fa4ac);return;}};
|
package/config/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var _0x5a419c=_0x2ec7;(function(_0x50a01a,_0x4e2596){var _0x34c54a=_0x2ec7,_0x276bd6=_0x50a01a();while(!![]){try{var _0x21b374=parseInt(_0x34c54a(0x15e))/0x1+-parseInt(_0x34c54a(0x14a))/0x2*(parseInt(_0x34c54a(0x157))/0x3)+parseInt(_0x34c54a(0x148))/0x4*(parseInt(_0x34c54a(0x15a))/0x5)+parseInt(_0x34c54a(0x159))/0x6*(parseInt(_0x34c54a(0x151))/0x7)+-parseInt(_0x34c54a(0x14e))/0x8*(parseInt(_0x34c54a(0x15f))/0x9)+-parseInt(_0x34c54a(0x15d))/0xa*(-parseInt(_0x34c54a(0x14b))/0xb)+-parseInt(_0x34c54a(0x158))/0xc;if(_0x21b374===_0x4e2596)break;else _0x276bd6['push'](_0x276bd6['shift']());}catch(_0x4f0ec1){_0x276bd6['push'](_0x276bd6['shift']());}}}(_0x18e7,0x6d73b));function _0x2ec7(_0x93a5d6,_0x52e9e1){var _0x18e70f=_0x18e7();return _0x2ec7=function(_0x2ec7ae,_0x510523){_0x2ec7ae=_0x2ec7ae-0x147;var _0x97f336=_0x18e70f[_0x2ec7ae];return _0x97f336;},_0x2ec7(_0x93a5d6,_0x52e9e1);}function _0x18e7(){var _0x48aae0=['app-config.json','https://zmp-api.developers.zalo.me/','//h5.zdn.vn/zapps/','638967jHLJtE','8292300THGbmE','1584QeOtjl','3471345wyVAaC','admin/login','app/upload-chunk','2087570PPVAmC','32432MqZbPO','9EprKkN','octet','exports','ZMP_TOKEN','4MnHCtS','cwd','4PGwLEw','33ToOZAF','app/get-info','zmp-cli.json','1186224MbRYdK','Request\x20Timeout','APP_ID','9562wAkUtO','/.env','App\x20config\x20not\x20found.\x20Please\x20re-init\x20project.\x20(Tips:\x20Run\x20\x27zmp\x20init\x27)'];_0x18e7=function(){return _0x48aae0;};return _0x18e7();}module[_0x5a419c(0x161)]={'filename':{'appConfig':_0x5a419c(0x154),'zmpConfig':_0x5a419c(0x14d),'packageJson':'package.json'},'api_domain':_0x5a419c(0x155),'zdn_url':_0x5a419c(0x156),'path':{'login':_0x5a419c(0x15b),'requestLogin':'admin/request-login','checkLoginStatus':'admin/get-login-status','uploadAppByChunk':_0x5a419c(0x15c),'requestUploadResumable':'app/request-upload','getAppInfo':_0x5a419c(0x14c)},'dirname':__dirname,'root_env':()=>process[_0x5a419c(0x149)]()+_0x5a419c(0x152),'env':{'appId':_0x5a419c(0x150),'token':_0x5a419c(0x147)},'error_code':{'app_config_not_found':-0x578,'permission_denied':-0x7d1,'request_timeout':-0x7d3},'error_msg':{'app_config_not_found':_0x5a419c(0x153),'permission_denied':'Permission\x20denied.\x20Please\x20login\x20again.\x20(Tips:\x20Run\x20\x27zmp\x20login\x27)','request_timeout':_0x5a419c(0x14f)},'resumable_option':{'chunkSize':0x7d000,'simultaneousUploads':0x4,'testChunks':!0x0,'throttleProgressCallbacks':0x1,'method':_0x5a419c(0x160),'forceChunkSize':!0x1}};
|
package/create/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x465e0a=_0x5a08;(function(_0x585675,_0x43c162){const _0x19f2e2=_0x5a08,_0x10d8ff=_0x585675();while(!![]){try{const _0xf8e42b=-parseInt(_0x19f2e2(0x107))/0x1*(parseInt(_0x19f2e2(0x133))/0x2)+parseInt(_0x19f2e2(0x10d))/0x3*(parseInt(_0x19f2e2(0x11b))/0x4)+parseInt(_0x19f2e2(0x11c))/0x5+parseInt(_0x19f2e2(0x134))/0x6+-parseInt(_0x19f2e2(0x109))/0x7*(-parseInt(_0x19f2e2(0x12f))/0x8)+parseInt(_0x19f2e2(0x135))/0x9+-parseInt(_0x19f2e2(0x100))/0xa;if(_0xf8e42b===_0x43c162)break;else _0x10d8ff['push'](_0x10d8ff['shift']());}catch(_0x3788cf){_0x10d8ff['push'](_0x10d8ff['shift']());}}}(_0x221a,0x1c882));function _0x5a08(_0x5ca05f,_0x4b2d15){const _0x221a01=_0x221a();return _0x5a08=function(_0x5a088f,_0x1ceae1){_0x5a088f=_0x5a088f-0xfb;let _0xe3f64=_0x221a01[_0x5a088f];return _0xe3f64;},_0x5a08(_0x5ca05f,_0x4b2d15);}const e=require(_0x465e0a(0x113)),t=require(_0x465e0a(0x11f)),n=require(_0x465e0a(0x132)),r=require(_0x465e0a(0x115)),{initProject:i}=require('zmp-cli-core'),o=require(_0x465e0a(0xff)),{errorExit:s}=require(_0x465e0a(0x137)),a=require(_0x465e0a(0xfe)),c=require(_0x465e0a(0xfc)),l=require(_0x465e0a(0x12b)),{renameSync:u,existsSync:p}=require('fs'),d=n[_0x465e0a(0x11d)](_0x465e0a(0x110));async function f(_0x26492a,_0x3d626e){const _0x55246a=_0x465e0a;_0x3d626e[_0x55246a(0x11e)](_0x55246a(0x12d));try{let {cwd:_0x24451e,template:_0x695392,folderName:_0x18c58a,name:_0x590c0d}=_0x26492a;await i({'cwd':_0x24451e,'template':_0x695392,'folderName':_0x18c58a,'projectName':_0x590c0d});}catch(_0x5aaa2){_0x3d626e[_0x55246a(0x12c)]('Error\x20creating\x20project\x20files'),s(_0x5aaa2);}_0x3d626e[_0x55246a(0x123)](_0x55246a(0x12d));}async function m(_0xd24745){const _0x505856=_0x465e0a;let _0x3536e6=t[_0x505856(0x10c)](_0xd24745[_0x505856(0x124)],_0x505856(0x117)),_0x3d577f=t[_0x505856(0x10c)](_0xd24745[_0x505856(0x124)],_0xd24745[_0x505856(0x10b)],_0x505856(0x117));p(_0x3536e6)&&!p(_0x3d577f)&&u(_0x3536e6,_0x3d577f);}async function g(_0x84c60a,_0x1e1307){const _0x59a298=_0x465e0a;let {cwd:_0x2040c5}=_0x84c60a;_0x1e1307[_0x59a298(0x11e)](_0x59a298(0x108));let _0x4a203f=c(_0x84c60a);o[_0x59a298(0x126)](t[_0x59a298(0xfd)](_0x2040c5,a[_0x59a298(0x125)]['appConfig']),_0x4a203f[_0x59a298(0x11a)]),_0x1e1307[_0x59a298(0x123)]('Generating\x20app-config.json');}async function $(_0x447488,_0x330d1c){const _0xee1252=_0x465e0a;let _0x59b09c=t['join'](_0x447488[_0xee1252(0x124)],_0x447488[_0xee1252(0x10b)]);_0x330d1c['statusStart'](_0xee1252(0x120)+d);let _0x490e4b=_0x59b09c===process['cwd']();try{_0x490e4b?await e[_0xee1252(0x102)](_0xee1252(0x12e),!0x0):await e[_0xee1252(0x102)](_0xee1252(0x112)+_0x59b09c['replace'](/ /g,'\x5c\x20')+_0xee1252(0x131),!0x0);}catch(_0x17f78f){_0x330d1c['statusError'](_0xee1252(0x116)),s(_0x17f78f);return;}_0x330d1c[_0xee1252(0x123)](_0xee1252(0x118));}function _0x221a(){const _0x4cc4cd=['../utils/fs-extra','3768150tUOIDg','name','promise','https://mini.zalo.me/','README.md','text','icon','41fXmeCv','Generating\x20app-config.json','204442AEsRji','info','folderName','resolve','10929zVCCha','Next\x20steps:','\x0a-\x20📖\x20Visit\x20documentation\x20at\x20','(Please\x20wait,\x20it\x20can\x20take\x20a\x20while)','bold','cd\x20','exec-sh','\x0a-\x20📖\x20Check\x20','log-symbols','Error\x20installing\x20NPM\x20Dependencies','.env','Installing\x20NPM\x20Dependencies','description','content','20XEEWWd','790290tZTibO','gray','statusStart','path','Installing\x20NPM\x20Dependencies\x20','\x20Run\x20\x22npm\x20run\x20','\x0a-\x20🔥\x20Run\x20\x22zmp\x20deploy\x22\x20-\x20deploy\x20mini\x20app\x20for\x20production\x0a-\x20📖\x20Visit\x20instruction\x20at\x20','statusDone','cwd','filename','writeFileSync','exports','https://mini.zalo.me/blog/huong-dan-chuyen-doi-web-app-thanh-zalo-mini-app-trong-30-phut/','success','\x0a-\x20👉\x20Run\x20\x22cd\x20','./utils/generate-npm-scripts','statusError','Creating\x20project\x20files','npm\x20install','40hVTpdd','\x20💪\x0a\x0a','\x20&&\x20npm\x20install','chalk','2180qKwCUk','1048446BXqnYD','371943KWZxeD','newProject','../utils/error','Done!','./utils/generate-app-config','join','../config'];_0x221a=function(){return _0x4cc4cd;};return _0x221a();}async function h(_0x348b42,_0x4a066f){const _0x4ea2e0=_0x465e0a;let _0x3a0a14=l(['s','r'])['map'](_0x10dfdf=>'-\x20'+_0x10dfdf[_0x4ea2e0(0x106)]+_0x4ea2e0(0x121)+_0x10dfdf[_0x4ea2e0(0x101)]+'\x22\x20-\x20'+_0x10dfdf[_0x4ea2e0(0x119)]),_0x1eefb2='\x0a'+n[_0x4ea2e0(0x111)](r[_0x4ea2e0(0x129)])+'\x20'+n[_0x4ea2e0(0x111)](_0x4ea2e0(0xfb))+_0x4ea2e0(0x130)+n[_0x4ea2e0(0x111)](r['info'])+'\x20'+n['bold'](_0x4ea2e0(0x10e))+_0x4ea2e0(0x12a)+_0x348b42[_0x4ea2e0(0x10b)]+'\x22\x0a'+_0x3a0a14[_0x4ea2e0(0xfd)]('\x0a')+_0x4ea2e0(0x10f)+n[_0x4ea2e0(0x111)](_0x4ea2e0(0x103))+_0x4ea2e0(0x114)+n[_0x4ea2e0(0x111)](_0x4ea2e0(0x104))+'\x20in\x20project\x20root\x20folder\x20with\x20further\x20instructions\x0a\x20\x20';_0x4a066f[_0x4ea2e0(0x105)](_0x1eefb2);}async function y(_0x4473ea,_0x3d79a3){const _0x40f31f=_0x465e0a;let _0x17efb7='\x0a'+n['bold'](r[_0x40f31f(0x129)])+'\x20'+n['bold']('Done!')+'\x20💪\x0a\x0a'+n['bold'](r[_0x40f31f(0x10a)])+'\x20'+n['bold'](_0x40f31f(0x10e))+_0x40f31f(0x122)+n[_0x40f31f(0x111)](_0x40f31f(0x128))+'\x0a\x20\x20';_0x3d79a3[_0x40f31f(0x105)](_0x17efb7);}module[_0x465e0a(0x127)]=async(_0x2a663d={},_0x2e8d7a)=>{const _0x33a748=_0x465e0a;for(let _0x3a990b of(_0x2e8d7a||(_0x2e8d7a={'statusStart'(){},'statusDone'(){},'statusError'(){},'text'(){},'error'(){}}),_0x2a663d[_0x33a748(0x136)]?[f,m,$,h]:[g,y]))await _0x3a990b(_0x2a663d,_0x2e8d7a);};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x10b754=_0x569d;(function(_0x5d7d65,_0x50fcc5){const _0x59f066=_0x569d,_0x373103=_0x5d7d65();while(!![]){try{const _0xffce73=parseInt(_0x59f066(0x1a5))/0x1*(-parseInt(_0x59f066(0x1a6))/0x2)+parseInt(_0x59f066(0x19e))/0x3+-parseInt(_0x59f066(0x19b))/0x4*(-parseInt(_0x59f066(0x1a3))/0x5)+parseInt(_0x59f066(0x1a7))/0x6+parseInt(_0x59f066(0x1a0))/0x7*(parseInt(_0x59f066(0x19a))/0x8)+-parseInt(_0x59f066(0x19d))/0x9+parseInt(_0x59f066(0x19f))/0xa*(-parseInt(_0x59f066(0x199))/0xb);if(_0xffce73===_0x50fcc5)break;else _0x373103['push'](_0x373103['shift']());}catch(_0x57f8e3){_0x373103['push'](_0x373103['shift']());}}}(_0x5aa7,0xc55e2));module[_0x10b754(0x1a2)]=function(_0x59a9b8){const _0x407f11=_0x10b754;let {name:_0x396ec2}=_0x59a9b8,_0x4a7fd1={'title':_0x396ec2,'headerTitle':_0x396ec2,'headerColor':_0x407f11(0x1a4),'textColor':_0x407f11(0x1a1),'leftButton':'back','statusBar':_0x407f11(0x19c),'actionBarHidden':!0x1,'hideAndroidBottomNavigationBar':!0x1,'hideIOSSafeAreaBottom':!0x1};return{'content':JSON[_0x407f11(0x1a8)]({'app':_0x4a7fd1,'listCSS':[],'listSyncJS':[],'listAsyncJS':[]},'',0x2)['trim'](),'appConfig':_0x4a7fd1};};function _0x569d(_0x16f1b6,_0x3461da){const _0x5aa7bc=_0x5aa7();return _0x569d=function(_0x569d3,_0x36fcd7){_0x569d3=_0x569d3-0x199;let _0x130add=_0x5aa7bc[_0x569d3];return _0x130add;},_0x569d(_0x16f1b6,_0x3461da);}function _0x5aa7(){const _0x5cf2d2=['40GgUrsl','4aKYMuv','normal','5345289gjkACG','970800eJAMSz','50RUuVfe','222243kDmNhq','white','exports','7922785GgUQIX','#1843EF','205152RqxQyd','12WbInqX','7393584TfEZrC','stringify','1465013iGmgnY'];_0x5aa7=function(){return _0x5cf2d2;};return _0x5aa7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0x404c4c=_0xf931;(function(_0x34b3bb,_0x5704ca){const _0x565b61=_0xf931,_0x1b29d7=_0x34b3bb();while(!![]){try{const _0x4bbbb2=-parseInt(_0x565b61(0xb9))/0x1+-parseInt(_0x565b61(0xba))/0x2+parseInt(_0x565b61(0xb5))/0x3+-parseInt(_0x565b61(0xbf))/0x4*(parseInt(_0x565b61(0xc2))/0x5)+parseInt(_0x565b61(0xc1))/0x6+parseInt(_0x565b61(0xb7))/0x7*(-parseInt(_0x565b61(0xb8))/0x8)+parseInt(_0x565b61(0xb2))/0x9;if(_0x4bbbb2===_0x5704ca)break;else _0x1b29d7['push'](_0x1b29d7['shift']());}catch(_0x3bb14e){_0x1b29d7['push'](_0x1b29d7['shift']());}}}(_0x45e3,0x75c6e));function _0xf931(_0x4424d0,_0x5dbe6b){const _0x45e32f=_0x45e3();return _0xf931=function(_0xf9313b,_0x4a4748){_0xf9313b=_0xf9313b-0xb2;let _0x334616=_0x45e32f[_0xf9313b];return _0x334616;},_0xf931(_0x4424d0,_0x5dbe6b);}const i=require(_0x404c4c(0xb3));module[_0x404c4c(0xc0)]=(_0x17170c=['s','r'])=>_0x17170c[_0x404c4c(0xb6)](_0x1b4320=>({'icon':i[_0x404c4c(0xbd)][_0x1b4320][_0x404c4c(0xb4)],'name':i[_0x404c4c(0xbd)][_0x1b4320][_0x404c4c(0xbe)],'script':i[_0x404c4c(0xbd)][_0x1b4320][_0x404c4c(0xc3)],'description':i[_0x404c4c(0xbd)][_0x1b4320][_0x404c4c(0xbc)]})),module['exports'][_0x404c4c(0xbb)]=(_0x1c60af=['t'])=>_0x1c60af['map'](_0x490574=>({'icon':i[_0x404c4c(0xc4)][_0x490574]['icon'],'name':i[_0x404c4c(0xc4)][_0x490574][_0x404c4c(0xbe)],'script':i[_0x404c4c(0xc4)][_0x490574][_0x404c4c(0xc3)],'description':i[_0x404c4c(0xc4)][_0x490574][_0x404c4c(0xbc)]}));function _0x45e3(){const _0x5e76ff=['tailwind','18841338MaUmDR','./npm-scripts','icon','2045265dMxFJu','map','7JMMAPy','7302864zJZVuD','878796kxtHeW','745570roPnNR','generateTailWindScripts','description','default','name','100BiAclM','exports','3102246vaVIPm','129085Wftkka','script'];_0x45e3=function(){return _0x5e76ff;};return _0x45e3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x534895=_0x162b;(function(_0x167604,_0x251caf){const _0x3e8281=_0x162b,_0x4346e5=_0x167604();while(!![]){try{const _0x4dfb6d=-parseInt(_0x3e8281(0x1b0))/0x1*(-parseInt(_0x3e8281(0x199))/0x2)+-parseInt(_0x3e8281(0x1a0))/0x3*(parseInt(_0x3e8281(0x197))/0x4)+parseInt(_0x3e8281(0x19b))/0x5*(parseInt(_0x3e8281(0x19e))/0x6)+-parseInt(_0x3e8281(0x1a1))/0x7+-parseInt(_0x3e8281(0x192))/0x8+-parseInt(_0x3e8281(0x196))/0x9*(parseInt(_0x3e8281(0x18f))/0xa)+parseInt(_0x3e8281(0x1a5))/0xb;if(_0x4dfb6d===_0x251caf)break;else _0x4346e5['push'](_0x4346e5['shift']());}catch(_0x8d9c3d){_0x4346e5['push'](_0x4346e5['shift']());}}}(_0x346c,0x6f7a8));function _0x162b(_0x19b652,_0x5eb23a){const _0x346cbc=_0x346c();return _0x162b=function(_0x162be7,_0x35cb7d){_0x162be7=_0x162be7-0x18e;let _0x3801e3=_0x346cbc[_0x162be7];return _0x3801e3;},_0x162b(_0x19b652,_0x5eb23a);}const e=require(_0x534895(0x1a2)),r=require(_0x534895(0x1aa)),{INIT_TEMPLATES:a}=require(_0x534895(0x1a4)),t=[{'type':_0x534895(0x190),'name':_0x534895(0x19f),'message':_0x534895(0x195),'choices':[{'name':_0x534895(0x1af),'value':!0x0,'short':'New\x20project'},{'name':'Using\x20ZMP\x20to\x20deploy\x20only','value':!0x1,'short':'Existing\x20project'}]},{'type':'list','name':'template','when':_0x22dfa0=>_0x22dfa0[_0x534895(0x19f)],'message':'Choose\x20a\x20template:','choices':[...a[_0x534895(0x1a7)](_0x1844b6=>_0x1844b6[_0x534895(0x1ae)])[_0x534895(0x1ad)](_0x45a2e9=>({'name':_0x45a2e9[_0x534895(0x1a3)],'value':_0x45a2e9})),new e[(_0x534895(0x194))](),...a[_0x534895(0x1a7)](_0x2d05bf=>!_0x2d05bf[_0x534895(0x1ae)])[_0x534895(0x1ad)](_0x4977b7=>({'name':_0x4977b7['name'],'value':_0x4977b7}))]},{'type':_0x534895(0x198),'name':'name','message':_0x534895(0x191),'default':_0x138c07=>{const _0x358c69=_0x534895;let {template:_0x2c2cc2}=_0x138c07;return _0x2c2cc2&&!_0x2c2cc2['isBlank']?_0x358c69(0x1ab)+_0x2c2cc2[_0x358c69(0x1a3)][_0x358c69(0x19a)](_0x358c69(0x1a9),'')+_0x358c69(0x1a8):_0x358c69(0x18e);},'validate':_0xcbbd3=>new Promise((_0x80d130,_0x52c4ee)=>{_0xcbbd3?_0x80d130(!0x0):_0x52c4ee(Error('App\x20name\x20is\x20required'));})},{'type':_0x534895(0x198),'name':'folderName','when':_0xfb7619=>_0xfb7619[_0x534895(0x19f)],'message':'Folder\x20name:','suffix':'\x0a'+r[_0x534895(0x19d)](_0x534895(0x19c)),'default':_0x25b47e=>{const _0x100efa=_0x534895;let {name:_0x58b8e6}=_0x25b47e;return _0x58b8e6[_0x100efa(0x19a)](/ /g,'-')[_0x100efa(0x19a)](/[^a-zA-Z0-9-]/g,'')['toLowerCase']();},'validate':_0x8f5631=>new Promise((_0x2202d9,_0x432357)=>{_0x8f5631?_0x2202d9(!0x0):_0x432357(Error('Folder\x20name\x20is\x20required'));})}];module['exports']=function(){const _0x240da9=_0x534895;return e[_0x240da9(0x1ac)](t)[_0x240da9(0x1a6)](_0x1bfebd=>Promise[_0x240da9(0x193)](_0x1bfebd));};function _0x346c(){const _0x2191fc=['chalk','My\x20','prompt','map','isBlank','Create\x20a\x20new\x20ZMP\x20project','25891ijFWhv','My\x20App','795890ORcpsX','list','App\x20(project)\x20name:','2292808ODJJNN','resolve','Separator','What\x20action\x20you\x20want\x20to\x20do?','45COEVzO','4rFGUXf','input','4jjfDQM','replace','515hYsYnu','(A\x20new\x20folder\x20with\x20this\x20name\x20will\x20be\x20created\x20in\x20the\x20selected\x20directory)','italic','2406jHslZQ','newProject','438603EOmkkj','1571395ExPSPc','inquirer','name','zmp-cli-core','15606393DWKdzy','then','filter','\x20App','ZaUI\x20'];_0x346c=function(){return _0x2191fc;};return _0x346c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x3964d2=_0x401a;(function(_0x337f84,_0x170f2c){const _0x13ff1d=_0x401a,_0x522a48=_0x337f84();while(!![]){try{const _0x21a9a7=-parseInt(_0x13ff1d(0x15e))/0x1+-parseInt(_0x13ff1d(0x15a))/0x2*(-parseInt(_0x13ff1d(0x157))/0x3)+parseInt(_0x13ff1d(0x16a))/0x4+-parseInt(_0x13ff1d(0x165))/0x5*(parseInt(_0x13ff1d(0x169))/0x6)+-parseInt(_0x13ff1d(0x172))/0x7+-parseInt(_0x13ff1d(0x15c))/0x8*(parseInt(_0x13ff1d(0x159))/0x9)+parseInt(_0x13ff1d(0x167))/0xa*(parseInt(_0x13ff1d(0x158))/0xb);if(_0x21a9a7===_0x170f2c)break;else _0x522a48['push'](_0x522a48['shift']());}catch(_0x2cbbd2){_0x522a48['push'](_0x522a48['shift']());}}}(_0x59cd,0x4a73c));function _0x401a(_0x5f6a31,_0x6b941b){const _0x59cd15=_0x59cd();return _0x401a=function(_0x401aec,_0x426dd0){_0x401aec=_0x401aec-0x155;let _0x4db776=_0x59cd15[_0x401aec];return _0x4db776;},_0x401a(_0x5f6a31,_0x6b941b);}function _0x59cd(){const _0x502b9f=['run\x20development\x20server','exports','forEach','npm\x20run\x20serve','serve','map','2590280fHHCNA','split','dev','build\x20tailwind\x20css','1749AHPZgs','2465441Pgaldb','1926hRiDlp','544zzIeeR','deploy','232zxIAvj','zmp\x20deploy','333134kboRPC','httpServer','zmp\x20start','name','prod','default','postcss\x20src/css/tailwind.css\x20-o\x20src/css/styles.css','10QhmXKN','tailwind','30QIYDJL','start','1175442NycelZ','2300724DLKjDh','build:css'];_0x59cd=function(){return _0x502b9f;};return _0x59cd();}const e={'d':_0x3964d2(0x155),'p':_0x3964d2(0x162),'s':_0x3964d2(0x168),'v':_0x3964d2(0x170),'r':_0x3964d2(0x15b),'t':_0x3964d2(0x16b)};function s(_0x5588ce){const _0x3ca855=_0x3964d2;return _0x5588ce[_0x3ca855(0x173)]('_')[0x0][_0x3ca855(0x173)]('')[_0x3ca855(0x171)](_0x14b623=>e[_0x14b623])['join']('-');}const t={'default':{'s':{'icon':'🔥','script':_0x3964d2(0x160),'description':_0x3964d2(0x16c)},'r':{'icon':'🙏','script':_0x3964d2(0x15d),'description':'deploy\x20mini\x20app\x20for\x20production'}},'httpServer':{'v':{'icon':'🔧','script':'http-server\x20./www/\x20-o\x20-c\x201\x20-a\x20localhost\x20-p\x208080','description':'run\x20development\x20server'},'s':{'icon':'🔥','script':_0x3964d2(0x16f),'description':_0x3964d2(0x16c)}},'tailwind':{'t':{'icon':'🔧','script':_0x3964d2(0x164),'description':_0x3964d2(0x156)}}};Object['keys'](t[_0x3964d2(0x163)])[_0x3964d2(0x16e)](_0x178108=>{const _0x922731=_0x3964d2;t[_0x922731(0x163)][_0x178108][_0x922731(0x161)]=s(_0x178108);}),Object['keys'](t[_0x3964d2(0x15f)])[_0x3964d2(0x16e)](_0x2952b1=>{const _0x34fae6=_0x3964d2;t['httpServer'][_0x2952b1][_0x34fae6(0x161)]=s(_0x2952b1);}),Object['keys'](t[_0x3964d2(0x166)])[_0x3964d2(0x16e)](_0x104396=>{t['tailwind'][_0x104396]['name']=s(_0x104396);}),module[_0x3964d2(0x16d)]=t;
|
package/deploy/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x5a7f(_0x5e8807,_0x2cc1e2){const _0x260490=_0x2604();return _0x5a7f=function(_0x5a7f06,_0x3764d3){_0x5a7f06=_0x5a7f06-0x17f;let _0x5d453c=_0x260490[_0x5a7f06];return _0x5d453c;},_0x5a7f(_0x5e8807,_0x2cc1e2);}const _0x379bbf=_0x5a7f;(function(_0x5439ee,_0x170389){const _0x383dc9=_0x5a7f,_0x12a863=_0x5439ee();while(!![]){try{const _0x2c225c=parseInt(_0x383dc9(0x1a1))/0x1+-parseInt(_0x383dc9(0x1b7))/0x2*(parseInt(_0x383dc9(0x1bb))/0x3)+-parseInt(_0x383dc9(0x190))/0x4*(-parseInt(_0x383dc9(0x1b9))/0x5)+-parseInt(_0x383dc9(0x1ae))/0x6+-parseInt(_0x383dc9(0x1a8))/0x7*(parseInt(_0x383dc9(0x189))/0x8)+parseInt(_0x383dc9(0x187))/0x9+parseInt(_0x383dc9(0x198))/0xa;if(_0x2c225c===_0x170389)break;else _0x12a863['push'](_0x12a863['shift']());}catch(_0x186366){_0x12a863['push'](_0x12a863['shift']());}}}(_0x2604,0xc584f));const e=require(_0x379bbf(0x184)),t=require(_0x379bbf(0x18c)),r=require('zip-local'),i=require(_0x379bbf(0x19b)),a=require('qrcode-terminal'),s=require('../config'),n=require(_0x379bbf(0x19f)),o=require('../utils/env'),{errorExit:l}=require(_0x379bbf(0x18a)),p=require(_0x379bbf(0x1b8)),u=require(_0x379bbf(0x1a0)),c=require('./utils/request-upload'),d=e[_0x379bbf(0x1b4)](_0x379bbf(0x18d)),f={'statusStart'(){},'statusDone'(){},'statusText'(){},'statusError'(){},'text'(){},'error'(){},'showOnUI'(){}};module[_0x379bbf(0x199)]=async(_0x14e8ab={},_0x27b6af=f)=>{const _0x1dd88a=_0x379bbf;let _0x5c59a6,_0x210a22,_0x10bd15,_0x297ec0=_0x14e8ab[_0x1dd88a(0x1b5)]||process[_0x1dd88a(0x1b5)](),_0x33e1ab=_0x14e8ab[_0x1dd88a(0x18f)]||_0x1dd88a(0x19e),_0x157678=s[_0x1dd88a(0x186)],_0x8267e9=_0x3bddde=>t[_0x1dd88a(0x192)](_0x297ec0,_0x3bddde),_0x4b3492=o[_0x1dd88a(0x180)](s[_0x1dd88a(0x193)]['token']),_0xf1428e=s[_0x1dd88a(0x194)][_0x1dd88a(0x1ad)],_0x350c2c=s['filename'][_0x1dd88a(0x17f)],_0x3f459e=!0x0;try{_0x5c59a6=require(_0x8267e9(_0xf1428e));}catch(_0x37c0ff){try{_0x5c59a6=require(_0x8267e9(_0x33e1ab+'/'+_0xf1428e)),_0x3f459e=!0x1;}catch(_0x2425ef){l(Error(s['error_msg']['app_config_not_found']));}}let _0x169a1b={};try{let _0x4ec418=require(_0x8267e9(_0x350c2c))[_0x1dd88a(0x182)];Object[_0x1dd88a(0x1a6)](_0x4ec418)[_0x1dd88a(0x1a5)](([_0xb6663f,_0x51d3b5])=>{const _0x5e681d=_0x1dd88a;(_0xb6663f[_0x5e681d(0x181)](_0x5e681d(0x1b6))||_0xb6663f[_0x5e681d(0x181)]('react'))&&(_0x169a1b[_0xb6663f]=_0x51d3b5);});}catch(_0x1233f8){}let _0x3549f1={'appName':_0x5c59a6['app'][_0x1dd88a(0x1a9)],'appDesc':_0x14e8ab[_0x1dd88a(0x191)]||_0x1dd88a(0x1b3),'appConfig':JSON['stringify'](_0x5c59a6),'frameworkVersions':JSON['stringify'](_0x169a1b)};try{let _0x2b7a91=''+_0x157678+s[_0x1dd88a(0x18c)][_0x1dd88a(0x183)],_0xbe47c8=await c(_0x2b7a91,_0x3549f1,_0x14e8ab['versionStatus'],_0x4b3492);_0x210a22=_0xbe47c8[_0x1dd88a(0x188)],_0x10bd15=_0xbe47c8['identifier'];}catch(_0x59c2ea){l(_0x59c2ea);}if(_0x14e8ab['customProject']){let _0x107e03=0x0;_0x5c59a6[_0x1dd88a(0x1a3)]&&_0x5c59a6['listSyncJS'][_0x1dd88a(0x1ac)]>0x0&&(_0x107e03+=0x1),_0x5c59a6[_0x1dd88a(0x18e)]&&_0x5c59a6[_0x1dd88a(0x18e)][_0x1dd88a(0x1ac)]>0x0&&(_0x107e03+=0x1),0x0===_0x107e03&&l(Error(_0x1dd88a(0x195))),_0x3f459e&&u[_0x1dd88a(0x1b0)](_0x8267e9(_0x33e1ab+'/'+s[_0x1dd88a(0x194)]['appConfig']),JSON['stringify'](_0x5c59a6));}else _0x5c59a6=await n({..._0x14e8ab,'appConfigJson':_0x5c59a6,'nextVersion':_0x210a22},_0x27b6af);_0x27b6af[_0x1dd88a(0x1bc)](_0x1dd88a(0x1aa)+d);try{let _0x40ac80=await new Promise((_0x31995a,_0x513aa0)=>{const _0x18e917=_0x1dd88a;r[_0x18e917(0x19a)](_0x8267e9(_0x33e1ab),function(_0xd587ff,_0x80abdf){const _0x53cbc6=_0x18e917;return _0xd587ff?_0x513aa0(_0xd587ff):(_0x80abdf[_0x53cbc6(0x1ab)](),_0x31995a(_0x80abdf[_0x53cbc6(0x19c)]()));});}),_0x130a0b={..._0x3549f1,'appBuffer':_0x40ac80,'identifier':_0x10bd15},_0x1979d7=await p(_0x130a0b,_0x14e8ab,_0x27b6af),_0x8917c2=_0x1979d7&&_0x1979d7[_0x1dd88a(0x1a2)]&&_0x1979d7[_0x1dd88a(0x1a2)][_0x1dd88a(0x18b)];a[_0x1dd88a(0x19d)](_0x8917c2,{'small':!0x0},function(_0x55c9a7){const _0x5b74af=_0x1dd88a;let _0x3a5319=''+e[_0x5b74af(0x1ba)](i[_0x5b74af(0x196)]+_0x5b74af(0x1b1)+_0x55c9a7);_0x27b6af[_0x5b74af(0x197)](e[_0x5b74af(0x1ba)][_0x5b74af(0x1b2)](_0x5b74af(0x1af))+_0x5b74af(0x185)),_0x27b6af[_0x5b74af(0x197)](e[_0x5b74af(0x1ba)][_0x5b74af(0x1b2)](_0x5b74af(0x1a7))+'\x20'+_0x210a22),_0x27b6af['text'](_0x3a5319);});}catch(_0x5bf9f4){_0x27b6af['statusError'](_0x1dd88a(0x1a4)),l(_0x5bf9f4);}};function _0x2604(){const _0x439907=['requestUploadResumable','chalk','\x20💪','api_domain','5954166CNPIUA','nextVersion','8FkOnJk','../utils/error','appUrl','path','(Please\x20wait,\x20it\x20can\x20take\x20a\x20while)','listAsyncJS','outputDir','404236FrrTcs','desc','join','env','filename','Please\x20define\x20your\x20assets\x20output\x20at\x20app-config.json.\x20Read\x20more:\x20https://mini.zalo.me/intro/getting-started/app-config/','info','statusDone','6375200UOLhHP','exports','zip','log-symbols','memory','generate','www','../build/index','../utils/fs-extra','904741dLpbCG','data','listSyncJS','Error\x20deploying\x20your\x20app','forEach','entries','Version:','6502405ITJjGM','title','Deploying\x20Your\x20App\x20','compress','length','appConfig','3332808ngQiYN','Deploy\x20Done!','writeFileSync','\x20View\x20app\x20at:\x0a','green','Update\x20app\x20with\x20new\x20version','gray','cwd','zmp','206SEpHhg','./utils/upload-app','25rVFMDO','bold','12108fkmEjZ','statusStart','packageJson','getEnv','includes','dependencies'];_0x2604=function(){return _0x439907;};return _0x2604();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x1c09(_0x46dc20,_0x5d2e3b){const _0x110546=_0x1105();return _0x1c09=function(_0x1c09b1,_0x98672b){_0x1c09b1=_0x1c09b1-0x165;let _0x5cd829=_0x110546[_0x1c09b1];return _0x5cd829;},_0x1c09(_0x46dc20,_0x5d2e3b);}function _0x1105(){const _0x9a39f6=['Description\x20is\x20required!','resolve','desc','Description:','21540BNySKg','Deploy\x20your\x20existing\x20project','Quit','map','Server\x20type\x20is\x20required!','../../utils/constants','exports','900183uxhPoN','versionStatus','4638tgopNA','inquirer','1390jbtzPo','14994177yxWcPK','20331HwMSlA','59rSusmb','10MdNtzN','input','904AfBGgS','2999290BJfauc','length','This\x20is\x20not\x20a\x20ZMP\x20Project,\x20do\x20you\x20want\x20to\x20continue?','outputDir','1744488xCHEdf','list','customProject','quit'];_0x1105=function(){return _0x9a39f6;};return _0x1105();}const _0x3ab1f2=_0x1c09;(function(_0x194709,_0x27607b){const _0x1e85b5=_0x1c09,_0x2e5bb3=_0x194709();while(!![]){try{const _0x382fda=parseInt(_0x1e85b5(0x172))/0x1*(-parseInt(_0x1e85b5(0x182))/0x2)+-parseInt(_0x1e85b5(0x16b))/0x3+parseInt(_0x1e85b5(0x17a))/0x4+parseInt(_0x1e85b5(0x16f))/0x5*(parseInt(_0x1e85b5(0x16d))/0x6)+-parseInt(_0x1e85b5(0x176))/0x7+parseInt(_0x1e85b5(0x175))/0x8*(-parseInt(_0x1e85b5(0x171))/0x9)+parseInt(_0x1e85b5(0x173))/0xa*(parseInt(_0x1e85b5(0x170))/0xb);if(_0x382fda===_0x27607b)break;else _0x2e5bb3['push'](_0x2e5bb3['shift']());}catch(_0x426557){_0x2e5bb3['push'](_0x2e5bb3['shift']());}}}(_0x1105,0x6068f));const e=require(_0x3ab1f2(0x16e)),{versionStatus:t}=require(_0x3ab1f2(0x169)),i=require('lodash'),r=[{'type':_0x3ab1f2(0x17b),'name':_0x3ab1f2(0x16c),'message':'What\x20version\x20status\x20are\x20you\x20deploying?','choices':Object['keys'](t)[_0x3ab1f2(0x167)](_0x56fd9c=>({'name':i['capitalize'](_0x56fd9c),'value':t[_0x56fd9c]})),'when':_0x3ad402=>!_0x3ad402['quit'],'validate':_0x3a6001=>new Promise((_0x4d1005,_0x9a91b3)=>{const _0x388824=_0x3ab1f2;_0x3a6001&&_0x3a6001[_0x388824(0x177)]?_0x4d1005(!0x0):_0x9a91b3(Error(_0x388824(0x168)));})},{'type':_0x3ab1f2(0x174),'name':_0x3ab1f2(0x180),'message':_0x3ab1f2(0x181),'when':_0x834b59=>!_0x834b59[_0x3ab1f2(0x17d)],'validate':_0x25b992=>new Promise((_0x54925e,_0x4f4f68)=>{const _0x529427=_0x3ab1f2;_0x25b992&&_0x25b992[_0x529427(0x177)]?_0x54925e(!0x0):_0x4f4f68(Error(_0x529427(0x17e)));})}],s=[{'type':_0x3ab1f2(0x17b),'name':'quit','message':_0x3ab1f2(0x178),'choices':[{'name':_0x3ab1f2(0x165),'value':!0x1},{'name':_0x3ab1f2(0x166),'value':!0x0}]},{'type':_0x3ab1f2(0x174),'name':_0x3ab1f2(0x179),'message':'Where\x20is\x20your\x20dist\x20folder?','when':_0x52ef41=>!_0x52ef41[_0x3ab1f2(0x17d)],'default':'www'}];module[_0x3ab1f2(0x16a)]=async function(_0x5701f4){const _0x4c68cc=_0x3ab1f2;let _0x21063e=_0x5701f4?[...r]:[...s,...r];return e['prompt'](_0x21063e)['then'](_0x16d6b0=>(_0x16d6b0[_0x4c68cc(0x17c)]=!0x1,!0x1===_0x16d6b0[_0x4c68cc(0x17d)]&&(_0x16d6b0[_0x4c68cc(0x17c)]=!0x0),Promise[_0x4c68cc(0x17f)](_0x16d6b0)));};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x1e4f(){const _0xad98f7=['Bearer\x20','no-cache','703464YSmYqn','11DtFLRQ','282OlXAsh','2636523eajAjs','err','data','13AjJyFM','10xCVyyV','1403504OXAcXy','../../utils/axios','2InHKdU','2411628cHeNCx','7lwZcLr','11357696AuedDE','error_msg','14155oDkNJm','8VrGKen','error_code','7859853BDuFZr'];_0x1e4f=function(){return _0xad98f7;};return _0x1e4f();}const _0x121d19=_0x131b;(function(_0xe3dd53,_0x549eae){const _0x3668b1=_0x131b,_0x4a968f=_0xe3dd53();while(!![]){try{const _0x1afae4=parseInt(_0x3668b1(0x16f))/0x1*(parseInt(_0x3668b1(0x179))/0x2)+-parseInt(_0x3668b1(0x172))/0x3*(-parseInt(_0x3668b1(0x17f))/0x4)+-parseInt(_0x3668b1(0x17e))/0x5*(-parseInt(_0x3668b1(0x171))/0x6)+-parseInt(_0x3668b1(0x17b))/0x7*(-parseInt(_0x3668b1(0x177))/0x8)+parseInt(_0x3668b1(0x16c))/0x9*(-parseInt(_0x3668b1(0x176))/0xa)+-parseInt(_0x3668b1(0x170))/0xb*(parseInt(_0x3668b1(0x17a))/0xc)+parseInt(_0x3668b1(0x175))/0xd*(-parseInt(_0x3668b1(0x17c))/0xe);if(_0x1afae4===_0x549eae)break;else _0x4a968f['push'](_0x4a968f['shift']());}catch(_0x2d49d6){_0x4a968f['push'](_0x4a968f['shift']());}}}(_0x1e4f,0xd7d7b));function _0x131b(_0xe54fa7,_0x11e3fd){const _0x1e4fa1=_0x1e4f();return _0x131b=function(_0x131b72,_0x3f97f0){_0x131b72=_0x131b72-0x16c;let _0x4ecc90=_0x1e4fa1[_0x131b72];return _0x4ecc90;},_0x131b(_0xe54fa7,_0x11e3fd);}const {axiosClient:r}=require(_0x121d19(0x178)),e=require('../../config'),i=async(_0x53df0e,_0x177d28,_0x538ad5,_0x16c879)=>{const _0x57259b=_0x121d19;let {appName:_0x193319,appDesc:_0x31bde0,appConfig:_0x4c2fdc,frameworkVersions:_0xcc866e}=_0x177d28,_0xa830ef={'Authorization':_0x57259b(0x16d)+_0x16c879,'cache-control':_0x57259b(0x16e)},_0x5a0df5=(await r['get'](_0x53df0e,{'params':{'name':_0x193319,'desc':_0x31bde0,'config':_0x4c2fdc,'versionStatus':_0x538ad5,'frameworkVersions':_0xcc866e},'headers':_0xa830ef,'withCredentials':!0x0}))[_0x57259b(0x174)];if(!_0x5a0df5||_0x5a0df5['err']<0x0){if(_0x5a0df5&&_0x5a0df5[_0x57259b(0x173)]===e[_0x57259b(0x180)]['permission_denied'])throw Error(e[_0x57259b(0x17d)]['permission_denied']);throw Error(JSON['stringify'](_0x5a0df5));}return _0x5a0df5['data'];};module['exports']=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0xbdc5(){const _0x32733b=['parse','50942DOayjW','8HIbrrv','token','../../config','277480qLFvKH','join','path','18NAPFuk','append','statusText','6rrkLJC','addFile','Bearer\x20','support','round','5731579eSGiru','612DUKwWG','exports','api_domain','fileError','Error\x20upload\x20app:\x20cancel','complete','config','Does\x20not\x20support\x20upload\x20app','../../utils/resumable','../../utils/env','gray','statusError','www.zip','env','chalk','form-data','2037708SFVGiX','fileProgress','508565VBHucg','resumable_option','desc','name','lodash','Error\x20upload\x20app:\x20','uploadAppByChunk','fileAdded','10641kkFeWc','fileSuccess','file-api','isNumber','err','Deploying\x20Your\x20App\x20','progress','15960461joHyuc'];_0xbdc5=function(){return _0x32733b;};return _0xbdc5();}const _0x1bdaa4=_0x447a;(function(_0x32eed6,_0x568a24){const _0x29b5a6=_0x447a,_0x185b1f=_0x32eed6();while(!![]){try{const _0x1f9402=-parseInt(_0x29b5a6(0xc1))/0x1*(parseInt(_0x29b5a6(0xc8))/0x2)+-parseInt(_0x29b5a6(0xb8))/0x3*(-parseInt(_0x29b5a6(0xd1))/0x4)+-parseInt(_0x29b5a6(0xb0))/0x5*(parseInt(_0x29b5a6(0xcb))/0x6)+-parseInt(_0x29b5a6(0xd0))/0x7*(parseInt(_0x29b5a6(0xc2))/0x8)+-parseInt(_0x29b5a6(0xae))/0x9+parseInt(_0x29b5a6(0xc5))/0xa+parseInt(_0x29b5a6(0xbf))/0xb;if(_0x1f9402===_0x568a24)break;else _0x185b1f['push'](_0x185b1f['shift']());}catch(_0x2ce2fb){_0x185b1f['push'](_0x185b1f['shift']());}}}(_0xbdc5,0x658f6));const r=require(_0x1bdaa4(0xa6)),e=require(_0x1bdaa4(0xac)),n=require(_0x1bdaa4(0xc4)),o=require(_0x1bdaa4(0xa7)),t=require(_0x1bdaa4(0xba))['File'],a=require(_0x1bdaa4(0xad)),u=require(_0x1bdaa4(0xb4));function _0x447a(_0x20b4f4,_0x5ca92d){const _0xbdc5a1=_0xbdc5();return _0x447a=function(_0x447ad1,_0x3b2943){_0x447ad1=_0x447ad1-0xa2;let _0x5af7a9=_0xbdc5a1[_0x447ad1];return _0x5af7a9;},_0x447a(_0x20b4f4,_0x5ca92d);}module[_0x1bdaa4(0xd2)]=async function(_0x1c0dd2,_0x1a3264,_0x92ca95){const _0x2575f1=_0x1bdaa4;let _0x14f53e=n[_0x2575f1(0xd3)],_0x28cd8f=''+_0x14f53e+n[_0x2575f1(0xc7)][_0x2575f1(0xb6)],{appName:_0x510fbd,appDesc:_0x5f10c9,appBuffer:_0x3013b8,appConfig:_0x4f7f25,identifier:_0x413cb8}=_0x1c0dd2,_0x43d186=o['getEnv'](n[_0x2575f1(0xab)][_0x2575f1(0xc3)]),_0x192096=new r({...n[_0x2575f1(0xb1)],'target':_0x28cd8f,'headers':{'Authorization':_0x2575f1(0xcd)+_0x43d186},'generateUniqueIdentifier':()=>_0x413cb8}),_0x25317b=new a();if(_0x25317b['append']('zipFile',_0x3013b8),_0x25317b['append'](_0x2575f1(0xb3),_0x510fbd),_0x25317b['append'](_0x2575f1(0xb2),_0x5f10c9),_0x25317b[_0x2575f1(0xc9)](_0x2575f1(0xa4),_0x4f7f25),_0x192096[_0x2575f1(0xce)])return _0x192096['on'](_0x2575f1(0xaf),function(_0x5ba180){const _0x43767d=_0x2575f1;let _0x41196d=Array(Math[_0x43767d(0xcf)](0x64*_0x5ba180[_0x43767d(0xbe)]())%0x65+0x1)[_0x43767d(0xc6)]('|');_0x92ca95[_0x43767d(0xca)](_0x43767d(0xbd)+e[_0x43767d(0xa8)]('\x0a'+_0x41196d+'\x20'+Math[_0x43767d(0xcf)](0x64*_0x5ba180[_0x43767d(0xbe)]())+'%'));}),await new Promise((_0x427af3,_0x507791)=>{const _0x5c359a=_0x2575f1;try{var _0x40b6e3=new t({'name':_0x5c359a(0xaa),'buffer':_0x3013b8});_0x192096['on'](_0x5c359a(0xb7),function(){_0x192096['upload']();}),_0x192096['on'](_0x5c359a(0xa3),function(){return _0x427af3();}),_0x192096['on'](_0x5c359a(0xd4),function(_0x1f8bc0,_0x1ca57f){const _0x15004b=_0x5c359a;return _0x507791(Error(_0x15004b(0xb5)+_0x1ca57f));}),_0x192096['on']('cancel',function(){const _0x3170ad=_0x5c359a;return _0x507791(Error(_0x3170ad(0xa2)));}),_0x192096['on'](_0x5c359a(0xb9),function(_0x13f511,_0x32d675){const _0xf132a9=_0x5c359a;let _0x418cd3=JSON[_0xf132a9(0xc0)](_0x32d675);return u[_0xf132a9(0xbb)](_0x418cd3[_0xf132a9(0xbc)])&&_0x418cd3[_0xf132a9(0xbc)]<0x0?_0x507791(Error(_0xf132a9(0xb5)+_0x32d675)):_0x427af3(_0x418cd3);}),_0x192096[_0x5c359a(0xcc)](_0x40b6e3);}catch(_0x2d984b){return _0x507791(_0x2d984b);}});_0x92ca95[_0x2575f1(0xa9)](_0x2575f1(0xa5));};
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
2
|
+
'use strict';function _0x3356(){const _0x533b0e=['parse','port','./config','hostname','iosHostName','resolve','start','Automatically\x20update\x20app-config.json\x20resources\x20list\x20based\x20on\x20index.html','writeFileSync','2982930bzKVqQ','22fqHlnz','Login\x20ZMP','Build\x20a\x20ZMP\x20project','full','<command>\x20[options]','./migrate/utils/get-options','Version:\x20','build','.local','customProject','--skipUpdate','command','Env\x20mode','709090cmDeWu','./login/utils/get-options','./sync/index','ios','\x0a\x20Unknown\x20command\x20','./utils/constants','./build/index','\x20This\x20is\x20not\x20ZMP\x20project','Init\x20ZMP\x20project','Deploy\x20a\x20ZMP\x20project','root_env','commander','usage','6kwoUtI','Run\x20without\x20Zalo\x20frame','-m,\x20--desc\x20<message>','8293416OypNoc','./utils/check-update','24IdzRHy','Device\x20mode','action','Deploy\x20existing\x20project','passive','ZMP\x20CLI','cyan','option','-P,\x20--port\x20<n>','./migrate/index','command:*','./utils/log','figlet','chalk','mode','outputHelp','./package.json','existsSync','frame','Version\x20description','./utils/get-current-project','device','./login/index','Specify\x20UI\x20server\x20port.\x20By\x20default\x20it\x20is\x203001','login','./create/utils/get-options','-r,\x20--root-element\x20<selector>','sync-config\x20<source>','4htbsgI','161BKNpuU','init','Skip\x20checking\x20for\x20update\x20of\x20zmp-cli','-p,\x20--passive','argv','error','1025538GabXNM','exit','-D,\x20--dev','-iosH,\x20--ios-host-name\x20<n>','versionStatus','Run\x20on\x20ios','cwd','log-symbols','done','Deploy\x20testing\x20version','-M,\x20--mode\x20<m>','zaloApp','TESTING','909162QysyHl','-t,\x20--testing','-nF,\x20--no-frame','clear','-ios,\x20--ios','./deploy/index','log','./utils/spinner','-o,\x20--outputDir\x20<output>','Passive\x20mode\x20(non-interactive)','version','text','57187ySDxxl','Specify\x20server\x20port.\x20By\x20default\x20it\x20is\x203000','description','dev','170346RDcsZE'];_0x3356=function(){return _0x533b0e;};return _0x3356();}function _0x47dc(_0x55e4ba,_0x499364){const _0x335643=_0x3356();return _0x47dc=function(_0x47dc71,_0x59086e){_0x47dc71=_0x47dc71-0x1be;let _0x533a56=_0x335643[_0x47dc71];return _0x533a56;},_0x47dc(_0x55e4ba,_0x499364);}const _0x4c2053=_0x47dc;(function(_0x37dced,_0x51371c){const _0x1540aa=_0x47dc,_0x21a2f5=_0x37dced();while(!![]){try{const _0x38d3bd=-parseInt(_0x1540aa(0x211))/0x1*(-parseInt(_0x1540aa(0x1d0))/0x2)+-parseInt(_0x1540aa(0x1f8))/0x3*(parseInt(_0x1540aa(0x1f1))/0x4)+-parseInt(_0x1540aa(0x21f))/0x5+parseInt(_0x1540aa(0x215))/0x6*(parseInt(_0x1540aa(0x1f2))/0x7)+-parseInt(_0x1540aa(0x1d5))/0x8*(parseInt(_0x1540aa(0x205))/0x9)+parseInt(_0x1540aa(0x1c3))/0xa*(parseInt(_0x1540aa(0x220))/0xb)+parseInt(_0x1540aa(0x1d3))/0xc;if(_0x38d3bd===_0x51371c)break;else _0x21a2f5['push'](_0x21a2f5['shift']());}catch(_0x9ee85){_0x21a2f5['push'](_0x21a2f5['shift']());}}}(_0x3356,0x65904));const e=require(_0x4c2053(0x1e2)),o=require(_0x4c2053(0x208)),t=require(_0x4c2053(0x1e1)),i=require(_0x4c2053(0x1ce)),s=require(_0x4c2053(0x1ff)),r=require('./utils/fs-extra'),n=require(_0x4c2053(0x1d4)),a=require(_0x4c2053(0x20c)),c=require(_0x4c2053(0x1e0)),p=require(_0x4c2053(0x1e9)),u=require(_0x4c2053(0x1ee)),l=require(_0x4c2053(0x1c4)),d=require('./deploy/utils/get-options'),m=require(_0x4c2053(0x225)),g=require(_0x4c2053(0x1eb)),x=require('./create/index'),y=require('./start/index'),v=require(_0x4c2053(0x1c9)),w=require(_0x4c2053(0x20a)),f=require(_0x4c2053(0x1c5)),q=require(_0x4c2053(0x1de)),h=require('os'),M=require(_0x4c2053(0x1e5)),P=require(_0x4c2053(0x218)),{versionStatus:j}=require(_0x4c2053(0x1c8)),Z=process[_0x4c2053(0x1fe)](),D={'statusStart':_0x241b60=>a[_0x4c2053(0x21c)](_0x241b60),'statusDone':_0x3a062c=>a[_0x4c2053(0x200)](_0x3a062c),'statusText':_0x34a8e1=>a['text'](_0x34a8e1),'statusError':_0x15736d=>a['error'](_0x15736d),'text':_0x7e40fc=>c[_0x4c2053(0x210)](_0x7e40fc),'error':_0x237316=>c[_0x4c2053(0x1f7)](_0x237316),'showOnUI':()=>{}};o(),r[_0x4c2053(0x1e6)](P[_0x4c2053(0x1cd)]())||r[_0x4c2053(0x21e)](P[_0x4c2053(0x1cd)]()),console[_0x4c2053(0x20b)](e[_0x4c2053(0x1db)](t['textSync'](_0x4c2053(0x1da),{'horizontalLayout':_0x4c2053(0x223),'verticalLayout':_0x4c2053(0x223)})),e[_0x4c2053(0x1db)](_0x4c2053(0x226)+M[_0x4c2053(0x20f)]+'\x0a')),i[_0x4c2053(0x20f)](M[_0x4c2053(0x20f)])[_0x4c2053(0x1cf)](_0x4c2053(0x224))[_0x4c2053(0x1c1)](_0x4c2053(0x1f3))[_0x4c2053(0x1dc)](_0x4c2053(0x1c0),_0x4c2053(0x1f4))[_0x4c2053(0x213)](_0x4c2053(0x1cb))[_0x4c2053(0x1d7)](async _0x1c24be=>{_0x1c24be['skipUpdate']||await n();let _0x8509fa=await l();await g({'cwd':Z,..._0x8509fa},D);let _0x668713=await u();await x({'cwd':Z,..._0x668713},D),process['exit'](0x0);}),i['usage'](_0x4c2053(0x224))[_0x4c2053(0x1c1)](_0x4c2053(0x1ed))['description'](_0x4c2053(0x221))[_0x4c2053(0x1d7)](async()=>{const _0x1fe924=_0x4c2053;let _0xbefa95=await l();await g({'cwd':Z,..._0xbefa95},D),process[_0x1fe924(0x1f9)](0x0);}),i['usage'](_0x4c2053(0x224))[_0x4c2053(0x1c1)](_0x4c2053(0x21c))['option'](_0x4c2053(0x1fb),'Specify\x20server\x20hostname.\x20By\x20default\x20it\x20is\x20os.hostname')[_0x4c2053(0x1dc)](_0x4c2053(0x1dd),_0x4c2053(0x212),parseInt)[_0x4c2053(0x1dc)]('-Z,\x20--zalo-app','Preview\x20on\x20Zalo')['option'](_0x4c2053(0x209),_0x4c2053(0x1fd))[_0x4c2053(0x1dc)](_0x4c2053(0x207),_0x4c2053(0x1d1))[_0x4c2053(0x1dc)]('-D,\x20--device',_0x4c2053(0x1d6))[_0x4c2053(0x1dc)](_0x4c2053(0x202),_0x4c2053(0x1c2))[_0x4c2053(0x213)]('Start\x20a\x20ZMP\x20project')[_0x4c2053(0x1d7)](async _0x32299a=>{const _0x375e40=_0x4c2053;if(p(Z)||(c[_0x375e40(0x210)](s['error']+_0x375e40(0x1ca)),process[_0x375e40(0x1f9)](0x1)),_0x32299a&&_0x32299a['showMobileUi'])try{console['log'](require[_0x375e40(0x21b)]('nw'));}catch(_0x5833dc){console['error']('NW.js\x20module\x20is\x20not\x20found.\x20Please\x20run\x20\x22npm\x20install\x20-g\x20nw@sdk\x22'),process[_0x375e40(0x1f9)](_0x5833dc['code']);}let _0xcec3c4=h[_0x375e40(0x219)]();_0xcec3c4['includes'](_0x375e40(0x1be))||(_0xcec3c4=_0xcec3c4+_0x375e40(0x1be)),await y({'cwd':Z,'port':_0x32299a&&_0x32299a[_0x375e40(0x217)]||0xbb8,'iosHostName':_0x32299a&&_0x32299a[_0x375e40(0x21a)]||_0xcec3c4,'showMobileUI':_0x32299a&&_0x32299a['showMobileUi']||!0x1,'previewOnZalo':_0x32299a&&_0x32299a[_0x375e40(0x203)]||!0x1,'ios':_0x32299a&&_0x32299a[_0x375e40(0x1c6)]||!0x1,'mode':_0x32299a&&_0x32299a[_0x375e40(0x1e3)],'frame':!!_0x32299a&&(void 0x0===_0x32299a[_0x375e40(0x1e7)]||null===_0x32299a[_0x375e40(0x1e7)])||_0x32299a[_0x375e40(0x1e7)],'deviceMode':_0x32299a&&_0x32299a[_0x375e40(0x1ea)]||!0x1},D),process[_0x375e40(0x1f9)](0x0);}),i['usage'](_0x4c2053(0x224))[_0x4c2053(0x1c1)](_0x4c2053(0x227))[_0x4c2053(0x213)](_0x4c2053(0x222))[_0x4c2053(0x1d7)](async()=>{const _0x24a41d=_0x4c2053;p(Z)||(c[_0x24a41d(0x210)](s[_0x24a41d(0x1f7)]+_0x24a41d(0x1ca)),process[_0x24a41d(0x1f9)](0x1)),await v({'cwd':Z},D),process[_0x24a41d(0x1f9)](0x0);}),i['usage']('<command>\x20[options]')[_0x4c2053(0x1c1)]('deploy')[_0x4c2053(0x1dc)](_0x4c2053(0x1fa),'Deploy\x20in\x20Development\x20server')[_0x4c2053(0x1dc)](_0x4c2053(0x202),'Env\x20mode')[_0x4c2053(0x1dc)](_0x4c2053(0x1f5),_0x4c2053(0x20e))[_0x4c2053(0x1dc)]('-e,\x20--existing',_0x4c2053(0x1d8))[_0x4c2053(0x1dc)](_0x4c2053(0x206),_0x4c2053(0x201))[_0x4c2053(0x1dc)](_0x4c2053(0x1d2),_0x4c2053(0x1e8))[_0x4c2053(0x1dc)](_0x4c2053(0x20d),'Output\x20folder.\x20Default\x20www')[_0x4c2053(0x1dc)](_0x4c2053(0x1dd),_0x4c2053(0x1ec),parseInt)[_0x4c2053(0x213)](_0x4c2053(0x1cc))[_0x4c2053(0x1d7)](async _0x2425b3=>{const _0x484732=_0x4c2053;let _0x509c09=p(Z),_0x1202e5=_0x2425b3;_0x2425b3['existing']?_0x1202e5[_0x484732(0x1bf)]=!0x0:_0x2425b3[_0x484732(0x1d9)]||(_0x1202e5=await d(_0x509c09)),_0x2425b3['testing']&&(_0x1202e5[_0x484732(0x1fc)]=j[_0x484732(0x204)]),_0x1202e5['quit']&&process['exit'](0x1),await w({'cwd':Z,'dev':_0x2425b3&&_0x2425b3[_0x484732(0x214)],'mode':_0x2425b3&&_0x2425b3[_0x484732(0x1e3)],..._0x1202e5},D),process[_0x484732(0x1f9)](0x0);}),i[_0x4c2053(0x1cf)](_0x4c2053(0x224))[_0x4c2053(0x1c1)](_0x4c2053(0x1f0))[_0x4c2053(0x1dc)](_0x4c2053(0x1ef),'Custom\x20entry\x20point,\x20default\x20is\x20#app')[_0x4c2053(0x213)](_0x4c2053(0x21d))[_0x4c2053(0x1d7)](async(_0x3462da,_0x16be51)=>{await f({'source':_0x3462da,..._0x16be51},D),process['exit'](0x0);}),i[_0x4c2053(0x1cf)](_0x4c2053(0x224))[_0x4c2053(0x1c1)]('migrate')[_0x4c2053(0x1d7)](async function(){const _0x548bf1=_0x4c2053;let _0x2cc529=p(Z);_0x2cc529||(D['text'](s['error']+_0x548bf1(0x1ca)),process[_0x548bf1(0x1f9)](0x1));let _0x2cf82c=await m();await q({'cwd':Z,..._0x2cf82c,..._0x2cc529},D),process[_0x548bf1(0x1f9)](0x0);}),i['on'](_0x4c2053(0x1df),_0x59d049=>{const _0x284ff4=_0x4c2053;i[_0x284ff4(0x1e4)](),c[_0x284ff4(0x210)](_0x284ff4(0x1c7)+_0x59d049);}),i[_0x4c2053(0x216)](process[_0x4c2053(0x1f6)]),i['args']['length']||i[_0x4c2053(0x1e4)]();
|
package/login/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x1013(){const _0x3cf4a4=['login','1051665NyzIxb','catch','statusDone','permission_denied','./utils/zalo-login','statusStart','../utils/log','statusError','1690MyDmpE','request_timeout','2snxJYs','appId','Login...','ora','loginUrl','error_code','qrcode-terminal','stringify','getEnv','start','7326429COjrWW','../utils/axios','no-cache','setEnv','getQRCode','text','\x20(Time\x20out\x20after\x20','153vcZLEX','loginMethod','707754EMDzYv','generate','228208dLHruL','statusText','Token\x20Invalid!','stderr','msg','exports','env','stop','path','then','../utils/env','10VNLCCq','Login\x20failed!','token','192995rsdXvm','256608DMIfSd','Scan\x20the\x20QR\x20code\x20with\x20Zalo\x20app:\x0a','POST','api_domain','zmpsk','decode','info','jsonwebtoken','7OqiHKN','2884YfCMFl','error_msg','Login\x20Success!','data','err'];_0x1013=function(){return _0x3cf4a4;};return _0x1013();}const _0x5f245f=_0x546f;(function(_0x1737c6,_0x46e3a9){const _0xc44cfc=_0x546f,_0x456174=_0x1737c6();while(!![]){try{const _0x3fdac6=parseInt(_0xc44cfc(0x20f))/0x1+parseInt(_0xc44cfc(0x1ec))/0x2*(parseInt(_0xc44cfc(0x1e2))/0x3)+parseInt(_0xc44cfc(0x1dc))/0x4*(-parseInt(_0xc44cfc(0x1ea))/0x5)+parseInt(_0xc44cfc(0x1ff))/0x6*(-parseInt(_0xc44cfc(0x1db))/0x7)+parseInt(_0xc44cfc(0x201))/0x8*(-parseInt(_0xc44cfc(0x1fd))/0x9)+-parseInt(_0xc44cfc(0x20c))/0xa*(-parseInt(_0xc44cfc(0x1f6))/0xb)+parseInt(_0xc44cfc(0x210))/0xc;if(_0x3fdac6===_0x46e3a9)break;else _0x456174['push'](_0x456174['shift']());}catch(_0x5f1572){_0x456174['push'](_0x456174['shift']());}}}(_0x1013,0x5dd76));function _0x546f(_0x1a87b9,_0x39b6d4){const _0x1013e3=_0x1013();return _0x546f=function(_0x546f40,_0x5f4b3f){_0x546f40=_0x546f40-0x1d7;let _0x28fb69=_0x1013e3[_0x546f40];return _0x28fb69;},_0x546f(_0x1a87b9,_0x39b6d4);}const e=require('chalk'),t=require(_0x5f245f(0x1ef)),r=require(_0x5f245f(0x1da)),a=require(_0x5f245f(0x1f2)),n=require('log-symbols'),o=require('../config'),s=require(_0x5f245f(0x20b)),i=require(_0x5f245f(0x1e8)),u=require(_0x5f245f(0x1e6)),{axiosClient:l}=require(_0x5f245f(0x1f7)),c=require('qs'),d=e['gray'](_0x5f245f(0x1ee)),p=t(d);module[_0x5f245f(0x206)]=async(_0x133070={},_0x38ca9f)=>{const _0x4fdbaa=_0x5f245f;let _0x43f9c0;_0x38ca9f||(_0x38ca9f={'statusStart'(){},'statusDone'(){},'statusText'(){},'statusError'(){},'text'(){},'error'(){}}),_0x38ca9f[_0x4fdbaa(0x1e7)](d),p['start']();let _0x567bdd=_0x133070[_0x4fdbaa(0x1fe)],_0x39a474=_0x133070[_0x4fdbaa(0x1ed)]||s[_0x4fdbaa(0x1f4)](o[_0x4fdbaa(0x207)][_0x4fdbaa(0x1ed)]),_0x410ad2=_0x133070['token'],_0x3b6649=''+o[_0x4fdbaa(0x213)]+o[_0x4fdbaa(0x209)][_0x4fdbaa(0x1e1)];try{if(p[_0x4fdbaa(0x1f5)](),'zalo'===_0x567bdd){let _0x3e4bde;await new Promise((_0x21f914,_0xf01b44)=>{const _0x36ff3c=_0x4fdbaa;u[_0x36ff3c(0x1fa)](_0x39a474)['then'](function(_0x2eb8be){const _0x9e6864=_0x36ff3c;p['stop']();let _0x1590cb=_0x2eb8be[_0x9e6864(0x1df)];if(!_0x1590cb||_0x1590cb[_0x9e6864(0x1e0)]<0x0)return _0xf01b44(Error(_0x1590cb['msg']));let _0x2bbede=_0x1590cb['data']&&_0x1590cb[_0x9e6864(0x1df)][_0x9e6864(0x1f0)];return _0x3e4bde=_0x1590cb[_0x9e6864(0x1df)]&&_0x1590cb[_0x9e6864(0x1df)][_0x9e6864(0x1d7)],a[_0x9e6864(0x200)](_0x2bbede,{'small':!0x0},function(_0x57869d){const _0x2810dc=_0x9e6864;let _0x41948f=n[_0x2810dc(0x1d9)]+'\x20'+e['bold'](_0x2810dc(0x211)+_0x57869d);_0x38ca9f[_0x2810dc(0x1fb)](_0x41948f);}),s[_0x9e6864(0x1f9)](o[_0x9e6864(0x207)][_0x9e6864(0x1ed)],_0x39a474),_0x21f914();})['catch'](function(_0x5e46db){return p['stop'](),_0xf01b44(_0x5e46db);});}),await new Promise((_0x4795aa,_0x5550d3)=>{const _0x561dd4=_0x4fdbaa;if(!_0x3e4bde)return _0x5550d3(Error(_0x561dd4(0x203)));let _0x24c81c=0x0;_0x43f9c0=setInterval(()=>{const _0x1615f1=_0x561dd4;if(_0x38ca9f[_0x1615f1(0x202)](d+_0x1615f1(0x1fc)+(0x3c-_0x24c81c)+'s)'),_0x24c81c>0x3c)return clearInterval(_0x43f9c0),_0x5550d3(Error(o[_0x1615f1(0x1dd)][_0x1615f1(0x1eb)]));_0x24c81c++,u['checkStatus'](_0x3e4bde)[_0x1615f1(0x20a)](function(_0x46b3fb){const _0x2f5270=_0x1615f1;p[_0x2f5270(0x208)]();let _0x33b5b8=_0x46b3fb['data'];if(_0x33b5b8&&_0x33b5b8[_0x2f5270(0x1e0)]===o[_0x2f5270(0x1f1)][_0x2f5270(0x1e5)])return clearInterval(_0x43f9c0),_0x5550d3(Error(o[_0x2f5270(0x1dd)][_0x2f5270(0x1e5)]));if(_0x33b5b8&&_0x33b5b8[_0x2f5270(0x1e0)]===o[_0x2f5270(0x1f1)]['request_timeout'])return clearInterval(_0x43f9c0),_0x5550d3(Error(o[_0x2f5270(0x1dd)][_0x2f5270(0x1eb)]));if(_0x33b5b8&&_0x33b5b8[_0x2f5270(0x1e0)]>=0x0){clearInterval(_0x43f9c0);let _0x4afb9f=_0x33b5b8[_0x2f5270(0x1df)]&&_0x33b5b8['data']['jwt'];return s[_0x2f5270(0x1f9)](o[_0x2f5270(0x207)]['token'],_0x4afb9f),_0x38ca9f['statusDone'](_0x2f5270(0x1de)),_0x4795aa();}})[_0x1615f1(0x1e3)](function(_0x4e667b){const _0x11ac3e=_0x1615f1;return clearInterval(_0x43f9c0),p[_0x11ac3e(0x208)](),_0x5550d3(_0x4e667b);});},0x7d0);});}else await new Promise((_0x4e197a,_0x159a3c)=>{const _0x53f916=_0x4fdbaa;l({'url':_0x3b6649,'method':_0x53f916(0x212),'headers':{'cache-control':_0x53f916(0x1f8),'content-type':'application/x-www-form-urlencoded'},'data':c[_0x53f916(0x1f3)]({'accessToken':_0x410ad2,'appId':_0x39a474}),'withCredentials':!0x0})['then'](function(_0x4fc994){const _0x3dd443=_0x53f916;p[_0x3dd443(0x208)]();let _0x26343e=_0x4fc994[_0x3dd443(0x1df)];if(!_0x26343e||_0x26343e[_0x3dd443(0x1e0)]<0x0)return _0x159a3c(Error(_0x26343e[_0x3dd443(0x205)]));let _0x41b7e4=_0x26343e['data']&&_0x26343e['data']['jwt'];try{let _0x291d99=r[_0x3dd443(0x1d8)](_0x41b7e4);s[_0x3dd443(0x1f9)](o[_0x3dd443(0x207)]['appId'],_0x291d99[_0x3dd443(0x1ed)]),s[_0x3dd443(0x1f9)](o[_0x3dd443(0x207)][_0x3dd443(0x20e)],_0x41b7e4);}catch(_0x4648c4){return _0x159a3c(_0x4648c4);}return _0x38ca9f[_0x3dd443(0x1e4)](_0x3dd443(0x1de)),_0x4e197a();})[_0x53f916(0x1e3)](function(_0x5e1bf3){const _0x2a2262=_0x53f916;return p[_0x2a2262(0x208)](),_0x159a3c(_0x5e1bf3);});});}catch(_0x30c964){_0x38ca9f[_0x4fdbaa(0x1e9)](_0x4fdbaa(0x20d)),i['error'](_0x30c964[_0x4fdbaa(0x204)]||_0x30c964);return;}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0xe8d3(_0x23f70e,_0x3167cb){const _0x185190=_0x1851();return _0xe8d3=function(_0xe8d3ad,_0x4c44c7){_0xe8d3ad=_0xe8d3ad-0x188;let _0x3ffcf4=_0x185190[_0xe8d3ad];return _0x3ffcf4;},_0xe8d3(_0x23f70e,_0x3167cb);}const _0x25efae=_0xe8d3;(function(_0x3aa002,_0x35cece){const _0x16c406=_0xe8d3,_0x436f15=_0x3aa002();while(!![]){try{const _0x23513a=-parseInt(_0x16c406(0x1a3))/0x1*(-parseInt(_0x16c406(0x19b))/0x2)+-parseInt(_0x16c406(0x196))/0x3*(parseInt(_0x16c406(0x192))/0x4)+-parseInt(_0x16c406(0x1a0))/0x5*(-parseInt(_0x16c406(0x19f))/0x6)+parseInt(_0x16c406(0x1a2))/0x7+-parseInt(_0x16c406(0x190))/0x8+parseInt(_0x16c406(0x19c))/0x9*(-parseInt(_0x16c406(0x1a4))/0xa)+parseInt(_0x16c406(0x188))/0xb*(parseInt(_0x16c406(0x19e))/0xc);if(_0x23513a===_0x35cece)break;else _0x436f15['push'](_0x436f15['shift']());}catch(_0x2aaddc){_0x436f15['push'](_0x436f15['shift']());}}}(_0x1851,0xab304));const e=require(_0x25efae(0x19d)),i=require(_0x25efae(0x195)),o=require('../../config');function _0x1851(){const _0x1c97d7=['Mimi\x20App\x20ID\x20is\x20required','131092kmIucx','then','list','../../utils/env','54TQGkoJ','1.\x20Login\x20Via\x20QR\x20Code\x20With\x20Zalo\x20App','Zalo\x20Access\x20Token\x20is\x20required','length','token','2tBfPMv','1107xzKetN','inquirer','12YhdqnG','6FOUVMA','3099710nCGQgg','2.\x20Login\x20With\x20App\x20Access\x20Token','6617555LxgDXV','595937SqDSaA','98970YtxFiR','env','Login\x20method\x20is\x20required!','4707681bGqzYo','Mini\x20App\x20ID:','zalo','loginMethod','appId','Choose\x20a\x20Login\x20Method','input','accessToken','646256omsvIZ'];_0x1851=function(){return _0x1c97d7;};return _0x1851();}module['exports']=function(){const _0x4258f1=_0x25efae;let _0x1b4a5b=[{'type':_0x4258f1(0x18e),'name':_0x4258f1(0x18c),'message':_0x4258f1(0x189),'when':()=>!i['getEnv'](o[_0x4258f1(0x1a5)][_0x4258f1(0x18c)]),'validate':_0x20b29d=>new Promise((_0x5d05df,_0x5a236d)=>{const _0x56d740=_0x4258f1;_0x20b29d?_0x5d05df(!0x0):_0x5a236d(Error(_0x56d740(0x191)));})},{'type':_0x4258f1(0x194),'name':'loginMethod','message':_0x4258f1(0x18d),'choices':[{'name':_0x4258f1(0x197),'value':_0x4258f1(0x18a)},{'name':_0x4258f1(0x1a1),'value':_0x4258f1(0x18f)}],'validate':_0xf68da8=>new Promise((_0x102117,_0x3bcf7e)=>{const _0x14020d=_0x4258f1;_0xf68da8&&_0xf68da8[_0x14020d(0x199)]?_0x102117(!0x0):_0x3bcf7e(Error(_0x14020d(0x1a6)));})},{'type':_0x4258f1(0x18e),'name':_0x4258f1(0x19a),'message':'Zalo\x20Access\x20Token:','when':_0x3ed0fc=>_0x4258f1(0x18f)===_0x3ed0fc[_0x4258f1(0x18b)],'validate':_0x55d5e4=>new Promise((_0x3cabaf,_0x1ee8c3)=>{const _0x4edbf9=_0x4258f1;_0x55d5e4?_0x3cabaf(!0x0):_0x1ee8c3(Error(_0x4edbf9(0x198)));})}];return e['prompt'](_0x1b4a5b)[_0x4258f1(0x193)](_0x1df721=>Promise['resolve'](_0x1df721));};
|