Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-functions-core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"browse": patch
---

Use the shared `@browserbasehq/sdk-functions/core` implementation for Functions scaffolding, local development, publishing, and invocation.
5 changes: 1 addition & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,21 @@
},
"dependencies": {
"@browserbasehq/sdk": "^2.17.0",
"@browserbasehq/sdk-functions": "catalog:",
"@browserbasehq/stagehand": "workspace:*",
"@oclif/core": "^4.11.0",
"@vercel/detect-agent": "^1.2.3",
"archiver": "^7.0.1",
"deepmerge": "^4.3.1",
"dotenv": "^16.5.0",
"fastest-levenshtein": "^1.0.16",
"http-status-codes": "^2.3.0",
"ignore": "^7.0.5",
"node-html-markdown": "^1.3.0",
"semver": "^7.7.4",
"tsx": "^4.20.6",
"ws": "^8.18.3",
"zod": "^4.2.1"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/archiver": "^6.0.3",
"@types/node": "^20.11.30",
"@types/semver": "^7.7.1",
"@types/ws": "^8.18.1",
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/commands/functions/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export default class FunctionsDev extends BrowseCommand {
helpValue: "<apiKey>",
}),
"base-url": Flags.string({
aliases: ["api-url"],
char: "u",
description: "Override the Browserbase API base URL.",
helpValue: "<baseUrl>",
}),
Expand All @@ -38,6 +40,10 @@ export default class FunctionsDev extends BrowseCommand {
description: "Port to listen on.",
helpValue: "<port>",
}),
"project-id": Flags.string({
description: "Browserbase project ID used for local browser sessions.",
helpValue: "<projectId>",
}),
verbose: Flags.boolean({
description: "Print verbose runtime logs.",
}),
Expand All @@ -51,6 +57,7 @@ export default class FunctionsDev extends BrowseCommand {
entrypoint: args.entrypoint,
host: flags.host,
port: flags.port,
projectId: flags["project-id"],
verbose: flags.verbose ?? false,
});
}
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/commands/functions/invoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export default class FunctionsInvoke extends BrowseCommand {
helpValue: "<apiKey>",
}),
"base-url": Flags.string({
aliases: ["api-url"],
char: "u",
description: "Override the Browserbase API base URL.",
helpValue: "<baseUrl>",
}),
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/commands/functions/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ export default class FunctionsPublish extends BrowseCommand {
helpValue: "<apiKey>",
}),
"base-url": Flags.string({
aliases: ["api-url"],
char: "u",
description: "Override the Browserbase API base URL.",
helpValue: "<baseUrl>",
}),
"dry-run": Flags.boolean({
description: "Show what would be published without uploading.",
}),
"project-id": Flags.string({
description: "Browserbase project ID to publish into.",
helpValue: "<projectId>",
}),
};

async run(): Promise<void> {
Expand All @@ -40,6 +46,7 @@ export default class FunctionsPublish extends BrowseCommand {
baseUrl: flags["base-url"],
dryRun: flags["dry-run"] ?? false,
entrypoint: args.entrypoint,
projectId: flags["project-id"],
});
}
}
Loading
Loading