@pikku/kysely-sqlite 0.12.18 → 0.12.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { Kysely, type KyselyPlugin, type SqliteDatabase } from 'kysely';
2
+ import { type TraceDriverOptions } from '@pikku/kysely';
2
3
  import type { KyselyPikkuDB } from '@pikku/kysely';
3
- export interface CreateSQLiteKyselyOptions {
4
+ export interface CreateSQLiteKyselyOptions extends Omit<TraceDriverOptions, 'system'> {
4
5
  /** Extra plugins to layer on, ahead of the always-last SerializePlugin. */
5
6
  plugins?: KyselyPlugin[];
6
7
  }
@@ -1,8 +1,13 @@
1
1
  import { Kysely, SqliteDialect, } from 'kysely';
2
- import { SerializePlugin } from '@pikku/kysely';
2
+ import { SerializePlugin, traceDialect, } from '@pikku/kysely';
3
3
  export function createSQLiteKysely(database, options = {}) {
4
4
  return new Kysely({
5
- dialect: new SqliteDialect({ database }),
5
+ dialect: traceDialect(new SqliteDialect({ database }), {
6
+ tracer: options.tracer,
7
+ currentTrace: options.currentTrace,
8
+ recordSqlText: options.recordSqlText,
9
+ system: 'sqlite',
10
+ }),
6
11
  plugins: [...(options.plugins ?? []), new SerializePlugin()],
7
12
  });
8
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/kysely-sqlite",
3
- "version": "0.12.18",
3
+ "version": "0.12.19",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pikkujs/pikku.git",
@@ -23,14 +23,14 @@
23
23
  "clean": "rm -rf dist tsconfig.tsbuildinfo"
24
24
  },
25
25
  "dependencies": {
26
- "@pikku/kysely": "^0.13.39",
26
+ "@pikku/kysely": "^0.13.43",
27
27
  "kysely": "^0.29.6"
28
28
  },
29
29
  "peerDependencies": {
30
- "@pikku/core": "^0.12.144"
30
+ "@pikku/core": "^0.12.156"
31
31
  },
32
32
  "devDependencies": {
33
- "@pikku/core": "^0.12.144"
33
+ "@pikku/core": "^0.12.156"
34
34
  },
35
35
  "exports": {
36
36
  ".": "./dist/src/index.js",