summaryrefslogtreecommitdiff
path: root/packages/db/src
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthewp@users.noreply.github.com> 2024-04-01 15:41:03 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2024-04-01 15:41:03 +0000
commitca2976491291e55a6901ba522362f171d31ce6a3 (patch)
tree8fdaae5faf166f3791e7225f88a647250f4405d0 /packages/db/src
parent157392ee44db08de0d3c01222644dae0a904044d (diff)
downloadastro-ca2976491291e55a6901ba522362f171d31ce6a3.tar.gz
astro-ca2976491291e55a6901ba522362f171d31ce6a3.tar.zst
astro-ca2976491291e55a6901ba522362f171d31ce6a3.zip
[ci] format
Diffstat (limited to 'packages/db/src')
-rw-r--r--packages/db/src/runtime/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/db/src/runtime/index.ts b/packages/db/src/runtime/index.ts
index a703a5c93..c4643b86a 100644
--- a/packages/db/src/runtime/index.ts
+++ b/packages/db/src/runtime/index.ts
@@ -1,3 +1,4 @@
+import { pathToFileURL } from 'url';
import { type ColumnBuilderBaseConfig, type ColumnDataType, sql } from 'drizzle-orm';
import {
type IndexBuilder,
@@ -10,7 +11,6 @@ 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 'url';
export type { Table } from './types.js';
export { createRemoteDatabaseClient, createLocalDatabaseClient } from './db-client.js';
@@ -133,10 +133,10 @@ function handleSerializedSQL<T>(def: T | SerializedSQL) {
}
export function normalizeDatabaseUrl(envDbUrl: string | undefined, defaultDbUrl: string): string {
- if(envDbUrl) {
+ if (envDbUrl) {
// This could be a file URL, or more likely a root-relative file path.
// Convert it to a file URL.
- if(envDbUrl.startsWith('file://')) {
+ if (envDbUrl.startsWith('file://')) {
return envDbUrl;
}
return new URL(envDbUrl, pathToFileURL(process.cwd())).toString();