Unified · Split
| @@ -4,11 +4,11 @@ import { FileSystem, HttpApiBuilder, HttpServer } from "@effect/platform"; · 3 unmodified lines | ||
| 4 | 4 | import { NodeFileSystem, NodeHttpServer } from "@effect/platform-node"; |
| 5 | 5 | import { describe, expect, it } from "@effect/vitest"; |
| 6 | 6 | import { |
| 7 | − createControlPlaneApiLayer, | |
| 7 | + createExecutorApiLayer, | |
| 8 | 8 | } from "@executor/platform-api"; |
| 9 | 9 | import { createExecutorEffect } from "@executor/platform-sdk"; |
| 10 | −import type { ControlPlaneRuntime } from "@executor/platform-sdk/runtime"; | |
| 11 | −import { createLocalControlPlaneRuntime as createControlPlaneRuntime } from "@executor/platform-sdk-file"; | |
| 10 | +import type { ExecutorRuntime } from "@executor/platform-sdk/runtime"; | |
| 11 | +import { createLocalExecutorRuntime as createExecutorRuntime } from "@executor/platform-sdk-file"; | |
| 12 | 12 | import type { |
| 13 | 13 | LocalInstallation, |
| 14 | 14 | Source, |
| @@ -70,7 +70,7 @@ type RunningServer = { · 55 unmodified lines | ||
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | 72 | type ApiServer = RunningServer & { |
| 73 | − runtime: ControlPlaneRuntime; | |
| 73 | + runtime: ExecutorRuntime; | |
| 74 | 74 | }; |
| 75 | 75 | |
| 76 | 76 | type HookHarness<T> = { |
| @@ -102,7 +102,7 @@ const startControlPlaneServer = async (): Promise<ApiServer> => { · 25 unmodified lines | ||
| 102 | 102 | ), |
| 103 | 103 | ); |
| 104 | 104 | const runtime = await Effect.runPromise( |
| 105 | − createControlPlaneRuntime({ | |
| 105 | + createExecutorRuntime({ | |
| 106 | 106 | workspaceRoot, |
| 107 | 107 | }), |
| 108 | 108 | ); |
| @@ -117,7 +117,7 @@ const startControlPlaneServer = async (): Promise<ApiServer> => { · 8 unmodified lines | ||
| 117 | 117 | }), |
| 118 | 118 | ); |
| 119 | 119 | const serverLayer = HttpApiBuilder.serve().pipe( |
| 120 | − Layer.provide(createControlPlaneApiLayer(executor)), | |
| 120 | + Layer.provide(createExecutorApiLayer(executor)), | |
| 121 | 121 | Layer.provideMerge(NodeHttpServer.layerTest), |
| 122 | 122 | ); |
| 123 | 123 | const context = await Effect.runPromise(Layer.buildWithScope(serverLayer, scope)); |
| @@ -2,8 +2,8 @@ import { Atom, Result } from "@effect-atom/atom"; · 1 unmodified line | ||
| 2 | 2 | import type * as Registry from "@effect-atom/atom/Registry"; |
| 3 | 3 | import { RegistryContext, RegistryProvider, useAtomValue } from "@effect-atom/atom-react"; |
| 4 | 4 | import { |
| 5 | − createControlPlaneClient, | |
| 6 | − type ControlPlaneClient, | |
| 5 | + createExecutorApiClient, | |
| 6 | + type ExecutorApiClient, | |
| 7 | 7 | } from "@executor/platform-api/client"; |
| 8 | 8 | import { |
| 9 | 9 | type CompleteSourceOAuthResult, |
| @@ -238,13 +238,13 @@ const logExecutorDevError = (label: string, details: Record<string, unknown>): v · 228 unmodified lines | ||
| 238 | 238 | const runControlPlane = async <A>(input: { |
| 239 | 239 | baseUrl?: string; |
| 240 | 240 | accountId?: string; |
| 241 | − execute: (client: ControlPlaneClient) => Effect.Effect<A, unknown, never>; | |
| 241 | + execute: (client: ExecutorApiClient) => Effect.Effect<A, unknown, never>; | |
| 242 | 242 | }): Promise<A> => { |
| 243 | 243 | const baseUrl = input.baseUrl ?? apiBaseUrl; |
| 244 | 244 | const accountId = input.accountId; |
| 245 | 245 | |
| 246 | 246 | const exit = await Effect.runPromiseExit( |
| 247 | − createControlPlaneClient({ | |
| 247 | + createExecutorApiClient({ | |
| 248 | 248 | baseUrl, |
| 249 | 249 | ...(accountId !== undefined ? { accountId } : {}), |
| 250 | 250 | }).pipe(Effect.flatMap(input.execute)), |
| @@ -267,7 +267,7 @@ const runControlPlane = async <A>(input: { · 16 unmodified lines | ||
| 267 | 267 | const controlPlaneRequest = <A>(input: { |
| 268 | 268 | baseUrl?: string; |
| 269 | 269 | accountId?: string; |
| 270 | − execute: (client: ControlPlaneClient) => Effect.Effect<A, unknown, never>; | |
| 270 | + execute: (client: ExecutorApiClient) => Effect.Effect<A, unknown, never>; | |
| 271 | 271 | }): Effect.Effect<A, Error> => |
| 272 | 272 | Effect.tryPromise({ |
| 273 | 273 | try: () => runControlPlane(input), |