@syncular/dialect-neon 0.0.1 → 0.0.2-126

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 ADDED
@@ -0,0 +1,31 @@
1
+ # @syncular/dialect-neon
2
+
3
+ Neon serverless Postgres Kysely dialect (HTTP).
4
+
5
+ Useful for stateless serverless/edge environments. Pair with `@syncular/server-dialect-postgres` when running a Syncular server on Postgres.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @syncular/dialect-neon
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { createNeonDb } from '@syncular/dialect-neon';
17
+
18
+ const db = createNeonDb<MyDb>({ connectionString: process.env.DATABASE_URL! });
19
+ ```
20
+
21
+ ## Documentation
22
+
23
+ - Dialect selection: https://syncular.dev/docs/introduction/installation#client-database-dialects
24
+ - Server dialects: https://syncular.dev/docs/server/dialects
25
+
26
+ ## Links
27
+
28
+ - GitHub: https://github.com/syncular/syncular
29
+ - Issues: https://github.com/syncular/syncular/issues
30
+
31
+ > Status: Alpha. APIs may change between releases.
package/dist/index.d.ts CHANGED
@@ -10,7 +10,8 @@
10
10
  * built-in PostgresDialect instead.
11
11
  */
12
12
  import { Kysely } from 'kysely';
13
- interface NeonOptions {
13
+ import { NeonDialect } from 'kysely-neon';
14
+ export interface NeonOptions {
14
15
  /** Neon Postgres connection string */
15
16
  connectionString: string;
16
17
  }
@@ -25,5 +26,8 @@ interface NeonOptions {
25
26
  * await ensureSyncSchema(db, dialect);
26
27
  */
27
28
  export declare function createNeonDb<T>(options: NeonOptions): Kysely<T>;
28
- export {};
29
+ /**
30
+ * Create the Neon dialect directly.
31
+ */
32
+ export declare function createNeonDialect(options: NeonOptions): NeonDialect;
29
33
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAGhC,UAAU,WAAW;IACnB,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"}
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"}
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ export function createNeonDb(options) {
30
30
  /**
31
31
  * Create the Neon dialect directly.
32
32
  */
33
- function createNeonDialect(options) {
33
+ export function createNeonDialect(options) {
34
34
  return new NeonDialect({
35
35
  neon: neon(options.connectionString),
36
36
  });
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,SAAS,iBAAiB,CAAC,OAAoB,EAAe;IAC5D,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,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"}
package/package.json CHANGED
@@ -1,6 +1,28 @@
1
1
  {
2
2
  "name": "@syncular/dialect-neon",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-126",
4
+ "description": "Neon serverless Postgres dialect for the Syncular client",
5
+ "license": "MIT",
6
+ "author": "Benjamin Kniffler",
7
+ "homepage": "https://syncular.dev",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/syncular/syncular.git",
11
+ "directory": "packages/dialect-neon"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/syncular/syncular/issues"
15
+ },
16
+ "keywords": [
17
+ "sync",
18
+ "offline-first",
19
+ "realtime",
20
+ "database",
21
+ "typescript",
22
+ "neon",
23
+ "postgres",
24
+ "serverless"
25
+ ],
4
26
  "private": false,
5
27
  "publishConfig": {
6
28
  "access": "public"
@@ -17,7 +39,8 @@
17
39
  },
18
40
  "scripts": {
19
41
  "tsgo": "tsgo --noEmit",
20
- "build": "rm -rf dist && tsgo"
42
+ "build": "tsgo",
43
+ "release": "bunx syncular-publish"
21
44
  },
22
45
  "dependencies": {
23
46
  "@neondatabase/serverless": "^1.0.2",
@@ -27,7 +50,7 @@
27
50
  "kysely": "^0.28.0"
28
51
  },
29
52
  "devDependencies": {
30
- "@syncular/config": "workspace:*",
53
+ "@syncular/config": "0.0.0",
31
54
  "kysely": "*"
32
55
  },
33
56
  "files": [
package/src/index.ts CHANGED
@@ -14,7 +14,7 @@ import { neon } from '@neondatabase/serverless';
14
14
  import { Kysely } from 'kysely';
15
15
  import { NeonDialect } from 'kysely-neon';
16
16
 
17
- interface NeonOptions {
17
+ export interface NeonOptions {
18
18
  /** Neon Postgres connection string */
19
19
  connectionString: string;
20
20
  }
@@ -38,7 +38,7 @@ export function createNeonDb<T>(options: NeonOptions): Kysely<T> {
38
38
  /**
39
39
  * Create the Neon dialect directly.
40
40
  */
41
- function createNeonDialect(options: NeonOptions): NeonDialect {
41
+ export function createNeonDialect(options: NeonOptions): NeonDialect {
42
42
  return new NeonDialect({
43
43
  neon: neon(options.connectionString),
44
44
  });