|
|
-
dir
:
string
|
|
|
Where the preload bundle is, for webPreferences.preload. webpack.config.preload.js writes it
beside the main bundle in both development and production, so no branch is needed here.
-
()
:
unit
-
Returns:
string
|
|
|
Register every bridge channel. Called once, before any window exists.
-
()
:
unit
|
|
|
Start the sidecar, and start it again if it dies. In development that is `dotnet run`, which
builds first when it must - the port channel below answers null until the handshake lands, so a
slow first build costs nothing but waiting. In production it is the self-contained binary
electron-builder placed under resources/sidecar (scripts/publish-sidecar.js).
**What a restart does and does not recover.** The transport comes back on its own: the port
channel answers the new port, and the renderer's `request` connects when it has no socket, so
the next thing asked of the simulator reaches the new process. What does NOT come back is the
simulation - the new process holds no design and no session, so every command naming the old
session's epoch is refused by name, which is exactly what that number is for. The user's next
Start or Refresh builds again and works.
It is deliberately left there. Rebuilding from here would mean this side deciding to simulate,
and "nothing but a start path builds" is the rule that deleted the build-retry storm
(docs/dev/sidecarInvariants.md, section J). A restart that silently rebuilt would also be a
simulation the user did not ask for, of whatever design happened to be open.
-
()
:
unit
|
|
|
Absolute path to the static asset directory.
The renderer used to work this out three different ways - a bare "./resources/static" relative to
the working directory on Windows and Linux, and __dirname/../../static on macOS. Both land on the
same place as process.resourcesPath, which is what Main.fs already uses for the splash page, so
this collapses them into the one reliable form.
-
()
:
unit
-
Returns:
string
|