Skip to content

Commit 94a0c6f

Browse files
authored
Merge pull request #132 from zenstackhq/dev
merge dev to main (v3.0.0-alpha.16)
2 parents 99eb798 + b14512e commit 94a0c6f

File tree

33 files changed

+77
-96
lines changed

33 files changed

+77
-96
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,10 @@ Now you can use the compiled TypeScript schema to instantiate a database client.
145145
import { ZenStackClient } from '@zenstackhq/runtime';
146146
import { schema } from './zenstack/schema';
147147
import SQLite from 'better-sqlite3';
148+
import { SqliteDialect } from 'kysely';
148149

149150
const client = new ZenStackClient(schema, {
150-
dialectConfig: { database: new SQLite('./dev.db') },
151+
dialect: new SqliteDialect({ database: new SQLite('./dev.db') }),
151152
});
152153
```
153154

@@ -156,13 +157,14 @@ const client = new ZenStackClient(schema, {
156157
```ts
157158
import { ZenStackClient } from '@zenstackhq/runtime';
158159
import { schema } from './zenstack/schema';
160+
import { PostgresDialect } from 'kysely';
159161
import { Pool } from 'pg';
160162
import { parseIntoClientConfig } from 'pg-connection-string';
161163

162164
const client = new ZenStackClient(schema, {
163-
dialectConfig: {
165+
dialect: new PostgresDialect({
164166
pool: new Pool(parseIntoClientConfig(process.env.DATABASE_URL)),
165-
},
167+
}),
166168
});
167169
```
168170

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zenstack-v3",
3-
"version": "3.0.0-alpha.15",
3+
"version": "3.0.0-alpha.16",
44
"description": "ZenStack",
55
"packageManager": "pnpm@10.12.1",
66
"scripts": {

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publisher": "zenstack",
44
"displayName": "ZenStack CLI",
55
"description": "FullStack database toolkit with built-in access control and automatic API generation.",
6-
"version": "3.0.0-alpha.15",
6+
"version": "3.0.0-alpha.16",
77
"type": "module",
88
"author": {
99
"name": "ZenStack Team"

packages/cli/src/actions/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import { ZenStackClient } from '@zenstackhq/runtime';
5050
import { schema } from '${outputPath}/schema';
5151
5252
const client = new ZenStackClient(schema, {
53-
dialectConfig: { ... }
53+
dialect: { ... }
5454
});
5555
\`\`\`
5656
`);

packages/cli/src/actions/templates.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ model Post {
2727
`;
2828

2929
export const STARTER_MAIN_TS = `import { ZenStackClient } from '@zenstackhq/runtime';
30-
import { schema } from './zenstack/schema';
3130
import SQLite from 'better-sqlite3';
31+
import { SqliteDialect } from 'kysely';
32+
import { schema } from './zenstack/schema';
3233
3334
async function main() {
3435
const client = new ZenStackClient(schema, {
35-
dialectConfig: {
36+
dialect: new SqliteDialect({
3637
database: new SQLite('./zenstack/dev.db'),
37-
},
38+
}),
3839
});
3940
const user = await client.user.create({
4041
data: {

packages/common-helpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/common-helpers",
3-
"version": "3.0.0-alpha.15",
3+
"version": "3.0.0-alpha.16",
44
"description": "ZenStack Common Helpers",
55
"type": "module",
66
"scripts": {

packages/create-zenstack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-zenstack",
3-
"version": "3.0.0-alpha.15",
3+
"version": "3.0.0-alpha.16",
44
"description": "Create a new ZenStack project",
55
"type": "module",
66
"scripts": {

packages/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/eslint-config",
3-
"version": "3.0.0-alpha.15",
3+
"version": "3.0.0-alpha.16",
44
"type": "module",
55
"private": true,
66
"license": "MIT"

packages/ide/vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "zenstack",
33
"publisher": "zenstack",
4-
"version": "3.0.0-alpha.15",
4+
"version": "3.0.0-alpha.16",
55
"displayName": "ZenStack Language Tools",
66
"description": "VSCode extension for ZenStack ZModel language",
77
"private": true,

packages/language/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/language",
33
"description": "ZenStack ZModel language specification",
4-
"version": "3.0.0-alpha.15",
4+
"version": "3.0.0-alpha.16",
55
"license": "MIT",
66
"author": "ZenStack Team",
77
"files": [

0 commit comments

Comments
 (0)