@syncular/dialect-neon 0.0.6-72 → 0.0.6-79

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.
package/README.md CHANGED
@@ -13,9 +13,13 @@ npm install @syncular/dialect-neon
13
13
  ## Usage
14
14
 
15
15
  ```ts
16
- import { createNeonDb } from '@syncular/dialect-neon';
16
+ import { createDatabase } from '@syncular/core';
17
+ import { createNeonDialect } from '@syncular/dialect-neon';
17
18
 
18
- const db = createNeonDb<MyDb>({ connectionString: process.env.DATABASE_URL! });
19
+ const db = createDatabase<MyDb>({
20
+ dialect: createNeonDialect({ connectionString: process.env.DATABASE_URL! }),
21
+ family: 'postgres',
22
+ });
19
23
  ```
20
24
 
21
25
  ## Documentation
package/dist/index.d.ts CHANGED
@@ -9,23 +9,11 @@
9
9
  * For transaction support, use Neon's WebSocket pool with Kysely's
10
10
  * built-in PostgresDialect instead.
11
11
  */
12
- import { Kysely } from 'kysely';
13
12
  import { NeonDialect } from 'kysely-neon';
14
13
  export interface NeonOptions {
15
14
  /** Neon Postgres connection string */
16
15
  connectionString: string;
17
16
  }
18
- /**
19
- * Create a Kysely instance with Neon serverless Postgres dialect.
20
- *
21
- * @example
22
- * const db = createNeonDb<MyDb>({
23
- * connectionString: process.env.DATABASE_URL!,
24
- * });
25
- * const dialect = createPostgresServerDialect();
26
- * await ensureSyncSchema(db, dialect);
27
- */
28
- export declare function createNeonDb<T>(options: NeonOptions): Kysely<T>;
29
17
  /**
30
18
  * Create the Neon dialect directly.
31
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAI/D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAInE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAInE"}
package/dist/index.js CHANGED
@@ -10,23 +10,7 @@
10
10
  * built-in PostgresDialect instead.
11
11
  */
12
12
  import { neon } from '@neondatabase/serverless';
13
- import { Kysely } from 'kysely';
14
13
  import { NeonDialect } from 'kysely-neon';
15
- /**
16
- * Create a Kysely instance with Neon serverless Postgres dialect.
17
- *
18
- * @example
19
- * const db = createNeonDb<MyDb>({
20
- * connectionString: process.env.DATABASE_URL!,
21
- * });
22
- * const dialect = createPostgresServerDialect();
23
- * await ensureSyncSchema(db, dialect);
24
- */
25
- export function createNeonDb(options) {
26
- return new Kysely({
27
- dialect: createNeonDialect(options),
28
- });
29
- }
30
14
  /**
31
15
  * Create the Neon dialect directly.
32
16
  */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAI,OAAoB,EAAa;IAC/D,OAAO,IAAI,MAAM,CAAI;QACnB,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC;KACpC,CAAC,CAAC;AAAA,CACJ;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAoB,EAAe;IACnE,OAAO,IAAI,WAAW,CAAC;QACrB,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;KACrC,CAAC,CAAC;AAAA,CACJ"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAoB,EAAe;IACnE,OAAO,IAAI,WAAW,CAAC;QACrB,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;KACrC,CAAC,CAAC;AAAA,CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/dialect-neon",
3
- "version": "0.0.6-72",
3
+ "version": "0.0.6-79",
4
4
  "description": "Neon serverless Postgres dialect for the Syncular client",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Benjamin Kniffler",
package/src/index.ts CHANGED
@@ -11,7 +11,6 @@
11
11
  */
12
12
 
13
13
  import { neon } from '@neondatabase/serverless';
14
- import { Kysely } from 'kysely';
15
14
  import { NeonDialect } from 'kysely-neon';
16
15
 
17
16
  export interface NeonOptions {
@@ -19,22 +18,6 @@ export interface NeonOptions {
19
18
  connectionString: string;
20
19
  }
21
20
 
22
- /**
23
- * Create a Kysely instance with Neon serverless Postgres dialect.
24
- *
25
- * @example
26
- * const db = createNeonDb<MyDb>({
27
- * connectionString: process.env.DATABASE_URL!,
28
- * });
29
- * const dialect = createPostgresServerDialect();
30
- * await ensureSyncSchema(db, dialect);
31
- */
32
- export function createNeonDb<T>(options: NeonOptions): Kysely<T> {
33
- return new Kysely<T>({
34
- dialect: createNeonDialect(options),
35
- });
36
- }
37
-
38
21
  /**
39
22
  * Create the Neon dialect directly.
40
23
  */