@zeppos/zeus-cli 1.1.9 → 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.
Files changed (200) hide show
  1. package/bin/main.js +2 -0
  2. package/modules/bridge.js +7 -8
  3. package/modules/build.js +21 -2
  4. package/modules/create.js +89 -38
  5. package/package.json +2 -2
  6. package/private-modules/zeppos-app-utils/dist/config/device.js +114 -14
  7. package/private-modules/zeppos-app-utils/dist/modules/build.js +30 -11
  8. package/private-modules/zeppos-app-utils/dist/modules/config.js +0 -1
  9. package/private-modules/zeppos-app-utils/dist/modules/create/index.js +74 -36
  10. package/private-modules/zeppos-app-utils/dist/modules/create/local-app.js +4 -4
  11. package/private-modules/zeppos-app-utils/dist/modules/login.js +1 -5
  12. package/private-modules/zeppos-app-utils/dist/modules/status.js +0 -1
  13. package/private-modules/zeppos-app-utils/dist/public/template/{_package.json → v1/_package.json} +0 -0
  14. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/app-side/i18n/en-US.po +0 -0
  15. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/app-side/index.js +0 -0
  16. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/app.js +0 -0
  17. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/app.json +0 -0
  18. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/assets/default/icon.png +0 -0
  19. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/page/i18n/en-US.po +0 -0
  20. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/page/index.js +0 -0
  21. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/setting/i18n/en-US.po +0 -0
  22. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/setting/index.js +0 -0
  23. package/private-modules/zeppos-app-utils/dist/public/template/{empty → v1/empty}/watchface/index.js +0 -0
  24. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/app-side/index.js +0 -0
  25. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/app.js +0 -0
  26. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/app.json +0 -0
  27. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/assets/gtr3/icon.png +0 -0
  28. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/assets/gtr3/image/logo.png +0 -0
  29. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/assets/gtr3-pro/icon.png +0 -0
  30. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/assets/gtr3-pro/image/logo.png +0 -0
  31. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/assets/gts3/icon.png +0 -0
  32. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/assets/gts3/image/logo.png +0 -0
  33. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gtr3/home/index.page.js +0 -0
  34. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gtr3/home/index.page.json +0 -0
  35. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gtr3/home/index.style.js +0 -0
  36. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gtr3-pro/home/index.page.js +0 -0
  37. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gtr3-pro/home/index.page.json +0 -0
  38. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gtr3-pro/home/index.style.js +0 -0
  39. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gts3/home/index.page.js +0 -0
  40. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gts3/home/index.page.json +0 -0
  41. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/gts3/home/index.style.js +0 -0
  42. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/page/i18n/en-US.po +0 -0
  43. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/setting/i18n/en-US.po +0 -0
  44. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/setting/index.js +0 -0
  45. package/private-modules/zeppos-app-utils/dist/public/template/{hello-world → v1/hello-world}/utils/index.js +0 -0
  46. package/private-modules/zeppos-app-utils/dist/public/template/{jsconfig.json → v1/jsconfig.json} +0 -0
  47. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/app.js +0 -0
  48. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/app.json +0 -0
  49. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bg/bg.png +0 -0
  50. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/0.png +0 -0
  51. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/1.png +0 -0
  52. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/2.png +0 -0
  53. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/3.png +0 -0
  54. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/4.png +0 -0
  55. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/5.png +0 -0
  56. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/6.png +0 -0
  57. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/7.png +0 -0
  58. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/8.png +0 -0
  59. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/9.png +0 -0
  60. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/bigNum/sp.png +0 -0
  61. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/btn/back.png +0 -0
  62. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/btn/lv.png +0 -0
  63. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/btn/red.png +0 -0
  64. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/point/bg.png +0 -0
  65. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/point/bottom.png +0 -0
  66. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/point/center.png +0 -0
  67. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/point/h.png +0 -0
  68. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/point/left.png +0 -0
  69. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/point/m.png +0 -0
  70. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/point/right.png +0 -0
  71. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/point/s.png +0 -0
  72. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/preview.png +0 -0
  73. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/second/second.png +0 -0
  74. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/0.png +0 -0
  75. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/1.png +0 -0
  76. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/2.png +0 -0
  77. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/3.png +0 -0
  78. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/4.png +0 -0
  79. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/5.png +0 -0
  80. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/6.png +0 -0
  81. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/7.png +0 -0
  82. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/8.png +0 -0
  83. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/9.png +0 -0
  84. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/d.png +0 -0
  85. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/smallNum/n.png +0 -0
  86. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_ch/1.png +0 -0
  87. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_ch/2.png +0 -0
  88. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_ch/3.png +0 -0
  89. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_ch/4.png +0 -0
  90. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_ch/5.png +0 -0
  91. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_ch/6.png +0 -0
  92. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_ch/7.png +0 -0
  93. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_en/1.png +0 -0
  94. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_en/2.png +0 -0
  95. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_en/3.png +0 -0
  96. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_en/4.png +0 -0
  97. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_en/5.png +0 -0
  98. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_en/6.png +0 -0
  99. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/assets/gtr-3-pro/images/week_en/7.png +0 -0
  100. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/shared/buffer.js +0 -0
  101. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/shared/device-polyfill.js +0 -0
  102. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/shared/global.js +0 -0
  103. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/shared/js-module.js +0 -0
  104. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/shared/logger.js +0 -0
  105. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/shared/setTimeout.js +0 -0
  106. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/watchface/gtr-3-pro/index.js +0 -0
  107. package/private-modules/zeppos-app-utils/dist/public/template/{timer → v1/timer}/watchface/round/index.js +0 -0
  108. package/private-modules/zeppos-app-utils/dist/public/template/v2/_package.json +14 -0
  109. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/app.js +28 -0
  110. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/app.json +56 -0
  111. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/consume.png +0 -0
  112. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/beer.png +0 -0
  113. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/cake.png +0 -0
  114. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/chocolate.png +0 -0
  115. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/coffee.png +0 -0
  116. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/cookies.png +0 -0
  117. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/ham.png +0 -0
  118. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/hamburger.png +0 -0
  119. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/ice cream.png +0 -0
  120. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/pizza.png +0 -0
  121. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/food/sausage.png +0 -0
  122. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/icon.png +0 -0
  123. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/multiply.png +0 -0
  124. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/selected.png +0 -0
  125. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/assets/gts/unselected.png +0 -0
  126. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/page/gts/food-list.js +113 -0
  127. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/page/gts/index.js +126 -0
  128. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/page/i18n/en-US.po +42 -0
  129. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/page/i18n/zh-CN.po +42 -0
  130. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/utils/constants.js +54 -0
  131. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/utils/storage.js +42 -0
  132. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/utils/styles-gts-3.js +141 -0
  133. package/private-modules/zeppos-app-utils/dist/public/template/v2/calories/utils/styles.js +142 -0
  134. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/app-side/i18n/en-US.po +2 -0
  135. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/app-side/index.js +13 -0
  136. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/app.js +10 -0
  137. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/app.json +60 -0
  138. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/assets/default/icon.png +0 -0
  139. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/page/i18n/en-US.po +2 -0
  140. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/page/index.js +7 -0
  141. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/setting/i18n/en-US.po +2 -0
  142. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/setting/index.js +7 -0
  143. package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/watchface/index.js +13 -0
  144. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/app-side/i18n/en-US.po +2 -0
  145. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/app-side/index.js +57 -0
  146. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/app.js +23 -0
  147. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/app.json +65 -0
  148. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/assets/common/icon.png +0 -0
  149. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/pages/i18n/en-US.po +2 -0
  150. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/pages/index.js +55 -0
  151. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/data.js +67 -0
  152. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/defer.js +35 -0
  153. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/device-polyfill.js +6 -0
  154. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/es6-promise.js +1149 -0
  155. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/event.js +42 -0
  156. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/message-side.js +1145 -0
  157. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/shared/message.js +1151 -0
  158. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/utils/config/constants.js +2 -0
  159. package/private-modules/zeppos-app-utils/dist/public/template/v2/fetch-api/utils/config/device.js +2 -0
  160. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/app-side/index.js +11 -0
  161. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/app.js +10 -0
  162. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/app.json +101 -0
  163. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/assets/gtr/icon.png +0 -0
  164. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/assets/gtr/image/logo.png +0 -0
  165. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/assets/gts/icon.png +0 -0
  166. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/assets/gts/image/logo.png +0 -0
  167. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gtr/home/index.page.js +20 -0
  168. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gtr/home/index.page.json +1 -0
  169. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gtr/home/index.style.js +18 -0
  170. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gts/home/index.page.js +21 -0
  171. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gts/home/index.page.json +1 -0
  172. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/gts/home/index.style.js +17 -0
  173. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/page/i18n/en-US.po +3 -0
  174. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/setting/i18n/en-US.po +2 -0
  175. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/setting/index.js +5 -0
  176. package/private-modules/zeppos-app-utils/dist/public/template/v2/hello-world/utils/index.js +3 -0
  177. package/private-modules/zeppos-app-utils/dist/public/template/v2/jsconfig.json +14 -0
  178. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/.prettierrc.js +6 -0
  179. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/app-side/index.js +48 -0
  180. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/app.js +25 -0
  181. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/app.json +75 -0
  182. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/assets/gts/icon.png +0 -0
  183. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/page/home/index.page.js +155 -0
  184. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/page/home/index.page.json +1 -0
  185. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/page/home/index.style.js +93 -0
  186. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/page/i18n/en-US.po +8 -0
  187. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/setting/i18n/en-US.po +5 -0
  188. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/setting/index.js +145 -0
  189. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/data.js +67 -0
  190. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/defer.js +35 -0
  191. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/device-polyfill.js +6 -0
  192. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/es6-promise.js +1149 -0
  193. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/event.js +42 -0
  194. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/message-side.js +1145 -0
  195. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/shared/message.js +1151 -0
  196. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/utils/constants.js +3 -0
  197. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/utils/fs.js +38 -0
  198. package/private-modules/zeppos-app-utils/dist/public/template/v2/todo-list/utils/index.js +38 -0
  199. package/private-modules/zeppos-app-utils/dist/tools/index.js +0 -2
  200. package/private-modules/zeppos-app-utils/package.json +2 -2
