diff --git a/package-lock.json b/package-lock.json index ff7b459..a2cd568 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "@dicebear/bottts-neutral": "^9.2.2", "@dicebear/core": "^9.2.2", "@dicebear/open-peeps": "^9.2.2", "@dicebear/pixel-art": "^9.2.2", @@ -33,6 +34,17 @@ "typescript": "^4.7.4" } }, + "node_modules/@dicebear/bottts-neutral": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@dicebear/bottts-neutral/-/bottts-neutral-9.2.2.tgz", + "integrity": "sha512-lSgpqmSJtlnyxVuUgNdBwyzuA0O9xa5zRJtz7x2KyWbicXir5iYdX0MVMCkp1EDvlcxm9rGJsclktugOyakTlw==", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@dicebear/core": "^9.0.0" + } + }, "node_modules/@dicebear/core": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/@dicebear/core/-/core-9.2.2.tgz", diff --git a/package.json b/package.json index 080b889..a024092 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "avatars-api", - "version": "1.0.0", + "version": "1.1.0", "description": "", "main": "dist/index.js", "type": "module", @@ -13,6 +13,7 @@ "author": "", "license": "ISC", "dependencies": { + "@dicebear/bottts-neutral": "^9.2.2", "@dicebear/core": "^9.2.2", "@dicebear/open-peeps": "^9.2.2", "@dicebear/pixel-art": "^9.2.2", @@ -28,12 +29,12 @@ }, "devDependencies": { "@types/koa": "^2.15.0", + "@types/koa__cors": "^5.0.0", "@types/koa-logger": "^3.1.5", "@types/koa-router": "^7.4.8", - "@types/koa__cors": "^5.0.0", "@types/node": "^18.7.3", "@types/uuid": "^10.0.0", "tsx": "^4.19.1", "typescript": "^4.7.4" } -} \ No newline at end of file +} diff --git a/src/routes/avatar.route.ts b/src/routes/avatar.route.ts index 7043686..55845dd 100644 --- a/src/routes/avatar.route.ts +++ b/src/routes/avatar.route.ts @@ -6,6 +6,7 @@ import { createAvatar, Style } from "@dicebear/core"; import * as openPeeps from "@dicebear/open-peeps"; import * as pixelArt from "@dicebear/pixel-art"; import * as thumbs from "@dicebear/thumbs"; +import * as botttsNeutral from "@dicebear/bottts-neutral"; import { isValue, isSize, isStyle } from "../utils/type-guards"; @@ -13,6 +14,7 @@ const DENSITY = 72; const avatars: Record & { defaultSize: number }> = { "open-peeps": { ...openPeeps, defaultSize: 704 }, "pixel-art": { ...pixelArt, defaultSize: 16 }, + "bottts-neutral": { ...botttsNeutral, defaultSize: 120 }, thumbs: { ...thumbs, defaultSize: 100 }, };