create-wervt 0.2.18 → 0.2.19

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.2.18",
3
+ "version": "0.2.19",
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",
@@ -118,6 +118,9 @@ const rows = await useDb().select().from(todos).where(eq(todos.done, false))
118
118
  - For relational queries (`db.query.rooms.findFirst({ with: … })`), define relations with
119
119
  `defineRelations` in `server/db/relations.ts` and use `useDb({ relations })`.
120
120
  - No raw SQL against other schemas, `public`, or system catalogs: the role can't access them.
121
+ - `vector` (pgvector: `vector({ dimensions })` columns, `cosineDistance`), `pg_trgm`, `unaccent`
122
+ and `citext` are installed for every app. Use their types and functions unqualified; never write
123
+ `CREATE EXTENSION` into a migration.
121
124
 
122
125
  ### Seeding
123
126
 
@@ -186,6 +189,9 @@ version polling. For a banner in the app's own design, set `wervt: { updates: 'm
186
189
  auto-imported) give the signed-in wervt user or nothing. Private apps always have one; public
187
190
  apps only when the visitor signed in. It works with `ssr: false` too (no own `/api/me` needed). Link to `wervtLoginUrl(path)` / `wervtLogoutUrl(path)` as
188
191
  external links. Never build your own login or OAuth.
192
+ - Name, picture and email change on wervt's account page: link to `wervtAccountUrl(path)`
193
+ (external), which shows it in the app's look and comes back. Don't build forms that change
194
+ them; keep app-only profile data (bio, display name) in the app's tables under `user.id`.
189
195
  - Users are one row per wervt account: key them by `user.id`, not by email (addresses change).
190
196
  When an admin merges two accounts of the same person, wervt runs the task
191
197
  `wervt:account-merged` (`server/tasks/wervt/account-merged.ts`) with
@@ -220,6 +226,11 @@ own bucket and `@wervt/nuxt` connects it; don't configure a provider or S3 crede
220
226
  three routes plus `useDirectUpload()` on the page, so browsers upload straight to the bucket;
221
227
  serve them with `signedUrl(file)`, a presigned link to the bucket.
222
228
  - No tus uploads and no `transform` / sharp: they need a disk and native modules.
229
+ - Images: never resize in the app. `imageUrl(file, { width: 800 })` from `@wervt/nuxt/server`
230
+ returns a URL on the app's own host where wervt serves that size (`fit: 'fill'`, `gravity`,
231
+ `crop`, `rotate`, `format`, `quality`, `keepMetadata`, `download`, `expiresIn`); HEIC works as a
232
+ source. Build the URLs in a route after checking access: whoever has one can load that image.
233
+ `fetchImage(file, options)` loads such a version on the server (pixels, a converted copy).
223
234
  - Check access in the route before serving a file.
224
235
 
225
236
  ## Real-world things
@@ -10,7 +10,7 @@
10
10
  "postinstall": "nuxt prepare"
11
11
  },
12
12
  "dependencies": {
13
- "@wervt/nuxt": "^0.3.11",
13
+ "@wervt/nuxt": "^0.3.20",
14
14
  "drizzle-orm": "1.0.0-rc.5",
15
15
  "nuxt": "npm:nuxt-nightly@5x",
16
16
  "valibot": "^1.5.0",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@golar/vue": "^0.1.11",
21
- "@wervt/cli": "^0.2.19",
21
+ "@wervt/cli": "^0.2.27",
22
22
  "drizzle-kit": "1.0.0-rc.5",
23
23
  "golar": "^0.1.11",
24
24
  "vite-plus": "^1.3.0"
@@ -6,3 +6,7 @@ allowBuilds:
6
6
  minimumReleaseAgeExclude:
7
7
  # wervt's own packages, so a new app gets the release that was just published.
8
8
  - '@wervt/*'
9
+ overrides:
10
+ # A module names `nuxt` as its peer. A package manager that does not take the aliased nightly
11
+ # for it installs stable Nuxt next to it, and its devtools with it.
12
+ nuxt: npm:nuxt-nightly@5x