File tree 4 files changed +15
-1
lines changed
dialects/kysely-bun-sqlite
4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 141
141
"prefer" : " type-imports"
142
142
}
143
143
],
144
+ "unicorn/no-typeof-undefined" : [
145
+ 1 ,
146
+ {
147
+ "checkGlobalVariables" : false
148
+ }
149
+ ],
144
150
"unicorn/prefer-node-protocol" : 0
145
151
}
146
152
},
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ export class KyselyBunSqliteIntrospectorDialect extends IntrospectorDialect {
6
6
override readonly introspector = new KyselyBunSqliteIntrospector ( ) ;
7
7
8
8
async createKyselyDialect ( options : CreateKyselyDialectOptions ) {
9
+ if ( typeof Bun === 'undefined' ) {
10
+ throw new ReferenceError (
11
+ "Dialect 'kysely-bun-sqlite' is only available in a Bun environment." ,
12
+ ) ;
13
+ }
14
+
9
15
const { default : Database } = await import ( 'bun:sqlite' ) ;
10
16
const { BunSqliteDialect : KyselyBunSqliteDialect } = await import (
11
17
'kysely-bun-sqlite'
Original file line number Diff line number Diff line change 1
1
export * from './dialect' ;
2
+ export * from './dialects/kysely-bun-sqlite/kysely-bun-sqlite-dialect' ;
3
+ export * from './dialects/kysely-bun-sqlite/kysely-bun-sqlite-introspector' ;
2
4
export * from './dialects/libsql/libsql-dialect' ;
3
5
export * from './dialects/libsql/libsql-introspector' ;
4
6
export * from './dialects/mssql/mssql-dialect' ;
Original file line number Diff line number Diff line change 19
19
"sourceMap" : true ,
20
20
"strict" : true ,
21
21
"target" : " es2020" ,
22
- "types" : [" vitest/globals" ]
22
+ "types" : [" bun " , " vitest/globals" ]
23
23
},
24
24
"include" : [" src" ]
25
25
}
You can’t perform that action at this time.
0 commit comments