alepha@docs:~/docs/packages/@alepha-desktop$
cat shell.md | pretty2 min read
Last commit:
#@alepha/desktop - Shell
#Installation
npm install @alepha/desktop
#Overview
The main thread of a compiled desktop app: the native window, the instance lock, and the supervisor that owns the server Worker.
alepha compile --desktop generates the entry that runs it: it creates an
Alepha container with this module, points WorkerSupervisorProvider
at the generated supervisor Worker, and exits with what
DesktopShell``.run() answers.
Native code (webview-bun, the Objective-C runtime, flock) loads lazily on
first use, so importing this module has no native side effect. In tests the
window, the lock and the supervisor are memory implementations.
macOS only.
#API Reference
#Providers
InstanceLockProvider- One running instance per app identifier.LogFileProvider- Points the process's stdout and stderr at a file.MemoryInstanceLockProvider-InstanceLockProviderfor specs:heldplays another processMemoryLogFileProvider-LogFileProviderfor specs: records the redirects, and fails whenMemorySupervisorProvider- A scripted supervisor for specs.crashplays the server dyingMemoryWindowProvider- A window that only records what was asked of it.NativeInstanceLockProvider-InstanceLockProvideron an exclusiveflock, which the kernelNativeLogFileProvider-LogFileProviderwithdup2.NativeWindowProvider- The macOS window: webview-bun on the main thread, plus a menu and alertsSupervisorProvider- The shell's view of the supervisor: the thread that owns the server WorkerWindowProvider- The native window of a desktop app, behind which the webview binding andWorkerSupervisorProvider-SupervisorProvideron a real supervisor Worker running