remove lodash.clonedeep

This commit is contained in:
Daniil Zotov
2024-08-05 06:57:29 +03:00
committed by GitHub
parent bf58e930f5
commit 1bc6491a33
2 changed files with 1 additions and 7 deletions

View File

@@ -68,14 +68,12 @@
"@apidevtools/swagger-parser": "^10.1.0",
"@scalar/api-reference": "^1.12.5",
"@types/bun": "1.1.6",
"@types/lodash.clonedeep": "^4.5.9",
"elysia": ">= 1.1.0-rc.2",
"eslint": "9.6.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3"
},
"dependencies": {
"lodash.clonedeep": "^4.5.0",
"openapi-types": "^12.1.3"
}
}

View File

@@ -6,8 +6,6 @@ import type { HTTPMethod, LocalHook } from 'elysia'
import { Kind, type TSchema } from '@sinclair/typebox'
import type { OpenAPIV3 } from 'openapi-types'
import deepClone from 'lodash.clonedeep'
export const toOpenAPIPath = (path: string) =>
path
.split('/')
@@ -116,9 +114,7 @@ export const registerSchemaPath = ({
method: HTTPMethod
hook?: LocalHook<any, any, any, any, any, any, any>
models: Record<string, TSchema>
}) => {
if (hook) hook = deepClone(hook)
}) => {
const contentType = hook?.type ?? [
'application/json',
'multipart/form-data',