@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.
- package/bin/main.js +8 -8
- package/modules/build.js +5 -3
- package/modules/create.js +6 -5
- package/package.json +1 -1
- package/private-modules/zeppos-app-utils/dist/config/device.js +105 -45
- package/private-modules/zeppos-app-utils/dist/modules/create/local-app.js +3 -2
- package/private-modules/zeppos-app-utils/dist/modules/fetchDevices.js +87 -0
- package/private-modules/zeppos-app-utils/dist/modules/index.js +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os1.0/app/fetch-api/app-side/index.js +6 -18
- package/private-modules/zeppos-app-utils/dist/public/template/os1.0/app/fetch-api/pages/index.js +6 -6
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/app-side/index.js +6 -18
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/pages/index.js +6 -6
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/empty/assets/default.b/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/empty/assets/default.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/empty/assets/default.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/app-side/index.js +7 -35
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/page/index.js +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/page/index.r.layout.js +8 -8
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/page/index.s.layout.js +1 -1
- package/private-modules/zeppos-app-utils/dist/tools/index.js +2 -1
- package/private-modules/zeppos-app-utils/dist/config/device-server.js +0 -116
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/.prettierrc.js +0 -6
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/app-side/index.js +0 -45
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/app.js +0 -25
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/app.json +0 -64
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/assets/gts/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/page/home/index.page.js +0 -155
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/page/home/index.page.json +0 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/page/home/index.style.js +0 -92
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/page/i18n/en-US.po +0 -9
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/secondary-widget/index.js +0 -160
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/setting/i18n/en-US.po +0 -5
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/setting/index.js +0 -143
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/data.js +0 -67
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/defer.js +0 -35
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/device-polyfill.js +0 -6
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/es6-promise.js +0 -1178
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/event.js +0 -42
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/message-side.js +0 -1190
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/shared/message.js +0 -1196
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/utils/constants.js +0 -1
- 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
|
-
}
|