dicebear 9.0.1 → 9.2.0

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.
@@ -1,5 +1,5 @@
1
1
  import { createAvatar } from '@dicebear/core';
2
- import { toJpeg, toPng } from '@dicebear/converter';
2
+ import { toJpeg, toPng, toWebp, toAvif } from '@dicebear/converter';
3
3
  import cliProgress from 'cli-progress';
4
4
  import PQueue from 'p-queue';
5
5
  import os from 'node:os';
@@ -57,6 +57,12 @@ export function addStyleCommand(cli, name, style) {
57
57
  case 'jpeg':
58
58
  await writeFile(fileName, await toJpeg(avatar.toString(), { includeExif }).toArrayBuffer());
59
59
  break;
60
+ case 'webp':
61
+ await writeFile(fileName, await toWebp(avatar.toString(), { includeExif }).toArrayBuffer());
62
+ break;
63
+ case 'avif':
64
+ await writeFile(fileName, await toAvif(avatar.toString(), { includeExif }).toArrayBuffer());
65
+ break;
60
66
  case 'json':
61
67
  await writeFile(fileName, JSON.stringify(avatar.toJson(), null, 2));
62
68
  break;
@@ -13,7 +13,7 @@ export function getStyleCommandSchema(style) {
13
13
  },
14
14
  format: {
15
15
  type: 'string',
16
- enum: ['svg', 'png', 'jpg', 'jpeg', 'json'],
16
+ enum: ['svg', 'png', 'jpg', 'jpeg', 'webp', 'avif', 'json'],
17
17
  default: 'svg',
18
18
  },
19
19
  exif: {
@@ -25,7 +25,7 @@ export function getStyleCommandSchema(style) {
25
25
  description: 'Save JSON file in addition to image file',
26
26
  type: 'boolean',
27
27
  default: false,
28
- }
28
+ },
29
29
  },
30
30
  },
31
31
  coreSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dicebear",
3
- "version": "9.0.1",
3
+ "version": "9.2.0",
4
4
  "private": false,
5
5
  "description": "CLI for DiceBear - An avatar library for designers and developers",
6
6
  "homepage": "https://github.com/dicebear/dicebear",
@@ -25,9 +25,9 @@
25
25
  "prepublishOnly": "npm run build"
26
26
  },
27
27
  "dependencies": {
28
- "@dicebear/collection": "9.0.1",
29
- "@dicebear/converter": "9.0.1",
30
- "@dicebear/core": "9.0.1",
28
+ "@dicebear/collection": "9.2.0",
29
+ "@dicebear/converter": "9.2.0",
30
+ "@dicebear/core": "9.2.0",
31
31
  "ajv": "^8.12.0",
32
32
  "chalk": "^5.2.0",
33
33
  "chalk-template": "^1.0.0",
@@ -51,5 +51,5 @@
51
51
  "engines": {
52
52
  "node": ">=18.0.0"
53
53
  },
54
- "gitHead": "96e800ad4a1f2175f225fe1639fb91624013e01c"
54
+ "gitHead": "a4f64b6235f77e30ca962199d806069c188fcaa7"
55
55
  }