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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
6 changes: 6 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@

- [Commands](cli-commands.md)

- Runtime API

- [`@zenstackhq/runtime/types`](runtime-types.md)
- [`@zenstackhq/runtime/client`](runtime-client.md)
- [`@zenstackhq/runtime/server`](runtime-server.md)

- Guide

- [Choosing a database](choosing-a-database.md)
Expand Down
22 changes: 11 additions & 11 deletions docs/cli-commands.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## CLI commands
# CLI commands

### `init`
## `init`

Set up ZenStack for an existing Next.js + Typescript project.

```bash
npx zenstack init [dir]
```

### `generate`
## `generate`

Generates RESTful CRUD API and React hooks from your model.

Expand All @@ -22,13 +22,13 @@ _Options_:
--schema <file> schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel")
```

### `migrate`
## `migrate`

Update the database schema with migrations.

**Sub-commands**:

#### `migrate dev`
### `migrate dev`

Create a migration from changes in Prisma schema, apply it to the database, trigger generation of database client. This command wraps `prisma migrate` command.

Expand All @@ -42,7 +42,7 @@ _Options_:
--schema <file> schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel")
```

#### `migrate reset`
### `migrate reset`

Reset your database and apply all migrations.

Expand All @@ -56,7 +56,7 @@ _Options_:
--schema <file> schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel")
```

#### `migrate deploy`
### `migrate deploy`

Apply pending migrations to the database in production/staging.

Expand All @@ -70,7 +70,7 @@ _Options_:
--schema <file> schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel")
```

#### `migrate status`
### `migrate status`

Check the status of migrations in the production/staging database.

Expand All @@ -84,13 +84,13 @@ _Options_:
--schema <file> schema file (with extension .zmodel) (default: "./zenstack/schema.zmodel")
```

### `db`
## `db`

Manage your database schema and lifecycle during development. This command wraps `prisma db` command.

**Sub-commands**:

#### `db push`
### `db push`

Push the state from model to the database during prototyping.

Expand All @@ -105,7 +105,7 @@ _Options_:
--accept-data-loss Ignore data loss warnings
```

### `studio`
## `studio`

Browse your data with Prisma Studio. This command wraps `prisma studio` command.

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/next-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Checkout [the starter's documentation](https://github.com/zenstackhq/nextjs-auth
```bash
npm i -D zenstack

npm i @zenstackhq/runtime @zenstackhq/internal
npm i @zenstackhq/runtime
```

2. Install [VSCode extension](https://marketplace.visualstudio.com/items?itemName=zenstack.zenstack) for authoring the model file
Expand Down
3 changes: 3 additions & 0 deletions docs/runtime-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @zenstackhq/runtime/client

TBD
3 changes: 3 additions & 0 deletions docs/runtime-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @zenstackhq/runtime/server

TBD
3 changes: 3 additions & 0 deletions docs/runtime-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @zenstackhq/runtime/types

TBD
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"name": "zenstack-monorepo",
"version": "0.3.10",
"version": "0.3.11",
"description": "",
"scripts": {
"build": "pnpm -r build",
"test": "pnpm -r run test --silent",
"lint": "pnpm -r lint",
"publish-all": "pnpm --filter \"./packages/**\" -r publish"
"publish-all": "pnpm --filter \"./packages/**\" -r publish",
"publish-dev": "pnpm --filter \"./packages/**\" -r publish --tag dev"
},
"keywords": [],
"author": "",
"license": "MIT"
"license": "MIT",
"devDependencies": {
"@changesets/cli": "^2.25.2"
}
}
2 changes: 0 additions & 2 deletions packages/internal/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions packages/internal/LICENSE.md

This file was deleted.

5 changes: 0 additions & 5 deletions packages/internal/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions packages/internal/jest.config.ts

This file was deleted.

58 changes: 0 additions & 58 deletions packages/internal/package.json

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion packages/runtime/client.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/runtime/client.js

This file was deleted.

10 changes: 0 additions & 10 deletions packages/runtime/hooks.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/runtime/hooks.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/runtime/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/runtime/index.js

This file was deleted.

Loading