@columnus/api-cli 0.1.0 → 0.1.48

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.
Files changed (3) hide show
  1. package/dist/cli.js +1798 -1606
  2. package/package.json +3 -13
  3. package/README.md +0 -71
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columnus/api-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.48",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "columnus-api pull and dev — live-sync read API codegen for Columnus consumer apps",
@@ -20,23 +20,13 @@
20
20
  "files": [
21
21
  "dist"
22
22
  ],
23
- "publishConfig": {
24
- "access": "public"
25
- },
26
23
  "dependencies": {
27
24
  "ws": "^8.18.3"
28
25
  },
29
26
  "peerDependencies": {
30
27
  "convex": "^1.42.1"
31
28
  },
32
- "devDependencies": {
33
- "@types/node": "^22.19.19",
34
- "@types/ws": "^8.18.1",
35
- "esbuild": "^0.28.0",
36
- "tsx": "^4.23.0",
37
- "typescript": "^6.0.3",
38
- "vitest": "^4.1.10",
39
- "@columnus/api-codegen": "0.0.0",
40
- "@columnus/shared": "0.0.0"
29
+ "publishConfig": {
30
+ "access": "public"
41
31
  }
42
32
  }
package/README.md DELETED
@@ -1,71 +0,0 @@
1
- # `@columnus/api-cli`
2
-
3
- `columnus-api pull` and `columnus-api dev` — live-sync Read API codegen for Columnus consumer apps.
4
-
5
- Install alongside your Vite (or other) app, point at a Columnus deployment + API token, and generate typed Convex client hooks when Studio schema changes.
6
-
7
- ## Install
8
-
9
- ```bash
10
- pnpm add -D @columnus/api-cli
11
- # or: npm i -D @columnus/api-cli
12
- ```
13
-
14
- Peer dependency: [`convex`](https://www.npmjs.com/package/convex) (already required for `npx convex codegen`).
15
-
16
- ## Setup
17
-
18
- In the consumer app `.env.local`:
19
-
20
- | Variable | Purpose |
21
- | --- | --- |
22
- | `VITE_CONVEX_URL` or `CONVEX_URL` | Columnus / Convex deployment URL |
23
- | `VITE_COLUMNUS_API_TOKEN` or `COLUMNUS_API_TOKEN` | `col_…` token from Studio **API** profiles |
24
-
25
- Create a profile and token under **`/api`** in Studio, then **Save & deploy** so generated read queries exist.
26
-
27
- ## Commands
28
-
29
- ### `columnus-api pull`
30
-
31
- One-shot introspect + write generated files (`convex/schema.ts`, `src/generated/*`), then run `convex codegen` (unless `--skip-codegen`).
32
-
33
- ```bash
34
- columnus-api pull
35
- # optional: --token col_… --url https://….convex.cloud --target .
36
- ```
37
-
38
- ### `columnus-api dev`
39
-
40
- Subscribe to `api.columnus.read.introspect`. When Save & deploy finishes (`deployStatus` is `deployed` or `idle`) and `manifestHash` changes, re-runs pull automatically. Does not start Vite — run them in parallel.
41
-
42
- ```json
43
- {
44
- "scripts": {
45
- "dev:columnus": "columnus-api dev",
46
- "dev": "npm-run-all --parallel dev:columnus dev:vite",
47
- "pull": "columnus-api pull"
48
- }
49
- }
50
- ```
51
-
52
- While deploy is in progress or failed, the watcher waits and keeps your last good pull.
53
-
54
- ## Flags
55
-
56
- | Flag | Description |
57
- | --- | --- |
58
- | `--token` | `col_…` secret (or env) |
59
- | `--target` | Consumer app root (default: `.`) |
60
- | `--url` | Deployment URL (defaults to `VITE_CONVEX_URL` / `CONVEX_URL`) |
61
- | `--skip-codegen` | `pull` only — skip `convex codegen` |
62
- | `--require-codegen` | `pull` fails when codegen fails |
63
-
64
- ## Docs
65
-
66
- - [Read API guide](https://github.com/movement-overdrive/convex-studio/blob/main/content/docs/guide/api-read.md) (in-app Docs → Guide)
67
- - Example app: [`examples/api-read-site`](https://github.com/movement-overdrive/convex-studio/tree/main/examples/api-read-site)
68
-
69
- ## License
70
-
71
- MIT