Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(tailscale): existing Serve handlers are no longer overwritten or removed #18068

Closedlastobelus(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/18068/headopened View on GitHub

Showing 13 changed files with 135 additions and 6 deletions (loading 12).

x
0 of 13 viewed, 13 left
135 additions and 6 deletionsapps/desktop/src/backend/DesktopServerExposure.test.tsModified
View file
@@ -7,6 +7,7 @@
import * as Fiber from "effect/Fiber";
import * as FileSystem from "effect/FileSystem";
import * as Layer from "effect/Layer";
+import * as Option from "effect/Option";
import * as Sink from "effect/Sink";
import * as Stream from "effect/Stream";
import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
@@ -40,14 +41,15 @@
],
};
​
-function layerMockSpawner(statusJson = "{}") {
+function layerMockSpawner(statusJson = "{}", calls?: Array<ReadonlyArray<string>>, exitCode = 0) {
return Layer.succeed(
ChildProcessSpawner.ChildProcessSpawner,
- ChildProcessSpawner.make(() =>
- Effect.succeed(
+ ChildProcessSpawner.make((command) => {
+ calls?.push("args" in command ? command.args : []);
+ return Effect.succeed(
ChildProcessSpawner.makeHandle({
pid: ChildProcessSpawner.ProcessId(1),
- exitCode: Effect.succeed(ChildProcessSpawner.ExitCode(0)),
+ exitCode: Effect.succeed(ChildProcessSpawner.ExitCode(exitCode)),
isRunning: Effect.succeed(false),
kill: () => Effect.void,
unref: Effect.succeed(Effect.void),