@things-factory/board-service 6.2.86 → 7.0.0-alpha.1
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/dist-server/controllers/headless-pool-for-label.js +4 -4
- package/dist-server/controllers/headless-pool-for-label.js.map +1 -1
- package/dist-server/service/board/board-subscription.js +4 -4
- package/dist-server/service/board/board-subscription.js.map +1 -1
- package/dist-server/service/play-group/play-group-subscription.js +4 -4
- package/dist-server/service/play-group/play-group-subscription.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/controllers/headless-pool-for-label.ts +2 -2
- package/server/service/board/board-subscription.ts +7 -7
- package/server/service/play-group/play-group-subscription.ts +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/board-service",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.1",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/auth-base": "^
|
|
28
|
-
"@things-factory/env": "^
|
|
29
|
-
"@things-factory/fav-base": "^
|
|
30
|
-
"@things-factory/font-base": "^
|
|
31
|
-
"@things-factory/integration-base": "^
|
|
27
|
+
"@things-factory/auth-base": "^7.0.0-alpha.1",
|
|
28
|
+
"@things-factory/env": "^7.0.0-alpha.0",
|
|
29
|
+
"@things-factory/fav-base": "^7.0.0-alpha.1",
|
|
30
|
+
"@things-factory/font-base": "^7.0.0-alpha.1",
|
|
31
|
+
"@things-factory/integration-base": "^7.0.0-alpha.1",
|
|
32
32
|
"@things-factory/operato-license-checker": "^4.0.4",
|
|
33
33
|
"content-disposition": "^0.5.3",
|
|
34
34
|
"generic-pool": "^3.8.2"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"@thiagoelg/node-printer": "0.6.2",
|
|
38
38
|
"puppeteer": "^20.7.3"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "778315d165d7f15e147583a45d5079c3d7cbce38"
|
|
41
41
|
}
|
|
@@ -45,8 +45,8 @@ export function getHeadlessPool() {
|
|
|
45
45
|
)
|
|
46
46
|
|
|
47
47
|
setTimeout(async () => {
|
|
48
|
-
const
|
|
49
|
-
for await (const data of
|
|
48
|
+
const eventSource = pubsub.subscribe('notify-font-changed')
|
|
49
|
+
for await (const data of eventSource) {
|
|
50
50
|
headlessPool.clear()
|
|
51
51
|
}
|
|
52
52
|
})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Resolver, Subscription, Root, Arg } from 'type-graphql'
|
|
2
|
-
import {
|
|
2
|
+
import { filter, pipe } from 'graphql-yoga'
|
|
3
3
|
import { pubsub } from '@things-factory/shell'
|
|
4
4
|
import { Board } from './board'
|
|
5
5
|
|
|
6
6
|
@Resolver(Board)
|
|
7
7
|
export class BoardSubscription {
|
|
8
8
|
@Subscription({
|
|
9
|
-
subscribe: (
|
|
9
|
+
subscribe: ({ args, context, info }) => {
|
|
10
10
|
const { domain, user } = context.state
|
|
11
11
|
const { id } = args
|
|
12
12
|
const subdomain = domain?.subdomain
|
|
@@ -19,9 +19,9 @@ export class BoardSubscription {
|
|
|
19
19
|
throw new Error(`domain(${subdomain}) is not working for user(${user.email}).`)
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
(payload
|
|
22
|
+
return pipe(
|
|
23
|
+
pubsub.subscribe('board'),
|
|
24
|
+
filter((payload: { board: Board }) => {
|
|
25
25
|
const { domainId, id: boardId } = payload.board
|
|
26
26
|
|
|
27
27
|
if (domainId !== domain.id) {
|
|
@@ -33,8 +33,8 @@ export class BoardSubscription {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
return true
|
|
36
|
-
}
|
|
37
|
-
)
|
|
36
|
+
})
|
|
37
|
+
)
|
|
38
38
|
}
|
|
39
39
|
})
|
|
40
40
|
board(@Root() payload: { board: Board }, @Arg('id') id: string): Board {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Resolver, Subscription, Root, Arg } from 'type-graphql'
|
|
2
|
-
import {
|
|
2
|
+
import { filter, pipe } from 'graphql-yoga'
|
|
3
3
|
import { pubsub } from '@things-factory/shell'
|
|
4
4
|
import { PlayGroup } from './play-group'
|
|
5
5
|
|
|
6
6
|
@Resolver(PlayGroup)
|
|
7
7
|
export class PlayGroupSubscription {
|
|
8
8
|
@Subscription({
|
|
9
|
-
subscribe: (
|
|
9
|
+
subscribe: ({ args, context, info }) => {
|
|
10
10
|
const { domain, user } = context.state
|
|
11
11
|
const { id } = args
|
|
12
12
|
const subdomain = domain?.subdomain
|
|
@@ -19,9 +19,9 @@ export class PlayGroupSubscription {
|
|
|
19
19
|
throw new Error(`domain(${subdomain}) is not working for user(${user.email}).`)
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
(payload
|
|
22
|
+
return pipe(
|
|
23
|
+
pubsub.subscribe('play-group'),
|
|
24
|
+
filter((payload: { playGroup: PlayGroup }) => {
|
|
25
25
|
const { id: playGroupId, domainId } = payload.playGroup
|
|
26
26
|
|
|
27
27
|
if (domainId !== domain.id) {
|
|
@@ -33,8 +33,8 @@ export class PlayGroupSubscription {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
return true
|
|
36
|
-
}
|
|
37
|
-
)
|
|
36
|
+
})
|
|
37
|
+
)
|
|
38
38
|
}
|
|
39
39
|
})
|
|
40
40
|
playGroup(@Root() payload: { playGroup: PlayGroup }, @Arg('id') id: string): PlayGroup {
|