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() {
3434 }
3535
3636 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`!' ) ;
3838
3939 // Start a Webhook Server
4040
Original file line number Diff line number Diff line change 1919 "scripts" : {
2020 "test" : " ./scripts/test" ,
2121 "build" : " ./scripts/build" ,
22+ "postbuild" : " chmod +x ./dist/lib/bin/cli.js" ,
2223 "prepublishOnly" : " echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1" ,
2324 "format" : " ./scripts/format" ,
2425 "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
22
33import { program } from 'commander' ;
44import { listen } from './commands/listen' ;
Original file line number Diff line number Diff line change @@ -12,16 +12,16 @@ const tickRef: {
1212
1313export const listen = new Command ( 'listen' )
1414 . 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 ) => {
1717 // Auth
1818
1919 const client = createBrowserUseClient ( ) ;
2020 const secret = getBrowserUseWebhookSecret ( ) ;
2121
2222 // Proxy
2323
24- const { dev : localTargetEndpoint } = options ;
24+ const localTargetEndpoint = endpoint ;
2525
2626 if ( typeof localTargetEndpoint !== 'string' ) {
2727 // NOTE: This should never happen because the command is validated by commander.
@@ -158,7 +158,7 @@ export const listen = new Command('listen')
158158 queue . current = delivery . filter ( ( d ) => d . delivery === 'rejected' ) . map ( ( d ) => d . update ) ;
159159 } , 1_000 ) ;
160160
161- console . log ( `Listening in dev mode at : ${ localTargetEndpoint } ` ) ;
161+ console . log ( `Forwarding updates to : ${ localTargetEndpoint } ! ` ) ;
162162 } ) ;
163163
164164process . on ( 'SIGINT' , ( ) => {
You can’t perform that action at this time.
0 commit comments