@actionbookdev/cli 0.2.1 → 0.2.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAInC,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAInC,eAAO,MAAM,cAAc,SA0BvB,CAAA"}
|
package/dist/commands/browser.js
CHANGED
|
@@ -1,44 +1,26 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
2
|
import { spawnAgentBrowser, installAgentBrowser } from '../utils/process.js';
|
|
4
3
|
export const browserCommand = new Command('browser')
|
|
5
4
|
.description('Execute actionbook browser commands (browser automation)')
|
|
6
5
|
.allowUnknownOption(true) // Critical: allow any args through
|
|
7
6
|
.allowExcessArguments(true)
|
|
8
|
-
.helpOption(
|
|
9
|
-
.addHelpText('after', `
|
|
10
|
-
Examples:
|
|
11
|
-
$ actionbook browser open example.com
|
|
12
|
-
$ actionbook browser snapshot -i
|
|
13
|
-
$ actionbook browser click @e1
|
|
14
|
-
$ actionbook browser fill @e3 "test@example.com"
|
|
15
|
-
|
|
16
|
-
Setup:
|
|
17
|
-
$ actionbook browser install # Download Chromium browser
|
|
18
|
-
$ actionbook browser install --with-deps # Linux: include system dependencies
|
|
19
|
-
|
|
20
|
-
For detailed commands:
|
|
21
|
-
$ actionbook browser
|
|
22
|
-
|
|
23
|
-
Learn more: ${chalk.cyan('https://github.com/vercel-labs/agent-browser')}
|
|
24
|
-
`)
|
|
7
|
+
.helpOption(false) // Disable built-in help, forward to agent-browser instead
|
|
25
8
|
.action(async (_options, command) => {
|
|
26
9
|
// Get all arguments passed after 'browser'
|
|
27
10
|
const args = command.args;
|
|
28
|
-
// If no args
|
|
11
|
+
// If no args, show agent-browser help
|
|
29
12
|
if (args.length === 0) {
|
|
30
|
-
console.log(chalk.yellow('No arguments provided. Showing agent-browser help:\n'));
|
|
31
13
|
const exitCode = await spawnAgentBrowser(['--help']);
|
|
32
14
|
process.exit(exitCode);
|
|
33
15
|
return;
|
|
34
16
|
}
|
|
35
|
-
// Special handling for 'install' command
|
|
17
|
+
// Special handling for 'install' command
|
|
36
18
|
if (args[0] === 'install') {
|
|
37
19
|
const exitCode = await installAgentBrowser(args.slice(1));
|
|
38
20
|
process.exit(exitCode);
|
|
39
21
|
return;
|
|
40
22
|
}
|
|
41
|
-
//
|
|
23
|
+
// Forward all args to agent-browser (including -h, --help)
|
|
42
24
|
const exitCode = await spawnAgentBrowser(args);
|
|
43
25
|
process.exit(exitCode);
|
|
44
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE5E,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC;KACjD,WAAW,CAAC,0DAA0D,CAAC;KACvE,kBAAkB,CAAC,IAAI,CAAC,CAAC,mCAAmC;KAC5D,oBAAoB,CAAC,IAAI,CAAC;KAC1B,UAAU,CAAC,KAAK,CAAC,CAAC,0DAA0D;KAC5E,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IACl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