@zeppos/zeus-cli 1.1.8 → 1.2.0
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/bin/{cli.js → main.js} +11 -7
- package/bin/post-command.js +3 -5
- package/index.js +0 -3
- package/modules/bridge.js +18 -21
- package/modules/build.js +86 -215
- package/modules/create.js +244 -0
- package/modules/help.js +16 -16
- package/modules/run.js +23 -83
- package/package.json +41 -51
- package/{api → private-modules/zeppos-app-utils/dist/api}/index.js +64 -98
- package/private-modules/zeppos-app-utils/dist/config/device.js +247 -0
- package/private-modules/zeppos-app-utils/dist/config/index.js +18 -0
- package/private-modules/zeppos-app-utils/dist/config/project.js +104 -0
- package/{utils → private-modules/zeppos-app-utils/dist}/hm-analytics.js +6 -6
- package/private-modules/zeppos-app-utils/dist/index.js +38 -0
- package/private-modules/zeppos-app-utils/dist/logger/index.js +54 -0
- package/private-modules/zeppos-app-utils/dist/logger/my-logger.js +69 -0
- package/private-modules/zeppos-app-utils/dist/modules/build.js +334 -0
- package/{modules → private-modules/zeppos-app-utils/dist/modules}/config.js +31 -57
- package/private-modules/zeppos-app-utils/dist/modules/create/index.js +254 -0
- package/{modules → private-modules/zeppos-app-utils/dist/modules}/create/local-app.js +10 -10
- package/{modules → private-modules/zeppos-app-utils/dist/modules}/create/yeoman-app.js +2 -2
- package/private-modules/zeppos-app-utils/dist/modules/index.js +21 -0
- package/{modules → private-modules/zeppos-app-utils/dist/modules}/login.js +17 -45
- package/{modules → private-modules/zeppos-app-utils/dist/modules}/status.js +32 -42
- package/{public → private-modules/zeppos-app-utils/dist/public}/scripts/png2vglite.py +0 -0
- package/{public → private-modules/zeppos-app-utils/dist/public}/scripts/requirements.txt +0 -0
- package/{public/template/package.json → private-modules/zeppos-app-utils/dist/public/template/v1/_package.json} +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/empty/app-side/i18n/en-US.po +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/empty/app-side/index.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/empty/app.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/empty/app.json +1 -1
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/empty/assets/default/icon.png +0 -0
- package/{public/template/empty/pages → private-modules/zeppos-app-utils/dist/public/template/v1/empty/page}/i18n/en-US.po +0 -0
- package/{public/template/empty/pages → private-modules/zeppos-app-utils/dist/public/template/v1/empty/page}/index.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/empty/setting/i18n/en-US.po +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/empty/setting/index.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/empty/watchface/index.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/app-side/index.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/app.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/app.json +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/assets/gtr3/icon.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/assets/gtr3/image/logo.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/assets/gtr3-pro/icon.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/assets/gtr3-pro/image/logo.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/assets/gts3/icon.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/assets/gts3/image/logo.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gtr3/home/index.page.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gtr3/home/index.page.json +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gtr3/home/index.style.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gtr3-pro/home/index.page.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gtr3-pro/home/index.page.json +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gtr3-pro/home/index.style.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gts3/home/index.page.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gts3/home/index.page.json +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/gts3/home/index.style.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/page/i18n/en-US.po +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/setting/i18n/en-US.po +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/setting/index.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/hello-world/utils/index.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/jsconfig.json +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/app.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/app.json +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bg/bg.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/0.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/1.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/2.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/3.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/4.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/5.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/6.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/7.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/8.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/9.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/bigNum/sp.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/btn/back.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/btn/lv.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/btn/red.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/point/bg.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/point/bottom.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/point/center.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/point/h.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/point/left.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/point/m.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/point/right.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/point/s.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/preview.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/second/second.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/0.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/1.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/2.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/3.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/4.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/5.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/6.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/7.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/8.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/9.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/d.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/smallNum/n.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_ch/1.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_ch/2.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_ch/3.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_ch/4.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_ch/5.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_ch/6.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_ch/7.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_en/1.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_en/2.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_en/3.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_en/4.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_en/5.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_en/6.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/assets/gtr-3-pro/images/week_en/7.png +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/shared/buffer.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/shared/device-polyfill.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/shared/global.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/shared/js-module.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/shared/logger.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/shared/setTimeout.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/watchface/gtr-3-pro/index.js +0 -0
- package/{public/template → private-modules/zeppos-app-utils/dist/public/template/v1}/timer/watchface/round/index.js +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/_package.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/app.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/app.json +56 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/consume.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/beer.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/cake.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/chocolate.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/coffee.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/cookies.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/ham.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/hamburger.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/ice cream.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/pizza.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/sausage.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/multiply.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/selected.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/unselected.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/page/gts/food-list.js +113 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/page/gts/index.js +126 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/page/i18n/en-US.po +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/page/i18n/zh-CN.po +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/utils/constants.js +54 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/utils/storage.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/utils/styles-gts-3.js +141 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/utils/styles.js +142 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/app-side/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/app-side/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/app.json +60 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/assets/default/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/page/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/page/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/setting/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/watchface/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/app-side/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/app-side/index.js +57 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/app.js +23 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/app.json +65 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/assets/common/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/pages/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/pages/index.js +55 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/data.js +67 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/defer.js +35 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/device-polyfill.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/es6-promise.js +1149 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/event.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/message-side.js +1145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/message.js +1151 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/utils/config/constants.js +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/utils/config/device.js +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/app-side/index.js +11 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/app.json +101 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/assets/gtr/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/assets/gtr/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/assets/gts/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/assets/gts/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gtr/home/index.page.js +20 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gtr/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gtr/home/index.style.js +18 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gts/home/index.page.js +21 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gts/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gts/home/index.style.js +17 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/i18n/en-US.po +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/setting/index.js +5 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/utils/index.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/jsconfig.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/.prettierrc.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/app-side/index.js +48 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/app.js +25 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/app.json +75 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/assets/gts/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/page/home/index.page.js +155 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/page/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/page/home/index.style.js +93 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/page/i18n/en-US.po +8 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/setting/i18n/en-US.po +5 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/setting/index.js +145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/data.js +67 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/defer.js +35 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/device-polyfill.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/es6-promise.js +1149 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/event.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/message-side.js +1145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/message.js +1151 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/utils/constants.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/utils/fs.js +38 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/utils/index.js +38 -0
- package/private-modules/zeppos-app-utils/dist/simulator.js +58 -0
- package/{modules/storage.js → private-modules/zeppos-app-utils/dist/storage/index.js} +2 -1
- package/private-modules/zeppos-app-utils/dist/tools/index.js +133 -0
- package/private-modules/zeppos-app-utils/dist/websocket.js +165 -0
- package/private-modules/zeppos-app-utils/package.json +51 -0
- package/utils/pre-check.js +9 -35
- package/config/device.js +0 -122
- package/config/project.js +0 -48
- package/font-icon.js +0 -27
- package/modules/create/index.js +0 -358
- package/modules/simulator.js +0 -82
- package/modules/websocket.js +0 -112
- package/utils/common.js +0 -138
- package/utils/logger.js +0 -31
- package/utils/md5.js +0 -11
- package/utils/sleep.js +0 -8
|
@@ -10,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -73,25 +50,55 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
73
50
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
74
51
|
};
|
|
75
52
|
exports.__esModule = true;
|
|
76
|
-
exports.downloadPackage = exports.uploadPackage = exports.
|
|
53
|
+
exports.downloadPackage = exports.uploadPackage = exports.getUserInfo = exports.getConnectDevServerWebSocketCode = void 0;
|
|
77
54
|
var axios_1 = __importDefault(require("axios"));
|
|
78
|
-
var
|
|
79
|
-
var qs_1 = __importDefault(require("qs"));
|
|
55
|
+
var storage_1 = require("../storage");
|
|
80
56
|
var project_1 = require("../config/project");
|
|
81
|
-
var
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
57
|
+
var logger_1 = require("../logger");
|
|
58
|
+
var loginStorageKey = (0, project_1.getLocalConfig)().loginStorageKey;
|
|
59
|
+
var getConnectDevServerWebSocketCode = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
60
|
+
var _a, _subRegionalHost, _b, _loginAppToken, thisUrl, url, error_1, message;
|
|
61
|
+
var _c, _d;
|
|
62
|
+
return __generator(this, function (_e) {
|
|
63
|
+
switch (_e.label) {
|
|
64
|
+
case 0:
|
|
65
|
+
if (!process.env._subRegionalHost) {
|
|
66
|
+
storage_1.globalStorage.deleteStorage(loginStorageKey.accountToken);
|
|
67
|
+
throw new Error('401');
|
|
68
|
+
}
|
|
69
|
+
_e.label = 1;
|
|
70
|
+
case 1:
|
|
71
|
+
_e.trys.push([1, 3, , 4]);
|
|
72
|
+
_a = process.env, _subRegionalHost = _a._subRegionalHost, _b = _a._loginAppToken, _loginAppToken = _b === void 0 ? '' : _b;
|
|
73
|
+
thisUrl = "https://".concat(_subRegionalHost, "/developerbridge/client/relay");
|
|
74
|
+
return [4, axios_1["default"].get(thisUrl, {
|
|
75
|
+
headers: {
|
|
76
|
+
apptoken: _loginAppToken
|
|
77
|
+
}
|
|
78
|
+
})];
|
|
79
|
+
case 2:
|
|
80
|
+
url = (_e.sent()).data.url;
|
|
81
|
+
return [2, url];
|
|
82
|
+
case 3:
|
|
83
|
+
error_1 = _e.sent();
|
|
84
|
+
message = (error_1 === null || error_1 === void 0 ? void 0 : error_1.response) && ((_c = error_1.response) === null || _c === void 0 ? void 0 : _c.data);
|
|
85
|
+
if ((message === null || message === void 0 ? void 0 : message.code) === 401 && ((_d = message === null || message === void 0 ? void 0 : message.data) === null || _d === void 0 ? void 0 : _d.code) === '0102') {
|
|
86
|
+
storage_1.globalStorage.deleteStorage(loginStorageKey.accountToken);
|
|
87
|
+
throw new Error('401');
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
process.env._bridgeOptionalDevice = '';
|
|
91
|
+
process.env._bridgeChoiredDevice = '';
|
|
92
|
+
throw new Error("GetConnectDevServerWebSocketCode error");
|
|
93
|
+
}
|
|
94
|
+
return [3, 4];
|
|
95
|
+
case 4: return [2];
|
|
96
|
+
}
|
|
91
97
|
});
|
|
92
|
-
};
|
|
98
|
+
}); };
|
|
99
|
+
exports.getConnectDevServerWebSocketCode = getConnectDevServerWebSocketCode;
|
|
93
100
|
var getUserInfo = function (url, token) { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
|
-
var headers, userInfo, data,
|
|
101
|
+
var headers, userInfo, data, error_2, message;
|
|
95
102
|
return __generator(this, function (_a) {
|
|
96
103
|
switch (_a.label) {
|
|
97
104
|
case 0:
|
|
@@ -110,10 +117,10 @@ var getUserInfo = function (url, token) { return __awaiter(void 0, void 0, void
|
|
|
110
117
|
data = userInfo.data;
|
|
111
118
|
return [2, data];
|
|
112
119
|
case 3:
|
|
113
|
-
|
|
114
|
-
message = typeof
|
|
120
|
+
error_2 = _a.sent();
|
|
121
|
+
message = typeof error_2 === 'object' ? error_2.message : error_2;
|
|
115
122
|
if (message.includes('401')) {
|
|
116
|
-
storage_1.globalStorage.deleteStorage(
|
|
123
|
+
storage_1.globalStorage.deleteStorage(loginStorageKey.accountToken);
|
|
117
124
|
throw new Error('401');
|
|
118
125
|
}
|
|
119
126
|
throw new Error('get nickName error');
|
|
@@ -122,70 +129,29 @@ var getUserInfo = function (url, token) { return __awaiter(void 0, void 0, void
|
|
|
122
129
|
});
|
|
123
130
|
}); };
|
|
124
131
|
exports.getUserInfo = getUserInfo;
|
|
125
|
-
var
|
|
126
|
-
var _a, _subRegionalHost, _loginAppToken,
|
|
127
|
-
var _b, _c;
|
|
132
|
+
var uploadPackage = function (form, length) { return __awaiter(void 0, void 0, void 0, function () {
|
|
133
|
+
var _a, _subRegionalHost, _b, _loginAppToken, _loginUserId, packageInfo, _c, protocol, code, error_3, message;
|
|
128
134
|
return __generator(this, function (_d) {
|
|
129
135
|
switch (_d.label) {
|
|
130
136
|
case 0:
|
|
131
|
-
|
|
132
|
-
storage_1.globalStorage.deleteStorage(project_1.loginStorageKey.accountToken);
|
|
133
|
-
throw new Error('401');
|
|
134
|
-
}
|
|
137
|
+
_a = process.env, _subRegionalHost = _a._subRegionalHost, _b = _a._loginAppToken, _loginAppToken = _b === void 0 ? '' : _b, _loginUserId = _a._loginUserId;
|
|
135
138
|
_d.label = 1;
|
|
136
139
|
case 1:
|
|
137
140
|
_d.trys.push([1, 3, , 4]);
|
|
138
|
-
_a = process.env, _subRegionalHost = _a._subRegionalHost, _loginAppToken = _a._loginAppToken;
|
|
139
|
-
thisUrl = "https://".concat(_subRegionalHost, "/developerbridge/client/relay");
|
|
140
|
-
return [4, axios_1["default"].get(thisUrl, {
|
|
141
|
-
headers: {
|
|
142
|
-
apptoken: _loginAppToken
|
|
143
|
-
}
|
|
144
|
-
})];
|
|
145
|
-
case 2:
|
|
146
|
-
url = (_d.sent()).data.url;
|
|
147
|
-
return [2, url];
|
|
148
|
-
case 3:
|
|
149
|
-
error_2 = _d.sent();
|
|
150
|
-
message = (error_2 === null || error_2 === void 0 ? void 0 : error_2.response) && ((_b = error_2.response) === null || _b === void 0 ? void 0 : _b.data);
|
|
151
|
-
if ((message === null || message === void 0 ? void 0 : message.code) === 401 && ((_c = message === null || message === void 0 ? void 0 : message.data) === null || _c === void 0 ? void 0 : _c.code) === '0102') {
|
|
152
|
-
storage_1.globalStorage.deleteStorage(project_1.loginStorageKey.accountToken);
|
|
153
|
-
throw new Error('401');
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
process.env._bridgeOptionalDevice = '';
|
|
157
|
-
process.env._bridgeChoiredDevice = '';
|
|
158
|
-
throw new Error("GetConnectDevServerWebSocketCode error");
|
|
159
|
-
}
|
|
160
|
-
return [3, 4];
|
|
161
|
-
case 4: return [2];
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}); };
|
|
165
|
-
exports.getConnectDevServerWebSocketCode = getConnectDevServerWebSocketCode;
|
|
166
|
-
var uploadPackage = function (form, length) { return __awaiter(void 0, void 0, void 0, function () {
|
|
167
|
-
var _a, _subRegionalHost, _loginAppToken, _loginUserId, packageInfo, _b, protocol, code, error_3, message;
|
|
168
|
-
return __generator(this, function (_c) {
|
|
169
|
-
switch (_c.label) {
|
|
170
|
-
case 0:
|
|
171
|
-
_a = process.env, _subRegionalHost = _a._subRegionalHost, _loginAppToken = _a._loginAppToken, _loginUserId = _a._loginUserId;
|
|
172
|
-
_c.label = 1;
|
|
173
|
-
case 1:
|
|
174
|
-
_c.trys.push([1, 3, , 4]);
|
|
175
141
|
return [4, axios_1["default"].post("https://".concat(_subRegionalHost, "/custom/tools/app-dial/upload?userid=").concat(_loginUserId), form, {
|
|
176
142
|
headers: __assign(__assign({}, form.getHeaders()), { 'content-length': "".concat(length), apptoken: _loginAppToken }),
|
|
177
143
|
maxContentLength: Infinity,
|
|
178
144
|
maxBodyLength: Infinity
|
|
179
145
|
})];
|
|
180
146
|
case 2:
|
|
181
|
-
packageInfo =
|
|
182
|
-
|
|
147
|
+
packageInfo = _d.sent();
|
|
148
|
+
_c = (packageInfo === null || packageInfo === void 0 ? void 0 : packageInfo.data) || {}, protocol = _c.protocol, code = _c.code;
|
|
183
149
|
return [2, { protocol: protocol, code: code }];
|
|
184
150
|
case 3:
|
|
185
|
-
error_3 =
|
|
151
|
+
error_3 = _d.sent();
|
|
186
152
|
message = typeof error_3 === 'object' ? error_3.message : error_3;
|
|
187
153
|
if (message.includes('401')) {
|
|
188
|
-
storage_1.globalStorage.deleteStorage(
|
|
154
|
+
storage_1.globalStorage.deleteStorage(loginStorageKey.accountToken);
|
|
189
155
|
throw new Error('401');
|
|
190
156
|
}
|
|
191
157
|
throw new Error(message);
|
|
@@ -195,12 +161,12 @@ var uploadPackage = function (form, length) { return __awaiter(void 0, void 0, v
|
|
|
195
161
|
}); };
|
|
196
162
|
exports.uploadPackage = uploadPackage;
|
|
197
163
|
var downloadPackage = function (code, deviceSource, appType) { return __awaiter(void 0, void 0, void 0, function () {
|
|
198
|
-
var _a, _subRegionalHost, _loginAppToken, _loginUserId, host, packageInfo, error_4, message;
|
|
199
|
-
return __generator(this, function (
|
|
200
|
-
switch (
|
|
164
|
+
var _a, _subRegionalHost, _b, _loginAppToken, _loginUserId, host, packageInfo, error_4, message;
|
|
165
|
+
return __generator(this, function (_c) {
|
|
166
|
+
switch (_c.label) {
|
|
201
167
|
case 0:
|
|
202
|
-
|
|
203
|
-
_a = process.env, _subRegionalHost = _a._subRegionalHost,
|
|
168
|
+
_c.trys.push([0, 2, , 3]);
|
|
169
|
+
_a = process.env, _subRegionalHost = _a._subRegionalHost, _b = _a._loginAppToken, _loginAppToken = _b === void 0 ? '' : _b, _loginUserId = _a._loginUserId;
|
|
204
170
|
host = "https://".concat(_subRegionalHost, "/custom/tools/app-dial/download/").concat(code);
|
|
205
171
|
if (appType === 'app') {
|
|
206
172
|
return [2, host];
|
|
@@ -211,16 +177,16 @@ var downloadPackage = function (code, deviceSource, appType) { return __awaiter(
|
|
|
211
177
|
}
|
|
212
178
|
})];
|
|
213
179
|
case 1:
|
|
214
|
-
packageInfo =
|
|
180
|
+
packageInfo = _c.sent();
|
|
215
181
|
return [2, packageInfo];
|
|
216
182
|
case 2:
|
|
217
|
-
error_4 =
|
|
183
|
+
error_4 = _c.sent();
|
|
218
184
|
message = typeof error_4 === 'object' ? error_4.message : error_4;
|
|
219
185
|
if (message.includes('401')) {
|
|
220
|
-
storage_1.globalStorage.deleteStorage(
|
|
186
|
+
storage_1.globalStorage.deleteStorage(loginStorageKey.accountToken);
|
|
221
187
|
message = "Invalid token,please login again with the command 'zeus login'.";
|
|
222
188
|
}
|
|
223
|
-
logger.error(message);
|
|
189
|
+
logger_1.logger.error(message);
|
|
224
190
|
return [3, 3];
|
|
225
191
|
case 3: return [2];
|
|
226
192
|
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.deviceInternalCodeName = exports.OSV2DeviceTargetNames = exports.OSV2Devices = exports.deviceTargets = exports.DeviceScreenType = exports.DeviceSource = exports.DevicePlatformName = exports.DeviceTarget = void 0;
|
|
5
|
+
var DeviceTarget;
|
|
6
|
+
(function (DeviceTarget) {
|
|
7
|
+
DeviceTarget["MADRID"] = "madrid";
|
|
8
|
+
DeviceTarget["VERONA"] = "verona";
|
|
9
|
+
DeviceTarget["ZURICH"] = "zurich";
|
|
10
|
+
DeviceTarget["TEIDE"] = "teide";
|
|
11
|
+
DeviceTarget["PROVENCE"] = "provence";
|
|
12
|
+
DeviceTarget["BARI"] = "bari";
|
|
13
|
+
DeviceTarget["BERLIN"] = "berlin";
|
|
14
|
+
DeviceTarget["LILLE"] = "lille";
|
|
15
|
+
})(DeviceTarget = exports.DeviceTarget || (exports.DeviceTarget = {}));
|
|
16
|
+
var DevicePlatformName;
|
|
17
|
+
(function (DevicePlatformName) {
|
|
18
|
+
DevicePlatformName["MADRID"] = "gtr3-pro";
|
|
19
|
+
DevicePlatformName["MADRIDW"] = "gtr3-pro-w";
|
|
20
|
+
DevicePlatformName["Madrid2"] = "gtr3-pro-meilin";
|
|
21
|
+
DevicePlatformName["VERONA"] = "gtr3";
|
|
22
|
+
DevicePlatformName["VERONAW"] = "gtr3-w";
|
|
23
|
+
DevicePlatformName["ZURICH"] = "gts3";
|
|
24
|
+
DevicePlatformName["ZURICHW"] = "gts3-w";
|
|
25
|
+
DevicePlatformName["TEIDE"] = "t-rex2";
|
|
26
|
+
DevicePlatformName["TEIDEW"] = "t-rex2-w";
|
|
27
|
+
DevicePlatformName["PROVENCE"] = "gts4-mini";
|
|
28
|
+
DevicePlatformName["PROVENCEW"] = "gts4-mini-w";
|
|
29
|
+
DevicePlatformName["BARI_NFC"] = "amazfit-band7-nfc";
|
|
30
|
+
DevicePlatformName["BARI"] = "amazfit-band7";
|
|
31
|
+
DevicePlatformName["BARI_W"] = "amazfit-band7-w";
|
|
32
|
+
DevicePlatformName["BERLIN"] = "gtr4";
|
|
33
|
+
DevicePlatformName["BERLIN_W"] = "gtr4-w";
|
|
34
|
+
DevicePlatformName["LILLE"] = "gts4";
|
|
35
|
+
DevicePlatformName["LILLE_W"] = "gts4-w";
|
|
36
|
+
})(DevicePlatformName = exports.DevicePlatformName || (exports.DevicePlatformName = {}));
|
|
37
|
+
var DeviceSource;
|
|
38
|
+
(function (DeviceSource) {
|
|
39
|
+
DeviceSource[DeviceSource["MADRID"] = 229] = "MADRID";
|
|
40
|
+
DeviceSource[DeviceSource["MADRIDW"] = 230] = "MADRIDW";
|
|
41
|
+
DeviceSource[DeviceSource["Madrid2"] = 6095106] = "Madrid2";
|
|
42
|
+
DeviceSource[DeviceSource["VERONA"] = 226] = "VERONA";
|
|
43
|
+
DeviceSource[DeviceSource["VERONAW"] = 227] = "VERONAW";
|
|
44
|
+
DeviceSource[DeviceSource["ZURICH"] = 224] = "ZURICH";
|
|
45
|
+
DeviceSource[DeviceSource["ZURICHW"] = 225] = "ZURICHW";
|
|
46
|
+
DeviceSource[DeviceSource["TEIDE"] = 418] = "TEIDE";
|
|
47
|
+
DeviceSource[DeviceSource["TEIDEW"] = 419] = "TEIDEW";
|
|
48
|
+
DeviceSource[DeviceSource["PROVENCE"] = 246] = "PROVENCE";
|
|
49
|
+
DeviceSource[DeviceSource["PROVENCEW"] = 247] = "PROVENCEW";
|
|
50
|
+
DeviceSource[DeviceSource["BARI_NFC"] = 252] = "BARI_NFC";
|
|
51
|
+
DeviceSource[DeviceSource["BARI"] = 253] = "BARI";
|
|
52
|
+
DeviceSource[DeviceSource["BARI_W"] = 254] = "BARI_W";
|
|
53
|
+
DeviceSource[DeviceSource["BERLIN"] = 7930112] = "BERLIN";
|
|
54
|
+
DeviceSource[DeviceSource["BERLIN_W"] = 7930113] = "BERLIN_W";
|
|
55
|
+
DeviceSource[DeviceSource["LILLE"] = 7995648] = "LILLE";
|
|
56
|
+
DeviceSource[DeviceSource["LILLE_W"] = 7995649] = "LILLE_W";
|
|
57
|
+
})(DeviceSource = exports.DeviceSource || (exports.DeviceSource = {}));
|
|
58
|
+
var DeviceScreenType;
|
|
59
|
+
(function (DeviceScreenType) {
|
|
60
|
+
DeviceScreenType["R"] = "r";
|
|
61
|
+
DeviceScreenType["S"] = "s";
|
|
62
|
+
})(DeviceScreenType = exports.DeviceScreenType || (exports.DeviceScreenType = {}));
|
|
63
|
+
exports.deviceTargets = (_a = {},
|
|
64
|
+
_a[DeviceTarget.MADRID] = {
|
|
65
|
+
deviceName: 'GTR3 Pro',
|
|
66
|
+
platforms: [
|
|
67
|
+
{
|
|
68
|
+
name: DevicePlatformName.MADRID,
|
|
69
|
+
deviceSource: DeviceSource.MADRID
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: DevicePlatformName.MADRIDW,
|
|
73
|
+
deviceSource: DeviceSource.MADRIDW
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: DevicePlatformName.Madrid2,
|
|
77
|
+
deviceSource: DeviceSource.Madrid2
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
screen: {
|
|
81
|
+
type: DeviceScreenType.R,
|
|
82
|
+
width: 480,
|
|
83
|
+
height: 480
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
_a[DeviceTarget.VERONA] = {
|
|
87
|
+
deviceName: 'GTR3',
|
|
88
|
+
platforms: [
|
|
89
|
+
{
|
|
90
|
+
name: DevicePlatformName.VERONA,
|
|
91
|
+
deviceSource: DeviceSource.VERONA
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: DevicePlatformName.VERONAW,
|
|
95
|
+
deviceSource: DeviceSource.VERONAW
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
screen: {
|
|
99
|
+
type: DeviceScreenType.R,
|
|
100
|
+
width: 454,
|
|
101
|
+
height: 454
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
_a[DeviceTarget.ZURICH] = {
|
|
105
|
+
deviceName: 'GTS3',
|
|
106
|
+
platforms: [
|
|
107
|
+
{
|
|
108
|
+
name: DevicePlatformName.ZURICH,
|
|
109
|
+
deviceSource: DeviceSource.ZURICH
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: DevicePlatformName.ZURICHW,
|
|
113
|
+
deviceSource: DeviceSource.ZURICHW
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
screen: {
|
|
117
|
+
type: DeviceScreenType.S,
|
|
118
|
+
width: 390,
|
|
119
|
+
height: 450
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
_a[DeviceTarget.TEIDE] = {
|
|
123
|
+
deviceName: 'T-Rex2',
|
|
124
|
+
platforms: [
|
|
125
|
+
{
|
|
126
|
+
name: DevicePlatformName.TEIDE,
|
|
127
|
+
deviceSource: DeviceSource.TEIDE
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: DevicePlatformName.TEIDEW,
|
|
131
|
+
deviceSource: DeviceSource.TEIDEW
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
screen: {
|
|
135
|
+
type: DeviceScreenType.R,
|
|
136
|
+
width: 454,
|
|
137
|
+
height: 454
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
_a[DeviceTarget.PROVENCE] = {
|
|
141
|
+
deviceName: 'GTS4 mini',
|
|
142
|
+
platforms: [
|
|
143
|
+
{
|
|
144
|
+
name: DevicePlatformName.PROVENCE,
|
|
145
|
+
deviceSource: DeviceSource.PROVENCE
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: DevicePlatformName.PROVENCEW,
|
|
149
|
+
deviceSource: DeviceSource.PROVENCEW
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
screen: {
|
|
153
|
+
type: DeviceScreenType.S,
|
|
154
|
+
width: 336,
|
|
155
|
+
height: 384
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
_a[DeviceTarget.BARI] = {
|
|
159
|
+
deviceName: 'Amazfit Band 7',
|
|
160
|
+
platforms: [
|
|
161
|
+
{
|
|
162
|
+
name: DevicePlatformName.BARI_NFC,
|
|
163
|
+
deviceSource: DeviceSource.BARI_NFC
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: DevicePlatformName.BARI,
|
|
167
|
+
deviceSource: DeviceSource.BARI
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: DevicePlatformName.BARI_W,
|
|
171
|
+
deviceSource: DeviceSource.BARI_W
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
screen: {
|
|
175
|
+
type: DeviceScreenType.S,
|
|
176
|
+
width: 194,
|
|
177
|
+
height: 368
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
_a[DeviceTarget.BERLIN] = {
|
|
181
|
+
deviceName: 'GTR 4',
|
|
182
|
+
platforms: [
|
|
183
|
+
{
|
|
184
|
+
name: DevicePlatformName.BERLIN,
|
|
185
|
+
deviceSource: DeviceSource.BERLIN
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: DevicePlatformName.BERLIN_W,
|
|
189
|
+
deviceSource: DeviceSource.BERLIN_W
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
screen: {
|
|
193
|
+
type: DeviceScreenType.R,
|
|
194
|
+
width: 466,
|
|
195
|
+
height: 466
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
_a[DeviceTarget.LILLE] = {
|
|
199
|
+
deviceName: 'GTS 4',
|
|
200
|
+
platforms: [
|
|
201
|
+
{
|
|
202
|
+
name: DevicePlatformName.LILLE,
|
|
203
|
+
deviceSource: DeviceSource.LILLE
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: DevicePlatformName.LILLE_W,
|
|
207
|
+
deviceSource: DeviceSource.LILLE_W
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
screen: {
|
|
211
|
+
type: DeviceScreenType.S,
|
|
212
|
+
width: 390,
|
|
213
|
+
height: 450
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
_a);
|
|
217
|
+
exports.OSV2Devices = [
|
|
218
|
+
DeviceSource.BERLIN,
|
|
219
|
+
DeviceSource.BERLIN_W,
|
|
220
|
+
DeviceSource.LILLE,
|
|
221
|
+
DeviceSource.LILLE_W
|
|
222
|
+
];
|
|
223
|
+
exports.OSV2DeviceTargetNames = Object.keys(exports.deviceTargets).reduce(function (targetNames, target) {
|
|
224
|
+
var flag = true;
|
|
225
|
+
var _a = exports.deviceTargets[target].platforms, platforms = _a === void 0 ? [] : _a;
|
|
226
|
+
if (platforms && platforms.length) {
|
|
227
|
+
platforms.forEach(function (_a) {
|
|
228
|
+
var deviceSource = _a.deviceSource;
|
|
229
|
+
if (!exports.OSV2Devices.includes(deviceSource)) {
|
|
230
|
+
flag = false;
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
flag = false;
|
|
236
|
+
}
|
|
237
|
+
flag && targetNames.push(target);
|
|
238
|
+
return targetNames;
|
|
239
|
+
}, []);
|
|
240
|
+
exports.deviceInternalCodeName = Object.keys(exports.deviceTargets).reduce(function (deviceSources, target) {
|
|
241
|
+
var _a = exports.deviceTargets[target].platforms, platforms = _a === void 0 ? [] : _a;
|
|
242
|
+
platforms.forEach(function (_a) {
|
|
243
|
+
var deviceSource = _a.deviceSource;
|
|
244
|
+
deviceSource && (deviceSources[deviceSource] = target);
|
|
245
|
+
});
|
|
246
|
+
return deviceSources;
|
|
247
|
+
}, {});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
exports.__esModule = true;
|
|
17
|
+
__exportStar(require("./device"), exports);
|
|
18
|
+
__exportStar(require("./project"), exports);
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.getLocalConfig = exports.getLocalStorage = exports.simulatorStorageKey = exports.updateVersion = exports.zeppFontIcon = exports.ACCOUNT_ENV_KEY = exports.DEFAULT_PORT = exports.DEFAULT_HOST = exports.TemplateCopyType = exports.AppSourceType = exports.AppType = void 0;
|
|
7
|
+
var dotenv_1 = __importDefault(require("dotenv"));
|
|
8
|
+
var fs_1 = __importDefault(require("fs"));
|
|
9
|
+
var os_1 = __importDefault(require("os"));
|
|
10
|
+
var path_1 = __importDefault(require("path"));
|
|
11
|
+
var fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
|
+
var AppType;
|
|
13
|
+
(function (AppType) {
|
|
14
|
+
AppType["APP"] = "app";
|
|
15
|
+
AppType["WATCHFACE"] = "watchface";
|
|
16
|
+
})(AppType = exports.AppType || (exports.AppType = {}));
|
|
17
|
+
var AppSourceType;
|
|
18
|
+
(function (AppSourceType) {
|
|
19
|
+
AppSourceType["LOCAL"] = "local";
|
|
20
|
+
AppSourceType["YEOMAN"] = "yeoman";
|
|
21
|
+
})(AppSourceType = exports.AppSourceType || (exports.AppSourceType = {}));
|
|
22
|
+
var TemplateCopyType;
|
|
23
|
+
(function (TemplateCopyType) {
|
|
24
|
+
TemplateCopyType["CLONE"] = "clone";
|
|
25
|
+
TemplateCopyType["EDIT"] = "edit";
|
|
26
|
+
})(TemplateCopyType = exports.TemplateCopyType || (exports.TemplateCopyType = {}));
|
|
27
|
+
exports.DEFAULT_HOST = '127.0.0.1';
|
|
28
|
+
exports.DEFAULT_PORT = '7650';
|
|
29
|
+
exports.ACCOUNT_ENV_KEY = 'account_env';
|
|
30
|
+
var localStoragePath = path_1["default"].resolve(os_1["default"].homedir(), ".zepp/.zeus");
|
|
31
|
+
var getLoginURL = {
|
|
32
|
+
production: 'https://user.zepp.com/universalLogin/index.html#/login',
|
|
33
|
+
test: 'https://user-testing.zepp.com/universalLogin/index.html#/login'
|
|
34
|
+
};
|
|
35
|
+
var getAnalyticsHost = {
|
|
36
|
+
production: 'https://api-analytics.huami.com',
|
|
37
|
+
test: 'https://api-analytics-test.huami.com'
|
|
38
|
+
};
|
|
39
|
+
exports.zeppFontIcon = [
|
|
40
|
+
'',
|
|
41
|
+
' ********* ******* ******* ******* ',
|
|
42
|
+
' //////**/ /**///// /**////** /**////**',
|
|
43
|
+
' **/ /** /** /** /** /**',
|
|
44
|
+
' **/ >***** /******* /******* ',
|
|
45
|
+
' **/ /**/// /**//// /**//// ',
|
|
46
|
+
' **/ /** /** /** ',
|
|
47
|
+
' ******** /******* /** /** ',
|
|
48
|
+
' //////// //////// // // ',
|
|
49
|
+
'',
|
|
50
|
+
].join('\n');
|
|
51
|
+
exports.updateVersion = [
|
|
52
|
+
'',
|
|
53
|
+
'╭──────────────────────────────────────────────────────╮',
|
|
54
|
+
'│ │',
|
|
55
|
+
'│ New version available! │',
|
|
56
|
+
'│ Changelog: https://api.huami.com/t/zeus-cli-doc │',
|
|
57
|
+
'│ Run `npm install @zeppos/zeus-cli -g` to update! │',
|
|
58
|
+
'│ │',
|
|
59
|
+
'╰──────────────────────────────────────────────────────╯',
|
|
60
|
+
'',
|
|
61
|
+
].join('\n');
|
|
62
|
+
exports.simulatorStorageKey = {
|
|
63
|
+
simulatorHost: 'simulator_host',
|
|
64
|
+
simulatorPort: 'simulator_port',
|
|
65
|
+
simulatorConnectStatus: "____simulator_connect_status"
|
|
66
|
+
};
|
|
67
|
+
var getLocalStorage = function () {
|
|
68
|
+
fs_extra_1["default"].ensureFileSync(localStoragePath);
|
|
69
|
+
return dotenv_1["default"].parse(fs_1["default"].readFileSync(localStoragePath));
|
|
70
|
+
};
|
|
71
|
+
exports.getLocalStorage = getLocalStorage;
|
|
72
|
+
var getLocalConfig = function () {
|
|
73
|
+
var zeusStorageInfo = (0, exports.getLocalStorage)();
|
|
74
|
+
var account_env = zeusStorageInfo.account_env || 'production';
|
|
75
|
+
var LOGIN_URL = new URL(getLoginURL[account_env]);
|
|
76
|
+
var ANALYTICS_HOST = getAnalyticsHost[account_env];
|
|
77
|
+
var accountPrefix = "____".concat(LOGIN_URL.host.replace(/\./g, '_'), "__");
|
|
78
|
+
var loginConfig = {
|
|
79
|
+
LOGIN_URL: LOGIN_URL,
|
|
80
|
+
PROJECT_NAME: 'zeppos_zeus_cli',
|
|
81
|
+
PLATFORM_APP: 'com.huami.webapp'
|
|
82
|
+
};
|
|
83
|
+
var loginStorageKey = {
|
|
84
|
+
accountToken: "".concat(accountPrefix, "token"),
|
|
85
|
+
account: "".concat(accountPrefix, "account"),
|
|
86
|
+
userid: "".concat(accountPrefix, "userid"),
|
|
87
|
+
cname: "".concat(accountPrefix, "cname")
|
|
88
|
+
};
|
|
89
|
+
var analyticsKey = {
|
|
90
|
+
id: "".concat(accountPrefix, "analyticsId")
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
zeusStorageInfo: zeusStorageInfo,
|
|
94
|
+
accountPrefix: accountPrefix,
|
|
95
|
+
account_env: account_env,
|
|
96
|
+
LOGIN_URL: LOGIN_URL,
|
|
97
|
+
ANALYTICS_HOST: ANALYTICS_HOST,
|
|
98
|
+
loginConfig: loginConfig,
|
|
99
|
+
analyticsKey: analyticsKey,
|
|
100
|
+
loginStorageKey: loginStorageKey,
|
|
101
|
+
simulatorStorageKey: exports.simulatorStorageKey
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
exports.getLocalConfig = getLocalConfig;
|
|
@@ -7,15 +7,15 @@ exports.HM_Analytics = void 0;
|
|
|
7
7
|
var os_1 = __importDefault(require("os"));
|
|
8
8
|
var uuid_1 = require("uuid");
|
|
9
9
|
var axios_1 = __importDefault(require("axios"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var index_1 = require("./index");
|
|
11
|
+
var _a = index_1.config.getLocalConfig(), ANALYTICS_HOST = _a.ANALYTICS_HOST, analyticsKey = _a.analyticsKey;
|
|
12
12
|
var getAnalyticsID = function () {
|
|
13
13
|
var _a;
|
|
14
|
-
var _b =
|
|
14
|
+
var _b = index_1.instanceStorage.getStorage(), _c = analyticsKey.id, _d = _b[_c], analyticsId = _d === void 0 ? '' : _d;
|
|
15
15
|
if (!analyticsId) {
|
|
16
16
|
var newAnalyticsId = (0, uuid_1.v4)();
|
|
17
|
-
|
|
18
|
-
_a[
|
|
17
|
+
index_1.globalStorage.set((_a = {},
|
|
18
|
+
_a[analyticsKey.id] = newAnalyticsId,
|
|
19
19
|
_a));
|
|
20
20
|
return newAnalyticsId;
|
|
21
21
|
}
|
|
@@ -43,7 +43,7 @@ var HM_Analytics = function (event_id, options) {
|
|
|
43
43
|
]
|
|
44
44
|
};
|
|
45
45
|
var eventPackageStr = Buffer.from(JSON.stringify(eventPackage)).toString('base64');
|
|
46
|
-
axios_1["default"].post("".concat(
|
|
46
|
+
axios_1["default"].post("".concat(ANALYTICS_HOST, "/api/v5/server/collect"), eventPackageStr, {
|
|
47
47
|
headers: {
|
|
48
48
|
appid: analytics_app_id,
|
|
49
49
|
'content-type': 'text/plain'
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
exports.__esModule = true;
|
|
29
|
+
exports.modules = exports.config = exports.api = void 0;
|
|
30
|
+
__exportStar(require("./storage/index"), exports);
|
|
31
|
+
__exportStar(require("./logger/index"), exports);
|
|
32
|
+
exports.api = __importStar(require("./api/index"));
|
|
33
|
+
exports.config = __importStar(require("./config/index"));
|
|
34
|
+
exports.modules = __importStar(require("./modules/index"));
|
|
35
|
+
__exportStar(require("./hm-analytics"), exports);
|
|
36
|
+
__exportStar(require("./tools/index"), exports);
|
|
37
|
+
__exportStar(require("./websocket"), exports);
|
|
38
|
+
__exportStar(require("./simulator"), exports);
|