robodev 0.10.0 → 0.11.0
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 +1 -1
- package/templates/auth-chat/README.md +1 -1
- package/templates/auth-chat/api/health.ts +1 -1
- package/templates/auth-chat/api/me.ts +1 -1
- package/templates/auth-chat/api/messages.ts +1 -1
- package/templates/auth-chat/package.json +1 -1
- package/templates/auth-chat/src/main.tsx +4 -4
- package/templates/backend/README.md +1 -1
- package/templates/backend/api/health.ts +1 -1
- package/templates/backend/api/launch.ts +1 -1
- package/templates/backend/api/me.ts +1 -1
- package/templates/backend/api/motto.ts +1 -1
- package/templates/backend/api/planets/[id].ts +1 -1
- package/templates/backend/api/planets.ts +1 -1
- package/templates/backend/api/rockets.ts +1 -1
- package/templates/backend/package.json +1 -1
- package/templates/catalog.json +1 -1
- package/templates/empty/README.md +1 -1
- package/templates/empty/api/health.ts +1 -1
- package/templates/empty/package.json +1 -1
- package/templates/space/README.md +1 -1
- package/templates/space/api/health.ts +1 -1
- package/templates/space/api/launch.ts +1 -1
- package/templates/space/api/me.ts +1 -1
- package/templates/space/api/motto.ts +1 -1
- package/templates/space/api/planets/[id].ts +1 -1
- package/templates/space/api/planets.ts +1 -1
- package/templates/space/api/rockets.ts +1 -1
- package/templates/space/package.json +1 -1
- package/templates/space/src/main.tsx +5 -5
package/package.json
CHANGED
|
@@ -12,6 +12,6 @@ Local Vite reads `VITE_API_URL` from `.env` (written by `robodev create` / `robo
|
|
|
12
12
|
|
|
13
13
|
Docs: https://robodev.povio.dev/docs/starter
|
|
14
14
|
|
|
15
|
-
`GET /me` and `GET/POST /messages` (`api/me.ts`, `api/messages.ts`) require a Robodev Auth Bearer token. `GET /health` stays public. Email auth works without Google. If Google is not configured on Starbase, the button shows a 503 message. Google OAuth may not complete inside the dashboard preview iframe — use Open app.
|
|
15
|
+
`GET /api/me` and `GET/POST /api/messages` (`api/me.ts`, `api/messages.ts`) require a Robodev Auth Bearer token. `GET /api/health` stays public. Email auth works without Google. If Google is not configured on Starbase, the button shows a 503 message. Google OAuth may not complete inside the dashboard preview iframe — use Open app.
|
|
16
16
|
|
|
17
17
|
Edit files in the dashboard Code page, or here, then Save / `npx robodev deploy`.
|
|
@@ -40,7 +40,7 @@ function App() {
|
|
|
40
40
|
const listRef = useRef<HTMLDivElement>(null);
|
|
41
41
|
|
|
42
42
|
async function refreshMessages() {
|
|
43
|
-
const res = await api.fetch("/messages");
|
|
43
|
+
const res = await api.fetch("/api/messages");
|
|
44
44
|
if (!res.ok) throw new Error(await res.text());
|
|
45
45
|
setMessages((await res.json()) as Message[]);
|
|
46
46
|
}
|
|
@@ -74,7 +74,7 @@ function App() {
|
|
|
74
74
|
}, [messages]);
|
|
75
75
|
|
|
76
76
|
useEffect(() => {
|
|
77
|
-
void fetch(`${apiUrl}/messages`).then((res) => {
|
|
77
|
+
void fetch(`${apiUrl}/api/messages`).then((res) => {
|
|
78
78
|
setUnauthStatus(
|
|
79
79
|
`${res.status} ${res.status === 401 ? "unauthorized (expected)" : res.statusText}`,
|
|
80
80
|
);
|
|
@@ -134,7 +134,7 @@ function App() {
|
|
|
134
134
|
setPending(true);
|
|
135
135
|
setError(null);
|
|
136
136
|
try {
|
|
137
|
-
const res = await api.fetch("/messages", {
|
|
137
|
+
const res = await api.fetch("/api/messages", {
|
|
138
138
|
method: "POST",
|
|
139
139
|
body: JSON.stringify({ body: draft.trim() }),
|
|
140
140
|
});
|
|
@@ -163,7 +163,7 @@ function App() {
|
|
|
163
163
|
<h1>{{NAME}}</h1>
|
|
164
164
|
<p className="lede">
|
|
165
165
|
Sign in with email or Google. Protected APIs live at {apiUrl}. Unauthenticated GET
|
|
166
|
-
/messages: {unauthStatus ?? "checking…"}.
|
|
166
|
+
/api/messages: {unauthStatus ?? "checking…"}.
|
|
167
167
|
</p>
|
|
168
168
|
{error ? <p className="error">{error}</p> : null}
|
|
169
169
|
|
|
@@ -14,4 +14,4 @@ Do not run `npm run dev` or `npm run build` in this folder. Do not run `robodev`
|
|
|
14
14
|
|
|
15
15
|
Frontend how-to: https://robodev.povio.dev/docs/frontend
|
|
16
16
|
|
|
17
|
-
`GET /me` (`api/me.ts`) requires a Robodev Auth Bearer token. Planet and rocket routes stay public.
|
|
17
|
+
`GET /api/me` (`api/me.ts`) requires a Robodev Auth Bearer token. Planet and rocket routes stay public.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** GET/POST /planets — list (seeds sample rows on first GET) and create planets. */
|
|
1
|
+
/** GET/POST /api/planets — list (seeds sample rows on first GET) and create planets. */
|
|
2
2
|
import { planets, rockets } from "../database";
|
|
3
3
|
import { defineApi, z } from "@robodev-ai/sdk";
|
|
4
4
|
|
package/templates/catalog.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{
|
|
20
20
|
"id": "empty",
|
|
21
21
|
"title": "Empty",
|
|
22
|
-
"description": "Blank database.ts and GET /health — no sample schema or UI. For Lovable, Bolt, or v0",
|
|
22
|
+
"description": "Blank database.ts and GET /api/health — no sample schema or UI. For Lovable, Bolt, or v0",
|
|
23
23
|
"kind": "backend"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
@@ -12,6 +12,6 @@ Local Vite reads `VITE_API_URL` from `.env` (written by `robodev create` / `robo
|
|
|
12
12
|
|
|
13
13
|
Docs: https://robodev.povio.dev/docs
|
|
14
14
|
|
|
15
|
-
`GET /
|
|
15
|
+
`GET /api/me` (`api/me.ts`) requires a Robodev Auth Bearer token. Planet and rocket routes stay public. Optional browser helper: `@robodev-ai/client`. Auth how-to: https://robodev.povio.dev/docs/auth
|
|
16
16
|
|
|
17
17
|
Edit files in the dashboard Code page, or here, then Save / `npx robodev deploy`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** GET/POST /planets — list (seeds sample rows on first GET) and create planets. */
|
|
1
|
+
/** GET/POST /api/planets — list (seeds sample rows on first GET) and create planets. */
|
|
2
2
|
import { planets, rockets } from "../database";
|
|
3
3
|
import { defineApi, z } from "@robodev-ai/sdk";
|
|
4
4
|
|
|
@@ -33,8 +33,8 @@ function App() {
|
|
|
33
33
|
const [rocketForm, setRocketForm] = useState({ name: "", destinationId: "" });
|
|
34
34
|
|
|
35
35
|
async function refresh() {
|
|
36
|
-
const nextPlanets = await request<Planet[]>("/planets");
|
|
37
|
-
const nextRockets = await request<Rocket[]>("/rockets");
|
|
36
|
+
const nextPlanets = await request<Planet[]>("/api/planets");
|
|
37
|
+
const nextRockets = await request<Rocket[]>("/api/rockets");
|
|
38
38
|
setPlanets(nextPlanets);
|
|
39
39
|
setRockets(nextRockets);
|
|
40
40
|
setRocketForm((form) => ({
|
|
@@ -54,7 +54,7 @@ function App() {
|
|
|
54
54
|
setPending(true);
|
|
55
55
|
setError(null);
|
|
56
56
|
try {
|
|
57
|
-
await request("/planets", {
|
|
57
|
+
await request("/api/planets", {
|
|
58
58
|
method: "POST",
|
|
59
59
|
body: JSON.stringify({
|
|
60
60
|
name: planetForm.name,
|
|
@@ -76,7 +76,7 @@ function App() {
|
|
|
76
76
|
setPending(true);
|
|
77
77
|
setError(null);
|
|
78
78
|
try {
|
|
79
|
-
await request("/rockets", {
|
|
79
|
+
await request("/api/rockets", {
|
|
80
80
|
method: "POST",
|
|
81
81
|
body: JSON.stringify({
|
|
82
82
|
name: rocketForm.name,
|
|
@@ -96,7 +96,7 @@ function App() {
|
|
|
96
96
|
setPending(true);
|
|
97
97
|
setError(null);
|
|
98
98
|
try {
|
|
99
|
-
await request("/launch", {
|
|
99
|
+
await request("/api/launch", {
|
|
100
100
|
method: "POST",
|
|
101
101
|
body: JSON.stringify({ id }),
|
|
102
102
|
});
|