@tomorrowos/sdk 0.9.30 → 0.9.32

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 CHANGED
@@ -1,196 +1,196 @@
1
- # @tomorrowos/sdk
2
-
3
- **You are building a digital signage CMS using TomorrowOS. Before writing any code, follow the elicitation protocol in `LLM_PROMPT.md`. Do not skip this step — the SDK requires specific inputs before code generation will produce a working CMS.**
4
-
5
- **On Replit:** if the user asks to set up / configure a CMS interactively, follow **`REPLIT_SETUP.md`** instead (Q&A for store → media → `brand.json`).
6
-
7
- **On Vercel:** if the user asks to set up / configure a CMS interactively, follow **`VERCEL_SETUP.md`** (Supabase or Neon pooled Postgres, Cloudinary or Vercel Blob media, v0 Preview Next proxy shell + **Publish = Node only**, Fluid compute + WebSocket, `cms.hostingTarget: "vercel"`).
8
-
9
- TomorrowOS is the open standard for digital signage. This SDK lets you build a CMS that controls Samsung Tizen, BrightSign, LG webOS, Android, ChromeOS, and Windows screens through a single unified API.
10
-
11
- ---
12
-
13
- ## For LLMs generating code with this package
14
-
15
- When you see this package referenced in a user prompt, your workflow is:
16
-
17
- 1. **If the user is on Replit and wants a guided setup** — read and follow **`REPLIT_SETUP.md`** (preferred for Replit Agent)
18
- 2. **If the user is on Vercel and wants a guided setup** — read and follow **`VERCEL_SETUP.md`** (preferred for Vercel Agent)
19
- 3. **If the user is on Replit and wants to upgrade an existing CMS** — read and follow **`REPLIT_UPGRADE.md`** (never `init --force`)
20
- 4. **Otherwise read `LLM_PROMPT.md`** — five required questions before generating code
21
- 5. **Read `BUILD_GUARDRAILS.md`** — mandatory components every generated CMS must include
22
- 6. **Read `brand.schema.json`** — validated shape of `brand.json`
23
- 7. Run **`npx tomorrowos init`** (Replit) or **`npx tomorrowos init --hosting v0`** (Vercel / v0) — minimal CMS server seed
24
- 8. **Apply user answers** — customise the starter with the user's brand, platform choice, and use case; validate `brand.json` against `brand.schema.json`
25
- 9. **Show `PLAYER_INSTALL.md`** — after the CMS is working, show how to build and install the player on a screen
26
-
27
- You must not write WebSocket transport, pairing wire format, or platform-specific player bridge code in the CMS — the SDK handles server-side device sessions and HTTP helpers. You customise UI, branding, and how you call the SDK.
28
-
29
- ---
30
-
31
- ## For human developers
32
-
33
- Install:
34
-
35
- ```bash
36
- npm install @tomorrowos/sdk
37
- ```
38
-
39
- Scaffold a new CMS project:
40
-
41
- ```bash
42
- # Replit / Railway / self-host (default)
43
- npx tomorrowos init
44
-
45
- # Vercel / v0 Publish (cms-panel + vercel.json + optional Next Preview)
46
- npx tomorrowos init --hosting v0
47
-
48
- cd my-tomorrowos-cms
49
- npm install
50
- npm run dev
51
- ```
52
-
53
- `tomorrowos init` creates `data/tomorrowos.db` with the TomorrowOS SQLite
54
- schema. The starter server uses that SQLite database by default, so pairings,
55
- playlists, and device assignments survive normal server restarts.
56
-
57
- ### Replit guided setup
58
-
59
- In Replit Agent, paste:
60
-
61
- ```text
62
- Follow @tomorrowos/sdk REPLIT_SETUP.md and set up my TomorrowOS CMS.
63
- Ask me the questions in order. Do not skip steps.
64
- ```
65
-
66
- That wizard configures Supabase, prefers Cloudinary for media, and writes
67
- `brand.json` from your answers. On Replit, Supabase must use Secret
68
- **`SUPABASE_URL`** (not the reserved `DATABASE_URL`).
69
-
70
- ### Vercel guided setup
71
-
72
- In Vercel Agent (or any AI setup prompt), paste:
73
-
74
- ```text
75
- Follow @tomorrowos/sdk VERCEL_SETUP.md and set up my TomorrowOS CMS.
76
- IF any step contradicts Vercel, adapt to settings that Vercel can accept.
77
- ```
78
-
79
- That wizard asks: database (**Supabase** → **Neon** → SQLite demo), media (**Cloudinary** → **Vercel Blob** → local),
80
- branding (manual fields or **website URL → `brand.json` only**, no login unless asked). Preview may use a thin **Next.js reverse proxy**;
81
- **Publish stays a Fluid Vercel Function** (`api/index.ts` + `export default server`, WebSockets per Vercel docs). Cloudinary uses **one Env popup** (all fields).
82
- Neon/Supabase: agent auto-sets `TOMORROWOS_STORE` + `DATABASE_SSL`. Sets `cms.hostingTarget` to `"vercel"`.
83
-
84
- ### Replit upgrade (existing CMS)
85
-
86
- In Replit Agent, paste:
87
-
88
- ```text
89
- Follow @tomorrowos/sdk REPLIT_UPGRADE.md to upgrade my CMS with the latest SDK.
90
- ```
91
-
92
- That protocol installs `@tomorrowos/sdk@latest`, backs up panel/server files,
93
- diffs `cms-starter` templates (merge — never blind overwrite), and must **not**
94
- run `init` / delete `data/` or `public/uploads/`.
95
-
96
- To switch to Supabase/Postgres manually, edit `.env` / Secrets:
97
-
98
- ```bash
99
- TOMORROWOS_STORE=supabase
100
- SUPABASE_URL=postgresql://...
101
- DATABASE_SSL=true
102
- # DATABASE_URL=... # optional fallback outside Replit
103
- ```
104
-
105
- For throwaway demos/tests, set `TOMORROWOS_STORE=memory`. The generated starter
106
- includes its own `README.md` beside `server.ts` with database selection,
107
- migration, and custom `TomorrowOSStore` examples.
108
-
109
- Migrate database records between supported stores:
110
-
111
- ```bash
112
- npx tomorrowos migrate \
113
- --from sqlite \
114
- --from-sqlite ./data/tomorrowos.db \
115
- --to supabase \
116
- --to-database-url "$DATABASE_URL"
117
- ```
118
-
119
- The migrate command supports `sqlite`, `postgres`, and `supabase` in either
120
- direction. It migrates TomorrowOS database records only; copy `public/uploads`
121
- or object-storage media separately.
122
-
123
- Build a player (placeholder in current SDK — see `PLAYER_INSTALL.md` for platform tooling):
124
-
125
- ```bash
126
- npx tomorrowos build --platform tizen
127
- ```
128
-
129
- ---
130
-
131
- ## Quick architecture
132
-
133
- ```
134
- ┌─────────────────┐ WebSocket ┌─────────────────┐
135
- │ Your CMS │ ◄────────────────────────►│ TomorrowOS │
136
- │ (your server) │ │ Player on │
137
- │ │ │ screen │
138
- │ imports │ │ │
139
- │ @tomorrowos │ │ unified API │
140
- │ /sdk │ │ across OSes │
141
- └─────────────────┘ └─────────────────┘
142
- ```
143
-
144
- TomorrowOS has no required cloud service. Your CMS talks to your screens over your network.
145
-
146
- **Player branding:** `GET /brand.json` returns the `brand` object passed to `new TomorrowOS({ brand })` (same host/port as `listen`). TomorrowOS players can fetch it to apply `backgroundColor`, logos, etc., without a separate static file server.
147
-
148
- **Content policy (`device.content.setPolicy`):** POST `/device/{deviceId}/content/set-policy` with `{ "policy": { "playlists": [...], "fallback": { "type": "brand" } } }`. Each playlist may include optional `schedule` (device local time):
149
-
150
- | Field | Format | Notes |
151
- |-------|--------|--------|
152
- | `startDate` / `endDate` | `YYYY-MM-DD` | Inclusive calendar range; omit either for open-ended |
153
- | `daysOfWeek` | `[0–6]` | `0` = Sunday … `6` = Saturday |
154
- | `start` / `end` | `HH:MM` | Daily window; supports overnight (e.g. `22:00`–`06:00`) |
155
-
156
- All provided constraints must match for the playlist to play. See `templates/cms-starter/policy.example.json`.
157
-
158
- ---
159
-
160
- ## Supported platforms (roadmap)
161
-
162
- | Platform | Status | Player format |
163
- |-------------------|------------|---------------|
164
- | Samsung Tizen | V1 target | `.wgt` |
165
- | BrightSign | V1 target | autorun zip |
166
- | Others | See docs | varies |
167
-
168
- See `PLAYER_INSTALL.md` for installation notes.
169
-
170
- ---
171
-
172
- ## Documentation in this package
173
-
174
- | File | Purpose |
175
- |------|---------|
176
- | `LLM_PROMPT.md` | Five-question elicitation for LLMs |
177
- | `REPLIT_SETUP.md` | Replit Agent guided CMS setup |
178
- | `VERCEL_SETUP.md` | Vercel Agent guided CMS setup |
179
- | `REPLIT_UPGRADE.md` | Replit Agent upgrade to latest SDK (no init) |
180
- | `BUILD_GUARDRAILS.md` | Mandatory CMS components |
181
- | `PLAYER_INSTALL.md` | Player build / install / pairing |
182
- | `brand.schema.json` | JSON Schema for `brand.json` |
183
- | `brand.example.json` | Full example `brand.json` |
184
- | `templates/cms-starter/` | Minimal Node + TypeScript server seed |
185
- | `templates/cms-starter/policy.example.json` | Example `setPolicy` payload with date schedule |
186
- | `templates/style-tokens/` | CSS tokens and UI pattern notes |
187
-
188
- ---
189
-
190
- ## License
191
-
192
- Apache 2.0.
193
-
194
- ## Protocol version
195
-
196
- Wire protocol `1.0` (see TomorrowOS specification).
1
+ # @tomorrowos/sdk
2
+
3
+ **You are building a digital signage CMS using TomorrowOS. Before writing any code, follow the elicitation protocol in `LLM_PROMPT.md`. Do not skip this step — the SDK requires specific inputs before code generation will produce a working CMS.**
4
+
5
+ **On Replit:** if the user asks to set up / configure a CMS interactively, follow **`REPLIT_SETUP.md`** instead (Q&A for store → media → `brand.json`).
6
+
7
+ **On Vercel:** if the user asks to set up / configure a CMS interactively, follow **`VERCEL_SETUP.md`** (Supabase or Neon pooled Postgres, Cloudinary or Vercel Blob media, v0 Preview Next proxy shell + **Publish = Node only**, Fluid compute + WebSocket, `cms.hostingTarget: "vercel"`).
8
+
9
+ TomorrowOS is the open standard for digital signage. This SDK lets you build a CMS that controls Samsung Tizen, BrightSign, LG webOS, Android, ChromeOS, and Windows screens through a single unified API.
10
+
11
+ ---
12
+
13
+ ## For LLMs generating code with this package
14
+
15
+ When you see this package referenced in a user prompt, your workflow is:
16
+
17
+ 1. **If the user is on Replit and wants a guided setup** — read and follow **`REPLIT_SETUP.md`** (preferred for Replit Agent)
18
+ 2. **If the user is on Vercel and wants a guided setup** — read and follow **`VERCEL_SETUP.md`** (preferred for Vercel Agent)
19
+ 3. **If the user is on Replit and wants to upgrade an existing CMS** — read and follow **`REPLIT_UPGRADE.md`** (never `init --force`)
20
+ 4. **Otherwise read `LLM_PROMPT.md`** — five required questions before generating code
21
+ 5. **Read `BUILD_GUARDRAILS.md`** — mandatory components every generated CMS must include
22
+ 6. **Read `brand.schema.json`** — validated shape of `brand.json`
23
+ 7. Run **`npx tomorrowos init`** (Replit) or **`npx tomorrowos init --hosting v0`** (Vercel / v0) — minimal CMS server seed
24
+ 8. **Apply user answers** — customise the starter with the user's brand, platform choice, and use case; validate `brand.json` against `brand.schema.json`
25
+ 9. **Show `PLAYER_INSTALL.md`** — after the CMS is working, show how to build and install the player on a screen
26
+
27
+ You must not write WebSocket transport, pairing wire format, or platform-specific player bridge code in the CMS — the SDK handles server-side device sessions and HTTP helpers. You customise UI, branding, and how you call the SDK.
28
+
29
+ ---
30
+
31
+ ## For human developers
32
+
33
+ Install:
34
+
35
+ ```bash
36
+ npm install @tomorrowos/sdk
37
+ ```
38
+
39
+ Scaffold a new CMS project:
40
+
41
+ ```bash
42
+ # Replit / Railway / self-host (default)
43
+ npx tomorrowos init
44
+
45
+ # Vercel / v0 Publish (cms-panel + vercel.json + optional Next Preview)
46
+ npx tomorrowos init --hosting v0
47
+
48
+ cd my-tomorrowos-cms
49
+ npm install
50
+ npm run dev
51
+ ```
52
+
53
+ `tomorrowos init` creates `data/tomorrowos.db` with the TomorrowOS SQLite
54
+ schema. The starter server uses that SQLite database by default, so pairings,
55
+ playlists, and device assignments survive normal server restarts.
56
+
57
+ ### Replit guided setup
58
+
59
+ In Replit Agent, paste:
60
+
61
+ ```text
62
+ Follow @tomorrowos/sdk REPLIT_SETUP.md and set up my TomorrowOS CMS.
63
+ Ask me the questions in order. Do not skip steps.
64
+ ```
65
+
66
+ That wizard configures Supabase, prefers Cloudinary for media, and writes
67
+ `brand.json` from your answers. On Replit, Supabase must use Secret
68
+ **`SUPABASE_URL`** (not the reserved `DATABASE_URL`).
69
+
70
+ ### Vercel guided setup
71
+
72
+ In Vercel Agent (or any AI setup prompt), paste:
73
+
74
+ ```text
75
+ Follow @tomorrowos/sdk VERCEL_SETUP.md and set up my TomorrowOS CMS.
76
+ IF any step contradicts Vercel, adapt to settings that Vercel can accept.
77
+ ```
78
+
79
+ That wizard asks: database (**Supabase** → **Neon** → SQLite demo), media (**Cloudinary** → **Vercel Blob** → local),
80
+ branding (manual fields or **website URL → `brand.json` only**, no login unless asked). Preview may use a thin **Next.js reverse proxy**;
81
+ **Publish stays a Fluid Vercel Function** (`api/index.ts` + `export default server`, WebSockets per Vercel docs). Cloudinary uses **one Env popup** (all fields).
82
+ Neon/Supabase: agent auto-sets `TOMORROWOS_STORE` + `DATABASE_SSL`. Sets `cms.hostingTarget` to `"vercel"`.
83
+
84
+ ### Replit upgrade (existing CMS)
85
+
86
+ In Replit Agent, paste:
87
+
88
+ ```text
89
+ Follow @tomorrowos/sdk REPLIT_UPGRADE.md to upgrade my CMS with the latest SDK.
90
+ ```
91
+
92
+ That protocol installs `@tomorrowos/sdk@latest`, backs up panel/server files,
93
+ diffs `cms-starter` templates (merge — never blind overwrite), and must **not**
94
+ run `init` / delete `data/` or `public/uploads/`.
95
+
96
+ To switch to Supabase/Postgres manually, edit `.env` / Secrets:
97
+
98
+ ```bash
99
+ TOMORROWOS_STORE=supabase
100
+ SUPABASE_URL=postgresql://...
101
+ DATABASE_SSL=true
102
+ # DATABASE_URL=... # optional fallback outside Replit
103
+ ```
104
+
105
+ For throwaway demos/tests, set `TOMORROWOS_STORE=memory`. The generated starter
106
+ includes its own `README.md` beside `server.ts` with database selection,
107
+ migration, and custom `TomorrowOSStore` examples.
108
+
109
+ Migrate database records between supported stores:
110
+
111
+ ```bash
112
+ npx tomorrowos migrate \
113
+ --from sqlite \
114
+ --from-sqlite ./data/tomorrowos.db \
115
+ --to supabase \
116
+ --to-database-url "$DATABASE_URL"
117
+ ```
118
+
119
+ The migrate command supports `sqlite`, `postgres`, and `supabase` in either
120
+ direction. It migrates TomorrowOS database records only; copy `public/uploads`
121
+ or object-storage media separately.
122
+
123
+ Build a player (placeholder in current SDK — see `PLAYER_INSTALL.md` for platform tooling):
124
+
125
+ ```bash
126
+ npx tomorrowos build --platform tizen
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Quick architecture
132
+
133
+ ```
134
+ ┌─────────────────┐ WebSocket ┌─────────────────┐
135
+ │ Your CMS │ ◄────────────────────────►│ TomorrowOS │
136
+ │ (your server) │ │ Player on │
137
+ │ │ │ screen │
138
+ │ imports │ │ │
139
+ │ @tomorrowos │ │ unified API │
140
+ │ /sdk │ │ across OSes │
141
+ └─────────────────┘ └─────────────────┘
142
+ ```
143
+
144
+ TomorrowOS has no required cloud service. Your CMS talks to your screens over your network.
145
+
146
+ **Player branding:** `GET /brand.json` returns the `brand` object passed to `new TomorrowOS({ brand })` (same host/port as `listen`). TomorrowOS players can fetch it to apply `backgroundColor`, logos, etc., without a separate static file server.
147
+
148
+ **Content policy (`device.content.setPolicy`):** POST `/device/{deviceId}/content/set-policy` with `{ "policy": { "playlists": [...], "fallback": { "type": "brand" } } }`. Each playlist may include optional `schedule` (device local time):
149
+
150
+ | Field | Format | Notes |
151
+ |-------|--------|--------|
152
+ | `startDate` / `endDate` | `YYYY-MM-DD` | Inclusive calendar range; omit either for open-ended |
153
+ | `daysOfWeek` | `[0–6]` | `0` = Sunday … `6` = Saturday |
154
+ | `start` / `end` | `HH:MM` | Daily window; supports overnight (e.g. `22:00`–`06:00`) |
155
+
156
+ All provided constraints must match for the playlist to play. See `templates/cms-starter/policy.example.json`.
157
+
158
+ ---
159
+
160
+ ## Supported platforms (roadmap)
161
+
162
+ | Platform | Status | Player format |
163
+ |-------------------|------------|---------------|
164
+ | Samsung Tizen | V1 target | `.wgt` |
165
+ | BrightSign | V1 target | autorun zip |
166
+ | Others | See docs | varies |
167
+
168
+ See `PLAYER_INSTALL.md` for installation notes.
169
+
170
+ ---
171
+
172
+ ## Documentation in this package
173
+
174
+ | File | Purpose |
175
+ |------|---------|
176
+ | `LLM_PROMPT.md` | Five-question elicitation for LLMs |
177
+ | `REPLIT_SETUP.md` | Replit Agent guided CMS setup |
178
+ | `VERCEL_SETUP.md` | Vercel Agent guided CMS setup |
179
+ | `REPLIT_UPGRADE.md` | Replit Agent upgrade to latest SDK (no init) |
180
+ | `BUILD_GUARDRAILS.md` | Mandatory CMS components |
181
+ | `PLAYER_INSTALL.md` | Player build / install / pairing |
182
+ | `brand.schema.json` | JSON Schema for `brand.json` |
183
+ | `brand.example.json` | Full example `brand.json` |
184
+ | `templates/cms-starter/` | Minimal Node + TypeScript server seed |
185
+ | `templates/cms-starter/policy.example.json` | Example `setPolicy` payload with date schedule |
186
+ | `templates/style-tokens/` | CSS tokens and UI pattern notes |
187
+
188
+ ---
189
+
190
+ ## License
191
+
192
+ Apache 2.0.
193
+
194
+ ## Protocol version
195
+
196
+ Wire protocol `1.0` (see TomorrowOS specification).
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` — pairs with `@tomorrowos/sdk` **0.9.30+** (`templates/cms-starter-v0`, Fluid Functions WebSockets).
8
+ > Protocol id: `vercel-setup/1.8` — pairs with `@tomorrowos/sdk` **0.9.32+** (`templates/cms-starter-v0`, Fluid Functions WebSockets).
9
9
 
