move to pathe to support working in environments without "path"

This commit is contained in:
Michael Kassabov
2024-08-31 20:55:21 -04:00
parent 40c1267dbd
commit a9f07368ae
3 changed files with 4 additions and 3 deletions

BIN
bun.lockb

Binary file not shown.

View File

@@ -76,6 +76,7 @@
},
"dependencies": {
"lodash.clonedeep": "^4.5.0",
"openapi-types": "^12.1.3"
"openapi-types": "^12.1.3",
"pathe": "^1.1.2"
}
}

View File

@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/no-unused-vars */
import path from 'path'
import { normalize } from 'pathe'
import type { HTTPMethod, LocalHook } from 'elysia'
import { Kind, type TSchema } from '@sinclair/typebox'
@@ -310,7 +310,7 @@ export const filterPaths = (
// exclude docs path and OpenAPI json path
const excludePaths = [`/${docsPath}`, `/${docsPath}/json`].map((p) =>
path.normalize(p)
normalize(p)
)
for (const [key, value] of Object.entries(paths))