Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f41a1f6
feat: add soft-delete plugin (#2688)
ymc9 May 31, 2026
2a9689e
chore(cli): mute telemetry without removing instrumentation (#2695)
ymc9 Jun 4, 2026
1d08e2a
perf(orm): speed up client type checking via options projection + var…
ymc9 Jun 9, 2026
dafd751
perf(orm): make Options invariant on leaf CRUD arg/filter types too
ymc9 Jun 9, 2026
47c9d0a
fix(orm): project options at the $zod boundary so leaf-type invarianc…
ymc9 Jun 9, 2026
3ec3fcf
chore: update sample readme
ymc9 Jun 9, 2026
d6b6a45
docs(soft-delete): add README for the soft-delete plugin package (#2690)
ymc9 Jun 9, 2026
1f18de7
perf(orm): speed up client type checking via options projection + var…
ymc9 Jun 9, 2026
23334f1
feat: date and time validation (#2689)
sanny-io Jun 12, 2026
487688e
fix(language): forbid duplicate `@default` applications (#2697)
sanny-io Jun 12, 2026
431ad02
fix: `isEmpty` function when using `postgresql` dialect (#2703)
sanny-io Jun 12, 2026
0da9f81
feat(cli): auto-detect import file extension from tsconfig (#2705)
ymc9 Jun 12, 2026
99745a4
fix(orm): forbid selecting @omit fields when allowQueryTimeOmitOverri…
ymc9 Jun 12, 2026
672f518
fix(server): omit relations to sliced-away models from OpenAPI spec (…
ymc9 Jun 12, 2026
0a2592b
[CI] Bump version 3.8.0 (#2707)
github-actions[bot] Jun 12, 2026
666f841
fix(orm): forbid selecting @omit fields when allowQueryTimeOmitOverri…
ymc9 Jun 12, 2026
c3a4e27
fix(deps): upgrade langium to 4.2 to drop vulnerable lodash-es (#2704…
ymc9 Jun 13, 2026
4f462a7
feat: support Authentication and Authorization for the proxy (#2698)
jiashengguo Jun 16, 2026
d229533
fix(orm): support _count nested inside an include (#2712)
ymc9 Jun 17, 2026
3abae92
chore: update README (#2722)
ymc9 Jun 18, 2026
405c9ee
fix: pageParam in seInternalInfiniteQuery for Vue (#2714)
caiotarifa Jun 18, 2026
1af9b2b
fix(policy): support `in` operator against enum list with native enum…
ymc9 Jun 18, 2026
8d46a7f
fix(language): detect @@@onceInModel duplicates across inheritance (#…
ymc9 Jun 18, 2026
0da3bda
fix(soft-delete): support delegate and mixin models
ymc9 Jun 18, 2026
897df21
fix(soft-delete): support delegate and mixin models (#2726)
ymc9 Jun 18, 2026
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
25 changes: 2 additions & 23 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
- name: Run Claude Code Review
id: claude-review
if: ${{ !contains(github.event.pull_request.title, '[WIP]') }}
uses: anthropics/claude-code-action@beta
uses: anthropics/claude-code-action@v1
Comment thread
ymc9 marked this conversation as resolved.
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514"

# Direct prompt for automated review (no @claude mention needed)
direct_prompt: |
prompt: |
Please review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
Expand All @@ -46,24 +46,3 @@ jobs:
- Test coverage

Be constructive and helpful in your feedback.

# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
# use_sticky_comment: true

# Optional: Customize review based on file types
# direct_prompt: |
# Review this PR focusing on:
# - For TypeScript files: Type safety and proper interface usage
# - For API endpoints: Security, input validation, and error handling
# - For React components: Performance, accessibility, and best practices
# - For tests: Coverage, edge cases, and test quality

# Optional: Different prompts for different authors
# direct_prompt: |
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}

# Optional: Add specific tools for running tests or linting
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"

2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- **ORM**: Depends on Kysely, Zod, and various utility libraries
- **CLI**: Depends on language package, Commander.js, and Prisma (for migrations)
- **Language**: Uses Langium for grammar parsing and AST generation
- **Database Support**: SQLite (better-sqlite3) and PostgreSQL (pg) only
- **Database Support**: SQLite (better-sqlite3), PostgreSQL (pg), and MySQL

### Testing Strategy

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<a href="https://www.npmjs.com/package/@zenstackhq/cli?activeTab=versions">
<img src="https://img.shields.io/npm/v/%40zenstackhq%2Fcli/latest">
</a>
<a href="https://www.npmjs.com/package/@zenstackhq/language">
<img src="https://img.shields.io/npm/dm/@zenstackhq/language">
</a>
Comment thread
ymc9 marked this conversation as resolved.
<img src="https://github.com/zenstackhq/zenstack/actions/workflows/build-test.yml/badge.svg">
<a href="https://twitter.com/zenstackhq">
<img src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fzenstackhq%2Fzenstack">
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "zenstack-v3",
"displayName": "ZenStack",
"description": "ZenStack",
"version": "3.7.2",
"version": "3.8.0",
"type": "module",
"author": {
"name": "ZenStack Team",
Expand Down Expand Up @@ -46,7 +46,7 @@
"prettier": "^3.5.3",
"prisma": "catalog:",
"tsdown": "^0.21.8",
"tsx": "^4.20.3",
"tsx": "catalog:",
"turbo": "^2.5.4",
"typescript": "catalog:",
"typescript-eslint": "^8.34.1",
Expand All @@ -62,8 +62,7 @@
],
"overrides": {
"cookie@<0.7.0": ">=0.7.0",
"lodash-es@>=4.0.0 <=4.17.22": ">=4.17.23",
"lodash@>=4.0.0 <=4.17.22": ">=4.17.23",
"lodash@>=4.0.0 <=4.17.23": ">=4.18.0",
"@better-auth/core": "1.4.19"
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-adapters/better-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@zenstackhq/better-auth",
"displayName": "ZenStack Better Auth Adapter",
"description": "ZenStack Better Auth Adapter. This adapter is modified from better-auth's Prisma adapter.",
"version": "3.7.2",
"version": "3.8.0",
"type": "module",
"author": {
"name": "ZenStack Team",
Expand Down
14 changes: 10 additions & 4 deletions packages/auth-adapters/better-auth/src/schema-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function addDefaultNow(df: DataField) {
} as any;
const nowExpr: InvocationExpr = {
$type: 'InvocationExpr',
function: { $refText: 'now' },
function: { $refText: 'now', ref: undefined },
args: [],
$container: nowArg,
};
Expand Down Expand Up @@ -221,6 +221,7 @@ function initializeZmodel(config: AdapterConfig) {
$type: 'InvocationExpr',
function: {
$refText: 'env',
ref: undefined,
},
args: [],
$container: urlField,
Expand Down Expand Up @@ -391,6 +392,7 @@ function addOrUpdateModel(
$type: 'DataFieldType',
reference: {
$refText: upperCaseFirst(referencedCustomModelName),
ref: undefined,
},
array: (field.type as string).endsWith('[]'),
optional: !field.required,
Expand All @@ -408,6 +410,7 @@ function addOrUpdateModel(
$type: 'DataFieldAttribute',
decl: {
$refText: '@relation',
ref: undefined,
},
args: [],
$container: relationField,
Expand All @@ -430,6 +433,7 @@ function addOrUpdateModel(
$container: fieldsExpr,
target: {
$refText: fieldName,
ref: undefined,
},
};
fieldsExpr.items.push(fkRefExpr);
Expand All @@ -452,6 +456,7 @@ function addOrUpdateModel(
$container: referencesExpr,
target: {
$refText: field.references.field,
ref: undefined,
},
};
referencesExpr.items.push(pkRefExpr);
Expand All @@ -465,7 +470,7 @@ function addOrUpdateModel(
} as any;
const onDeleteValueExpr: ReferenceExpr = {
$type: 'ReferenceExpr',
target: { $refText: action },
target: { $refText: action, ref: undefined },
args: [],
$container: onDeleteArg,
};
Expand Down Expand Up @@ -495,6 +500,7 @@ function addOrUpdateModel(
$type: 'DataFieldType',
reference: {
$refText: relatedModel,
ref: undefined,
},
array: true,
optional: false,
Expand All @@ -512,7 +518,7 @@ function addOrUpdateModel(
function addModelAttribute(dataModel: DataModel, name: string, args: Omit<AttributeArg, '$container'>[] = []) {
const attr: DataModelAttribute = {
$type: 'DataModelAttribute',
decl: { $refText: name },
decl: { $refText: name, ref: undefined },
$container: dataModel,
args: [],
};
Expand All @@ -527,7 +533,7 @@ function addModelAttribute(dataModel: DataModel, name: string, args: Omit<Attrib
function addFieldAttribute(dataField: DataField, name: string, args: Omit<AttributeArg, '$container'>[] = []) {
const attr: DataFieldAttribute = {
$type: 'DataFieldAttribute',
decl: { $refText: name },
decl: { $refText: name, ref: undefined },
$container: dataField,
args: [],
};
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@zenstackhq/cli",
"displayName": "ZenStack CLI",
"description": "FullStack database toolkit with built-in access control and automatic API generation.",
"version": "3.7.2",
"version": "3.8.0",
"type": "module",
"author": {
"name": "ZenStack Team",
Expand Down Expand Up @@ -45,6 +45,7 @@
"@zenstackhq/orm": "workspace:*",
"@zenstackhq/schema": "workspace:*",
"@zenstackhq/sdk": "workspace:*",
"@zenstackhq/plugin-policy": "workspace:*",
"@zenstackhq/server": "workspace:*",
"chokidar": "^5.0.0",
"colors": "1.4.0",
Expand Down Expand Up @@ -98,4 +99,4 @@
"node": ">=20"
},
"funding": "https://github.com/sponsors/zenstackhq"
}
}
2 changes: 1 addition & 1 deletion packages/cli/src/actions/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function checkPluginResolution(schemaFile: string, model: Model) {
const provider = getPluginProvider(plugin);
if (!provider.startsWith('@core/')) {
const pluginSourcePath =
plugin.$cstNode?.parent?.element.$document?.uri?.fsPath ?? schemaFile;
plugin.$cstNode?.container?.astNode.$document?.uri?.fsPath ?? schemaFile;
await loadPluginModule(provider, path.dirname(pluginSourcePath));
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/actions/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ async function runPull(options: PullOptions) {
});
// Add/update models and their fields
newModel.declarations
.filter((d) => [DataModel, Enum].includes(d.$type))
.filter((d) => d.$type === DataModel.$type || d.$type === Enum.$type)
.forEach((_declaration) => {
const newDataModel = _declaration as DataModel | Enum;
const declarations = services.shared.workspace.IndexManager.allElements(newDataModel.$type, docsSet).toArray();
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/actions/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export async function run(options: Options) {
(
model.declarations.filter(
(v) =>
v.$cstNode?.parent?.element.$type === 'Model' &&
!!v.$cstNode.parent.element.$document?.uri?.fsPath,
v.$cstNode?.container?.astNode.$type === 'Model' &&
!!v.$cstNode.container.astNode.$document?.uri?.fsPath,
) as AbstractDeclaration[]
).map((v) => v.$cstNode!.parent!.element.$document!.uri!.fsPath),
).map((v) => v.$cstNode!.container!.astNode.$document!.uri!.fsPath),
);

const watchedPaths = getRootModelWatchPaths(model);
Expand Down Expand Up @@ -189,7 +189,7 @@ async function runPlugins(schemaFile: string, model: Model, outputPath: string,
// resolve relative plugin paths against the schema file where the plugin is declared,
// not the entry schema file
const pluginSourcePath =
plugin.$cstNode?.parent?.element.$document?.uri?.fsPath ?? schemaFile;
plugin.$cstNode?.container?.astNode.$document?.uri?.fsPath ?? schemaFile;
cliPlugin = await loadPluginModule(provider, path.dirname(pluginSourcePath));
}

Expand Down
Loading
Loading