10
10
  ## User trigger (copy-paste)
11
11
 
@@ -266,7 +266,7 @@ const server = tomorrowos.listen({
266
266
  export { server, tomorrowos };
267
267
  ```
268
268
 
269
- SDK behaviour (0.9.30+):
269
+ SDK behaviour (0.9.32+):
270
270
 
271
271
  - Accepts WebSocket upgrades on `/`, `/api`, `/api/ws` (players may use either)
272
272
  - When `VERCEL` is set: **`autoListen` defaults to false** — do not bind a port yourself
@@ -282,7 +282,7 @@ SDK behaviour (0.9.30+):
282
282
  "buildCommand": "npm run build",
283
283
  "functions": {
284
284
  "api/index.ts": {
285
- "maxDuration": 800,
285
+ "maxDuration": 300,
286
286
  "memory": 1024,
287
287
  "includeFiles": "{cms-panel/**,brand.json,assets/**}"
288
288
  }
@@ -293,6 +293,8 @@ SDK behaviour (0.9.30+):
293
293
  }
294
294
  ```
295
295
 
296
+ **`maxDuration` plan limits:** Hobby / many default plans allow **1–300** seconds. **800** requires a higher Vercel plan. Prefer **`300`** unless the account already allows more — otherwise Publish fails with *“maxDuration must be between 1 and 300… upgrade your plan”*.
297
+
296
298
  **Why rewrites:** Public URLs stay `https://app.vercel.app/` and `/status` while the Function mount is `/api`. Device `wss://app.vercel.app/` is rewritten to the same Function so one isolate handles HTTP + WS.
297
299
 
298
300
  **v0 schema:** never add `startCommand` or `processes`.
@@ -366,7 +368,7 @@ If (1)+(2) pass but (3) fails → Function is serving HTTP only. Re-check Fluid,
366
368
 
367
369
  - Serve TomorrowOS via **Vercel Function** `api/index.ts` → `export default server` (Fluid + WebSockets).
368
370
  - Keep root **`server.ts`** for **local** `npm start` / Preview internal port only (same `cms-app.ts`).
369
- - Keep **`@tomorrowos/sdk`** (0.9.30+) and put **`tsx` in `dependencies`** for local start.
371
+ - Keep **`@tomorrowos/sdk`** (0.9.32+) and put **`tsx` in `dependencies`** for local start.
370
372
  - Node **20+**.
371
373
  - **Do not** replace the SDK with a hand-rolled server that drops WebSocket upgrades.
372
374
  - **Forbidden as the Production CMS:** `next start`, static export only, or a bare `(req,res)` handler without `http.Server` + `ws`.
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
- {
2
- "name": "@tomorrowos/sdk",
3
- "version": "0.9.30",
4
- "description": "TomorrowOS CMS server SDK - WebSocket transport, pairing, device commands, optional static CMS UI. Includes CLI (tomorrowos init / build) and starter templates.",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
- }
13
- },
14
- "bin": {
15
- "tomorrowos": "./dist/cli.js"
16
- },
17
- "files": [
18
- "dist",
19
- "templates",
20
- "README.md",
21
- "LLM_PROMPT.md",
22
- "REPLIT_SETUP.md",
23
- "VERCEL_SETUP.md",
24
- "REPLIT_UPGRADE.md",
25
- "BUILD_GUARDRAILS.md",
26
- "PLAYER_INSTALL.md",
27
- "brand.schema.json",
28
- "brand.example.json"
29
- ],
30
- "scripts": {
31
- "build": "tsc",
32
- "prepublishOnly": "npm run build"
33
- },
34
- "engines": {
35
- "node": ">=18"
36
- },
37
- "dependencies": {
38
- "better-sqlite3": "^12.11.1",
39
- "cloudinary": "^2.10.0",
40
- "pg": "^8.22.0",
41
- "ws": "^8.21.0"
42
- },
43
- "devDependencies": {
44
- "@types/better-sqlite3": "^7.6.13",
45
- "@types/node": "^20.19.41",
46
- "@types/pg": "^8.20.0",
47
- "@types/ws": "^8.5.10",
48
- "typescript": "^5.5.0"
49
- },
50
- "license": "Apache-2.0"
51
- }
1
+ {
2
+ "name": "@tomorrowos/sdk",
3
+ "version": "0.9.32",
4
+ "description": "TomorrowOS CMS server SDK - WebSocket transport, pairing, device commands, optional static CMS UI. Includes CLI (tomorrowos init / build) and starter templates.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "bin": {
15
+ "tomorrowos": "./dist/cli.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "templates",
20
+ "README.md",
21
+ "LLM_PROMPT.md",
22
+ "REPLIT_SETUP.md",
23
+ "VERCEL_SETUP.md",
24
+ "REPLIT_UPGRADE.md",
25
+ "BUILD_GUARDRAILS.md",
26
+ "PLAYER_INSTALL.md",
27
+ "brand.schema.json",
28
+ "brand.example.json"
29
+ ],
30
+ "scripts": {
31
+ "build": "tsc",
32
+ "prepublishOnly": "npm run build"
33
+ },
34
+ "engines": {
35
+ "node": ">=18"
36
+ },
37
+ "dependencies": {
38
+ "better-sqlite3": "^12.11.1",
39
+ "cloudinary": "^2.10.0",
40
+ "pg": "^8.22.0",
41
+ "ws": "^8.21.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/better-sqlite3": "^7.6.13",
45
+ "@types/node": "^20.19.41",
46
+ "@types/pg": "^8.20.0",
47
+ "@types/ws": "^8.5.10",
48
+ "typescript": "^5.5.0"
49
+ },
50
+ "license": "Apache-2.0"
51
+ }
@@ -1,25 +1,25 @@
1
- {
2
- "name": "my-cms",
3
- "version": "0.9.30",
4
- "description": "CMS server on @tomorrowos/sdk. Add your UI (React, static files, etc.) alongside this server.",
5
- "private": true,
6
- "type": "module",
7
- "engines": {
8
- "node": ">=20"
9
- },
10
- "scripts": {
11
- "dev": "tsx watch server.ts",
12
- "start": "tsx server.ts",
13
- "build-player": "tomorrowos build --platform tizen"
14
- },
15
- "dependencies": {
16
- "@tomorrowos/sdk": "^0.9.30",
17
- "dotenv": "^17.2.3",
18
- "tsx": "^4.19.0"
19
- },
20
- "devDependencies": {
21
- "@types/node": "^20.0.0",
22
- "typescript": "^5.5.0"
23
- }
24
- }
25
-
1
+ {
2
+ "name": "my-cms",
3
+ "version": "0.9.32",
4
+ "description": "CMS server on @tomorrowos/sdk. Add your UI (React, static files, etc.) alongside this server.",
5
+ "private": true,
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=20"
9
+ },
10
+ "scripts": {
11
+ "dev": "tsx watch server.ts",
12
+ "start": "tsx server.ts",
13
+ "build-player": "tomorrowos build --platform tizen"
14
+ },
15
+ "dependencies": {
16
+ "@tomorrowos/sdk": "^0.9.32",
17
+ "dotenv": "^17.2.3",
18
+ "tsx": "^4.19.0"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^20.0.0",
22
+ "typescript": "^5.5.0"
23
+ }
24
+ }
25
+
@@ -1,35 +1,35 @@
1
- {
2
- "name": "my-cms",
3
- "version": "0.9.30",
4
- "description": "TomorrowOS CMS for Vercel / v0 Publish (Fluid Function + WebSockets + optional Next Preview).",
5
- "private": true,
6
- "type": "module",
7
- "engines": {
8
- "node": ">=20"
9
- },
10
- "scripts": {
11
- "dev": "tsx watch server.ts",
12
- "dev:tomorrowos": "cross-env TOMORROWOS_INTERNAL_PORT=3001 tsx watch server.ts",
13
- "dev:next": "cd preview && next dev -p 3000",
14
- "dev:preview": "concurrently -k \"npm:dev:tomorrowos\" \"npm:dev:next\"",
15
- "start": "tsx server.ts",
16
- "build": "node -e \"process.exit(0)\"",
17
- "build-player": "tomorrowos build --platform tizen"
18
- },
19
- "dependencies": {
20
- "@tomorrowos/sdk": "^0.9.30",
21
- "dotenv": "^17.2.3",
22
- "tsx": "^4.19.0"
23
- },
24
- "devDependencies": {
25
- "@types/node": "^20.0.0",
26
- "@types/react": "^19.0.0",
27
- "@types/react-dom": "^19.0.0",
28
- "concurrently": "^9.1.2",
29
- "cross-env": "^7.0.3",
30
- "next": "^15.1.0",
31
- "react": "^19.0.0",
32
- "react-dom": "^19.0.0",
33
- "typescript": "^5.5.0"
34
- }
35
- }
1
+ {
2
+ "name": "my-cms",
3
+ "version": "0.9.32",
4
+ "description": "TomorrowOS CMS for Vercel / v0 Publish (Fluid Function + WebSockets + optional Next Preview).",
5
+ "private": true,
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=20"
9
+ },
10
+ "scripts": {
11
+ "dev": "tsx watch server.ts",
12
+ "dev:tomorrowos": "cross-env TOMORROWOS_INTERNAL_PORT=3001 tsx watch server.ts",
13
+ "dev:next": "cd preview && next dev -p 3000",
14
+ "dev:preview": "concurrently -k \"npm:dev:tomorrowos\" \"npm:dev:next\"",
15
+ "start": "tsx server.ts",
16
+ "build": "node -e \"process.exit(0)\"",
17
+ "build-player": "tomorrowos build --platform tizen"
18
+ },
19
+ "dependencies": {
20
+ "@tomorrowos/sdk": "^0.9.32",
21
+ "dotenv": "^17.2.3",
22
+ "tsx": "^4.19.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^20.0.0",
26
+ "@types/react": "^19.0.0",
27
+ "@types/react-dom": "^19.0.0",
28
+ "concurrently": "^9.1.2",
29
+ "cross-env": "^7.0.3",
30
+ "next": "^15.1.0",
31
+ "react": "^19.0.0",
32
+ "react-dom": "^19.0.0",
33
+ "typescript": "^5.5.0"
34
+ }
35
+ }
@@ -6,7 +6,7 @@
6
6
  "buildCommand": "npm run build",
7
7
  "functions": {
8
8
  "api/index.ts": {
9
- "maxDuration": 800,
9
+ "maxDuration": 300,
10
10
  "memory": 1024,
11
11
  "includeFiles": "{cms-panel/**,brand.json,assets/**}"
12
12
  }