create-wervt 0.1.0 → 0.2.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": "create-wervt",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Create a new wervt app: Nuxt 5, Postgres with Drizzle, live data with Electric.",
5
5
  "homepage": "https://wervt.app",
6
6
  "license": "MIT",
@@ -110,6 +110,22 @@ const { data: todos, isLive } = await useShape<Todo>('/api/shapes/todos')
110
110
  requests.
111
111
  - No secrets in client code. Server env vars come from wervt; don't hardcode credentials.
112
112
 
113
+ ## Logs
114
+
115
+ Every request logs one wide event (evlog). Add context to it rather than logging separate lines:
116
+ `useLogger(event).set({ user: { id }, room: { id } })` (auto-imported). Use `log.info(tag, msg)`
117
+ outside requests. Never log secrets or request bodies.
118
+
119
+ Production logs, to debug a bug report (`WERVT_TOKEN` can be the read token):
120
+
121
+ ```bash
122
+ pnpm exec wervt logs <app> 'level:error' --since 1d --json
123
+ pnpm exec wervt logs <app> 'status:>=500 path:/api/*' --json
124
+ pnpm exec wervt logs <app> 'type:=BootFailure' # a release that didn't start
125
+ ```
126
+
127
+ Queries are LogsQL. Logs may contain user data: quote only what's needed.
128
+
113
129
  ## Commands
114
130
 
115
131
  - `pnpm dev`: dev server against the local wervt stack (`docker compose up -d` in the wervt repo).
@@ -9,7 +9,7 @@
9
9
  "postinstall": "nuxt prepare"
10
10
  },
11
11
  "dependencies": {
12
- "@wervt/nuxt": "^0.1.0",
12
+ "@wervt/nuxt": "^0.2.0",
13
13
  "drizzle-orm": "1.0.0-rc.4",
14
14
  "nuxt": "npm:nuxt-nightly@5x",
15
15
  "valibot": "^1.5.0"