File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ async function main() {
34
34
}
35
35
36
36
console . log ( 'Starting Browser Use Webhook Example' ) ;
37
- console . log ( 'Run `browser-use listen --dev http://localhost:3000/webhook`!' ) ;
37
+ console . log ( 'Run `browser-use listen http://localhost:3000/webhook`!' ) ;
38
38
39
39
// Start a Webhook Server
40
40
Original file line number Diff line number Diff line change 19
19
"scripts" : {
20
20
"test" : " ./scripts/test" ,
21
21
"build" : " ./scripts/build" ,
22
+ "postbuild" : " chmod +x ./dist/lib/bin/cli.js" ,
22
23
"prepublishOnly" : " echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1" ,
23
24
"format" : " ./scripts/format" ,
24
25
"prepare" : " if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build && ./scripts/utils/git-swap.sh; fi" ,
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env -S npm run tsn -T
1
+ #!/usr/bin/env node
2
2
3
3
import { program } from 'commander' ;
4
4
import { listen } from './commands/listen' ;
Original file line number Diff line number Diff line change @@ -12,16 +12,16 @@ const tickRef: {
12
12
13
13
export const listen = new Command ( 'listen' )
14
14
. description ( `Open a local webhook to receive Cloud API updates from the CLI on your local machine.` )
15
- . option ( '-d, --dev <endpoint>', 'The endpoint to forward updates to.' )
16
- . action ( async ( options ) => {
15
+ . argument ( ' <endpoint>', 'The endpoint to forward updates to.' )
16
+ . action ( async ( endpoint ) => {
17
17
// Auth
18
18
19
19
const client = createBrowserUseClient ( ) ;
20
20
const secret = getBrowserUseWebhookSecret ( ) ;
21
21
22
22
// Proxy
23
23
24
- const { dev : localTargetEndpoint } = options ;
24
+ const localTargetEndpoint = endpoint ;
25
25
26
26
if ( typeof localTargetEndpoint !== 'string' ) {
27
27
// NOTE: This should never happen because the command is validated by commander.
@@ -158,7 +158,7 @@ export const listen = new Command('listen')
158
158
queue . current = delivery . filter ( ( d ) => d . delivery === 'rejected' ) . map ( ( d ) => d . update ) ;
159
159
} , 1_000 ) ;
160
160
161
- console . log ( `Listening in dev mode at : ${ localTargetEndpoint } ` ) ;
161
+ console . log ( `Forwarding updates to : ${ localTargetEndpoint } ! ` ) ;
162
162
} ) ;
163
163
164
164
process . on ( 'SIGINT' , ( ) => {
You can’t perform that action at this time.
0 commit comments