bf1efb2099
- Migration 007: repo_url on apps table + analysis table with FTS5 - Analysis struct, parser, CRUD, validation, hash computation - Selective purge: remote-only apps/analysis preserved across fn index - CLI: fn app list/clone/pull, fn analysis list/clone/pull - search/show/list now include analysis results - Apps removed from git tracking (content lives in Gitea repos) - .gitkeep for apps/ and analysis/ dirs - Bash functions: jupyter analysis pipeline, shell utilities - Browser domain: CDP functions moved from infra to browser Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| chrome_launch | function | go | browser | 1.0.0 | impure | func ChromeLaunch(opts ChromeLaunchOpts) (int, error) | Lanza Google Chrome con remote debugging habilitado en el puerto indicado. Busca chrome.exe en PATH (WSL2) o en rutas conocidas de Windows. Espera hasta 15s a que el puerto CDP este listo antes de retornar. Retorna el PID del proceso. |
|
false | error_go_core |
|
true |
|
functions/infra/chrome_launch_test.go | functions/infra/chrome_launch.go |
Ejemplo
pid, err := ChromeLaunch(ChromeLaunchOpts{
Port: 9222,
UserDataDir: "/tmp/chrome-cdp",
Headless: true,
})
if err != nil {
log.Fatal(err)
}
defer CdpClose(nil, pid)
Notas
Busca Chrome en este orden:
chrome.exeen PATH (disponible en WSL2 si Windows lo tiene en PATH)google-chrome/chromium-browser/chromium(Linux nativo)/mnt/c/Program Files/Google/Chrome/Application/chrome.exe/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe
Los flags aplicados desactivan funcionalidades de red y actualizacion en segundo plano para entornos de automatizacion. En modo headless se agrega --headless=new --disable-gpu.
El struct ChromeLaunchOpts se define en el mismo archivo.