@tomorrowos/sdk 0.9.28 → 0.9.30
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 +7 -2
- package/VERCEL_SETUP.md +135 -115
- package/dist/cli.js +42 -11
- package/dist/tomorrowos.d.ts +13 -1
- package/dist/tomorrowos.d.ts.map +1 -1
- package/dist/tomorrowos.js +45 -9
- package/package.json +1 -1
- package/templates/cms-starter/package.json +2 -2
- package/templates/cms-starter/server.ts +2 -2
- package/templates/cms-starter-v0/.env.example +19 -0
- package/templates/cms-starter-v0/README.md +50 -0
- package/templates/cms-starter-v0/api/index.ts +10 -0
- package/templates/cms-starter-v0/assets/logo.svg +4 -0
- package/templates/cms-starter-v0/brand.json +23 -0
- package/templates/cms-starter-v0/cms-app.ts +75 -0
- package/templates/cms-starter-v0/cms-panel/assets/player-download/android.svg +1 -0
- package/templates/cms-starter-v0/cms-panel/assets/player-download/brightsign.svg +1 -0
- package/templates/cms-starter-v0/cms-panel/assets/player-download/lg-webos.svg +1 -0
- package/templates/cms-starter-v0/cms-panel/assets/player-download/samsung.svg +1 -0
- package/templates/cms-starter-v0/cms-panel/assets/player-download/toolbox.svg +1 -0
- package/templates/cms-starter-v0/cms-panel/index.html +290 -0
- package/templates/cms-starter-v0/cms-panel/methods.js +2361 -0
- package/templates/cms-starter-v0/cms-panel/panel.css +1127 -0
- package/templates/cms-starter-v0/cms-panel/uploads/.gitkeep +1 -0
- package/templates/cms-starter-v0/package.json +35 -0
- package/templates/cms-starter-v0/policy.example.json +30 -0
- package/templates/cms-starter-v0/preview/app/layout.tsx +11 -0
- package/templates/cms-starter-v0/preview/app/page.tsx +3 -0
- package/templates/cms-starter-v0/preview/next-env.d.ts +2 -0
- package/templates/cms-starter-v0/preview/next.config.mjs +18 -0
- package/templates/cms-starter-v0/preview/tsconfig.json +20 -0
- package/templates/cms-starter-v0/server.ts +6 -0
- package/templates/cms-starter-v0/tsconfig.json +13 -0
- package/templates/cms-starter-v0/vercel.json +17 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"policy": {
|
|
3
|
+
"playlists": [
|
|
4
|
+
{
|
|
5
|
+
"id": "weekday-promo",
|
|
6
|
+
"name": "Weekday promo",
|
|
7
|
+
"schedule": {
|
|
8
|
+
"startDate": "2026-05-01",
|
|
9
|
+
"endDate": "2026-05-31",
|
|
10
|
+
"daysOfWeek": [1, 2, 3, 4, 5],
|
|
11
|
+
"start": "09:00",
|
|
12
|
+
"end": "17:00"
|
|
13
|
+
},
|
|
14
|
+
"items": [
|
|
15
|
+
{
|
|
16
|
+
"url": "https://example.com/hero.jpg",
|
|
17
|
+
"type": "image",
|
|
18
|
+
"durationMs": 10000
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"url": "https://example.com/spot.mp4",
|
|
22
|
+
"type": "video",
|
|
23
|
+
"durationMs": 30000
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"fallback": { "type": "brand" }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const internalUrl =
|
|
2
|
+
process.env.TOMORROWOS_INTERNAL_URL || "http://127.0.0.1:3001";
|
|
3
|
+
|
|
4
|
+
/** @type {import('next').NextConfig} */
|
|
5
|
+
const nextConfig = {
|
|
6
|
+
async rewrites() {
|
|
7
|
+
return {
|
|
8
|
+
fallback: [
|
|
9
|
+
{
|
|
10
|
+
source: "/:path*",
|
|
11
|
+
destination: `${internalUrl}/:path*`
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default nextConfig;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "preserve",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [{ "name": "next" }]
|
|
17
|
+
},
|
|
18
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
|
19
|
+
"exclude": ["node_modules"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
3
|
+
"fluid": true,
|
|
4
|
+
"framework": null,
|
|
5
|
+
"installCommand": "npm install",
|
|
6
|
+
"buildCommand": "npm run build",
|
|
7
|
+
"functions": {
|
|
8
|
+
"api/index.ts": {
|
|
9
|
+
"maxDuration": 800,
|
|
10
|
+
"memory": 1024,
|
|
11
|
+
"includeFiles": "{cms-panel/**,brand.json,assets/**}"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"rewrites": [
|
|
15
|
+
{ "source": "/((?!api/).*)", "destination": "/api" }
|
|
16
|
+
]
|
|
17
|
+
}
|