package/bin/main.js CHANGED
@@ -41,6 +41,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
41
41
  return (mod && mod.__esModule) ? mod : { "default": mod };
42
42
  };
43
43
  exports.__esModule = true;
44
+ var lodash_1 = __importDefault(require("lodash"));
44
45
  var yargs_1 = __importDefault(require("yargs"));
45
46
  require("./post-command");
46
47
  var hideBin = require('yargs/helpers').hideBin;
@@ -61,6 +62,7 @@ var proxy = function (args) { return __awaiter(void 0, void 0, void 0, function
61
62
  case 2:
62
63
  res = _a.sent();
63
64
  Object.assign(context, res);
65
+ (0, zeppos_app_utils_1.HM_Analytics)("ZEPP_CLI_".concat(lodash_1["default"].toUpper(lodash_1["default"].get(args.argv, '_[0]')), "_C"));
64
66
  return [2];
65
67
  }
66
68
  });
package/modules/bridge.js CHANGED
@@ -131,6 +131,7 @@ var connectWSCB = function () {
131
131
  .action(function (args, cb) { return __awaiter(void 0, void 0, void 0, function () {
132
132
  return __generator(this, function (_a) {
133
133
  connectDevice(vorpal);
134
+ (0, zeppos_app_utils_2.HM_Analytics)("ZEPP_CLI_BRIDGE_CONNECT_C");
134
135
  cb();
135
136
  return [2];
136
137
  });
@@ -152,6 +153,7 @@ var connectWSCB = function () {
152
153
  vorpal.log(chalk_1["default"].yellow("No device is connected, please connect the device with the command width 'connect' first."));
153
154
  _a.label = 3;
154
155
  case 3:
156
+ (0, zeppos_app_utils_2.HM_Analytics)("ZEPP_CLI_BRIDGE_INSTALL_C");
155
157
  cb();
156
158
  return [2];
157
159
  }
@@ -179,26 +181,23 @@ var connectWSCB = function () {
179
181
  else if (args.appid) {
180
182
  vorpal.log("".concat(chalk_1["default"].red('error'), " invalid '").concat(args.appid, "', the 'uninstall' command should be followed by appid or blank."));
181
183
  }
184
+ (0, zeppos_app_utils_2.HM_Analytics)("ZEPP_CLI_BRIDGE_UNINSTALL_C");
182
185
  cb();
183
186
  return [2];
184
187
  });
185
188
  }); });
