Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/proxy",
"version": "0.4.0",
"version": "0.4.1",
"description": "A CLI tool to run an Express server that proxies CRUD requests to a ZenStack backend",
"main": "index.js",
"publishConfig": {
Expand Down Expand Up @@ -29,8 +29,8 @@
"author": "",
"license": "MIT",
"dependencies": {
"@prisma/adapter-better-sqlite3": "^7.3.0",
"@prisma/adapter-mariadb": "^7.1.0",
"@prisma/adapter-better-sqlite3": "^6.18.0",
"@prisma/adapter-mariadb": "^6.18.0",
Comment on lines +32 to +33
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title/description says “downgrade … to 6.18.0”, but using a caret range ("^6.18.0") still allows pnpm to resolve newer 6.x versions (the lockfile currently resolves 6.19.2). If the intent is to pin specifically to 6.18.0, change the specifier to an exact version (or at least "~6.18.0") and regenerate the lockfile accordingly; otherwise consider updating the PR description/title to reflect that this is a major downgrade to 6.x, not specifically 6.18.0.

Copilot uses AI. Check for mistakes.
"@prisma/adapter-pg": "^6.18.0",
"@zenstackhq/server": "^2.0.0",
"colors": "^1.4.0",
Expand Down
60 changes: 24 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ function createAdapter(config: ZModelConfig, zmodelSchemaDir: string): any {
resolvedUrl = `file:${resolveSQLitePath(filePath, prismaSchemaDir)}`
}
}
const { PrismaBetterSQLite3 } = require('@prisma/adapter-better-sqlite3')
const _mod = require('@prisma/adapter-better-sqlite3')
//Prisma7 renamed PrismaBetterSqlite3 from PrismaBetterSQLite3, support both cases for compatibility
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline comment formatting doesn’t match the surrounding style (missing space after //) and the wording is a bit confusing (“renamed … from …”). For consistency/clarity, adjust to something like “Prisma 7 renamed PrismaBetterSQLite3 to PrismaBetterSqlite3; support both for compatibility”.

Suggested change
//Prisma7 renamed PrismaBetterSqlite3 from PrismaBetterSQLite3, support both cases for compatibility
// Prisma 7 renamed PrismaBetterSQLite3 to PrismaBetterSqlite3; support both for compatibility

Copilot uses AI. Check for mistakes.
const PrismaBetterSQLite3 =
_mod.PrismaBetterSQLite3 ?? _mod.PrismaBetterSqlite3 ?? _mod.default

console.log(grey(`Connecting to SQLite database at: ${resolvedUrl}`))
return new PrismaBetterSQLite3({
url: resolvedUrl,
Expand All @@ -129,9 +133,9 @@ function createAdapter(config: ZModelConfig, zmodelSchemaDir: string): any {
}
case 'mysql': {
try {
const { PrismaMariaDB } = require('@prisma/adapter-mariadb')
const { PrismaMariaDb } = require('@prisma/adapter-mariadb')
console.log(grey(`Connecting to MySQL/MariaDB database at: ${redactDatabaseUrl(url)}`))
return new PrismaMariaDB({
return new PrismaMariaDb({
url,
})
} catch (error) {
Expand Down
Loading