@zeppos/zeus-cli 1.2.2 → 1.2.4
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/main.js +1 -1
- package/modules/bridge.js +1 -1
- package/modules/build.js +152 -32
- package/modules/create.js +7 -6
- package/modules/help.js +1 -1
- package/modules/run.js +14 -12
- package/package.json +2 -2
- package/private-modules/zeppos-app-utils/dist/api/index.js +1 -1
- package/private-modules/zeppos-app-utils/dist/config/device-server.js +113 -0
- package/private-modules/zeppos-app-utils/dist/config/device.js +403 -152
- package/private-modules/zeppos-app-utils/dist/modules/build.js +101 -29
- package/private-modules/zeppos-app-utils/dist/modules/config.js +1 -1
- package/private-modules/zeppos-app-utils/dist/modules/create/index.js +13 -11
- package/private-modules/zeppos-app-utils/dist/modules/create/local-app.js +10 -10
- package/private-modules/zeppos-app-utils/dist/modules/create/yeoman-app.js +1 -1
- package/private-modules/zeppos-app-utils/dist/modules/login.js +1 -1
- package/private-modules/zeppos-app-utils/dist/modules/status.js +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/_package.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app-side/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app-side/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app.json +59 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/assets/default/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/page/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/page/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/setting/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/watchface/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/app-side/index.js +11 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/app.json +66 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gtr3/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gtr3/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gtr3-pro/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gtr3-pro/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gts3/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gts3/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3/home/index.page.js +18 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3/home/index.style.js +15 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3-pro/home/index.page.js +18 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3-pro/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3-pro/home/index.style.js +15 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gts3/home/index.page.js +19 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gts3/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gts3/home/index.style.js +15 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/i18n/en-US.po +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/setting/index.js +5 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/utils/index.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/jsconfig.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/app.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/app.json +51 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bg/bg.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/0.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/8.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/9.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/sp.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/btn/back.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/btn/lv.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/btn/red.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/bg.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/bottom.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/center.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/h.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/left.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/m.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/right.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/s.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/preview.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/second/second.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/0.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/8.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/9.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/d.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/n.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/buffer.js +11 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/device-polyfill.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/global.js +17 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/js-module.js +27 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/logger.js +21 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/setTimeout.js +59 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/watchface/gtr-3-pro/index.js +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/watchface/round/index.js +438 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/_package.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/app.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/app.json +51 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/consume.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/beer.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/cake.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/chocolate.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/coffee.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/cookies.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/ham.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/hamburger.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/ice cream.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/pizza.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/sausage.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/multiply.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/selected.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/unselected.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/page/gt/food-list.js +113 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/page/gt/index.js +126 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/page/i18n/en-US.po +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/page/i18n/zh-CN.po +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/utils/constants.js +54 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/utils/storage.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/utils/styles-gts-3.js +141 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/utils/styles.js +142 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app-side/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app-side/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app.json +59 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/assets/default/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/page/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/page/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/setting/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/watchface/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/app-side/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/app-side/index.js +72 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/app.js +23 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/app.json +55 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/assets/common.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/assets/common.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/page/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/page/index.js +55 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/data.js +67 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/defer.js +35 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/device-polyfill.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/es6-promise.js +1149 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/event.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/message-side.js +1145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/message.js +1151 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/utils/config/constants.js +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/utils/config/device.js +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/app-side/index.js +11 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/app.json +66 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/assets/gt.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/assets/gt.r/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/assets/gt.s/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.page.js +17 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.page.r.layout.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.page.s.layout.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.style.js +18 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/i18n/en-US.po +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/setting/index.js +5 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/utils/index.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/jsconfig.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/.prettierrc.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/app-side/index.js +48 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/app.js +25 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/app.json +70 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/page/home/index.page.js +155 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/page/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/page/home/index.style.js +93 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/page/i18n/en-US.po +9 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/setting/i18n/en-US.po +5 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/setting/index.js +145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/data.js +67 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/defer.js +35 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/device-polyfill.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/es6-promise.js +1149 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/event.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/message-side.js +1145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/message.js +1151 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/utils/constants.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/utils/fs.js +38 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/utils/index.js +38 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/page/index.js +2 -2
- package/private-modules/zeppos-app-utils/dist/tools/index.js +1 -1
- package/private-modules/zeppos-app-utils/dist/tools/tools.js +14 -0
- package/private-modules/zeppos-app-utils/package.json +1 -1
- package/utils/pre-check.js +11 -22
- package/utils/tools.js +14 -0
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
38
|
function step(op) {
|
|
39
39
|
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (_) try {
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
41
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
42
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
43
|
switch (op[0]) {
|
|
@@ -62,7 +62,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
62
62
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
63
|
};
|
|
64
64
|
exports.__esModule = true;
|
|
65
|
-
exports.runX = exports.previewBuild = exports.build = exports.BuildMode = void 0;
|
|
65
|
+
exports.runX = exports.previewBuild = exports.build = exports.buildSupportV3Config = exports.BuildMode = void 0;
|
|
66
66
|
var zpm_1 = require("@zeppos/zpm");
|
|
67
67
|
var rd = __importStar(require("rd"));
|
|
68
68
|
var fs_1 = __importDefault(require("fs"));
|
|
@@ -105,13 +105,86 @@ var gitignoreDefaultItem = [
|
|
|
105
105
|
'*.njsproj',
|
|
106
106
|
'*.sln',
|
|
107
107
|
];
|
|
108
|
+
var buildSupportV3Config = function (workspace, mode, buildConfigOption) {
|
|
109
|
+
if (mode === void 0) { mode = BuildMode.PROD; }
|
|
110
|
+
if (buildConfigOption === void 0) { buildConfigOption = {}; }
|
|
111
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
112
|
+
var _a, targets, _b, sources, buildOptions, _c, js2c, _d, js2bin, _e, png2vg, _f, prune, _g, compress, zabName_1, distDir_1, name_1, newName_1, error_1;
|
|
113
|
+
return __generator(this, function (_h) {
|
|
114
|
+
switch (_h.label) {
|
|
115
|
+
case 0:
|
|
116
|
+
_a = buildConfigOption.targets, targets = _a === void 0 ? [] : _a, _b = buildConfigOption.sources, sources = _b === void 0 ? [] : _b;
|
|
117
|
+
buildOptions = {
|
|
118
|
+
path: workspace,
|
|
119
|
+
buildMode: mode,
|
|
120
|
+
targets: targets,
|
|
121
|
+
sources: sources,
|
|
122
|
+
jsc: TransformType.Default
|
|
123
|
+
};
|
|
124
|
+
if ([BuildMode.PROD, BuildMode.PREVIEW].includes(mode)) {
|
|
125
|
+
_c = buildConfigOption || {}, js2c = _c.js2c, _d = _c.js2bin, js2bin = _d === void 0 ? true : _d, _e = _c.png2vg, png2vg = _e === void 0 ? true : _e, _f = _c.prune, prune = _f === void 0 ? true : _f, _g = _c.compress, compress = _g === void 0 ? true : _g;
|
|
126
|
+
js2c = !!(js2c === 'true' || js2c === true);
|
|
127
|
+
js2bin = !!(js2bin === 'true' || js2bin === true);
|
|
128
|
+
png2vg = !!(png2vg === 'true' || png2vg === true);
|
|
129
|
+
prune = !!(prune === 'true' || prune === true);
|
|
130
|
+
compress = !!(compress === 'true' || compress === true);
|
|
131
|
+
js2c && Object.assign(buildOptions, { jsc: TransformType.C });
|
|
132
|
+
js2bin && Object.assign(buildOptions, { jsc: TransformType.Bin });
|
|
133
|
+
Object.assign(buildOptions, {
|
|
134
|
+
png2vg: png2vg,
|
|
135
|
+
prune: prune,
|
|
136
|
+
compress: compress
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
_h.label = 1;
|
|
140
|
+
case 1:
|
|
141
|
+
_h.trys.push([1, 6, , 7]);
|
|
142
|
+
if (targets.length) {
|
|
143
|
+
index_1.logger.info("Start building package, targets: ".concat(targets.join(', '), "."));
|
|
144
|
+
}
|
|
145
|
+
else if (sources.length) {
|
|
146
|
+
index_1.logger.info("Start building package, device sources: ".concat(sources.join(', '), "."));
|
|
147
|
+
}
|
|
148
|
+
if (!(mode === BuildMode.DEV && (0, lodash_1.get)(buildConfigOption, '_[0]') !== 'install')) return [3, 3];
|
|
149
|
+
return [4, (0, zpm_1.startWithoutDist)(buildOptions)];
|
|
150
|
+
case 2: return [2, _h.sent()];
|
|
151
|
+
case 3: return [4, (0, zpm_1.start)(buildOptions)];
|
|
152
|
+
case 4:
|
|
153
|
+
zabName_1 = _h.sent();
|
|
154
|
+
if (buildConfigOption.renameWithAppId) {
|
|
155
|
+
distDir_1 = path.join(workspace, 'dist');
|
|
156
|
+
name_1 = zabName_1.replace(/[\s]/g, '_').split('.zab');
|
|
157
|
+
newName_1 = "".concat(buildConfigOption.renameWithAppId, "-").concat(name_1[0], ".zab");
|
|
158
|
+
rd.eachFileSync(distDir_1, function (file) {
|
|
159
|
+
var oldName = path.join(distDir_1, zabName_1);
|
|
160
|
+
if (file !== oldName) {
|
|
161
|
+
fs_extra_1["default"].removeSync(file);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
fs_1["default"].renameSync(oldName, path.join(distDir_1, newName_1));
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
return [2, newName_1];
|
|
168
|
+
}
|
|
169
|
+
return [2, zabName_1];
|
|
170
|
+
case 5: return [3, 7];
|
|
171
|
+
case 6:
|
|
172
|
+
error_1 = _h.sent();
|
|
173
|
+
index_1.logger.error(error_1);
|
|
174
|
+
return [3, 7];
|
|
175
|
+
case 7: return [2];
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
exports.buildSupportV3Config = buildSupportV3Config;
|
|
108
181
|
var build = function (workspace, mode, buildConfigOption, packages, appId) {
|
|
109
182
|
if (mode === void 0) { mode = BuildMode.PROD; }
|
|
110
183
|
if (appId === void 0) { appId = '10000'; }
|
|
111
184
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
112
|
-
var buildOptions, _a, js2c, _b, js2bin, _c, png2vg, _d, prune, curOpt, productName_1, DistDir_1,
|
|
113
|
-
return __generator(this, function (
|
|
114
|
-
switch (
|
|
185
|
+
var buildOptions, _a, js2c, _b, js2bin, _c, png2vg, _d, prune, _e, compress, curOpt, productName_1, DistDir_1, name_2, newName_2, error_2;
|
|
186
|
+
return __generator(this, function (_f) {
|
|
187
|
+
switch (_f.label) {
|
|
115
188
|
case 0:
|
|
116
189
|
buildOptions = {
|
|
117
190
|
path: workspace,
|
|
@@ -120,54 +193,56 @@ var build = function (workspace, mode, buildConfigOption, packages, appId) {
|
|
|
120
193
|
jsc: TransformType.Default
|
|
121
194
|
};
|
|
122
195
|
if (mode === BuildMode.PROD || mode === BuildMode.PREVIEW) {
|
|
123
|
-
_a = buildConfigOption || {}, js2c = _a.js2c, _b = _a.js2bin, js2bin = _b === void 0 ? true : _b, _c = _a.png2vg, png2vg = _c === void 0 ? true : _c, _d = _a.prune, prune = _d === void 0 ? true : _d;
|
|
196
|
+
_a = buildConfigOption || {}, js2c = _a.js2c, _b = _a.js2bin, js2bin = _b === void 0 ? true : _b, _c = _a.png2vg, png2vg = _c === void 0 ? true : _c, _d = _a.prune, prune = _d === void 0 ? true : _d, _e = _a.compress, compress = _e === void 0 ? true : _e;
|
|
124
197
|
js2c = !!(js2c === 'true' || js2c === true);
|
|
125
198
|
js2bin = !!(js2bin === 'true' || js2bin === true);
|
|
126
199
|
png2vg = !!(png2vg === 'true' || png2vg === true);
|
|
127
200
|
prune = !!(prune === 'true' || prune === true);
|
|
201
|
+
compress = !!(compress === 'true' || compress === true);
|
|
128
202
|
js2c && Object.assign(buildOptions, { jsc: TransformType.C });
|
|
129
203
|
js2bin && Object.assign(buildOptions, { jsc: TransformType.Bin });
|
|
130
204
|
Object.assign(buildOptions, {
|
|
131
205
|
png2vg: png2vg,
|
|
132
|
-
prune: prune
|
|
206
|
+
prune: prune,
|
|
207
|
+
compress: compress
|
|
133
208
|
});
|
|
134
209
|
}
|
|
135
|
-
|
|
210
|
+
_f.label = 1;
|
|
136
211
|
case 1:
|
|
137
|
-
|
|
212
|
+
_f.trys.push([1, 6, , 7]);
|
|
138
213
|
index_1.logger.info("Start building package, targets: ".concat(packages.join(', '), "."));
|
|
139
|
-
curOpt = (buildConfigOption
|
|
214
|
+
curOpt = (0, lodash_1.get)(buildConfigOption, '_', [])[0];
|
|
140
215
|
if (!(mode !== BuildMode.DEV ||
|
|
141
216
|
(mode === BuildMode.DEV && curOpt === 'install'))) return [3, 3];
|
|
142
217
|
return [4, (0, zpm_1.start)(buildOptions)];
|
|
143
218
|
case 2:
|
|
144
|
-
productName_1 =
|
|
219
|
+
productName_1 = _f.sent();
|
|
145
220
|
if (productName_1) {
|
|
146
221
|
DistDir_1 = path.join(workspace, 'dist');
|
|
147
|
-
|
|
148
|
-
|
|
222
|
+
name_2 = productName_1.replace(/[\s]/g, '_').split('.zab');
|
|
223
|
+
newName_2 = "".concat(appId, "-").concat(name_2[0], ".zab");
|
|
149
224
|
rd.eachFileSync(DistDir_1, function (file) {
|
|
150
225
|
var oldName = path.join(DistDir_1, productName_1);
|
|
151
226
|
if (file !== oldName) {
|
|
152
227
|
fs_extra_1["default"].removeSync(file);
|
|
153
228
|
}
|
|
154
229
|
else {
|
|
155
|
-
fs_1["default"].renameSync(oldName, path.join(DistDir_1,
|
|
230
|
+
fs_1["default"].renameSync(oldName, path.join(DistDir_1, newName_2));
|
|
156
231
|
}
|
|
157
232
|
});
|
|
158
|
-
productName_1 =
|
|
233
|
+
productName_1 = newName_2;
|
|
159
234
|
}
|
|
160
235
|
return [2, productName_1];
|
|
161
236
|
case 3:
|
|
162
237
|
if (!(mode === BuildMode.DEV)) return [3, 5];
|
|
163
238
|
return [4, (0, zpm_1.startWithoutDist)(buildOptions)];
|
|
164
239
|
case 4:
|
|
165
|
-
|
|
240
|
+
_f.sent();
|
|
166
241
|
return [2, (0, zpm_1.getZpkBuf)(packages[0])];
|
|
167
242
|
case 5: return [3, 7];
|
|
168
243
|
case 6:
|
|
169
|
-
|
|
170
|
-
index_1.logger.error(
|
|
244
|
+
error_2 = _f.sent();
|
|
245
|
+
index_1.logger.error(error_2);
|
|
171
246
|
return [3, 7];
|
|
172
247
|
case 7: return [2];
|
|
173
248
|
}
|
|
@@ -184,7 +259,7 @@ var previewBuild = function (root, args, workspace, appType, curCommand) { retur
|
|
|
184
259
|
form.append('file', fs_1["default"].createReadStream(workspace));
|
|
185
260
|
form.append('app_type', appType === index_1.config.AppType.WATCHFACE ? '1' : '2');
|
|
186
261
|
form.getLength(function (err, length) { return __awaiter(void 0, void 0, void 0, function () {
|
|
187
|
-
var protocol, code, res,
|
|
262
|
+
var protocol, code, res, error_3, _subRegionalHost, url, _a, deviceSource, appId, appName, appType_1, deviceSourceArr, targetDeviceInternalName, packageInfo, url, preview, downloadPackageReturn;
|
|
188
263
|
return __generator(this, function (_b) {
|
|
189
264
|
switch (_b.label) {
|
|
190
265
|
case 0:
|
|
@@ -204,8 +279,8 @@ var previewBuild = function (root, args, workspace, appType, curCommand) { retur
|
|
|
204
279
|
code = res.code;
|
|
205
280
|
return [3, 7];
|
|
206
281
|
case 3:
|
|
207
|
-
|
|
208
|
-
if (!((
|
|
282
|
+
error_3 = _b.sent();
|
|
283
|
+
if (!((error_3 === null || error_3 === void 0 ? void 0 : error_3.message) === '401')) return [3, 5];
|
|
209
284
|
index_1.logger.warn("Login information is invalid. Please login again, or end this service and login again with the command 'zeus login'.");
|
|
210
285
|
return [4, index_1.modules.login().then(function (res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
211
286
|
return __generator(this, function (_a) {
|
|
@@ -219,7 +294,7 @@ var previewBuild = function (root, args, workspace, appType, curCommand) { retur
|
|
|
219
294
|
_b.sent();
|
|
220
295
|
return [3, 6];
|
|
221
296
|
case 5:
|
|
222
|
-
index_1.logger.error(
|
|
297
|
+
index_1.logger.error(error_3 === null || error_3 === void 0 ? void 0 : error_3.message);
|
|
223
298
|
reject('reTry');
|
|
224
299
|
return [2];
|
|
225
300
|
case 6: return [3, 7];
|
|
@@ -232,7 +307,7 @@ var previewBuild = function (root, args, workspace, appType, curCommand) { retur
|
|
|
232
307
|
case 8:
|
|
233
308
|
if (!(curCommand === 'install')) return [3, 10];
|
|
234
309
|
_a = (0, index_1.getDeviceInfoFromAppJson)(root), deviceSource = _a.deviceSource, appId = _a.appId, appName = _a.appName, appType_1 = _a.appType, deviceSourceArr = _a.deviceSourceArr, targetDeviceInternalName = _a.targetDeviceInternalName;
|
|
235
|
-
return [4, index_1.api.downloadPackage(code, deviceSource, appType_1)];
|
|
310
|
+
return [4, index_1.api.downloadPackage(code, (0, lodash_1.get)(args, "sources[0]", deviceSource), appType_1)];
|
|
236
311
|
case 9:
|
|
237
312
|
packageInfo = _b.sent();
|
|
238
313
|
url = packageInfo;
|
|
@@ -250,7 +325,7 @@ var previewBuild = function (root, args, workspace, appType, curCommand) { retur
|
|
|
250
325
|
name: appName,
|
|
251
326
|
"debugger": true,
|
|
252
327
|
updatedTime: Math.round(new Date().getTime() / 1000),
|
|
253
|
-
devices: deviceSourceArr,
|
|
328
|
+
devices: (0, lodash_1.get)(args, "sources", deviceSourceArr),
|
|
254
329
|
target: targetDeviceInternalName
|
|
255
330
|
});
|
|
256
331
|
_b.label = 10;
|
|
@@ -264,7 +339,7 @@ var previewBuild = function (root, args, workspace, appType, curCommand) { retur
|
|
|
264
339
|
});
|
|
265
340
|
}); };
|
|
266
341
|
exports.previewBuild = previewBuild;
|
|
267
|
-
var runX = function (root, args, url,
|
|
342
|
+
var runX = function (root, args, url, logAfterFunc) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
343
|
var logger, simulator, refreshSimulator, gitignorePath, gitignore, ignored;
|
|
269
344
|
return __generator(this, function (_a) {
|
|
270
345
|
logger = new index_1.MyLogger();
|
|
@@ -278,10 +353,7 @@ var runX = function (root, args, url, packages, logAfterFunc) { return __awaiter
|
|
|
278
353
|
switch (_b.label) {
|
|
279
354
|
case 0:
|
|
280
355
|
logger.info('rebuilding...');
|
|
281
|
-
|
|
282
|
-
args.target = process.env._targetDeviceToBuild;
|
|
283
|
-
}
|
|
284
|
-
return [4, index_1.modules.build(root, BuildMode.DEV, args, packages)];
|
|
356
|
+
return [4, (0, exports.buildSupportV3Config)(root, BuildMode.DEV, args)];
|
|
285
357
|
case 1:
|
|
286
358
|
zpkBuffer = _b.sent();
|
|
287
359
|
if (zpkBuffer) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -48,7 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
49
|
function step(op) {
|
|
50
50
|
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
-
while (_) try {
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
52
52
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
53
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
54
|
switch (op[0]) {
|
|
@@ -101,14 +101,16 @@ var projectPreInstall = function (dir) {
|
|
|
101
101
|
var createX = function (cwdPath, args, func, beforeFiles) {
|
|
102
102
|
if (beforeFiles === void 0) { beforeFiles = []; }
|
|
103
103
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
104
|
-
var cmd, _a, projectName, workDir, V1_TEMPLATE_DIR, V2_TEMPLATE_DIR, localTemplates, localChoices, watchfaceTemplateChoices, appTemplateChoices, templatesInit, env, generatorMate, generatorMateKeys, choicesValueFormat, answer, choosePkg;
|
|
105
|
-
return __generator(this, function (
|
|
106
|
-
switch (
|
|
104
|
+
var cmd, _a, projectName, _b, configVersion, workDir, templateDir, V1_TEMPLATE_DIR, V2_TEMPLATE_DIR, localTemplates, localChoices, watchfaceTemplateChoices, appTemplateChoices, templatesInit, env, generatorMate, generatorMateKeys, choicesValueFormat, answer, choosePkg;
|
|
105
|
+
return __generator(this, function (_c) {
|
|
106
|
+
switch (_c.label) {
|
|
107
107
|
case 0:
|
|
108
|
-
cmd = args._[0], _a = args.projectName, projectName = _a === void 0 ? '' : _a;
|
|
108
|
+
cmd = args._[0], _a = args.projectName, projectName = _a === void 0 ? '' : _a, _b = args.configVersion, configVersion = _b === void 0 ? 'v2' : _b;
|
|
109
109
|
workDir = cwdPath;
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
args.configVersion = (0, lodash_1.toLower)(configVersion);
|
|
111
|
+
templateDir = (0, path_1.resolve)(__dirname, "../../public/template".concat((0, lodash_1.toLower)(configVersion) === 'v3' ? '/config-version-v3' : ''));
|
|
112
|
+
V1_TEMPLATE_DIR = (0, path_1.resolve)(templateDir, './v1');
|
|
113
|
+
V2_TEMPLATE_DIR = (0, path_1.resolve)(templateDir, './v2');
|
|
112
114
|
localTemplates = {
|
|
113
115
|
v1: (0, fs_1.readdirSync)(V1_TEMPLATE_DIR),
|
|
114
116
|
v2: (0, fs_1.readdirSync)(V2_TEMPLATE_DIR)
|
|
@@ -199,7 +201,7 @@ var createX = function (cwdPath, args, func, beforeFiles) {
|
|
|
199
201
|
watchfaceTemplateChoices: watchfaceTemplateChoices
|
|
200
202
|
})];
|
|
201
203
|
case 1:
|
|
202
|
-
answer =
|
|
204
|
+
answer = _c.sent();
|
|
203
205
|
answer.appType = answer.appType || AppType.APP;
|
|
204
206
|
answer.workDir = workDir;
|
|
205
207
|
choosePkg = answer.appType.toLowerCase() === AppType.APP
|
|
@@ -208,7 +210,7 @@ var createX = function (cwdPath, args, func, beforeFiles) {
|
|
|
208
210
|
index_1.logger.info('fetching template...');
|
|
209
211
|
return [4, (0, index_1.sleep)(100)];
|
|
210
212
|
case 2:
|
|
211
|
-
|
|
213
|
+
_c.sent();
|
|
212
214
|
if (choosePkg.type === AppSourceType.YEOMAN) {
|
|
213
215
|
index_1.logger.info("".concat((0, lodash_1.upperFirst)(cmd), " application using yeoman template \"").concat(choosePkg.name, "\"."));
|
|
214
216
|
(0, yeoman_app_1.createYeomanApp)(__assign(__assign({}, answer), { env: env, templateInfo: generatorMate[choosePkg.name] }));
|
|
@@ -220,7 +222,7 @@ var createX = function (cwdPath, args, func, beforeFiles) {
|
|
|
220
222
|
index_1.logger.log('\n');
|
|
221
223
|
return [4, (0, index_1.sleep)(50)];
|
|
222
224
|
case 3:
|
|
223
|
-
|
|
225
|
+
_c.sent();
|
|
224
226
|
rd.eachFileSync(workDir, function (file) {
|
|
225
227
|
if ((0, lodash_1.endsWith)(file, '.DS_Store')) {
|
|
226
228
|
fs_extra_1["default"].remove(file);
|
|
@@ -240,7 +242,7 @@ var createX = function (cwdPath, args, func, beforeFiles) {
|
|
|
240
242
|
index_1.logger.log('Start installing dependency packages.');
|
|
241
243
|
return [4, projectPreInstall(workDir)];
|
|
242
244
|
case 4:
|
|
243
|
-
|
|
245
|
+
_c.sent();
|
|
244
246
|
index_1.logger.log(chalk_1["default"].hex('#DB8C41')(zeppFontIcon));
|
|
245
247
|
index_1.logger.log("I'm all done. Now you can start your application.");
|
|
246
248
|
return [2, [
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -59,12 +59,12 @@ var fs_1 = __importDefault(require("fs"));
|
|
|
59
59
|
var index_1 = require("../../index");
|
|
60
60
|
var TemplateCopyType = index_1.config.TemplateCopyType, AppType = index_1.config.AppType, deviceTargets = index_1.config.deviceTargets;
|
|
61
61
|
var createLocalApp = function (args) { return __awaiter(void 0, void 0, void 0, function () {
|
|
62
|
-
var workDir, templateInfo,
|
|
62
|
+
var workDir, templateInfo, withAppSide, withSettings, buildTargets, appType, appJsonPath, appJson, appID, defaultTarget, targets, defaultWatchFaceConfig, defaultAssetsPath_1;
|
|
63
63
|
return __generator(this, function (_a) {
|
|
64
|
-
workDir = args.workDir, templateInfo = args.templateInfo,
|
|
64
|
+
workDir = args.workDir, templateInfo = args.templateInfo, withAppSide = args.withAppSide, withSettings = args.withSettings, buildTargets = args.buildTargets, appType = args.appType;
|
|
65
65
|
fs_extra_1["default"].copySync(templateInfo.path, workDir);
|
|
66
|
-
fs_extra_1["default"].copySync((0, path_1.resolve)(
|
|
67
|
-
fs_extra_1["default"].copySync((0, path_1.resolve)(
|
|
66
|
+
fs_extra_1["default"].copySync((0, path_1.resolve)(templateInfo.path, "../jsconfig.json"), "".concat(workDir, "/jsconfig.json"));
|
|
67
|
+
fs_extra_1["default"].copySync((0, path_1.resolve)(templateInfo.path, "../_package.json"), "".concat(workDir, "/package.json"));
|
|
68
68
|
fs_1["default"].writeFileSync("".concat(workDir, "/global.d.ts"), '/// <reference path="node_modules/@zeppos/device-types/index.d.ts" />');
|
|
69
69
|
appJsonPath = (0, path_1.resolve)(workDir, './app.json');
|
|
70
70
|
appJson = fs_extra_1["default"].readJsonSync(appJsonPath);
|
|
@@ -81,11 +81,11 @@ var createLocalApp = function (args) { return __awaiter(void 0, void 0, void 0,
|
|
|
81
81
|
targets = {};
|
|
82
82
|
if (appType.toLowerCase() === AppType.WATCHFACE) {
|
|
83
83
|
defaultWatchFaceConfig = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
path: 'watchface/index',
|
|
85
|
+
main: 1,
|
|
86
|
+
editable: 0,
|
|
87
|
+
lockscreen: 0,
|
|
88
|
+
photoscreen: 0
|
|
89
89
|
};
|
|
90
90
|
lodash_1["default"].set(appJson, 'app.appType', AppType.WATCHFACE);
|
|
91
91
|
lodash_1["default"].set(appJson, 'app.description', 'empty watchface');
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/_package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "empty",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "app.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@zeppos/device-types": "^1.0.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"configVersion": "v3",
|
|
3
|
+
"app": {
|
|
4
|
+
"appId": 20000,
|
|
5
|
+
"appName": "Empty",
|
|
6
|
+
"appType": "app",
|
|
7
|
+
"version": {
|
|
8
|
+
"code": 1,
|
|
9
|
+
"name": "1.0.0"
|
|
10
|
+
},
|
|
11
|
+
"icon": "icon.png",
|
|
12
|
+
"vender": "zepp",
|
|
13
|
+
"description": "empty application"
|
|
14
|
+
},
|
|
15
|
+
"permissions": [
|
|
16
|
+
"data:os.device.info",
|
|
17
|
+
"device:os.local_storage",
|
|
18
|
+
"data:user.hd.calorie"
|
|
19
|
+
],
|
|
20
|
+
"runtime": {
|
|
21
|
+
"apiVersion": {
|
|
22
|
+
"compatible": "1.0.0",
|
|
23
|
+
"target": "1.0.0",
|
|
24
|
+
"minVersion": "1.0"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"targets": {
|
|
28
|
+
"default": {
|
|
29
|
+
"module": {
|
|
30
|
+
"page": {
|
|
31
|
+
"pages": [
|
|
32
|
+
"page/index"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"app-side": {
|
|
36
|
+
"path": "app-side/index"
|
|
37
|
+
},
|
|
38
|
+
"setting": {
|
|
39
|
+
"path": "setting/index"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"platforms": [
|
|
43
|
+
{
|
|
44
|
+
"st": "r"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"st": "s"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"designWidth": 480
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"i18n": {
|
|
54
|
+
"en-US": {
|
|
55
|
+
"appName": "Empty"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"defaultLanguage": "en-US"
|
|
59
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"configVersion": "v2",
|
|
3
|
+
"app": {
|
|
4
|
+
"appId": 20001,
|
|
5
|
+
"appName": "Hello World",
|
|
6
|
+
"appType": "app",
|
|
7
|
+
"version": {
|
|
8
|
+
"code": 1,
|
|
9
|
+
"name": "1.0.1"
|
|
10
|
+
},
|
|
11
|
+
"icon": "icon.png",
|
|
12
|
+
"vender": "zepp",
|
|
13
|
+
"description": "hello world app"
|
|
14
|
+
},
|
|
15
|
+
"permissions": [
|
|
16
|
+
"data:os.device.info",
|
|
17
|
+
"device:os.local_storage"
|
|
18
|
+
],
|
|
19
|
+
"runtime": {
|
|
20
|
+
"apiVersion": {
|
|
21
|
+
"compatible": "1.0.0",
|
|
22
|
+
"target": "1.0.0",
|
|
23
|
+
"minVersion": "1.0"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"debug": false,
|
|
27
|
+
"targets": {
|
|
28
|
+
"gt": {
|
|
29
|
+
"module": {
|
|
30
|
+
"page": {
|
|
31
|
+
"pages": [
|
|
32
|
+
"page/gt/home/index.page"
|
|
33
|
+
],
|
|
34
|
+
"window": {
|
|
35
|
+
"navigationBarBackgroundColor": "#ffffff",
|
|
36
|
+
"navigationBarTextStyle": "black",
|
|
37
|
+
"navigationBarTitleText": "Hello World",
|
|
38
|
+
"backgroundColor": "#eeeeee",
|
|
39
|
+
"backgroundTextStyle": "light"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"app-side": {
|
|
43
|
+
"path": "app-side/index"
|
|
44
|
+
},
|
|
45
|
+
"setting": {
|
|
46
|
+
"path": "setting/index"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"platforms": [
|
|
50
|
+
{
|
|
51
|
+
"st": "r"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"st": "s"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"designWidth": 480
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"i18n": {
|
|
61
|
+
"en-US": {
|
|
62
|
+
"appName": "Hello World"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"defaultLanguage": "en-US"
|
|
66
|
+
}
|
|
Binary file
|