skia-canvas 3.0.4 → 3.0.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/lib/index.d.ts +3 -1
- package/lib/prebuild.mjs +5 -3
- package/package.json +17 -21
package/lib/index.d.ts
CHANGED
|
@@ -922,7 +922,7 @@ interface FontLibrary {
|
|
|
922
922
|
use(fontPaths: readonly string[]): Font[]
|
|
923
923
|
use(
|
|
924
924
|
families: Record<string, readonly string[] | string>
|
|
925
|
-
): Record<string, Font[]
|
|
925
|
+
): Record<string, Font[]>
|
|
926
926
|
|
|
927
927
|
reset(): void
|
|
928
928
|
}
|
|
@@ -953,6 +953,7 @@ export type WindowOptions = {
|
|
|
953
953
|
background?: string
|
|
954
954
|
fullscreen?: boolean
|
|
955
955
|
borderless?: boolean
|
|
956
|
+
resizable?: boolean
|
|
956
957
|
visible?: boolean
|
|
957
958
|
cursor?: CursorStyle
|
|
958
959
|
canvas?: Canvas
|
|
@@ -1020,6 +1021,7 @@ export class Window extends EventEmitter<{
|
|
|
1020
1021
|
visible: boolean
|
|
1021
1022
|
fullscreen: boolean
|
|
1022
1023
|
borderless: boolean
|
|
1024
|
+
resizable: boolean
|
|
1023
1025
|
title: string
|
|
1024
1026
|
cursor: CursorStyle
|
|
1025
1027
|
fit: FitStyle
|
package/lib/prebuild.mjs
CHANGED
|
@@ -89,8 +89,8 @@ async function download(...args){
|
|
|
89
89
|
let body = await new Promise((res, rej) => {
|
|
90
90
|
https.get(url, {agent}, resp => {
|
|
91
91
|
let {statusCode:status} = resp
|
|
92
|
-
if (status == 404) rej(`Prebuilt library not found at "${url}" (HTTP error ${status})`)
|
|
93
|
-
else if (status < 200 || status >= 300) rej(`Failed to load prebuilt binary from "${url}" (HTTP error ${status})`)
|
|
92
|
+
if (status == 404) rej(Error(`Prebuilt library not found at "${url}" (HTTP error ${status})`))
|
|
93
|
+
else if (status < 200 || status >= 300) rej(Error(`Failed to load prebuilt binary from "${url}" (HTTP error ${status})`))
|
|
94
94
|
else res(resp)
|
|
95
95
|
})
|
|
96
96
|
})
|
|
@@ -128,10 +128,12 @@ function compile(...args){
|
|
|
128
128
|
else if (isFallback) console.log("\nAttempting to rebuild locally...")
|
|
129
129
|
else console.warn(`cargo build ${[optimization, features].filter(s=>s).join(' ')}`)
|
|
130
130
|
|
|
131
|
-
child_process.spawnSync(
|
|
131
|
+
let {status} = child_process.spawnSync(
|
|
132
132
|
`cargo-cp-artifact -nc ${BINARY_PATH} -- cargo build --message-format=json-render-diagnostics ${optimization} ${features}`,
|
|
133
133
|
{shell:true, stdio:'inherit'}
|
|
134
134
|
)
|
|
135
|
+
|
|
136
|
+
process.exit(status)
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
async function usage(){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skia-canvas",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "A multi-threaded, GPU-accelerated, Canvas API for Node",
|
|
5
5
|
"author": "Christian Swinehart <drafting@samizdat.co>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,24 +25,20 @@
|
|
|
25
25
|
"build": "node lib/prebuild.mjs compile",
|
|
26
26
|
"install": "node lib/prebuild.mjs download --or-compile",
|
|
27
27
|
"upload": "node lib/prebuild.mjs upload",
|
|
28
|
-
"test": "
|
|
28
|
+
"test": "node --test"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"detect-libc": "^2.0
|
|
31
|
+
"detect-libc": "^2.1.0",
|
|
32
32
|
"follow-redirects": "^1.15.11",
|
|
33
33
|
"https-proxy-agent": "^7.0.6",
|
|
34
34
|
"string-split-by": "^1.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@types/
|
|
39
|
-
"@types/node": "^24.2.1",
|
|
37
|
+
"@hono/node-server": "^1.19.3",
|
|
38
|
+
"@types/node": "^24.5.2",
|
|
40
39
|
"cargo-cp-artifact": "^0.1",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"jest": "^30.0.5",
|
|
44
|
-
"lodash": "^4.17.21",
|
|
45
|
-
"nodemon": "^3.1.10",
|
|
40
|
+
"hono": "^4.9.8",
|
|
41
|
+
"nock": "^14.0.10",
|
|
46
42
|
"tmp": "^0.2.5"
|
|
47
43
|
},
|
|
48
44
|
"files": [
|
|
@@ -70,15 +66,15 @@
|
|
|
70
66
|
"rust"
|
|
71
67
|
],
|
|
72
68
|
"prebuild": {
|
|
73
|
-
"aws-lambda-arm64.zip": "sha256:
|
|
74
|
-
"aws-lambda-x64.zip": "sha256:
|
|
75
|
-
"darwin-arm64.gz": "sha256:
|
|
76
|
-
"darwin-x64.gz": "sha256:
|
|
77
|
-
"linux-arm64-glibc.gz": "sha256:
|
|
78
|
-
"linux-arm64-musl.gz": "sha256:
|
|
79
|
-
"linux-x64-glibc.gz": "sha256:
|
|
80
|
-
"linux-x64-musl.gz": "sha256:
|
|
81
|
-
"win32-arm64.gz": "sha256:
|
|
82
|
-
"win32-x64.gz": "sha256:
|
|
69
|
+
"aws-lambda-arm64.zip": "sha256:a1a612c5ee0e8aabe956ed0b00f2d8f37aacd76911daf08c6d59e9ae6555d379",
|
|
70
|
+
"aws-lambda-x64.zip": "sha256:21a3fafeaae39ed2a9b96f1df7d01e7e9cc607d45ef2c79d68c0ee23338f4a3a",
|
|
71
|
+
"darwin-arm64.gz": "sha256:49ade120467cb307d747fc420c46cf978434e6848bf190354b5eeef4158abb30",
|
|
72
|
+
"darwin-x64.gz": "sha256:352f3a2a6e7c3e6c768e5976a1f6b01883e75300169b4d4e8eb1dadcfa6fb0f1",
|
|
73
|
+
"linux-arm64-glibc.gz": "sha256:ea8379b05f98961b2a583a495b735ca36da4433f285aa70fcf89d70ccb1014c3",
|
|
74
|
+
"linux-arm64-musl.gz": "sha256:723591043b434f4f01562bc5747bbc62dab50a0a9cf250bf1c792bec70ff9fea",
|
|
75
|
+
"linux-x64-glibc.gz": "sha256:d73352d6209d5d094aac0afe133bf70f181b62ae75ac504714a8c1756f6ef02c",
|
|
76
|
+
"linux-x64-musl.gz": "sha256:1cef0dd858b4d437e4e0a93906466dfdd2316c13147fac4b0fd544a24c5bce27",
|
|
77
|
+
"win32-arm64.gz": "sha256:816c2bb063a7c53fef91d44de06cd25b64d4432c31a103f1b82d21eb4ff35f7b",
|
|
78
|
+
"win32-x64.gz": "sha256:652103751b4702f30ef76ad28a655db518eee3878e913674c5f6891e6cd8d2b1"
|
|
83
79
|
}
|
|
84
80
|
}
|