@tomorrowos/sdk 0.9.23 → 0.9.24
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/README.md +1 -1
- package/VERCEL_SETUP.md +29 -10
- package/package.json +1 -1
- package/templates/cms-starter/package.json +2 -2
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ IF any step contradicts Vercel, adapt to settings that Vercel can accept.
|
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
That wizard asks: database (**Supabase** → **Neon** → SQLite demo), media (**Cloudinary** → **Vercel Blob** → local),
|
|
75
|
-
branding (manual fields or **
|
|
75
|
+
branding (manual fields or **website URL → `brand.json` only**, no login unless asked). Preview may use a thin **Next.js reverse proxy**;
|
|
76
76
|
**Publish stays pure Node** `TomorrowOS.listen` (not Next). Cloudinary credentials are collected one-at-a-time
|
|
77
77
|
(cloud name → API key → API secret). Sets `cms.hostingTarget` to `"vercel"`.
|
|
78
78
|
|
package/VERCEL_SETUP.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
>
|
|
6
6
|
> **On Vercel, this file is the setup questionnaire** (not `REPLIT_SETUP.md`, not `LLM_PROMPT.md`).
|
|
7
7
|
>
|
|
8
|
-
> Protocol id: `vercel-setup/1.
|
|
8
|
+
> Protocol id: `vercel-setup/1.3` — pairs with `@tomorrowos/sdk` packages that ship `templates/cms-starter` and this file.
|
|
9
9
|
|
|
10
10
|
## User trigger (copy-paste)
|
|
11
11
|
|
|
@@ -16,7 +16,7 @@ Follow @tomorrowos/sdk VERCEL_SETUP.md and set up my TomorrowOS CMS.
|
|
|
16
16
|
Ask only the questions listed in VERCEL_SETUP.md, in order. Do not use LLM_PROMPT.md or REPLIT_SETUP.md.
|
|
17
17
|
If any step contradicts Vercel, adapt to settings Vercel can accept (document the adaptation).
|
|
18
18
|
After all setup questions are answered (including Cloudinary or Vercel Blob Env Vars if you chose those), configure and deploy — minimal verification only (Control Panel at /). Prefer Supabase Session pooler URL or Neon pooled URL. Do not treat sandbox ENETUNREACH / IPv6 :5432 errors as a hard setup failure when a pooler URL is configured for production.
|
|
19
|
-
Question 3 only updates brand.json. Do not skip steps.
|
|
19
|
+
Question 3 only updates brand.json from colours/logo/name (a website URL is brand reference only — do not add CMS login/auth unless the user explicitly asks). Do not skip steps.
|
|
20
20
|
Use Next.js only as a v0/Preview shell with a reverse proxy; Production Publish must remain pure Node TomorrowOS.listen (not Next).
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -105,6 +105,7 @@ Then ask **Question 1**.
|
|
|
105
105
|
11. **Production:** export the HTTP server Vercel can capture: `const server = tomorrowos.listen(...); export default server;` (or equivalent). **Do not** make `next start` the Production entrypoint.
|
|
106
106
|
12. **Preview:** if the environment is v0 / Next-hardwired, install the Next reverse-proxy shell (see **Preview adapter**). Do not leave Preview broken.
|
|
107
107
|
13. After Q&A: **configure → install → run/deploy → minimal verify** (Control Panel at `/`). Do not run a long test suite.
|
|
108
|
+
14. **No inventing CMS login.** A branding URL never means “build auth.” Only add login if the user **explicitly** requests it.
|
|
108
109
|
|
|
109
110
|
**Question order:** Q1 → Q2 → Q3 → execution checklist.
|
|
110
111
|
|
|
@@ -458,6 +459,11 @@ import { put } from "@vercel/blob";
|
|
|
458
459
|
## Question 3 — Brand (`brand.json` only)
|
|
459
460
|
|
|
460
461
|
> Updates **only** `brand.json`. Does **not** change Vercel project settings, Env Vars, or `server.ts` store wiring beyond what Q1–Q2 already required.
|
|
462
|
+
>
|
|
463
|
+
> **IRON RULE — website URL ≠ build a website / login / auth CMS.**
|
|
464
|
+
> If the user pastes a URL (or says “make it look like this site”), that input is **reference material for `brand.json` only** (name, colours, fonts, logo, tagline).
|
|
465
|
+
> **Do not** scaffold a login page, signup, OAuth, gated dashboard, or copy the reference site’s IA/pages — **unless the user explicitly asks for CMS login / auth**.
|
|
466
|
+
> Default TomorrowOS Control Panel has **no login**. Keep it that way.
|
|
461
467
|
|
|
462
468
|
### Step A — Ask branding input
|
|
463
469
|
|
|
@@ -465,8 +471,9 @@ import { put } from "@vercel/blob";
|
|
|
465
471
|
|
|
466
472
|
> Let’s brand your TomorrowOS experience. You can answer in either way:
|
|
467
473
|
>
|
|
468
|
-
> **Option A — Website URL only**
|
|
469
|
-
> Paste **one public website URL
|
|
474
|
+
> **Option A — Website URL only (brand reference)**
|
|
475
|
+
> Paste **one public website URL**. I will use it **only** to infer colours, fonts, name, tagline, and logo for **`brand.json`**.
|
|
476
|
+
> I will **not** rebuild that website, add a login page, or change Control Panel features — unless you explicitly ask for login/auth later.
|
|
470
477
|
>
|
|
471
478
|
> **Option B — Manual fields**
|
|
472
479
|
> Provide:
|
|
@@ -483,7 +490,8 @@ import { put } from "@vercel/blob";
|
|
|
483
490
|
**You must:**
|
|
484
491
|
|
|
485
492
|
1. **Fetch and inspect** the page (HTTP GET the URL; follow one redirect if needed). Do not invent colours.
|
|
486
|
-
2. **
|
|
493
|
+
2. **Write / update `brand.json` only** from what you infer. Touch nothing else for this step (no new pages, no auth, no Next marketing site, no login UI).
|
|
494
|
+
3. **Derive branding** using this priority order:
|
|
487
495
|
- **Name:** `<title>`, `og:site_name`, or prominent header / logo `alt` text (trim to ≤ 60 chars).
|
|
488
496
|
- **Tagline:** `meta[name="description"]`, `og:description`, or first hero subtitle (≤ 120 chars).
|
|
489
497
|
- **Primary colour:** `meta[name="theme-color"]`, CSS `--primary` / `--brand` variables, or dominant accent from linked stylesheets / inline styles (convert to `#RRGGBB`).
|
|
@@ -492,10 +500,20 @@ import { put } from "@vercel/blob";
|
|
|
492
500
|
- **Secondary colour:** muted border / secondary button colour, or a tint of the primary.
|
|
493
501
|
- **Font:** first `font-family` on `body` (strip quotes; default `Inter` if generic system stack).
|
|
494
502
|
- **Logo:** prefer `og:image`, then `link[rel="icon"]` / apple-touch-icon, then header `<img>` logo. Download into `./assets/logo.png` or `./assets/logo.svg` and set `logoPath` accordingly. If only favicon exists, use it and note size in the summary.
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
503
|
+
4. **Contrast check:** if background is dark, set `activationScreen.theme` to `"dark"` and add `logoPathOnDark` when a light logo variant exists.
|
|
504
|
+
5. **Infer `cms.useCase`** from page content when obvious (restaurant / retail / corporate / etc.); otherwise `"other"`.
|
|
505
|
+
6. **Show a one-line summary** to the user (name + primary hex + logo path) before or while writing the file — do not ask a second branding question unless fetch failed.
|
|
506
|
+
7. If the URL is unreachable, blocked, or has no usable styles, say so and fall back to **Option B** manual questions for missing fields only.
|
|
507
|
+
|
|
508
|
+
**Explicitly forbidden when the user only gave a URL (no login request):**
|
|
509
|
+
|
|
510
|
+
- ❌ Login / signup / “Sign in to continue” screens
|
|
511
|
+
- ❌ Auth middleware, sessions, cookies, OAuth, password forms
|
|
512
|
+
- ❌ Cloning the reference site as a marketing landing or multi-page CMS
|
|
513
|
+
- ❌ Gating the Control Panel behind authentication
|
|
514
|
+
- ❌ Treating “make it like this site” as “rebuild this site”
|
|
515
|
+
|
|
516
|
+
If the reference site itself is a login page, **still only extract visual brand tokens** (colours/logo/name) into `brand.json` — do **not** recreate that login flow.
|
|
499
517
|
|
|
500
518
|
### Step C — Write `brand.json`
|
|
501
519
|
|
|
@@ -631,6 +649,7 @@ Tell the user:
|
|
|
631
649
|
| Secrets in git | Mistake | Rotate keys; move to Vercel Env Vars |
|
|
632
650
|
| Replit files present | Copied wrong protocol | Delete `.replit*`; use this file |
|
|
633
651
|
| Brand colours wrong from URL | SPA / blocked fetch | Manual Option B for colours + logo |
|
|
652
|
+
| Agent built a login page after user pasted a URL | Misread brand reference as product scope | Remove login; keep starter Control Panel; apply URL only to `brand.json` |
|
|
634
653
|
|
|
635
654
|
---
|
|
636
655
|
|
|
@@ -645,7 +664,7 @@ Tell the user:
|
|
|
645
664
|
| Media | Cloudinary or Replit Object Storage | Cloudinary **or Vercel Blob** |
|
|
646
665
|
| Preview | Replit Preview / Autoscale Node | **Next shell + proxy** when v0 hardwires Next |
|
|
647
666
|
| Publish | Long-lived Node | **Node `TomorrowOS.listen` only** (not Next) |
|
|
648
|
-
| Brand from URL | Not in Replit protocol | **Option A**
|
|
667
|
+
| Brand from URL | Not in Replit protocol | **Option A** — infer **`brand.json` only**; never invent login |
|
|
649
668
|
|
|
650
669
|
---
|
|
651
670
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomorrowos/sdk",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"description": "TomorrowOS CMS server SDK - WebSocket transport, pairing, device commands, optional static CMS UI. Includes CLI (tomorrowos init / build) and starter templates.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-cms",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"description": "CMS server on @tomorrowos/sdk. Add your UI (React, static files, etc.) alongside this server.",
|
|
5
5
|
"private": true,
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build-player": "tomorrowos build --platform tizen"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@tomorrowos/sdk": "^0.9.
|
|
16
|
+
"@tomorrowos/sdk": "^0.9.24",
|
|
17
17
|
"dotenv": "^17.2.3",
|
|
18
18
|
"tsx": "^4.19.0"
|
|
19
19
|
},
|