Skip to content
Source
Sign inSign up
pingdotgg/t3code

Bootstrap default thread on server welcome and simplify dev runner behavior #101

Mergedjuliusmarmingemerged 6 commits intomain fromcodething/ad120d1fmerged by juliusmarminge View on GitHub

Showing 6 changed files with 148 additions and 10 deletions (loading 4).

x
0 of 6 viewed, 6 left
98 additions and 3 deletionsapps/server/src/wsServer.test.tsModified
View file
@@ -3,6 +3,7 @@
import os from "node:os";
import path from "node:path";
​
+import * as NodeServices from "@effect/platform-node/NodeServices";
import { Effect, Exit, Layer, PubSub, Scope, Stream } from "effect";
import { describe, expect, it, afterEach, vi } from "vitest";
import { createServer } from "./wsServer";
@@ -38,7 +39,7 @@
TerminalWriteInput,
} from "@t3tools/contracts";
import { TerminalManager, type TerminalManagerShape } from "./terminal/Services/Manager";
-import { SqlitePersistenceMemory } from "./persistence/Layers/Sqlite";
+import { makeSqlitePersistenceLive, SqlitePersistenceMemory } from "./persistence/Layers/Sqlite";
import { SqlClient } from "effect/unstable/sql";
import { ProviderService, type ProviderServiceShape } from "./provider/Services/ProviderService";
import { Open, type OpenShape } from "./open";
@@ -448,23 +449,117 @@
​
const ws = await connectWs(port);
connections.push(ws);
- await waitForMessage(ws); // welcome
+ const welcome = (await waitForMessage(ws)) as WsPush; // welcome
+ expect(welcome.channel).toBe(WS_CHANNELS.serverWelcome);
+ expect(welcome.data).toEqual(
+ expect.objectContaining({
+ cwd: "/test/bootstrap-workspace",
+ projectName: "bootstrap-workspace",