robodev 0.8.0 → 0.10.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robodev",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "CLI for Robodev Starbase — create, auth, link, and deploy hosted apps",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -38,7 +38,7 @@ Commands:
38
38
  logout Remove stored credentials
39
39
  whoami Show the signed-in user
40
40
  projects List your projects
41
- create [path] [--starter <id>] Create a project, scaffold a starter, and deploy
41
+ create [path] [--starter <id>] [--empty] Create a project, scaffold a starter, and deploy
42
42
  link [projectId] Write .robodev in the current folder
43
43
  deploy [--force] Deploy database.ts, api/*.ts, jobs, and frontend files (no Vite / npm run build)
44
44
  `);
@@ -282,8 +282,13 @@ function validIdsMessage(starters: Starter[]): string {
282
282
  function parseCreateArgs(args: string[]): { path?: string; starterId?: string } {
283
283
  let path: string | undefined;
284
284
  let starterId: string | undefined;
285
+ let empty = false;
285
286
  for (let i = 0; i < args.length; i++) {
286
287
  const arg = args[i];
288
+ if (arg === "--empty") {
289
+ empty = true;
290
+ continue;
291
+ }
287
292
  if (arg === "--starter") {
288
293
  const value = args[i + 1];
289
294
  if (!value || value.startsWith("-")) {
@@ -309,6 +314,12 @@ function parseCreateArgs(args: string[]): { path?: string; starterId?: string }
309
314
  }
310
315
  path = arg;
311
316
  }
317
+ if (empty && starterId !== undefined) {
318
+ throw new Error("Use either --empty or --starter, not both.");
319
+ }
320
+ if (empty) {
321
+ starterId = "empty";
322
+ }
312
323
  return { path, starterId };
313
324
  }
314
325
 
@@ -12,7 +12,7 @@
12
12
  "react": "^18.3.1",
13
13
  "react-dom": "^18.3.1",
14
14
  "@robodev-ai/sdk": "^0.6.0",
15
- "@robodev-ai/client": "^0.2.0"
15
+ "@robodev-ai/client": "^0.3.0"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "^18.3.24",
@@ -20,6 +20,6 @@
20
20
  "@vitejs/plugin-react": "^4.7.0",
21
21
  "typescript": "^5.9.2",
22
22
  "vite": "^6.3.5",
23
- "robodev": "^0.8.0"
23
+ "robodev": "^0.10.0"
24
24
  }
25
25
  }
@@ -86,11 +86,13 @@ function App() {
86
86
  setPending(true);
87
87
  setError(null);
88
88
  try {
89
- const session =
90
- mode === "signup"
91
- ? await api.auth.signUp({ email, password, name: name.trim() || undefined })
92
- : await api.auth.signIn.email({ email, password });
93
- setUser(session.user);
89
+ if (mode === "signup") {
90
+ await api.auth.signUp({ email, password, name: name.trim() || undefined });
91
+ } else {
92
+ await api.auth.signIn.email({ email, password });
93
+ }
94
+ const { user: next } = await api.auth.getUser();
95
+ setUser(next);
94
96
  setPassword("");
95
97
  } catch (err) {
96
98
  setError(err instanceof Error ? err.message : "Auth failed");
@@ -103,7 +105,7 @@ function App() {
103
105
  setPending(true);
104
106
  setError(null);
105
107
  try {
106
- const start = new URL(`${api.url}/auth/google/start`);
108
+ const start = new URL(`${api.url}/api/user/auth/google`);
107
109
  start.searchParams.set("redirect_uri", window.location.href);
108
110
  const probe = await fetch(start.toString(), { redirect: "manual" });
109
111
  if (probe.status === 503) {
@@ -208,7 +210,7 @@ function App() {
208
210
  <input
209
211
  type="password"
210
212
  required
211
- minLength={8}
213
+ minLength={12}
212
214
  autoComplete={mode === "signup" ? "new-password" : "current-password"}
213
215
  value={password}
214
216
  onChange={(event) => setPassword(event.target.value)}
@@ -10,7 +10,7 @@
10
10
  "@robodev-ai/sdk": "^0.6.0"
11
11
  },
12
12
  "devDependencies": {
13
- "robodev": "^0.8.0",
13
+ "robodev": "^0.10.0",
14
14
  "typescript": "^5.9.2"
15
15
  }
16
16
  }
@@ -15,6 +15,12 @@
15
15
  "title": "Backend",
16
16
  "description": "Space APIs only — no Vite UI. For Lovable, Bolt, or v0",
17
17
  "kind": "backend"
18
+ },
19
+ {
20
+ "id": "empty",
21
+ "title": "Empty",
22
+ "description": "Blank database.ts and GET /health — no sample schema or UI. For Lovable, Bolt, or v0",
23
+ "kind": "backend"
18
24
  }
19
25
  ]
20
26
  }
@@ -0,0 +1,15 @@
1
+ # {{NAME}}
2
+
3
+ Blank `database.ts` and `GET /health` — no sample schema or UI. For Lovable, Bolt, or v0.
4
+
5
+ Deploy `database.ts` and `api/` from a real terminal:
6
+
7
+ ```bash
8
+ npx robodev deploy
9
+ ```
10
+
11
+ Build the UI elsewhere against `VITE_API_URL` (written to `.env` by `robodev create` / `robodev link`). Paste that URL into the frontend tool.
12
+
13
+ Do not run `npm run dev` or `npm run build` in this folder. Do not run `robodev` (auth, create, deploy) or `npm run build` inside Lovable, Bolt, or v0 — those tools cannot complete loopback OAuth and must not treat this folder as a Vite app.
14
+
15
+ Frontend how-to: https://robodev.povio.dev/docs/frontend
@@ -0,0 +1,7 @@
1
+ /** GET /health — liveness check for the deployed project host. */
2
+ import { defineApi, z } from "@robodev-ai/sdk";
3
+
4
+ export const get = defineApi({
5
+ response: z.object({ ok: z.literal(true) }),
6
+ handler: async () => ({ ok: true as const }),
7
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Placeholder schema. Replace this table or add tables, then `robodev deploy`.
3
+ */
4
+ import { defineDatabase, pgTable, text, uuid } from "@robodev-ai/sdk";
5
+
6
+ export const items = pgTable("items", {
7
+ id: uuid("id").primaryKey().defaultRandom(),
8
+ name: text("name").notNull(),
9
+ });
10
+
11
+ export default defineDatabase({
12
+ name: "app",
13
+ tables: { items },
14
+ });
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "{{PACKAGE_NAME}}",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "deploy": "robodev deploy"
8
+ },
9
+ "dependencies": {
10
+ "@robodev-ai/sdk": "^0.6.0"
11
+ },
12
+ "devDependencies": {
13
+ "robodev": "^0.10.0",
14
+ "typescript": "^5.9.2"
15
+ }
16
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "skipLibCheck": true,
8
+ "noEmit": true
9
+ },
10
+ "include": ["database.ts", "api/**/*.ts"]
11
+ }
@@ -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 /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
15
+ `GET /me` and `GET /api/me` (`api/me.ts`) require 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`.
@@ -12,7 +12,7 @@
12
12
  "react": "^18.3.1",
13
13
  "react-dom": "^18.3.1",
14
14
  "@robodev-ai/sdk": "^0.6.0",
15
- "@robodev-ai/client": "^0.2.0"
15
+ "@robodev-ai/client": "^0.3.0"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "^18.3.24",
@@ -20,6 +20,6 @@
20
20
  "@vitejs/plugin-react": "^4.7.0",
21
21
  "typescript": "^5.9.2",
22
22
  "vite": "^6.3.5",
23
- "robodev": "^0.8.0"
23
+ "robodev": "^0.10.0"
24
24
  }
25
25
  }