@browserbasehq/browse-cli 0.5.0-alpha-666baf1 → 0.5.0-alpha-902ef50
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/README.md +0 -1
- package/dist/index.js +19 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -239,7 +239,6 @@ browse status
|
|
|
239
239
|
|----------|-------------|
|
|
240
240
|
| `BROWSE_SESSION` | Default session name (alternative to `--session`) |
|
|
241
241
|
| `BROWSERBASE_API_KEY` | Browserbase API key (required for `browse env remote`) |
|
|
242
|
-
| `BROWSERBASE_PROJECT_ID` | Browserbase project ID (optional, passed through if set) |
|
|
243
242
|
|
|
244
243
|
## Element References
|
|
245
244
|
|
package/dist/index.js
CHANGED
|
@@ -14413,7 +14413,7 @@ var init_api2 = __esm({
|
|
|
14413
14413
|
}),
|
|
14414
14414
|
modelName: external_exports.string().meta({
|
|
14415
14415
|
description: "Model name string with provider prefix (e.g., 'openai/gpt-5-nano')",
|
|
14416
|
-
example: "openai/gpt-5-
|
|
14416
|
+
example: "openai/gpt-5.4-mini"
|
|
14417
14417
|
}),
|
|
14418
14418
|
apiKey: external_exports.string().optional().meta({
|
|
14419
14419
|
description: "API key for the model provider",
|
|
@@ -14556,7 +14556,7 @@ var init_api2 = __esm({
|
|
|
14556
14556
|
SessionStartRequestSchema = external_exports.object({
|
|
14557
14557
|
modelName: external_exports.string().meta({
|
|
14558
14558
|
description: "Model name to use for AI operations",
|
|
14559
|
-
example: "openai/gpt-
|
|
14559
|
+
example: "openai/gpt-5.4-mini"
|
|
14560
14560
|
}),
|
|
14561
14561
|
domSettleTimeoutMs: external_exports.number().optional().meta({
|
|
14562
14562
|
description: "Timeout in ms to wait for DOM to settle",
|
|
@@ -165541,6 +165541,13 @@ async function executeCommand(context, command, args, stagehand) {
|
|
|
165541
165541
|
await stagehand.act(action);
|
|
165542
165542
|
return { selected: values };
|
|
165543
165543
|
}
|
|
165544
|
+
case "upload": {
|
|
165545
|
+
const [selector, filePaths] = args;
|
|
165546
|
+
const resolved = resolveSelector(selector);
|
|
165547
|
+
const files = filePaths.length === 1 ? filePaths[0] : filePaths;
|
|
165548
|
+
await page.deepLocator(resolved).setInputFiles(files);
|
|
165549
|
+
return { uploaded: true, files: filePaths };
|
|
165550
|
+
}
|
|
165544
165551
|
case "highlight": {
|
|
165545
165552
|
const [selector, duration3] = args;
|
|
165546
165553
|
await page.deepLocator(resolveSelector(selector)).highlight({ durationMs: duration3 ?? 2e3 });
|
|
@@ -166584,6 +166591,16 @@ program.command("select <selector> <values...>").description("Select option(s)")
|
|
|
166584
166591
|
process.exit(1);
|
|
166585
166592
|
}
|
|
166586
166593
|
});
|
|
166594
|
+
program.command("upload <selector> <files...>").description('Upload file(s) to an <input type="file"> element').action(async (selector, files) => {
|
|
166595
|
+
const opts = program.opts();
|
|
166596
|
+
try {
|
|
166597
|
+
const result = await runCommand("upload", [selector, files]);
|
|
166598
|
+
output(result, opts.json ?? false);
|
|
166599
|
+
} catch (e3) {
|
|
166600
|
+
console.error("Error:", e3 instanceof Error ? e3.message : e3);
|
|
166601
|
+
process.exit(1);
|
|
166602
|
+
}
|
|
166603
|
+
});
|
|
166587
166604
|
program.command("highlight <selector>").description("Highlight element").option("-d, --duration <ms>", "Duration", "2000").action(async (selector, cmdOpts) => {
|
|
166588
166605
|
const opts = program.opts();
|
|
166589
166606
|
try {
|