@gzl10/nexus-backend 0.21.0 → 1.0.0-alpha.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/claude-commands/nexus-new-action.md +2 -2
- package/claude-commands/nexus-test.md +17 -4
- package/dist/cli.js +14240 -7778
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +963 -1239
- package/dist/index.js +17528 -15797
- package/dist/index.js.map +1 -1
- package/dist/instrumentation.d.ts +7 -4
- package/dist/instrumentation.js +0 -9
- package/dist/instrumentation.js.map +1 -1
- package/dist/main.js +16757 -14648
- package/dist/main.js.map +1 -1
- package/dist/migration-helpers/index.js +434 -12724
- package/dist/migration-helpers/index.js.map +1 -1
- package/dist/testing/index.js +19 -9
- package/dist/testing/index.js.map +1 -1
- package/llms.txt +190 -0
- package/migrations/core__1775618072245_drop-schedules-tags.js +22 -0
- package/migrations/core__1775619133207_split-target-config.js +73 -0
- package/migrations/core__1775861704914_auto.js +36 -0
- package/migrations/core__1776150736671_auto.js +27 -0
- package/package.json +12 -22
|
@@ -91,10 +91,10 @@ npx tsc --noEmit
|
|
|
91
91
|
|
|
92
92
|
## Gotchas
|
|
93
93
|
|
|
94
|
-
- Handler signature: `handler: async (ctx, input,
|
|
94
|
+
- Handler signature: `handler: async (ctx, input, c?) => {}` — direct function, NOT factory pattern. `c` is the Hono `Context`.
|
|
95
95
|
- Hooks use factory pattern `(ctx) => ({...})`, but action handlers do NOT
|
|
96
96
|
- `key` is the route identifier (NOT `name`)
|
|
97
|
-
- `scope: 'row'` actions receive `req.
|
|
97
|
+
- `scope: 'row'` actions receive the entity id via `c.req.param('id')` if `c` is needed
|
|
98
98
|
- `input` defines the form shown before execution (Record<string, FieldDefinition>)
|
|
99
99
|
- `output: {}` shows raw JSON result, `output` with fields shows structured modal
|
|
100
100
|
- `batch: true` + `timeout: number` for batch processing with SSE progress
|
|
@@ -76,11 +76,13 @@ Check if the backend is reachable:
|
|
|
76
76
|
$CLI client health
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
If it fails (connection refused), start the backend in background:
|
|
79
|
+
If it fails (connection refused), start the backend in background **forcing JSON logs** so you can parse them reliably (sin códigos ANSI ni multilínea de pino-pretty):
|
|
80
80
|
|
|
81
|
-
- **Monorepo core:** `cd packages/backend && pnpm dev &`
|
|
82
|
-
- **Monorepo demo:** `cd demos/demo-backend && pnpm dev &`
|
|
83
|
-
- **Project:** `pnpm dev &` (from project root)
|
|
81
|
+
- **Monorepo core:** `cd packages/backend && LOG_FORMAT=json pnpm dev &`
|
|
82
|
+
- **Monorepo demo:** `cd demos/demo-backend && LOG_FORMAT=json pnpm dev &`
|
|
83
|
+
- **Project:** `LOG_FORMAT=json pnpm dev &` (from project root)
|
|
84
|
+
|
|
85
|
+
`LOG_FORMAT=json` produce una línea JSON por evento — útil para grep/jq y para que la IA filtre logs sin parsear ANSI. Si el `.env` ya define `LOG_FORMAT`, el override del entorno tiene prioridad solo si no se exporta antes.
|
|
84
86
|
|
|
85
87
|
Wait until `$CLI client health` succeeds (poll every 2s, max 30s).
|
|
86
88
|
|
|
@@ -131,15 +133,26 @@ Available commands:
|
|
|
131
133
|
- `$CLI client fetch POST /mail/send '{"to":"x"}'` — example write
|
|
132
134
|
- `$CLI client fetch GET /some/endpoint --pat <token>` — bypass session, use PAT directly
|
|
133
135
|
|
|
136
|
+
**Storage:**
|
|
137
|
+
|
|
138
|
+
- `$CLI client storage upload <file...> [--folder X] [--scope X] [--visibility public|internal|private]` — upload one or more files
|
|
139
|
+
- `$CLI client storage download <id> [--output path]` — download file to disk (default: original filename in CWD)
|
|
140
|
+
- `$CLI client storage list [--mimetype X] [--folder X] [--scope X] [--limit N]` — list storage files
|
|
141
|
+
- `$CLI client storage delete <id>` — delete file by ID
|
|
142
|
+
- `$CLI client storage stats` — storage statistics (total files, size, by type)
|
|
143
|
+
|
|
134
144
|
**Other:**
|
|
135
145
|
|
|
136
146
|
- `$CLI client health` — health check
|
|
137
147
|
- `$CLI client login [email] [password]` — authenticate (creates PAT)
|
|
138
148
|
- `$CLI client me` — current user info
|
|
149
|
+
- `$CLI logs [--lines N] [--file path]` — tail backend log file in real time (requires LOG_FILE in .env)
|
|
150
|
+
- `$CLI migrate list` — show migration status (alias for `migrate status`)
|
|
139
151
|
|
|
140
152
|
**Command selection guide:**
|
|
141
153
|
- **entity** — CRUD on entities (list, get, create, update, delete)
|
|
142
154
|
- **action** — declared actions in modules/plugins (have a key, may need body or row id)
|
|
155
|
+
- **storage** — file upload/download/list/delete/stats
|
|
143
156
|
- **fetch** — anything else (custom routes, plugin endpoints, non-standard paths)
|
|
144
157
|
|
|
145
158
|
Use `--debug` flag on any command for verbose HTTP logging.
|