186
189
  vorpal
187
- .command('screenshot', 'Screenshot of the current watch device.').hidden()
190
+ .command('screenshot', 'Screenshot of the current watch device, OS 2.0-enabled devices only.')
188
191
  .action(function (args, cb) { return __awaiter(void 0, void 0, void 0, function () {
189
192
  return __generator(this, function (_a) {
190
193
  if (hasConnectDevice) {
191
- if (choiredDevice.indexOf('app') > -1) {
192
- vorpal.log(chalk_1["default"].blue('Waiting...'));
193
- client.sendMessage({ type: 'screenshot' }, { method: 'sysSettingPush' });
194
- }
195
- else {
196
- vorpal.log(chalk_1["default"].yellow("Only the connected device is an app that can use the screenshot command."));
197
- }
194
+ vorpal.log(chalk_1["default"].blue('Waiting...'));
195
+ client.sendMessage({ type: 'screenshot' }, { method: 'sysSettingPush' });
198
196
  }
199
197
  else {
200
198
  vorpal.log(chalk_1["default"].yellow("No device is connected, please connect the device with the command width 'connect' first."));
201
199
  }
200
+ (0, zeppos_app_utils_2.HM_Analytics)("ZEPP_CLI_BRIDGE_SCREENSHOT_C");
202
201
  cb();
203
202
  return [2];
204
203
  });
package/modules/build.js CHANGED
@@ -70,7 +70,7 @@ var dayjs_1 = __importDefault(require("dayjs"));
70
70
  var qrcode_terminal_1 = __importDefault(require("qrcode-terminal"));
71
71
  var inquirer_1 = __importDefault(require("inquirer"));
72
72
  var zeppos_app_utils_1 = require("zeppos-app-utils");
73
- var AppType = zeppos_app_utils_1.config.AppType;
73
+ var AppType = zeppos_app_utils_1.config.AppType, OSV2Devices = zeppos_app_utils_1.config.OSV2Devices;
74
74
  var appJsonContent = fs_extra_1["default"].readJSONSync(path.resolve('./app.json'), { throws: false });
75
75
  var BuildMode;
76
76
  (function (BuildMode) {
@@ -78,10 +78,15 @@ var BuildMode;
78
78
  BuildMode["PREVIEW"] = "preview";
79
79
  BuildMode["PROD"] = "production";
80
80
  })(BuildMode = exports.BuildMode || (exports.BuildMode = {}));
81
+ var isV2ApiVersion = function (appJson) {
82
+ var minVersion = (0, lodash_1.get)(appJson, 'runtime.apiVersion.minVersion', '');
83
+ var minVersionArr = minVersion.split('.');
84
+ return parseInt("0".concat(minVersionArr[0]), 10) >= 2;
85
+ };
81
86
  var chooseBuildPackages = function (mode, args) {
82
87
  if (mode === void 0) { mode = 'development'; }
83
88
  return __awaiter(void 0, void 0, void 0, function () {
84
- var targets, returnRes, _a, promptTarget_1, answers;
89
+ var jsonTargets_1, unsupportedTargets_1, targets, returnRes, _a, promptTarget_1, answers;
85
90
  return __generator(this, function (_b) {
86
91
  switch (_b.label) {
87
92
  case 0:
@@ -89,6 +94,20 @@ var chooseBuildPackages = function (mode, args) {
89
94
  zeppos_app_utils_1.logger.warn("This command needs to be executed in the root of the project.");
90
95
  process.exit(1);
91
96
  }
97
+ if (isV2ApiVersion(appJsonContent)) {
98
+ jsonTargets_1 = (0, lodash_1.get)(appJsonContent, 'targets', {});
99
+ unsupportedTargets_1 = [];
100
+ Object.keys(jsonTargets_1).forEach(function (target) {
101
+ var notV2Index = (0, lodash_1.findIndex)((0, lodash_1.get)(jsonTargets_1, "".concat(target, ".platforms"), []), function (o) {
102
+ return !OSV2Devices.includes(o.deviceSource);
103
+ });
104
+ if (notV2Index > -1) {
105
+ (0, lodash_1.unset)(appJsonContent, "targets[".concat(target, "]"));
106
+ unsupportedTargets_1.push(target);
107
+ }
108
+ });
109
+ unsupportedTargets_1.length && zeppos_app_utils_1.logger.warn("Unsupported targets(".concat(unsupportedTargets_1.join(', '), ") have been removed."));
110
+ }
92
111
  targets = Object.keys((0, lodash_1.get)(appJsonContent, 'targets', {}));
93
112
  returnRes = [];
94
113
  if (!!targets.length) return [3, 1];
package/modules/create.js CHANGED
@@ -53,15 +53,15 @@ var lodash_1 = require("lodash");
53
53
  var inquirer_1 = __importDefault(require("inquirer"));
54
54
  var path_1 = require("path");
55
55
  var zeppos_app_utils_1 = require("zeppos-app-utils");
56
- var AppType = zeppos_app_utils_1.config.AppType, deviceTargets = zeppos_app_utils_1.config.deviceTargets;
56
+ var AppType = zeppos_app_utils_1.config.AppType, deviceTargets = zeppos_app_utils_1.config.deviceTargets, OSV2DeviceTargetNames = zeppos_app_utils_1.config.OSV2DeviceTargetNames;
57
57
  var inquirerFunc = function (args, _a) {
58
58
  var appTemplateChoices = _a.appTemplateChoices, watchfaceTemplateChoices = _a.watchfaceTemplateChoices;
59
59
  return __awaiter(void 0, void 0, void 0, function () {
60
- var _b, promptAppType, _c, promptTemplate, _d, promptWithAppSide, _e, promptWithSettings, _f, promptBuildTargets;
61
- return __generator(this, function (_g) {
62
- switch (_g.label) {
60
+ var _b, promptAppType, _c, promptOsVersion, _d, promptTemplate, _e, promptWithAppSide, _f, promptWithSettings, _g, promptBuildTargets;
61
+ return __generator(this, function (_h) {
62
+ switch (_h.label) {
63
63
  case 0:
64
- _b = args.appType, promptAppType = _b === void 0 ? '' : _b, _c = args.template, promptTemplate = _c === void 0 ? '' : _c, _d = args.withAppSide, promptWithAppSide = _d === void 0 ? false : _d, _e = args.withSettings, promptWithSettings = _e === void 0 ? false : _e, _f = args.buildTargets, promptBuildTargets = _f === void 0 ? [] : _f;
64
+ _b = args.appType, promptAppType = _b === void 0 ? '' : _b, _c = args.OSVersion, promptOsVersion = _c === void 0 ? '' : _c, _d = args.template, promptTemplate = _d === void 0 ? '' : _d, _e = args.withAppSide, promptWithAppSide = _e === void 0 ? false : _e, _f = args.withSettings, promptWithSettings = _f === void 0 ? false : _f, _g = args.buildTargets, promptBuildTargets = _g === void 0 ? [] : _g;
65
65
  return [4, inquirer_1["default"].prompt([
66
66
  {
67
67
  name: 'appType',
@@ -76,12 +76,37 @@ var inquirerFunc = function (args, _a) {
76
76
  message: 'What type of application do you want to create?',
77
77
  choices: Object.keys(AppType)
78
78
  },
79
+ {
80
+ name: 'OSVersion',
81
+ type: 'list',
82
+ when: function (args) {
83
+ var bool = !promptOsVersion || !['v1', 'v2'].includes(promptOsVersion);
84
+ if (!bool) {
85
+ args.OSVersion = promptOsVersion;
86
+ }
87
+ return bool;
88
+ },
89
+ message: 'Which OS version API to develop with?',
90
+ choices: [
91
+ new inquirer_1["default"].Separator(),
92
+ new inquirer_1["default"].Separator('Device Basic Information:https://docs.zepp.com/docs/reference/related-resources/device-list/'),
93
+ new inquirer_1["default"].Separator(),
94
+ {
95
+ name: 'OS 1.0 API (Build products can run on OS 2.0, OS 1.0 devices)',
96
+ value: 'v1'
97
+ },
98
+ {
99
+ name: 'OS 2.0 API (Build products can only run on OS 2.0 devices)',
100
+ value: 'v2'
101
+ }
102
+ ]
103
+ },
79
104
  {
80
105
  name: 'template',
81
106
  type: 'list',
82
107
  when: function (args) {
83
108
  var isApp = args.appType.toLowerCase() === AppType.APP;
84
- var objMap = appTemplateChoices.find(function (val) {
109
+ var objMap = appTemplateChoices[args.OSVersion].find(function (val) {
85
110
  var name = val.name === 'Hello World' ? 'Hello_World' : val.name;
86
111
  return name === promptTemplate;
87
112
  });
@@ -91,27 +116,33 @@ var inquirerFunc = function (args, _a) {
91
116
  return isApp && !objMap;
92
117
  },
93
118
  message: 'Which app template do you want to use?',
94
- choices: __spreadArray([
95
- new inquirer_1["default"].Separator(),
96
- new inquirer_1["default"].Separator('Choose a app template')
97
- ], appTemplateChoices, true)
119
+ choices: function (args) {
120
+ var val = appTemplateChoices[args.OSVersion] || [];
121
+ return __spreadArray([
122
+ new inquirer_1["default"].Separator(),
123
+ new inquirer_1["default"].Separator('Choose a app template')
124
+ ], val, true);
125
+ }
98
126
  },
99
127
  {
100
128
  name: 'template',
101
129
  type: 'list',
102
130
  when: function (args) {
103
131
  var isWatchFace = args.appType.toLowerCase() === AppType.WATCHFACE;
104
- var objMap = watchfaceTemplateChoices.find(function (val) { return val.name === promptTemplate; });
132
+ var objMap = watchfaceTemplateChoices[args.OSVersion].find(function (val) { return val.name === promptTemplate; });
105
133
  if (isWatchFace && objMap) {
106
134
  args.template = objMap.value;
107
135
  }
108
136
  return isWatchFace && !objMap;
109
137
  },
110
138
  message: 'Which watchface template do you want to use?',
111
- choices: __spreadArray([
112
- new inquirer_1["default"].Separator(),
113
- new inquirer_1["default"].Separator('Choose a watchface template')
114
- ], watchfaceTemplateChoices, true)
139
+ choices: function (args) {
140
+ var val = watchfaceTemplateChoices[args.OSVersion] || [];
141
+ return __spreadArray([
142
+ new inquirer_1["default"].Separator(),
143
+ new inquirer_1["default"].Separator('Choose a watchface template')
144
+ ], val, true);
145
+ }
115
146
  },
116
147
  {
117
148
  name: 'withAppSide',
@@ -139,29 +170,49 @@ var inquirerFunc = function (args, _a) {
139
170
  return withAppSide;
140
171
  },
141
172
  message: 'Should this application contain a settings component?'
142
- },
143
- {
144
- name: 'buildTargets',
145
- type: 'checkbox',
146
- when: function (args) {
147
- var bool = args.template === 0;
148
- var tarArr = typeof promptBuildTargets === 'string' ? (0, lodash_1.intersection)(Object.keys(deviceTargets), promptBuildTargets.split(',')) : [];
149
- if (bool && tarArr.length) {
150
- args.buildTargets = tarArr;
151
- return false;
152
- }
153
- return bool;
154
- },
155
- choices: Object.keys(deviceTargets).map(function (platform) { return ({
156
- name: deviceTargets[platform].deviceName,
157
- value: platform,
158
- checked: platform === Object.keys(deviceTargets)[0]
159
- }); }),
160
- "default": Object.keys(deviceTargets)[0],
161
- message: 'Which platforms of this application should be built?'
162
- },
163
- ])];
164
- case 1: return [2, _g.sent()];
173
+ }
174
+ ]).then(function (args) { return __awaiter(void 0, void 0, void 0, function () {
175
+ var choicePlatforms_1, answer;
176
+ return __generator(this, function (_a) {
177
+ switch (_a.label) {
178
+ case 0:
179
+ if (!(typeof promptBuildTargets === 'string')) return [3, 1];
180
+ args.buildTargets = (0, lodash_1.intersection)(Object.keys(deviceTargets), promptBuildTargets.split(','));
181
+ return [3, 3];
182
+ case 1:
183
+ choicePlatforms_1 = [];
184
+ switch (args.OSVersion) {
185
+ case 'v1':
186
+ choicePlatforms_1 = Object.keys(deviceTargets);
187
+ break;
188
+ case 'v2':
189
+ choicePlatforms_1 = OSV2DeviceTargetNames;
190
+ break;
191
+ default:
192
+ break;
193
+ }
194
+ if (!choicePlatforms_1.length) return [3, 3];
195
+ return [4, inquirer_1["default"].prompt({
196
+ name: 'buildTargets',
197
+ type: 'checkbox',
198
+ when: function () { return args.template === 0; },
199
+ choices: choicePlatforms_1.map(function (platform) { return ({
200
+ name: deviceTargets[platform].deviceName,
201
+ value: platform,
202
+ checked: platform === choicePlatforms_1[0]
203
+ }); }),
204
+ "default": choicePlatforms_1[0],
205
+ message: 'Which platforms of this application should be built?'
206
+ })];
207
+ case 2:
208
+ answer = _a.sent();
209
+ Object.assign(args, answer);
210
+ _a.label = 3;
211
+ case 3: return [2, args];
212
+ }
213
+ });
214
+ }); })];
215
+ case 1: return [2, _h.sent()];
165
216
  }
166
217
  });
167
218
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeppos/zeus-cli",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "zeus mini-program tools",
5
5
  "main": "index.ts",
6
6
  "author": "zepp",
@@ -21,7 +21,7 @@
21
21
  "qrcode-terminal": "^0.12.0",
22
22
  "vorpal": "^1.12.0",
23
23
  "yargs": "^17.5.1",
24
- "@zeppos/zpm": "2.6.6",
24
+ "@zeppos/zpm": "^2.6.6",
25
25
  "axios": "^0.27.2",
26
26
  "chalk": "^4.1.2",
27
27
  "chokidar": "^3.5.3",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- var _a, _b;
2
+ var _a;
3
3
  exports.__esModule = true;
4
- exports.deviceInternalCodeName = exports.deviceTargets = exports.DeviceScreenType = exports.DeviceSource = exports.DevicePlatformName = exports.DeviceTarget = void 0;
4
+ exports.deviceInternalCodeName = exports.OSV2DeviceTargetNames = exports.OSV2Devices = exports.deviceTargets = exports.DeviceScreenType = exports.DeviceSource = exports.DevicePlatformName = exports.DeviceTarget = void 0;
5
5
  var DeviceTarget;
6
6
  (function (DeviceTarget) {
7
7
  DeviceTarget["MADRID"] = "madrid";
@@ -9,11 +9,15 @@ var DeviceTarget;
9
9
  DeviceTarget["ZURICH"] = "zurich";
10
10
  DeviceTarget["TEIDE"] = "teide";
11
11
  DeviceTarget["PROVENCE"] = "provence";
12
+ DeviceTarget["BARI"] = "bari";
13
+ DeviceTarget["BERLIN"] = "berlin";
14
+ DeviceTarget["LILLE"] = "lille";
12
15
  })(DeviceTarget = exports.DeviceTarget || (exports.DeviceTarget = {}));
13
16
  var DevicePlatformName;
14
17
  (function (DevicePlatformName) {
15
18
  DevicePlatformName["MADRID"] = "gtr3-pro";
16
19
  DevicePlatformName["MADRIDW"] = "gtr3-pro-w";
20
+ DevicePlatformName["Madrid2"] = "gtr3-pro-meilin";
17
21
  DevicePlatformName["VERONA"] = "gtr3";
18
22
  DevicePlatformName["VERONAW"] = "gtr3-w";
19
23
  DevicePlatformName["ZURICH"] = "gts3";
@@ -22,11 +26,19 @@ var DevicePlatformName;
22
26
  DevicePlatformName["TEIDEW"] = "t-rex2-w";
23
27
  DevicePlatformName["PROVENCE"] = "gts4-mini";
24
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";
25
36
  })(DevicePlatformName = exports.DevicePlatformName || (exports.DevicePlatformName = {}));
26
37
  var DeviceSource;
27
38
  (function (DeviceSource) {
28
39
  DeviceSource[DeviceSource["MADRID"] = 229] = "MADRID";
29
40
  DeviceSource[DeviceSource["MADRIDW"] = 230] = "MADRIDW";
41
+ DeviceSource[DeviceSource["Madrid2"] = 6095106] = "Madrid2";
30
42
  DeviceSource[DeviceSource["VERONA"] = 226] = "VERONA";
31
43
  DeviceSource[DeviceSource["VERONAW"] = 227] = "VERONAW";
32
44
  DeviceSource[DeviceSource["ZURICH"] = 224] = "ZURICH";
@@ -35,6 +47,13 @@ var DeviceSource;
35
47
  DeviceSource[DeviceSource["TEIDEW"] = 419] = "TEIDEW";
36
48
  DeviceSource[DeviceSource["PROVENCE"] = 246] = "PROVENCE";
37
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";
38
57
  })(DeviceSource = exports.DeviceSource || (exports.DeviceSource = {}));
39
58
  var DeviceScreenType;
40
59
  (function (DeviceScreenType) {
@@ -52,6 +71,10 @@ exports.deviceTargets = (_a = {},
52
71
  {
53
72
  name: DevicePlatformName.MADRIDW,
54
73
  deviceSource: DeviceSource.MADRIDW
74
+ },
75
+ {
76
+ name: DevicePlatformName.Madrid2,
77
+ deviceSource: DeviceSource.Madrid2
55
78
  }
56
79
  ],
57
80
  screen: {
@@ -132,16 +155,93 @@ exports.deviceTargets = (_a = {},
132
155
  height: 384
133
156
  }
134
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
+ },
135
216
  _a);
136
- exports.deviceInternalCodeName = (_b = {},
137
- _b[DeviceSource.MADRID] = DeviceTarget.MADRID,
138
- _b[DeviceSource.MADRIDW] = DeviceTarget.MADRID,
139
- _b[DeviceSource.VERONA] = DeviceTarget.VERONA,
140
- _b[DeviceSource.VERONAW] = DeviceTarget.VERONA,
141
- _b[DeviceSource.ZURICH] = DeviceTarget.ZURICH,
142
- _b[DeviceSource.ZURICHW] = DeviceTarget.ZURICH,
143
- _b[DeviceSource.TEIDE] = DeviceTarget.TEIDE,
144
- _b[DeviceSource.TEIDEW] = DeviceTarget.TEIDE,
145
- _b[DeviceSource.PROVENCE] = DeviceTarget.PROVENCE,
146
- _b[DeviceSource.PROVENCEW] = DeviceTarget.PROVENCE,
147
- _b);
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
+ }, {});
@@ -88,8 +88,23 @@ var TransformType;
88
88
  TransformType["C"] = "c";
89
89
  TransformType["Bin"] = "bin";
90
90
  })(TransformType || (TransformType = {}));
91
- var gitignoreDefaultItem = ['.DS_Store', 'node_modules/**', 'dist/*', 'npm-debug.log', 'yarn-debug.log*', 'yarn-error.log*', 'yarn.lock',
92
- 'package-lock.json', 'selenium-debug.log', '.idea', '.vscode', '*.suo', '*.ntvs*', '*.njsproj', '*.sln'];
91
+ var gitignoreDefaultItem = [
92
+ '.DS_Store',
93
+ 'node_modules/**',
94
+ 'dist/*',
95
+ 'npm-debug.log',
96
+ 'yarn-debug.log*',
97
+ 'yarn-error.log*',
98
+ 'yarn.lock',
99
+ 'package-lock.json',
100
+ 'selenium-debug.log',
101
+ '.idea',
102
+ '.vscode',
103
+ '*.suo',
104
+ '*.ntvs*',
105
+ '*.njsproj',
106
+ '*.sln',
107
+ ];
93
108
  var build = function (workspace, mode, buildConfigOption, packages, appId) {
94
109
  if (mode === void 0) { mode = BuildMode.PROD; }
95
110
  if (appId === void 0) { appId = '10000'; }
@@ -106,10 +121,10 @@ var build = function (workspace, mode, buildConfigOption, packages, appId) {
106
121
  };
107
122
  if (mode === BuildMode.PROD || mode === BuildMode.PREVIEW) {
108
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;
109
- js2c = !!((js2c === 'true') || (js2c === true));
110
- js2bin = !!((js2bin === 'true') || (js2bin === true));
111
- png2vg = !!((png2vg === 'true') || (png2vg === true));
112
- prune = !!((prune === 'true') || (prune === true));
124
+ js2c = !!(js2c === 'true' || js2c === true);
125
+ js2bin = !!(js2bin === 'true' || js2bin === true);
126
+ png2vg = !!(png2vg === 'true' || png2vg === true);
127
+ prune = !!(prune === 'true' || prune === true);
113
128
  js2c && Object.assign(buildOptions, { jsc: TransformType.C });
114
129
  js2bin && Object.assign(buildOptions, { jsc: TransformType.Bin });
115
130
  Object.assign(buildOptions, {
@@ -120,8 +135,10 @@ var build = function (workspace, mode, buildConfigOption, packages, appId) {
120
135
  _e.label = 1;
121
136
  case 1:
122
137
  _e.trys.push([1, 6, , 7]);
138
+ index_1.logger.info("Start building package, targets: ".concat(packages.join(', '), "."));
123
139
  curOpt = (buildConfigOption ? buildConfigOption._ : [''])[0];
124
- if (!(mode !== BuildMode.DEV || (mode === BuildMode.DEV && curOpt === 'install'))) return [3, 3];
140
+ if (!(mode !== BuildMode.DEV ||
141
+ (mode === BuildMode.DEV && curOpt === 'install'))) return [3, 3];
125
142
  return [4, (0, zpm_1.start)(buildOptions)];
126
143
  case 2:
127
144
  productName_1 = _e.sent();
@@ -281,7 +298,7 @@ var runX = function (root, args, url, packages, logAfterFunc) { return __awaiter
281
298
  return [2];
282
299
  }
283
300
  });
284
- }); });
301
+ }); }, 150, { maxWait: 1000 });
285
302
  refreshSimulator();
286
303
  gitignorePath = path.resolve(root, '.gitignore');
287
304
  fs_extra_1["default"].ensureFileSync(gitignorePath);
@@ -299,14 +316,16 @@ var runX = function (root, args, url, packages, logAfterFunc) { return __awaiter
299
316
  'node_modules',
300
317
  '.git/**',
301
318
  'yarn.lock',
302
- 'package-lock.json'
319
+ 'package-lock.json',
303
320
  ], gitignore);
304
- return [2, chokidar_1["default"].watch('.', {
321
+ return [2, chokidar_1["default"]
322
+ .watch('.', {
305
323
  ignored: ignored,
306
324
  ignoreInitial: true,
307
325
  interval: 1000,
308
326
  cwd: root
309
- }).on('all', function (_type, path) {
327
+ })
328
+ .on('all', function (_type, path) {
310
329
  logger.info("".concat(path, " ").concat(chalk_1["default"].green(_type)));
311
330
  refreshSimulator();
312
331
  })];
@@ -138,7 +138,6 @@ var config = function (args, logAfterFunc) { return __awaiter(void 0, void 0, vo
138
138
  default:
139
139
  break;
140
140
  }
141
- (0, index_1.HM_Analytics)('ZEPP_CLI_CONFIG_C');
142
141
  return [2];
143
142
  });
144
143
  }); };