feat(connect): keep macOS hosts reachable after reboot
This commit is contained in:
12 files changed
+690
-91
No files matched your search
@@ -21,8 +21,8 @@ export const ExecutionEnvironmentPlatform = Schema.Struct({
|
||||
export type ExecutionEnvironmentPlatform = typeof ExecutionEnvironmentPlatform.Type;
|
||||
|
||||
/** How a server can replace itself with another version when asked over RPC:
|
||||
"boot-service" rewrites the systemd user unit and restarts it; "respawn"
|
||||
installs the target version and respawns the foreground process. */
|
||||
"boot-service" hands off through its systemd unit or macOS LaunchAgent;
|
||||
"respawn" installs the target version and replaces the foreground process. */
|
||||
export const ServerSelfUpdateMethod = Schema.Literals(["boot-service", "respawn"]);
|
||||
export type ServerSelfUpdateMethod = typeof ServerSelfUpdateMethod.Type;
|
||||
|
||||
|
||||
@@ -51,4 +51,11 @@ export const HostProcessArguments = Context.Reference<ReadonlyArray<string>>(
|
||||
},
|
||||
);
|
||||
|
||||
export const HostProcessUserId = Context.Reference<number | null>(
|
||||
"@t3tools/shared/hostProcess/HostProcessUserId",
|
||||
{
|
||||
defaultValue: () => (typeof process.getuid === "function" ? process.getuid() : null),
|
||||
},
|
||||
);
|
||||
|
||||
export const isHostWindows = Effect.map(HostProcessPlatform, (platform) => platform === "win32");
|
||||
Reference in new issue
Block a user