chore(deps/openapi): updated all
Updated openapi and verified that no unused dependency still remains
This commit is contained in:
parent
4cde1b744f
commit
63549752e8
23 changed files with 39 additions and 694 deletions
|
|
@ -1,26 +1,25 @@
|
||||||
{
|
{
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
"typescript": "~5.9.3",
|
"@tailwindcss/vite": "^4.1.18",
|
||||||
"vite": "^7.3.0",
|
"typescript": "~5.9.3",
|
||||||
"vite-tsconfig-paths": "^5.1.4"
|
"vite": "^7.3.0",
|
||||||
},
|
"vite-tsconfig-paths": "^5.1.4"
|
||||||
"dependencies": {
|
},
|
||||||
"@tailwindcss/vite": "^4.1.18",
|
"dependencies": {
|
||||||
"@types/qrcode": "^1.5.6",
|
"js-cookie": "^3.0.5",
|
||||||
"js-cookie": "^3.0.5",
|
"qrcode": "^1.5.4",
|
||||||
"qrcode": "^1.5.4",
|
"socket.io-client": "^4.8.3",
|
||||||
"socket.io-client": "^4.8.3",
|
"tailwindcss": "^4.1.18"
|
||||||
"tailwindcss": "^4.1.18"
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
frontend/pnpm-lock.yaml
generated
12
frontend/pnpm-lock.yaml
generated
|
|
@ -8,12 +8,6 @@ importers:
|
||||||
|
|
||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tailwindcss/vite':
|
|
||||||
specifier: ^4.1.18
|
|
||||||
version: 4.1.18(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2))
|
|
||||||
'@types/qrcode':
|
|
||||||
specifier: ^1.5.6
|
|
||||||
version: 1.5.6
|
|
||||||
js-cookie:
|
js-cookie:
|
||||||
specifier: ^3.0.5
|
specifier: ^3.0.5
|
||||||
version: 3.0.5
|
version: 3.0.5
|
||||||
|
|
@ -27,9 +21,15 @@ importers:
|
||||||
specifier: ^4.1.18
|
specifier: ^4.1.18
|
||||||
version: 4.1.18
|
version: 4.1.18
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
'@tailwindcss/vite':
|
||||||
|
specifier: ^4.1.18
|
||||||
|
version: 4.1.18(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2))
|
||||||
'@types/js-cookie':
|
'@types/js-cookie':
|
||||||
specifier: ^3.0.6
|
specifier: ^3.0.6
|
||||||
version: 3.0.6
|
version: 3.0.6
|
||||||
|
'@types/qrcode':
|
||||||
|
specifier: ^1.5.6
|
||||||
|
version: 1.5.6
|
||||||
typescript:
|
typescript:
|
||||||
specifier: ~5.9.3
|
specifier: ~5.9.3
|
||||||
version: 5.9.3
|
version: 5.9.3
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ apis/index.ts
|
||||||
index.ts
|
index.ts
|
||||||
models/AllowGuestMessage200Response.ts
|
models/AllowGuestMessage200Response.ts
|
||||||
models/AllowGuestMessage403Response.ts
|
models/AllowGuestMessage403Response.ts
|
||||||
models/ApiChatBroadcastPostRequest.ts
|
|
||||||
models/ChangeDesc200Response.ts
|
models/ChangeDesc200Response.ts
|
||||||
models/ChangeDesc400Response.ts
|
models/ChangeDesc400Response.ts
|
||||||
models/ChangeDesc403Response.ts
|
models/ChangeDesc403Response.ts
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import * as runtime from '../runtime';
|
||||||
import type {
|
import type {
|
||||||
AllowGuestMessage200Response,
|
AllowGuestMessage200Response,
|
||||||
AllowGuestMessage403Response,
|
AllowGuestMessage403Response,
|
||||||
ApiChatBroadcastPostRequest,
|
|
||||||
ChangeDesc200Response,
|
ChangeDesc200Response,
|
||||||
ChangeDesc400Response,
|
ChangeDesc400Response,
|
||||||
ChangeDesc403Response,
|
ChangeDesc403Response,
|
||||||
|
|
@ -79,8 +78,6 @@ import {
|
||||||
AllowGuestMessage200ResponseToJSON,
|
AllowGuestMessage200ResponseToJSON,
|
||||||
AllowGuestMessage403ResponseFromJSON,
|
AllowGuestMessage403ResponseFromJSON,
|
||||||
AllowGuestMessage403ResponseToJSON,
|
AllowGuestMessage403ResponseToJSON,
|
||||||
ApiChatBroadcastPostRequestFromJSON,
|
|
||||||
ApiChatBroadcastPostRequestToJSON,
|
|
||||||
ChangeDesc200ResponseFromJSON,
|
ChangeDesc200ResponseFromJSON,
|
||||||
ChangeDesc200ResponseToJSON,
|
ChangeDesc200ResponseToJSON,
|
||||||
ChangeDesc400ResponseFromJSON,
|
ChangeDesc400ResponseFromJSON,
|
||||||
|
|
@ -193,10 +190,6 @@ import {
|
||||||
TttHistory404ResponseToJSON,
|
TttHistory404ResponseToJSON,
|
||||||
} from '../models/index';
|
} from '../models/index';
|
||||||
|
|
||||||
export interface ApiChatBroadcastPostOperationRequest {
|
|
||||||
apiChatBroadcastPostRequest: ApiChatBroadcastPostRequest;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ChangeDescOperationRequest {
|
export interface ChangeDescOperationRequest {
|
||||||
changeDescRequest: ChangeDescRequest;
|
changeDescRequest: ChangeDescRequest;
|
||||||
}
|
}
|
||||||
|
|
@ -296,53 +289,6 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
||||||
return await response.value();
|
return await response.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async apiChatBroadcastPostRaw(requestParameters: ApiChatBroadcastPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters['apiChatBroadcastPostRequest'] == null) {
|
|
||||||
throw new runtime.RequiredError(
|
|
||||||
'apiChatBroadcastPostRequest',
|
|
||||||
'Required parameter "apiChatBroadcastPostRequest" was null or undefined when calling apiChatBroadcastPost().'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
|
|
||||||
let urlPath = `/api/chat/broadcast`;
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: urlPath,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: ApiChatBroadcastPostRequestToJSON(requestParameters['apiChatBroadcastPostRequest']),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
// CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses
|
|
||||||
// This allows typed access to error responses (4xx, 5xx) and other status codes.
|
|
||||||
// The code routes responses based on the actual HTTP status code and returns
|
|
||||||
// appropriately typed ApiResponse wrappers for each status code.
|
|
||||||
if (response.status === 200) {
|
|
||||||
// No body response for status 200
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
// CHANGED: Throw error if status code is not handled by any of the defined responses
|
|
||||||
// This ensures all code paths return a value and provides clear error messages for unexpected status codes
|
|
||||||
// Only throw if responses were defined but none matched the actual status code
|
|
||||||
throw new runtime.ResponseError(response, `Unexpected status code: ${response.status}. Expected one of: 200`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async apiChatBroadcastPost(requestParameters: ApiChatBroadcastPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.apiChatBroadcastPostRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
async changeDescRaw(requestParameters: ChangeDescOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChangeDesc200Response | ChangeDesc400Response | ChangePassword401Response | ChangeDesc403Response>> {
|
async changeDescRaw(requestParameters: ChangeDescOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChangeDesc200Response | ChangeDesc400Response | ChangePassword401Response | ChangeDesc403Response>> {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export * from './AllowGuestMessage200Response';
|
export * from './AllowGuestMessage200Response';
|
||||||
export * from './AllowGuestMessage403Response';
|
export * from './AllowGuestMessage403Response';
|
||||||
export * from './ApiChatBroadcastPostRequest';
|
|
||||||
export * from './ChangeDesc200Response';
|
export * from './ChangeDesc200Response';
|
||||||
export * from './ChangeDesc400Response';
|
export * from './ChangeDesc400Response';
|
||||||
export * from './ChangeDesc403Response';
|
export * from './ChangeDesc403Response';
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,8 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/autoload": "^6.3.1",
|
|
||||||
"@fastify/formbody": "^8.0.2",
|
|
||||||
"@fastify/multipart": "^9.3.0",
|
|
||||||
"@fastify/sensible": "^6.0.4",
|
|
||||||
"@fastify/static": "^8.3.0",
|
|
||||||
"confbox": "^0.2.2",
|
"confbox": "^0.2.2",
|
||||||
"fastify": "^5.6.2",
|
"fastify": "^5.6.2",
|
||||||
"fastify-cli": "^7.4.1",
|
|
||||||
"fastify-plugin": "^5.1.0",
|
"fastify-plugin": "^5.1.0",
|
||||||
"typebox": "^1.0.69"
|
"typebox": "^1.0.69"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import { FastifyPluginAsync } from 'fastify';
|
import { FastifyPluginAsync } from 'fastify';
|
||||||
import fastifyFormBody from '@fastify/formbody';
|
|
||||||
import fastifyMultipart from '@fastify/multipart';
|
|
||||||
import * as db from '@shared/database';
|
import * as db from '@shared/database';
|
||||||
import * as auth from '@shared/auth';
|
import * as auth from '@shared/auth';
|
||||||
import * as swagger from '@shared/swagger';
|
import * as swagger from '@shared/swagger';
|
||||||
|
|
@ -36,9 +34,6 @@ const app: FastifyPluginAsync = async (fastify, opts): Promise<void> => {
|
||||||
for (const route of Object.values(routes)) {
|
for (const route of Object.values(routes)) {
|
||||||
void fastify.register(route as FastifyPluginAsync, {});
|
void fastify.register(route as FastifyPluginAsync, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void fastify.register(fastifyFormBody, {});
|
|
||||||
void fastify.register(fastifyMultipart, {});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default app;
|
export default app;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import fp from 'fastify-plugin';
|
|
||||||
import sensible, { FastifySensibleOptions } from '@fastify/sensible';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This plugins adds some utilities to handle http errors
|
|
||||||
*
|
|
||||||
* @see https://github.com/fastify/fastify-sensible
|
|
||||||
*/
|
|
||||||
export default fp<FastifySensibleOptions>(async (fastify) => {
|
|
||||||
fastify.register(sensible);
|
|
||||||
});
|
|
||||||
|
|
@ -7,35 +7,7 @@
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {}
|
"schemas": {}
|
||||||
},
|
},
|
||||||
"paths": {
|
"paths": {},
|
||||||
"/api/chat/broadcast": {
|
|
||||||
"post": {
|
|
||||||
"requestBody": {
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"nextGame"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"nextGame": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Default Response"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
"url": "https://local.maix.me:8888",
|
"url": "https://local.maix.me:8888",
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,6 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/autoload": "^6.3.1",
|
|
||||||
"@fastify/formbody": "^8.0.2",
|
|
||||||
"@fastify/multipart": "^9.3.0",
|
|
||||||
"@fastify/sensible": "^6.0.4",
|
|
||||||
"@fastify/static": "^8.3.0",
|
|
||||||
"@fastify/websocket": "^11.2.0",
|
|
||||||
"fastify": "^5.6.2",
|
"fastify": "^5.6.2",
|
||||||
"fastify-plugin": "^5.1.0",
|
"fastify-plugin": "^5.1.0",
|
||||||
"socket.io": "^4.8.3",
|
"socket.io": "^4.8.3",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
import { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
||||||
import fastifyFormBody from '@fastify/formbody';
|
|
||||||
import fastifyMultipart from '@fastify/multipart';
|
|
||||||
import * as db from '@shared/database';
|
import * as db from '@shared/database';
|
||||||
import * as auth from '@shared/auth';
|
import * as auth from '@shared/auth';
|
||||||
import * as swagger from '@shared/swagger';
|
import * as swagger from '@shared/swagger';
|
||||||
|
|
@ -50,9 +48,6 @@ const app: FastifyPluginAsync = async (fastify, opts): Promise<void> => {
|
||||||
void fastify.register(route as FastifyPluginAsync, {});
|
void fastify.register(route as FastifyPluginAsync, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void fastify.register(fastifyFormBody, {});
|
|
||||||
void fastify.register(fastifyMultipart, {});
|
|
||||||
|
|
||||||
fastify.ready((err) => {
|
fastify.ready((err) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
onReady(fastify);
|
onReady(fastify);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import fp from 'fastify-plugin';
|
|
||||||
import sensible, { FastifySensibleOptions } from '@fastify/sensible';
|
|
||||||
/**
|
|
||||||
* This plugins adds some utilities to handle http errors
|
|
||||||
*
|
|
||||||
* @see https://github.com/fastify/fastify-sensible
|
|
||||||
*/
|
|
||||||
export default fp<FastifySensibleOptions>(async (fastify) => {
|
|
||||||
fastify.register(sensible);
|
|
||||||
});
|
|
||||||
|
|
@ -1917,36 +1917,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/chat/broadcast": {
|
|
||||||
"post": {
|
|
||||||
"requestBody": {
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"nextGame"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"nextGame": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Default Response"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tags": [
|
|
||||||
"openapi_other"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/ttt/history/{user}": {
|
"/api/ttt/history/{user}": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "tttHistory",
|
"operationId": "tttHistory",
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@
|
||||||
"lint-staged": "^16.2.7",
|
"lint-staged": "^16.2.7",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"typescript-eslint": "^8.51.0",
|
"typescript-eslint": "^8.51.0",
|
||||||
"vite": "^7.3.0"
|
"vite": "^7.3.0",
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@redocly/cli": "^2.14.1",
|
"@redocly/cli": "^2.14.1",
|
||||||
"bindings": "^1.5.0"
|
"bindings": "^1.5.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
455
src/pnpm-lock.yaml
generated
455
src/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -18,12 +18,6 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/autoload": "^6.3.1",
|
|
||||||
"@fastify/formbody": "^8.0.2",
|
|
||||||
"@fastify/multipart": "^9.3.0",
|
|
||||||
"@fastify/sensible": "^6.0.4",
|
|
||||||
"@fastify/static": "^8.3.0",
|
|
||||||
"@fastify/websocket": "^11.2.0",
|
|
||||||
"fastify": "^5.6.2",
|
"fastify": "^5.6.2",
|
||||||
"fastify-plugin": "^5.1.0",
|
"fastify-plugin": "^5.1.0",
|
||||||
"socket.io": "^4.8.1",
|
"socket.io": "^4.8.1",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
import { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
||||||
import fastifyFormBody from '@fastify/formbody';
|
|
||||||
import fastifyMultipart from '@fastify/multipart';
|
|
||||||
import * as db from '@shared/database';
|
import * as db from '@shared/database';
|
||||||
import * as auth from '@shared/auth';
|
import * as auth from '@shared/auth';
|
||||||
import * as swagger from '@shared/swagger';
|
import * as swagger from '@shared/swagger';
|
||||||
|
|
@ -34,9 +32,6 @@ const app: FastifyPluginAsync = async (fastify, opts): Promise<void> => {
|
||||||
void fastify.register(route as FastifyPluginAsync, {});
|
void fastify.register(route as FastifyPluginAsync, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void fastify.register(fastifyFormBody, {});
|
|
||||||
void fastify.register(fastifyMultipart, {});
|
|
||||||
|
|
||||||
fastify.ready((err) => {
|
fastify.ready((err) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
newState(fastify);
|
newState(fastify);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import fp from 'fastify-plugin';
|
|
||||||
import sensible, { FastifySensibleOptions } from '@fastify/sensible';
|
|
||||||
/**
|
|
||||||
* This plugins adds some utilities to handle http errors
|
|
||||||
*
|
|
||||||
* @see https://github.com/fastify/fastify-sensible
|
|
||||||
*/
|
|
||||||
export default fp<FastifySensibleOptions>(async (fastify) => {
|
|
||||||
fastify.register(sensible);
|
|
||||||
});
|
|
||||||
|
|
@ -14,12 +14,6 @@
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"packageManager": "pnpm@10.24.0",
|
"packageManager": "pnpm@10.24.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/autoload": "^6.3.1",
|
|
||||||
"@fastify/formbody": "^8.0.2",
|
|
||||||
"@fastify/multipart": "^9.3.0",
|
|
||||||
"@fastify/sensible": "^6.0.4",
|
|
||||||
"@fastify/static": "^8.3.0",
|
|
||||||
"@fastify/websocket": "^11.2.0",
|
|
||||||
"fastify": "^5.6.2",
|
"fastify": "^5.6.2",
|
||||||
"fastify-plugin": "^5.1.0",
|
"fastify-plugin": "^5.1.0",
|
||||||
"socket.io": "^4.8.3",
|
"socket.io": "^4.8.3",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
// import { TTC } from './game';
|
// import { TTC } from './game';
|
||||||
import { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
import { FastifyInstance, FastifyPluginAsync } from 'fastify';
|
||||||
import fastifyFormBody from '@fastify/formbody';
|
|
||||||
import fastifyMultipart from '@fastify/multipart';
|
|
||||||
import * as db from '@shared/database';
|
import * as db from '@shared/database';
|
||||||
import * as auth from '@shared/auth';
|
import * as auth from '@shared/auth';
|
||||||
import * as swagger from '@shared/swagger';
|
import * as swagger from '@shared/swagger';
|
||||||
|
|
@ -35,9 +33,6 @@ const app: FastifyPluginAsync = async (fastify, opts): Promise<void> => {
|
||||||
void fastify.register(route as FastifyPluginAsync, {});
|
void fastify.register(route as FastifyPluginAsync, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void fastify.register(fastifyFormBody, {});
|
|
||||||
void fastify.register(fastifyMultipart, {});
|
|
||||||
|
|
||||||
fastify.ready((err) => {
|
fastify.ready((err) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
onReady(fastify);
|
onReady(fastify);
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,7 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/autoload": "^6.3.1",
|
|
||||||
"@fastify/formbody": "^8.0.2",
|
|
||||||
"@fastify/multipart": "^9.3.0",
|
|
||||||
"@fastify/sensible": "^6.0.4",
|
|
||||||
"@fastify/static": "^8.3.0",
|
|
||||||
"fastify": "^5.6.2",
|
"fastify": "^5.6.2",
|
||||||
"fastify-cli": "^7.4.1",
|
|
||||||
"fastify-plugin": "^5.1.0",
|
"fastify-plugin": "^5.1.0",
|
||||||
"typebox": "^1.0.69"
|
"typebox": "^1.0.69"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import { FastifyPluginAsync } from 'fastify';
|
import { FastifyPluginAsync } from 'fastify';
|
||||||
import fastifyFormBody from '@fastify/formbody';
|
|
||||||
import fastifyMultipart from '@fastify/multipart';
|
|
||||||
import * as db from '@shared/database';
|
import * as db from '@shared/database';
|
||||||
import * as auth from '@shared/auth';
|
import * as auth from '@shared/auth';
|
||||||
import * as swagger from '@shared/swagger';
|
import * as swagger from '@shared/swagger';
|
||||||
|
|
@ -29,9 +27,6 @@ const app: FastifyPluginAsync = async (fastify, opts): Promise<void> => {
|
||||||
for (const route of Object.values(routes)) {
|
for (const route of Object.values(routes)) {
|
||||||
void fastify.register(route as FastifyPluginAsync, {});
|
void fastify.register(route as FastifyPluginAsync, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void fastify.register(fastifyFormBody, {});
|
|
||||||
void fastify.register(fastifyMultipart, {});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default app;
|
export default app;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import fp from 'fastify-plugin';
|
|
||||||
import sensible, { FastifySensibleOptions } from '@fastify/sensible';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This plugins adds some utilities to handle http errors
|
|
||||||
*
|
|
||||||
* @see https://github.com/fastify/fastify-sensible
|
|
||||||
*/
|
|
||||||
export default fp<FastifySensibleOptions>(async (fastify) => {
|
|
||||||
fastify.register(sensible);
|
|
||||||
});
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue