diff options
-rw-r--r-- | packages/db/src/runtime/index.ts | 2 | ||||
-rw-r--r-- | packages/db/src/runtime/utils.ts | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/db/src/runtime/index.ts b/packages/db/src/runtime/index.ts index 0cc91e57b..67dea935a 100644 --- a/packages/db/src/runtime/index.ts +++ b/packages/db/src/runtime/index.ts @@ -1,4 +1,3 @@ -import { pathToFileURL } from './utils.js'; import { type ColumnBuilderBaseConfig, type ColumnDataType, sql } from 'drizzle-orm'; import { type IndexBuilder, @@ -11,6 +10,7 @@ import { } from 'drizzle-orm/sqlite-core'; import { type DBColumn, type DBTable } from '../core/types.js'; import { type SerializedSQL, isSerializedSQL } from './types.js'; +import { pathToFileURL } from './utils.js'; export type { Table } from './types.js'; export { createRemoteDatabaseClient, createLocalDatabaseClient } from './db-client.js'; diff --git a/packages/db/src/runtime/utils.ts b/packages/db/src/runtime/utils.ts index 098417fcc..97ad21ccd 100644 --- a/packages/db/src/runtime/utils.ts +++ b/packages/db/src/runtime/utils.ts @@ -1,6 +1,6 @@ import { AstroError } from 'astro/errors'; -const isWindows = process?.platform === "win32"; +const isWindows = process?.platform === 'win32'; /** * Small wrapper around fetch that throws an error if the response is not OK. Allows for custom error handling as well through the onNotOK callback. @@ -36,10 +36,10 @@ export default function slash(path: string) { } export function pathToFileURL(path: string): URL { - if(isWindows) { + if (isWindows) { let slashed = slash(path); // Windows like C:/foo/bar - if(!slashed.startsWith('/')) { + if (!slashed.startsWith('/')) { slashed = '/' + slashed; } return new URL('file://' + slashed); |