@@ -41,15 +41,21 @@ for (const [os, arch] of targets) {
4141
4242 const opentui = `@opentui/core-${ os === "windows" ? "win32" : os } -${ arch . replace ( "-baseline" , "" ) } `
4343 await $ `mkdir -p ../../node_modules/${ opentui } `
44- await $ `npm pack ${ opentui } @${ pkg . dependencies [ "@opentui/core" ] } ` . cwd ( path . join ( dir , "../../node_modules" ) )
44+ await $ `npm pack ${ opentui } @${ pkg . dependencies [ "@opentui/core" ] } ` . cwd (
45+ path . join ( dir , "../../node_modules" ) ,
46+ )
4547 await $ `tar -xf ../../node_modules/${ opentui . replace ( "@opentui/" , "opentui-" ) } -*.tgz -C ../../node_modules/${ opentui } --strip-components=1`
4648
4749 const watcher = `@parcel/watcher-${ os === "windows" ? "win32" : os } -${ arch . replace ( "-baseline" , "" ) } ${ os === "linux" ? "-glibc" : "" } `
4850 await $ `mkdir -p ../../node_modules/${ watcher } `
4951 await $ `npm pack ${ watcher } ` . cwd ( path . join ( dir , "../../node_modules" ) ) . quiet ( )
5052 await $ `tar -xf ../../node_modules/${ watcher . replace ( "@parcel/" , "parcel-" ) } -*.tgz -C ../../node_modules/${ watcher } --strip-components=1`
5153
52- const parserWorker = fs . realpathSync ( path . resolve ( dir , "./node_modules/@opentui/core/parser.worker.js" ) )
54+ const parserWorker = fs . realpathSync (
55+ path . resolve ( dir , "./node_modules/@opentui/core/parser.worker.js" ) ,
56+ )
57+ const workerPath = "./src/cli/cmd/tui/worker.ts"
58+
5359 await Bun . build ( {
5460 conditions : [ "browser" ] ,
5561 tsconfig : "./tsconfig.json" ,
@@ -61,10 +67,11 @@ for (const [os, arch] of targets) {
6167 execArgv : [ `--user-agent=opencode/${ Script . version } ` , `--env-file=""` , `--` ] ,
6268 windows : { } ,
6369 } ,
64- entrypoints : [ "./src/index.ts" , parserWorker , "./src/cli/cmd/tui/worker.ts" ] ,
70+ entrypoints : [ "./src/index.ts" , parserWorker , workerPath ] ,
6571 define : {
6672 OPENCODE_VERSION : `'${ Script . version } '` ,
6773 OTUI_TREE_SITTER_WORKER_PATH : "/$bunfs/root/" + path . relative ( dir , parserWorker ) ,
74+ OPENCODE_WORKER_PATH : workerPath ,
6875 OPENCODE_CHANNEL : `'${ Script . channel } '` ,
6976 } ,
7077 } )
0 commit comments