Run real holesail in a Bare worker for Pear UI
CI / test (push) Successful in 9m59s

pear-electron cannot load bare-tcp (require.addon) in the renderer.
Use pear-run + workers/holesail-local.cjs so the actual holesail package
runs under Bare; Node still loads holesail in-process. Add connect
fallback modal with copy URL.
This commit is contained in:
2026-07-10 23:13:30 -04:00
parent 9e39c27b88
commit cc6df798e1
8 changed files with 470 additions and 22 deletions
+22 -1
View File
@@ -794,7 +794,28 @@ export async function connectLocalTunnel(url, opts = {}) {
return entry
} catch (err) {
completeActivity(false, err.message || 'Local Holesail failed')
presentError(err, 'holesailLocal', { showAlert })
const msg = err?.message || String(err)
// Designed modal with copy action (never rely on native confirm / alert alone)
try {
const copy = await confirmDialog({
title: 'Could not start local Holesail proxy',
body:
`${msg}\n\n` +
`You can still connect outside peardock:\n` +
`npx holesail '${url}'\n\n` +
`Then open http://127.0.0.1:<port> in your browser.`,
confirmLabel: 'Copy hs:// URL',
cancelLabel: 'Dismiss',
info: true,
icon: 'fa-plug-circle-xmark',
})
if (copy && navigator.clipboard?.writeText) {
await navigator.clipboard.writeText(url)
showAlert('success', 'Holesail URL copied')
}
} catch {
presentError(err, 'holesailLocal', { showAlert })
}
return null
}
}
+2
View File
@@ -201,6 +201,8 @@
margin: 0 0 1.15rem;
font-size: 0.92rem;
line-height: 1.55;
white-space: pre-wrap;
word-break: break-word;
}
.pd-modal-confirm-field {
margin: 0 0 1rem;