@zeppos/zeus-cli 1.3.5 → 1.3.7

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 (42) hide show
  1. package/bin/main.js +8 -8
  2. package/modules/build.js +5 -3
  3. package/modules/create.js +6 -5
  4. package/package.json +1 -1
  5. package/private-modules/zeppos-app-utils/dist/config/device.js +105 -45
  6. package/private-modules/zeppos-app-utils/dist/modules/create/local-app.js +3 -2
  7. package/private-modules/zeppos-app-utils/dist/modules/fetchDevices.js +87 -0
  8. package/private-modules/zeppos-app-utils/dist/modules/index.js +1 -0
  9. package/private-modules/zeppos-app-utils/dist/public/template/os1.0/app/fetch-api/app-side/index.js +6 -18
  10. package/private-modules/zeppos-app-utils/dist/public/template/os1.0/app/fetch-api/pages/index.js +6 -6
  11. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/app-side/index.js +6 -18
  12. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/pages/index.js +6 -6
  13. package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/empty/assets/default.b/icon.png +0 -0
  14. package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/empty/assets/default.r/icon.png +0 -0
  15. package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/empty/assets/default.s/icon.png +0 -0
  16. package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/app-side/index.js +7 -35
  17. package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/page/index.js +1 -1
  18. package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/page/index.r.layout.js +8 -8
  19. package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/page/index.s.layout.js +1 -1
  20. package/private-modules/zeppos-app-utils/dist/tools/index.js +2 -1
  21. package/private-modules/zeppos-app-utils/dist/config/device-server.js +0 -116
  22. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/.prettierrc.js +0 -6
  23. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/app-side/index.js +0 -45
  24. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/app.js +0 -25
  25. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/app.json +0 -64
  26. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/assets/gts/icon.png +0 -0
  27. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/page/home/index.page.js +0 -155
  28. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/page/home/index.page.json +0 -1
  29. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/page/home/index.style.js +0 -92
  30. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/page/i18n/en-US.po +0 -9
  31. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/secondary-widget/index.js +0 -160
  32. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/setting/i18n/en-US.po +0 -5
  33. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/setting/index.js +0 -143
  34. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/data.js +0 -67
  35. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/defer.js +0 -35
  36. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/device-polyfill.js +0 -6
  37. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/es6-promise.js +0 -1178
  38. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/event.js +0 -42
  39. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/message-side.js +0 -1190
  40. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/message.js +0 -1196
  41. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/utils/constants.js +0 -1
  42. package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/utils/index.js +0 -38
@@ -1,42 +0,0 @@
1
- export class EventBus {
2
- constructor() {
3
- this.map = new Map()
4
- }
5
-
6
- on(type, cb) {
7
- if (this.map.has(type)) {
8
- this.map.get(type).push(cb)
9
- } else {
10
- this.map.set(type, [cb])
11
- }
12
- }
13
-
14
- off(type, cb) {
15
- if (type) {
16
- if (cb) {
17
- const cbs = this.map.get(type)
18
-
19
- if (!cbs) return
20
- const index = cbs.findIndex((i) => i === cb)
21
-
22
- if (index >= 0) {
23
- cbs.splice(index, 1)
24
- }
25
- } else {
26
- this.map.delete(type)
27
- }
28
- } else {
29
- this.map.clear()
30
- }
31
- }
32
-
33
- emit(type, ...args) {
34
- for (let cb of this.map.get(type) ? this.map.get(type) : []) {
35
- cb && cb(...args)
36
- }
37
- }
38
-
39
- count(type) {
40
- return this.map.get(type) ? this.map.get(type).length : 0
41
- }
42
- }