feat: generate thumbhash for assets

This commit is contained in:
Menci
2025-11-17 02:52:00 +08:00
parent 96cfc41f7a
commit a956db4650
13 changed files with 429 additions and 44 deletions
+250
View File
@@ -11,6 +11,9 @@ importers:
'@guiiai/logg':
specifier: ^1.2.5
version: 1.2.5
'@napi-rs/canvas':
specifier: ^0.1.82
version: 0.1.82
'@types/js-yaml':
specifier: ^4.0.9
version: 4.0.9
@@ -29,6 +32,9 @@ importers:
glob:
specifier: ^11.0.3
version: 11.0.3
thumbhash-node:
specifier: ^0.1.3
version: 0.1.3
tinypool:
specifier: ^2.0.0
version: 2.0.0
@@ -150,6 +156,70 @@ packages:
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
'@napi-rs/canvas-android-arm64@0.1.82':
resolution: {integrity: sha512-bvZhN0iI54ouaQOrgJV96H2q7J3ZoufnHf4E1fUaERwW29Rz4rgicohnAg4venwBJZYjGl5Yl3CGmlAl1LZowQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [android]
'@napi-rs/canvas-darwin-arm64@0.1.82':
resolution: {integrity: sha512-InuBHKCyuFqhNwNr4gpqazo5Xp6ltKflqOLiROn4hqAS8u21xAHyYCJRgHwd+a5NKmutFTaRWeUIT/vxWbU/iw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
'@napi-rs/canvas-darwin-x64@0.1.82':
resolution: {integrity: sha512-aQGV5Ynn96onSXcuvYb2y7TRXD/t4CL2EGmnGqvLyeJX1JLSNisKQlWN/1bPDDXymZYSdUqbXehj5qzBlOx+RQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
'@napi-rs/canvas-linux-arm-gnueabihf@0.1.82':
resolution: {integrity: sha512-YIUpmHWeHGGRhWitT1KJkgj/JPXPfc9ox8oUoyaGPxolLGPp5AxJkq8wIg8CdFGtutget968dtwmx71m8o3h5g==}
engines: {node: '>= 10'}
cpu: [arm]
os: [linux]
'@napi-rs/canvas-linux-arm64-gnu@0.1.82':
resolution: {integrity: sha512-AwLzwLBgmvk7kWeUgItOUor/QyG31xqtD26w1tLpf4yE0hiXTGp23yc669aawjB6FzgIkjh1NKaNS52B7/qEBQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
'@napi-rs/canvas-linux-arm64-musl@0.1.82':
resolution: {integrity: sha512-moZWuqepAwWBffdF4JDadt8TgBD02iMhG6I1FHZf8xO20AsIp9rB+p0B8Zma2h2vAF/YMjeFCDmW5un6+zZz9g==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
'@napi-rs/canvas-linux-riscv64-gnu@0.1.82':
resolution: {integrity: sha512-w9++2df2kG9eC9LWYIHIlMLuhIrKGQYfUxs97CwgxYjITeFakIRazI9LYWgVzEc98QZ9x9GQvlicFsrROV59MQ==}
engines: {node: '>= 10'}
cpu: [riscv64]
os: [linux]
'@napi-rs/canvas-linux-x64-gnu@0.1.82':
resolution: {integrity: sha512-lZulOPwrRi6hEg/17CaqdwWEUfOlIJuhXxincx1aVzsVOCmyHf+xFq4i6liJl1P+x2v6Iz2Z/H5zHvXJCC7Bwg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
'@napi-rs/canvas-linux-x64-musl@0.1.82':
resolution: {integrity: sha512-Be9Wf5RTv1w6GXlTph55K3PH3vsAh1Ax4T1FQY1UYM0QfD0yrwGdnJ8/fhqw7dEgMjd59zIbjJQC8C3msbGn5g==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
'@napi-rs/canvas-win32-x64-msvc@0.1.82':
resolution: {integrity: sha512-LN/i8VrvxTDmEEK1c10z2cdOTkWT76LlTGtyZe5Kr1sqoSomKeExAjbilnu1+oee5lZUgS5yfZ2LNlVhCeARuw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
'@napi-rs/canvas@0.1.82':
resolution: {integrity: sha512-FGjyUBoF0sl1EenSiE4UV2WYu76q6F9GSYedq5EiOCOyGYoQ/Owulcv6rd7v/tWOpljDDtefXXIaOCJrVKem4w==}
engines: {node: '>= 10'}
'@napi-rs/wasm-runtime@0.2.12':
resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==}
@@ -1307,6 +1377,88 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
thumbhash-node-android-arm-eabi@0.1.3:
resolution: {integrity: sha512-xiT17jBTetB+TWMhJDDAVBQPQUVvpdQm39Eg1JCq9guY6/Mzt+GgSUzAveGF1pAt7Jif/zc1Ipcm6sfOWBZwIQ==}
engines: {node: '>= 10'}
cpu: [arm]
os: [android]
thumbhash-node-android-arm64@0.1.3:
resolution: {integrity: sha512-rpeWM7Z3EGnhTEI+mXOEP8cxpkqXZSPhV83T1Joa/UsZgXraQ/247rUxPVPzpEC/fwHmInvmxg5Lic+6lBFiyg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [android]
thumbhash-node-darwin-arm64@0.1.3:
resolution: {integrity: sha512-McVwFidx7VbmkYbjpD3VR6v1kyEt+nNPnbH1KUYOeDf2nvqjEDmVoVq7wp0uru6zms17Qel4wOkaaF4xbd7M8A==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
thumbhash-node-darwin-x64@0.1.3:
resolution: {integrity: sha512-2N2oVSDr9Q6HZliuVEc48FpEdPqWxxv1DwcX0KwsE7SEduH3T7UOFvOoEhwe1ViLAhU/LM9KVbI4EpBsgCFndA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
thumbhash-node-freebsd-x64@0.1.3:
resolution: {integrity: sha512-8CXIYYMP/nMkVKFqt++YfVuatuBOQv/cpzhrOr0kilmn6IbUEIxK909eeZ8l27SxVubdfPnaORtV6aB3VbTsmQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [freebsd]
thumbhash-node-linux-arm-gnueabihf@0.1.3:
resolution: {integrity: sha512-0puL2Owq8HUhSK517tLhWlxOLwg2Frvgee47WYU+grIOJEWNhT5xRenM7jvtvn3ABoP/9TbDO5B81gmB1JcsWw==}
engines: {node: '>= 10'}
cpu: [arm]
os: [linux]
thumbhash-node-linux-arm64-gnu@0.1.3:
resolution: {integrity: sha512-lowvXaSaqwc/bghNLckMZQD+wjSZFaaK0mEJgv94QbbKMZkYKU7ELh28q1v/mSMsFLB3etsxP+10dbrmkUoXog==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
thumbhash-node-linux-arm64-musl@0.1.3:
resolution: {integrity: sha512-1k4GXQA/iXD5hPPahOW1rNXyYWnc3C/Srp1UtdrqsH8A/rXIe6bPqaCKNr30GAcIifx1PoZIpvvEqfO14hqr3Q==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
thumbhash-node-linux-x64-gnu@0.1.3:
resolution: {integrity: sha512-5gtw1mJIPGG/fpFvPCv7CmN3hkvdDCU+wHe8Mnhq1r8Z+Vu/Rizx4Uxzqqo2QBGxZLHDbR/l24R0+8Oo4rV77w==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
thumbhash-node-linux-x64-musl@0.1.3:
resolution: {integrity: sha512-2qI7KARyY6kRgSEAvAi6rxYRS9GKO2JPyc9/Q/ai29IdJSvAXgnnvGZDJ6xdv7wzRwE9sjQoY1iME7AvM1x6Bw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
thumbhash-node-win32-arm64-msvc@0.1.3:
resolution: {integrity: sha512-Q1Gh3JLL8Y/2zenQH44WitoMCi9juHgX9HXoDvtHwEzthbFpehYozMTFjZh5trttKDUeW9qWb26YYSBVXYys/g==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
thumbhash-node-win32-ia32-msvc@0.1.3:
resolution: {integrity: sha512-Wppy5xD05j7fks0gd4khE9JAXJtmmsPwvVuRHO+ftGWfVaYG44mcIZgygt6WqNSyXnyqXO4X9wuCJtoOtO8Xwg==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
thumbhash-node-win32-x64-msvc@0.1.3:
resolution: {integrity: sha512-yz6XkszxbVnICc6NWVHHExzjoUvrRkbCUeeETnVDSJJgo3XYw7Ak04Z6XPmyd700+dJp/Lgi+qumQbdAXqGZBA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
thumbhash-node@0.1.3:
resolution: {integrity: sha512-jP/j1zoNbTcYxN9wMaKU4WZYg+UIdY/hsCS8sKsiOmfK3VVmxProa3WE58rZ2yHafKEnK8wLWCqOjhdIB66SWQ==}
engines: {node: '>= 10'}
tinyglobby@0.2.15:
resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}
engines: {node: '>=12.0.0'}
@@ -1506,6 +1658,49 @@ snapshots:
wrap-ansi: 8.1.0
wrap-ansi-cjs: wrap-ansi@7.0.0
'@napi-rs/canvas-android-arm64@0.1.82':
optional: true
'@napi-rs/canvas-darwin-arm64@0.1.82':
optional: true
'@napi-rs/canvas-darwin-x64@0.1.82':
optional: true
'@napi-rs/canvas-linux-arm-gnueabihf@0.1.82':
optional: true
'@napi-rs/canvas-linux-arm64-gnu@0.1.82':
optional: true
'@napi-rs/canvas-linux-arm64-musl@0.1.82':
optional: true
'@napi-rs/canvas-linux-riscv64-gnu@0.1.82':
optional: true
'@napi-rs/canvas-linux-x64-gnu@0.1.82':
optional: true
'@napi-rs/canvas-linux-x64-musl@0.1.82':
optional: true
'@napi-rs/canvas-win32-x64-msvc@0.1.82':
optional: true
'@napi-rs/canvas@0.1.82':
optionalDependencies:
'@napi-rs/canvas-android-arm64': 0.1.82
'@napi-rs/canvas-darwin-arm64': 0.1.82
'@napi-rs/canvas-darwin-x64': 0.1.82
'@napi-rs/canvas-linux-arm-gnueabihf': 0.1.82
'@napi-rs/canvas-linux-arm64-gnu': 0.1.82
'@napi-rs/canvas-linux-arm64-musl': 0.1.82
'@napi-rs/canvas-linux-riscv64-gnu': 0.1.82
'@napi-rs/canvas-linux-x64-gnu': 0.1.82
'@napi-rs/canvas-linux-x64-musl': 0.1.82
'@napi-rs/canvas-win32-x64-msvc': 0.1.82
'@napi-rs/wasm-runtime@0.2.12':
dependencies:
'@emnapi/core': 1.7.0
@@ -2795,6 +2990,61 @@ snapshots:
supports-preserve-symlinks-flag@1.0.0: {}
thumbhash-node-android-arm-eabi@0.1.3:
optional: true
thumbhash-node-android-arm64@0.1.3:
optional: true
thumbhash-node-darwin-arm64@0.1.3:
optional: true
thumbhash-node-darwin-x64@0.1.3:
optional: true
thumbhash-node-freebsd-x64@0.1.3:
optional: true
thumbhash-node-linux-arm-gnueabihf@0.1.3:
optional: true
thumbhash-node-linux-arm64-gnu@0.1.3:
optional: true
thumbhash-node-linux-arm64-musl@0.1.3:
optional: true
thumbhash-node-linux-x64-gnu@0.1.3:
optional: true
thumbhash-node-linux-x64-musl@0.1.3:
optional: true
thumbhash-node-win32-arm64-msvc@0.1.3:
optional: true
thumbhash-node-win32-ia32-msvc@0.1.3:
optional: true
thumbhash-node-win32-x64-msvc@0.1.3:
optional: true
thumbhash-node@0.1.3:
optionalDependencies:
thumbhash-node-android-arm-eabi: 0.1.3
thumbhash-node-android-arm64: 0.1.3
thumbhash-node-darwin-arm64: 0.1.3
thumbhash-node-darwin-x64: 0.1.3
thumbhash-node-freebsd-x64: 0.1.3
thumbhash-node-linux-arm-gnueabihf: 0.1.3
thumbhash-node-linux-arm64-gnu: 0.1.3
thumbhash-node-linux-arm64-musl: 0.1.3
thumbhash-node-linux-x64-gnu: 0.1.3
thumbhash-node-linux-x64-musl: 0.1.3
thumbhash-node-win32-arm64-msvc: 0.1.3
thumbhash-node-win32-ia32-msvc: 0.1.3
thumbhash-node-win32-x64-msvc: 0.1.3
tinyglobby@0.2.15:
dependencies:
fdir: 6.5.0(picomatch@4.0.3)