1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-07 19:32:34 +01:00
server/package.json
Umimaso f10df31f5c feat: add widget endpoints
Implemented the four widget related endpoints of the api. Partial user
object being returned as part of the widget.json endpoint [1] is an
intentional choice related to privacy [2].

The widget.json endpoint will require additional changes upon completion
of other work. Member details will need to return extra key/values for
connected users to voice channels. An additional avatar_url value will
hold an unique avatar url for the user + guild, fetched via a CDN
endpoint widget-avatars.

New dependencies `canvas` and `image-size`. Canvas is used to create the
widget.png endpoint image [3]. Image-size is used to set the canvas'
size to match the widget template images.

Use regex in determining if a NO_AUTHORIZATION_ROUTES is hit or not.

[1] https://discord.com/developers/docs/resources/guild#get-guild-widget
[2] https://github.com/discord/discord-api-docs/issues/1287
[3] https://discord.com/developers/docs/resources/guild#get-guild-widget-image

Closes: #9, #110
2021-06-19 14:50:11 +01:00

78 lines
2.0 KiB
JSON

{
"name": "@fosscord/api",
"version": "1.0.0",
"description": "This repository contains the HTTP API Server",
"main": "dist/Server.js",
"types": "dist/Server.d.ts",
"scripts": {
"test": "jest",
"test:watch": "jest --watch",
"start": "npm run build && node dist/start",
"build": "tsc -b .",
"dev": "tsnd --respawn src/start.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/fosscord/fosscord-api.git"
},
"keywords": [
"discord",
"fosscord",
"fosscord-api",
"discord open source",
"discord-open-source"
],
"author": "Fosscord",
"license": "ISC",
"bugs": {
"url": "https://github.com/fosscord/fosscord-api/issues"
},
"homepage": "https://github.com/fosscord/fosscord-api#readme",
"dependencies": {
"@fosscord/server-util": "^1.3.16",
"@types/jest": "^26.0.22",
"@types/json-schema": "^7.0.7",
"ajv": "^8.4.0",
"ajv-formats": "^2.1.0",
"assert": "^1.5.0",
"atomically": "^1.7.0",
"bcrypt": "^5.0.1",
"body-parser": "^1.19.0",
"canvas": "^2.8.0",
"cheerio": "^1.0.0-rc.9",
"dot-prop": "^6.0.1",
"dotenv": "^8.2.0",
"env-paths": "^2.2.1",
"express": "^4.17.1",
"express-validator": "^6.9.2",
"form-data": "^3.0.0",
"i18next": "^19.8.5",
"i18next-http-middleware": "^3.1.3",
"i18next-node-fs-backend": "^2.1.3",
"image-size": "^1.0.0",
"jsonwebtoken": "^8.5.1",
"lambert-server": "^1.2.5",
"missing-native-js-functions": "^1.2.6",
"mongoose": "^5.12.3",
"mongoose-autopopulate": "^0.12.3",
"mongoose-long": "^0.3.2",
"multer": "^1.4.2"
},
"devDependencies": {
"@types/bcrypt": "^3.0.0",
"@types/express": "^4.17.9",
"@types/i18next-node-fs-backend": "^2.1.0",
"@types/jsonwebtoken": "^8.5.0",
"@types/multer": "^1.4.5",
"@types/node": "^14.14.22",
"@types/node-fetch": "^2.5.7",
"@zerollup/ts-transform-paths": "^1.7.18",
"0x": "^4.10.2",
"jest": "^26.6.3",
"node-fetch": "^2.6.1",
"ts-node": "^9.1.1",
"ts-node-dev": "^1.1.6",
"typescript": "^4.1.2"
}
}