Merge wasm-port-bd-44d0: Add npm package with native binaries
Merges complete npm package implementation for @beads/bd. Features: - npm package wrapping native bd binaries - Automatic platform-specific binary download - Claude Code for Web integration via SessionStart hooks - Comprehensive integration test suite (5 tests, all passing) - Complete documentation (6 guides) - Release process documentation Published to npm: https://www.npmjs.com/package/@beads/bd Benefits over WASM: - Full SQLite support (native vs custom VFS) - Better performance - Simpler implementation and maintenance - 100% feature parity with standalone bd Closes bd-febc
This commit is contained in:
14
cmd/bd/daemon_lock_wasm.go
Normal file
14
cmd/bd/daemon_lock_wasm.go
Normal file
@@ -0,0 +1,14 @@
|
||||
//go:build js && wasm
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func flockExclusive(f *os.File) error {
|
||||
// WASM doesn't support file locking
|
||||
// In a WASM environment, we're typically single-process anyway
|
||||
return fmt.Errorf("file locking not supported in WASM")
|
||||
}
|
||||
28
cmd/bd/daemon_wasm.go
Normal file
28
cmd/bd/daemon_wasm.go
Normal file
@@ -0,0 +1,28 @@
|
||||
//go:build js && wasm
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// WASM doesn't support signals or process management
|
||||
var daemonSignals = []os.Signal{}
|
||||
|
||||
func configureDaemonProcess(cmd *exec.Cmd) {
|
||||
// No-op in WASM
|
||||
}
|
||||
|
||||
func sendStopSignal(process *os.Process) error {
|
||||
return fmt.Errorf("daemon operations not supported in WASM")
|
||||
}
|
||||
|
||||
func isReloadSignal(sig os.Signal) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func isProcessRunning(pid int) bool {
|
||||
return false
|
||||
}
|
||||
@@ -16,7 +16,8 @@ import (
|
||||
"github.com/steveyegge/beads"
|
||||
"github.com/steveyegge/beads/internal/configfile"
|
||||
"github.com/steveyegge/beads/internal/daemon"
|
||||
_ "modernc.org/sqlite"
|
||||
_ "github.com/ncruces/go-sqlite3/driver"
|
||||
_ "github.com/ncruces/go-sqlite3/embed"
|
||||
)
|
||||
|
||||
// Status constants for doctor checks
|
||||
|
||||
@@ -16,7 +16,8 @@ import (
|
||||
"github.com/steveyegge/beads/internal/storage/sqlite"
|
||||
"github.com/steveyegge/beads/internal/types"
|
||||
"github.com/steveyegge/beads/internal/utils"
|
||||
_ "modernc.org/sqlite"
|
||||
_ "github.com/ncruces/go-sqlite3/driver"
|
||||
_ "github.com/ncruces/go-sqlite3/embed"
|
||||
)
|
||||
|
||||
var migrateCmd = &cobra.Command{
|
||||
|
||||
Reference in New Issue
Block a user