From 29463dff52f2e74d0d522168afe6faf70ff2fabb Mon Sep 17 00:00:00 2001 From: Oliver Speir <115520730+OliverSpeir@users.noreply.github.com> Date: Mon, 10 Jun 2024 09:53:38 -0600 Subject: [PATCH] Export type Database from db/runtime (#11216) * import and export in index.ts * remove import and export from virtual.ts * add changset * Update .changeset/warm-pets-tap.md Co-authored-by: Emanuele Stoppa --------- Co-authored-by: Emanuele Stoppa --- .changeset/warm-pets-tap.md | 5 +++++ packages/db/src/runtime/index.ts | 3 ++- packages/db/src/runtime/virtual.ts | 4 ---- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .changeset/warm-pets-tap.md diff --git a/.changeset/warm-pets-tap.md b/.changeset/warm-pets-tap.md new file mode 100644 index 000000000000..7c388259b865 --- /dev/null +++ b/.changeset/warm-pets-tap.md @@ -0,0 +1,5 @@ +--- +'@astrojs/db': patch +--- + +Export type `Database` from `@astrojs/db/runtime` diff --git a/packages/db/src/runtime/index.ts b/packages/db/src/runtime/index.ts index b2c28a64402e..8737c7d9fc36 100644 --- a/packages/db/src/runtime/index.ts +++ b/packages/db/src/runtime/index.ts @@ -11,7 +11,8 @@ import { import type { DBColumn, DBTable } from '../core/types.js'; import { type SerializedSQL, isSerializedSQL } from './types.js'; import { pathToFileURL } from './utils.js'; - +import { type LibSQLDatabase } from 'drizzle-orm/libsql'; +export type Database = Omit; export type { Table } from './types.js'; export { createRemoteDatabaseClient, createLocalDatabaseClient } from './db-client.js'; diff --git a/packages/db/src/runtime/virtual.ts b/packages/db/src/runtime/virtual.ts index 4159e74c1a5c..6f008fe0d8ac 100644 --- a/packages/db/src/runtime/virtual.ts +++ b/packages/db/src/runtime/virtual.ts @@ -11,10 +11,6 @@ import type { TextColumnOpts, } from '../core/types.js'; -import type { LibSQLDatabase } from 'drizzle-orm/libsql'; - -export type Database = Omit; - function createColumn>(type: S, schema: T) { return { type,