@things-factory/board-service 8.0.92 → 8.0.93
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/board-service",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.93",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"things-factory": true,
|
|
6
6
|
"author": "",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@things-factory/auth-base": "^8.0.
|
|
26
|
+
"@things-factory/auth-base": "^8.0.93",
|
|
27
27
|
"@things-factory/env": "^8.0.88",
|
|
28
|
-
"@things-factory/fav-base": "^8.0.
|
|
29
|
-
"@things-factory/font-base": "^8.0.
|
|
30
|
-
"@things-factory/integration-base": "^8.0.
|
|
28
|
+
"@things-factory/fav-base": "^8.0.93",
|
|
29
|
+
"@things-factory/font-base": "^8.0.93",
|
|
30
|
+
"@things-factory/integration-base": "^8.0.93",
|
|
31
31
|
"@things-factory/operato-license-checker": "^4.0.4",
|
|
32
32
|
"content-disposition": "^0.5.3",
|
|
33
33
|
"generic-pool": "^3.8.2",
|
|
34
34
|
"puppeteer": "^23.0.0"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "2e0834bba65b603e01fb6e966e1add625515d4af"
|
|
37
37
|
}
|
|
@@ -14,7 +14,16 @@ import { headlessModel } from './headless-model'
|
|
|
14
14
|
* @param {boolean} mirror 좌우반전
|
|
15
15
|
* @param {boolean} upsideDown 상하반전
|
|
16
16
|
*/
|
|
17
|
-
export const labelcommand = async ({
|
|
17
|
+
export const labelcommand = async ({
|
|
18
|
+
id,
|
|
19
|
+
model,
|
|
20
|
+
data,
|
|
21
|
+
orientation,
|
|
22
|
+
mirror = false,
|
|
23
|
+
upsideDown = false,
|
|
24
|
+
context,
|
|
25
|
+
draft = false
|
|
26
|
+
}) => {
|
|
18
27
|
const { domain } = context.state
|
|
19
28
|
|
|
20
29
|
const browser = (await getHeadlessPool().acquire()) as any
|
|
@@ -22,41 +31,44 @@ export const labelcommand = async ({ id, model, data, orientation, mirror = fals
|
|
|
22
31
|
return
|
|
23
32
|
}
|
|
24
33
|
|
|
25
|
-
|
|
34
|
+
try {
|
|
35
|
+
const { page } = browser
|
|
26
36
|
|
|
27
|
-
|
|
37
|
+
var { model } = await headlessModel({ domain, model, id }, draft)
|
|
28
38
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
requestAnimationFrame(() => {
|
|
39
|
+
const grf = await page.evaluate(
|
|
40
|
+
async (model, data, orientation, mirror, upsideDown) => {
|
|
41
|
+
//@ts-ignore
|
|
42
|
+
let s = createScene(model)
|
|
43
|
+
if (data) {
|
|
44
|
+
s.data = data
|
|
45
|
+
}
|
|
46
|
+
return new Promise(resolve => {
|
|
39
47
|
// @ts-ignore
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
requestAnimationFrame(() => {
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
let grf = imageDataToGrf(s, model, orientation, mirror, upsideDown)
|
|
51
|
+
resolve(grf)
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
sceneContainer.removeChild(s.target)
|
|
54
|
+
s.dispose()
|
|
55
|
+
})
|
|
45
56
|
})
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
getHeadlessPool().release(browser)
|
|
57
|
+
},
|
|
58
|
+
model,
|
|
59
|
+
data,
|
|
60
|
+
orientation,
|
|
61
|
+
mirror,
|
|
62
|
+
upsideDown
|
|
63
|
+
)
|
|
56
64
|
|
|
57
|
-
|
|
65
|
+
return `
|
|
58
66
|
^XA
|
|
59
67
|
^GFA,${grf}
|
|
60
68
|
^FS
|
|
61
69
|
^XZ`
|
|
70
|
+
} finally {
|
|
71
|
+
// 에러 발생 시에도 반드시 풀에 브라우저를 반환
|
|
72
|
+
getHeadlessPool().release(browser)
|
|
73
|
+
}
|
|
62
74
|
}
|