robodev 0.33.0 → 0.34.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 +2 -2
- package/src/dev-server.ts +12 -0
- package/src/dev.ts +5 -0
- package/templates/auth-chat/package.json +1 -1
- package/templates/backend/package.json +1 -1
- package/templates/empty/package.json +1 -1
- package/templates/marketplace/package.json +1 -1
- package/templates/space/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robodev",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "CLI for Robodev Starbase — create, auth, link, deploy, and run a project locally with robodev dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"embedded-postgres": "17.10.0-beta.17",
|
|
26
26
|
"fastify": "^5.12.1",
|
|
27
27
|
"tsx": "^4.20.5",
|
|
28
|
-
"@robodev-ai/runtime": "0.
|
|
28
|
+
"@robodev-ai/runtime": "0.3.0",
|
|
29
29
|
"@robodev-ai/sdk": "0.11.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/dev-server.ts
CHANGED
|
@@ -35,6 +35,10 @@ export type DevServerOptions = {
|
|
|
35
35
|
log: (line: string) => void;
|
|
36
36
|
enqueue: (job: JobEnqueueInput) => Promise<{ id: string }>;
|
|
37
37
|
inspect: DevInspectStore;
|
|
38
|
+
listenOrigin: string;
|
|
39
|
+
brokerBaseUrl: string;
|
|
40
|
+
googleClientId?: string;
|
|
41
|
+
googleClientSecret?: string;
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
const SWAGGER_PATHS = new Set(["/_robodev/docs", "/_robodev/swagger", "/docs", "/swagger"]);
|
|
@@ -196,8 +200,16 @@ export async function startDevServer(
|
|
|
196
200
|
options.inspect.record({ kind: "auth_code", type, to, code });
|
|
197
201
|
options.log(`${type} code for ${to}: ${code}`);
|
|
198
202
|
},
|
|
203
|
+
listenOrigin: options.listenOrigin,
|
|
204
|
+
brokerBaseUrl: options.brokerBaseUrl,
|
|
205
|
+
googleClientId: options.googleClientId,
|
|
206
|
+
googleClientSecret: options.googleClientSecret,
|
|
199
207
|
},
|
|
200
208
|
);
|
|
209
|
+
if (result.headers?.Location) {
|
|
210
|
+
await reply.redirect(result.headers.Location);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
201
213
|
await reply.code(result.status).send(result.body);
|
|
202
214
|
return;
|
|
203
215
|
}
|
package/src/dev.ts
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
type DevProject,
|
|
30
30
|
} from "./dev-project.js";
|
|
31
31
|
import { externalDevPostgres, startDevPostgres, type DevPostgres } from "./dev-postgres.js";
|
|
32
|
+
import { starbaseUrl } from "./config.js";
|
|
32
33
|
import { devRouteClients } from "./dev-clients.js";
|
|
33
34
|
import { createDevInspect } from "./dev-inspect.js";
|
|
34
35
|
import { buildDevOpenApi, startDevServer, type DevRuntime } from "./dev-server.js";
|
|
@@ -270,6 +271,10 @@ export async function main(args: string[]): Promise<void> {
|
|
|
270
271
|
log,
|
|
271
272
|
inspect,
|
|
272
273
|
enqueue: (input) => engine.enqueue(input),
|
|
274
|
+
listenOrigin: `http://localhost:${parsed.port}`,
|
|
275
|
+
brokerBaseUrl: starbaseUrl(),
|
|
276
|
+
googleClientId: env.GOOGLE_CLIENT_ID,
|
|
277
|
+
googleClientSecret: env.GOOGLE_CLIENT_SECRET,
|
|
273
278
|
},
|
|
274
279
|
() => current,
|
|
275
280
|
);
|