Prepare datamodel for multi-environment (#1765)
Co-authored-by: justsomelegs <[email protected]> Co-authored-by: codex <[email protected]> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>
This commit is contained in:
121 files changed
+10195
-4958
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { EnvironmentId } from "@t3tools/contracts";
|
||||
import { assert, it } from "@effect/vitest";
|
||||
import { assertTrue } from "@effect/vitest/utils";
|
||||
import { Effect, Option } from "effect";
|
||||
@@ -9,12 +10,20 @@ it.effect(
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const lifecycleEvents = yield* ServerLifecycleEvents;
|
||||
const environment = {
|
||||
environmentId: EnvironmentId.makeUnsafe("environment-test"),
|
||||
label: "Test environment",
|
||||
platform: { os: "darwin" as const, arch: "arm64" as const },
|
||||
serverVersion: "0.0.0-test",
|
||||
capabilities: { repositoryIdentity: true },
|
||||
};
|
||||
|
||||
const welcome = yield* lifecycleEvents
|
||||
.publish({
|
||||
version: 1,
|
||||
type: "welcome",
|
||||
payload: {
|
||||
environment,
|
||||
cwd: "/tmp/project",
|
||||
projectName: "project",
|
||||
},
|
||||
@@ -29,6 +38,7 @@ it.effect(
|
||||
type: "ready",
|
||||
payload: {
|
||||
at: new Date().toISOString(),
|
||||
environment,
|
||||
},
|
||||
})
|
||||
.pipe(Effect.timeoutOption("50 millis"));
|
||||
|
||||
Reference in new issue
Block a user