robodev 0.8.0 → 0.9.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/src/index.ts +12 -1
- package/templates/auth-chat/package.json +1 -1
- package/templates/backend/package.json +1 -1
- package/templates/catalog.json +6 -0
- package/templates/empty/README.md +15 -0
- package/templates/empty/api/health.ts +7 -0
- package/templates/empty/database.ts +14 -0
- package/templates/empty/package.json +16 -0
- package/templates/empty/tsconfig.json +11 -0
- package/templates/space/package.json +1 -1
package/package.json
CHANGED
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
|
|
package/templates/catalog.json
CHANGED
|
@@ -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,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.9.0",
|
|
14
|
+
"typescript": "^5.9.2"
|
|
15
|
+
}
|
|
16
|
+
}
|