@dicebear/converter 5.3.4 → 6.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/README.md +6 -6
- package/lib/node/core.js +3 -3
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<h1><img src="https://dicebear.com/logo-readme.svg" width="28" /> DiceBear Converter</h1>
|
|
2
2
|
|
|
3
3
|
<p>
|
|
4
|
-
<img src="https://api.dicebear.com/
|
|
5
|
-
<img src="https://api.dicebear.com/
|
|
6
|
-
<img src="https://api.dicebear.com/
|
|
7
|
-
<img src="https://api.dicebear.com/
|
|
8
|
-
<img src="https://api.dicebear.com/
|
|
9
|
-
<img src="https://api.dicebear.com/
|
|
4
|
+
<img src="https://api.dicebear.com/6.x/adventurer/svg?seed=Mimi&backgroundColor=0077b6&radius=10" width="64" />
|
|
5
|
+
<img src="https://api.dicebear.com/6.x/open-peeps/svg?seed=Kitty&backgroundColor=0096c7&radius=10" width="64" />
|
|
6
|
+
<img src="https://api.dicebear.com/6.x/pixel-art/svg?seed=Lilly&backgroundColor=00b4d8&radius=10" width="64" />
|
|
7
|
+
<img src="https://api.dicebear.com/6.x/lorelei/svg?seed=Tigger&backgroundColor=48cae4&radius=10" width="64" />
|
|
8
|
+
<img src="https://api.dicebear.com/6.x/bottts/svg?seed=Zoe&backgroundColor=90e0ef&radius=10" width="64" />
|
|
9
|
+
<img src="https://api.dicebear.com/6.x/initials/svg?seed=..&backgroundColor=ade8f4&radius=10" width="64" />
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
[Playground](https://dicebear.com/playground) |
|
package/lib/node/core.js
CHANGED
|
@@ -32,7 +32,7 @@ async function toArrayBuffer(rawSvg, format, exif) {
|
|
|
32
32
|
return (await toBuffer(rawSvg, format, exif)).buffer;
|
|
33
33
|
}
|
|
34
34
|
async function toBuffer(rawSvg, format, exif) {
|
|
35
|
-
await ensurePackage('@resvg/resvg-js', '^2.
|
|
35
|
+
await ensurePackage('@resvg/resvg-js', '^2.4.1');
|
|
36
36
|
const { renderAsync } = await import('@resvg/resvg-js');
|
|
37
37
|
const interRegular = new URL('../../fonts/inter/inter-regular.otf', import.meta.url);
|
|
38
38
|
const interBold = new URL('../../fonts/inter/inter-bold.otf', import.meta.url);
|
|
@@ -45,7 +45,7 @@ async function toBuffer(rawSvg, format, exif) {
|
|
|
45
45
|
},
|
|
46
46
|
})).asPng();
|
|
47
47
|
if ('jpeg' === format) {
|
|
48
|
-
await ensurePackage('sharp', '^0.
|
|
48
|
+
await ensurePackage('sharp', '^0.31.3');
|
|
49
49
|
const sharp = (await import('sharp')).default;
|
|
50
50
|
buffer = await sharp(buffer)
|
|
51
51
|
.flatten({ background: '#ffffff' })
|
|
@@ -53,7 +53,7 @@ async function toBuffer(rawSvg, format, exif) {
|
|
|
53
53
|
.toBuffer();
|
|
54
54
|
}
|
|
55
55
|
if (exif) {
|
|
56
|
-
await ensurePackage('exiftool-vendored', '^
|
|
56
|
+
await ensurePackage('exiftool-vendored', '^21.2.0');
|
|
57
57
|
const exiftool = (await import('exiftool-vendored')).exiftool;
|
|
58
58
|
await tmp.withFile(async ({ path }) => {
|
|
59
59
|
await fs.writeFile(path, buffer);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicebear/converter",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.1",
|
|
4
4
|
"description": "SVG Converter for DiceBear",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dicebear"
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"test": "uvu tests"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@types/json-schema": "^7.0.
|
|
39
|
+
"@types/json-schema": "^7.0.11",
|
|
40
40
|
"tmp-promise": "^3.0.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@resvg/resvg-js": "^2.
|
|
44
|
-
"exiftool-vendored": "^
|
|
45
|
-
"sharp": "^0.
|
|
43
|
+
"@resvg/resvg-js": "^2.4.1",
|
|
44
|
+
"exiftool-vendored": "^21.2.0",
|
|
45
|
+
"sharp": "^0.31.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@resvg/resvg-js": "^2.4.
|
|
49
|
-
"@tsconfig/recommended": "^1.0.
|
|
48
|
+
"@resvg/resvg-js": "^2.4.1",
|
|
49
|
+
"@tsconfig/recommended": "^1.0.2",
|
|
50
50
|
"@types/sharp": "^0.31.1",
|
|
51
51
|
"del-cli": "^5.0.0",
|
|
52
|
-
"exiftool-vendored": "^21.
|
|
52
|
+
"exiftool-vendored": "^21.2.0",
|
|
53
53
|
"sharp": "^0.31.3",
|
|
54
|
-
"typescript": "^4.
|
|
55
|
-
"uvu": "^0.5.
|
|
54
|
+
"typescript": "^4.9.5",
|
|
55
|
+
"uvu": "^0.5.6"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"@resvg/resvg-js": {
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
|
-
"node": "
|
|
69
|
+
"node": ">=16.0.0"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "564a3d5154cbb9fad08d95e28beec2b6bdcdcbba"
|
|
75
75
|
}
|