@rebasepro/cli 0.29.0-canary.g0e3a0e7 → 0.29.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebasepro/cli",
3
- "version": "0.29.0-canary.g0e3a0e7",
3
+ "version": "0.29.0",
4
4
  "description": "Developer tools for Rebase projects",
5
5
  "keywords": [
6
6
  "cli",
@@ -44,13 +44,13 @@
44
44
  "inquirer": "14.0.2",
45
45
  "jiti": "^2.7.0",
46
46
  "pg": "^8.22.0",
47
- "@rebasepro/agent-skills": "0.29.0-canary.g0e3a0e7",
48
- "@rebasepro/client": "0.29.0-canary.g0e3a0e7",
49
- "@rebasepro/rls-check": "0.29.0-canary.g0e3a0e7",
50
- "@rebasepro/server": "0.29.0-canary.g0e3a0e7",
51
- "@rebasepro/types": "0.29.0-canary.g0e3a0e7",
52
- "@rebasepro/server-postgres": "0.29.0-canary.g0e3a0e7",
53
- "@rebasepro/codegen": "0.29.0-canary.g0e3a0e7"
47
+ "@rebasepro/agent-skills": "0.29.0",
48
+ "@rebasepro/client": "0.29.0",
49
+ "@rebasepro/rls-check": "0.29.0",
50
+ "@rebasepro/server": "0.29.0",
51
+ "@rebasepro/codegen": "0.29.0",
52
+ "@rebasepro/types": "0.29.0",
53
+ "@rebasepro/server-postgres": "0.29.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/node": "^26.1.2",
@@ -26,7 +26,7 @@ This is a **headless** Rebase project: a REST API, auth, storage and realtime ov
26
26
  - **Never edit `.env`.** It holds generated secrets and the connection string. Add a variable by asking, and document it in `.env.example`.
27
27
  - **Never edit `rebase.resources.json`.** It is generated from `config/resources.ts` — declare there, then `rebase resources --write`.
28
28
  - **Never pass `--allow-destructive`** to anything pointed at a database that is not the local development one. It drops columns and tables.
29
- - **Never read or write application rows with raw SQL or Drizzle from code.** The schema is SQL here; the data is not. That path skips validation, hooks and row-level security.
29
+ - **Never read or write application rows with raw SQL or Drizzle from code.** The schema is SQL here; the data is not. That path skips validation, hooks and row-level security. Analytics have an SDK form — `aggregate()` with `countDistinct`, `mode`, `percentile`, `distinct`, groups by `lower(…)`, `day(…)` or `unnest(tags)`, and `fingerprint()` to know whether a table changed — and bulk writes are `createMany` / `updateMany`, one statement per batch.
30
30
 
31
31
  ## Core rules
32
32
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  ## Never
24
24
 
25
- - **Never create or change a table in code, and never write raw SQL or Drizzle queries against application tables** — `rebase.sql()` included, except to read a column marked `excludeFromApi`, which the API never returns. A table is a collection (core rule 1), and one that already exists gets its collection from `pnpm schema:introspect`. Raw SQL skips validation, hooks and row-level security, and `rebase.sql()` logs a warning naming the fix when it is used to create, alter, drop or index a table.
25
+ - **Never create or change a table in code, and never write raw SQL or Drizzle queries against application tables** — `rebase.sql()` included, except to read a column marked `excludeFromApi`, which the API never returns. A table is a collection (core rule 1), and one that already exists gets its collection from `pnpm schema:introspect`. Raw SQL skips validation, hooks and row-level security, and `rebase.sql()` logs a warning naming the fix when it is used to create, alter, drop or index a table. What used to send apps to SQL has an SDK form: `aggregate()` with `countDistinct`, `mode`, `percentile`, `distinct` and groups by `lower(…)`, `day(…)` or `unnest(tags)`; `fingerprint()` instead of hashing a table; `updateMany` with a value per row and `createMany` (one statement for the batch); `array-contains-all` / `array-contained-by` filters; and for a query the SDK cannot express, a collection with `view: { query }` (read-only, created by `db push`).
26
26
  - **Never deploy.** `pnpm deploy`, `rebase cloud deploy`, `firebase deploy`, `gcloud run deploy` — print the command and let the human run it, even when the task list ends in "deploy" and the tests are green.
27
27
  - **Never edit `.env`.** It holds generated secrets and the connection string. Add a variable by asking, and document it in `.env.example`.
28
28
  - **Never edit `backend/src/schema.generated.ts`.** It is overwritten by `pnpm schema:generate`; the collection file is the source.
@@ -3,7 +3,7 @@ import { defineConfig } from "vite";
3
3
  import react from "@vitejs/plugin-react";
4
4
  import svgr from "vite-plugin-svgr";
5
5
  import tailwindcss from "@tailwindcss/vite";
6
- import { rebaseCollectionsPlugin, rebaseManualChunks } from "@rebasepro/app/vitePlugin";
6
+ import { rebaseCollectionsPlugin, rebaseManualChunks, rebaseMcpViewPlugin } from "@rebasepro/app/vitePlugin";
7
7
 
8
8
  export default defineConfig({
9
9
  // `import.meta.dirname`, not `__dirname`: vite 8 warns that the latter is
@@ -60,6 +60,9 @@ export default defineConfig({
60
60
  svgr(),
61
61
  react({}),
62
62
  tailwindcss(),
63
- rebaseCollectionsPlugin({ collectionsDir: "../config/collections" })
63
+ rebaseCollectionsPlugin({ collectionsDir: "../config/collections" }),
64
+ // The view Claude shows this project's data in over MCP, built from
65
+ // this app so it draws your own fields, views and actions.
66
+ rebaseMcpViewPlugin()
64
67
  ]
65
68
  });