@vibes.diy/api-queue 2.4.12 → 2.4.14

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 (2) hide show
  1. package/README.md +12 -12
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -78,7 +78,7 @@ interface MsgBase {
78
78
  The server uses Evento (from `@adviser/cement`) for request routing. Handlers are registered in order:
79
79
 
80
80
  1. **CORS preflight** - Handles OPTIONS requests
81
- 2. **servEntryPoint** - Serves deployed app HTML (hostname routing: `{appSlug}--{userSlug}.{host}/~{fsId}~/`)
81
+ 2. **servEntryPoint** - Serves deployed app HTML (hostname routing: `{appSlug}--{userHandle}.{host}/~{fsId}~/`)
82
82
  3. **Request logging** - Logs incoming POST/PUT requests, rejects other methods with 503
83
83
  4. **ensureAppSlugItem** - App deployment handler
84
84
  5. **ensureChatContext** - Chat session handler
@@ -237,26 +237,26 @@ Defined in `svc/sql/vibes-diy-api-schema.ts` using Drizzle ORM.
237
237
  | Column | Type | Description |
238
238
  |--------|------|-------------|
239
239
  | `userId` | text | User identifier |
240
- | `userSlug` | text | Human-friendly user slug (unique) |
240
+ | `userHandle` | text | Human-friendly user slug (unique) |
241
241
  | `created` | text | ISO timestamp |
242
242
 
243
- Primary key: `(userSlug, userId)`. Unique index on `userSlug`.
243
+ Primary key: `(userHandle, userId)`. Unique index on `userHandle`.
244
244
 
245
245
  **AppSlugBindings** - Maps apps to slugs within a user's namespace
246
246
  | Column | Type | Description |
247
247
  |--------|------|-------------|
248
- | `userSlug` | text FK | References UserSlugBindings.userSlug |
248
+ | `userHandle` | text FK | References UserSlugBindings.userHandle |
249
249
  | `appSlug` | text | Human-friendly app slug |
250
250
  | `created` | text | ISO timestamp |
251
251
 
252
- Primary key: `(appSlug, userSlug)`.
252
+ Primary key: `(appSlug, userHandle)`.
253
253
 
254
254
  **Apps** - Deployed app versions with filesystem and environment
255
255
  | Column | Type | Description |
256
256
  |--------|------|-------------|
257
257
  | `appSlug` | text | App identifier |
258
258
  | `userId` | text | Owner |
259
- | `userSlug` | text | Owner's slug |
259
+ | `userHandle` | text | Owner's slug |
260
260
  | `releaseSeq` | int | Incremented on each deployment |
261
261
  | `fsId` | text | CID of filesystem manifest |
262
262
  | `env` | json | Environment variables (VibesEnv) |
@@ -393,7 +393,7 @@ The client uses `KeyedResolvOnce` for connection pooling - multiple `VibeDiyApi`
393
393
  const res = await api.ensureAppSlug({
394
394
  mode: "dev", // 'dev' or 'production'
395
395
  appSlug: "my-app", // optional, server generates 3-word slug
396
- userSlug: "my-user", // optional, server generates 3-word slug
396
+ userHandle: "my-user", // optional, server generates 3-word slug
397
397
  env: { API_KEY: "..." }, // optional, passed to app runtime
398
398
  fileSystem: [
399
399
  {
@@ -407,8 +407,8 @@ const res = await api.ensureAppSlug({
407
407
  });
408
408
 
409
409
  if (res.isOk()) {
410
- const { entryPointUrl, fsId, userSlug, appSlug, fileSystem } = res.Ok();
411
- // entryPointUrl -> https://{appSlug}--{userSlug}.{hostnameBase}/~{fsId}~/
410
+ const { entryPointUrl, fsId, userHandle, appSlug, fileSystem } = res.Ok();
411
+ // entryPointUrl -> https://{appSlug}--{userHandle}.{hostnameBase}/~{fsId}~/
412
412
  // e.g. https://my-app--my-user.vibes.app/~zABC123~/
413
413
  // fsId -> CID of filesystem manifest
414
414
  // fileSystem -> Array<FileSystemItem> with assetIds and transforms
@@ -486,7 +486,7 @@ pnpm test
486
486
  Deployed apps are served via hostname-based routing:
487
487
 
488
488
  ```
489
- https://{appSlug}--{userSlug}.{hostnameBase}/~{fsId}~/
489
+ https://{appSlug}--{userHandle}.{hostnameBase}/~{fsId}~/
490
490
  └────────────────────┘ └──────────┘ └──────┘
491
491
  hostname base domain version path
492
492
  ```
@@ -495,13 +495,13 @@ Example: `https://my-app--fuzzy-purple-elephant.vibes.app/~z4PhNX7vuL~/`
495
495
 
496
496
  The `extractHostToBindings()` function parses:
497
497
 
498
- - Hostname pattern: `{appSlug}--{userSlug}.{rest}`
498
+ - Hostname pattern: `{appSlug}--{userHandle}.{rest}`
499
499
  - Path pattern: `/~{fsId}~/` (fsId starts with `z`, 8+ chars)
500
500
  - If no fsId in path, serves latest production release
501
501
 
502
502
  ### Slug Generation
503
503
 
504
- When `appSlug` or `userSlug` are not provided, the server generates 3-word slugs using the `random-words` package:
504
+ When `appSlug` or `userHandle` are not provided, the server generates 3-word slugs using the `random-words` package:
505
505
 
506
506
  ```typescript
507
507
  generate({ exactly: 1, wordsPerString: 3, separator: "-" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/api-queue",
3
- "version": "2.4.12",
3
+ "version": "2.4.14",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "scripts": {
@@ -15,10 +15,10 @@
15
15
  "@cloudflare/puppeteer": "~1.1.0",
16
16
  "@fireproof/core-runtime": "~0.24.19",
17
17
  "@fireproof/core-types-base": "~0.24.19",
18
- "@vibes.diy/api-pkg": "2.4.12",
19
- "@vibes.diy/api-sql": "2.4.12",
20
- "@vibes.diy/api-svc": "2.4.12",
21
- "@vibes.diy/api-types": "2.4.12",
18
+ "@vibes.diy/api-pkg": "2.4.14",
19
+ "@vibes.diy/api-sql": "2.4.14",
20
+ "@vibes.diy/api-svc": "2.4.14",
21
+ "@vibes.diy/api-types": "2.4.14",
22
22
  "arktype": "~2.2.0",
23
23
  "drizzle-orm": "~0.45.2"
24
24
  },