@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 +31 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +26 -3
- package/src/index.ts +2 -2
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
|
-
|
|
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
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Create the Neon dialect directly.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createNeonDialect(options: NeonOptions): NeonDialect;
|
|
29
33
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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;
|
|
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
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,
|
|
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.
|
|
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": "
|
|
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": "
|
|
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
|
});
|