Showing the changes to packages/platform/control-plane (2 of 6 files). Show all
Unified · Split
| @@ -396,10 +396,16 @@ const planHttpInvocation = (input: { · 395 unmodified lines | ||
| 396 | 396 | const executeHttpPlan = (requestPlan: HttpInvocationRequestPlan) => |
| 397 | 397 | Effect.tryPromise({ |
| 398 | 398 | try: async () => { |
| 399 | + const body = | |
| 400 | + requestPlan.body === undefined | |
| 401 | + ? undefined | |
| 402 | + : typeof requestPlan.body === "string" | |
| 403 | + ? requestPlan.body | |
| 404 | + : new Uint8Array(requestPlan.body).buffer; | |
| 399 | 405 | const response = await fetch(requestPlan.url, { |
| 400 | 406 | method: requestPlan.method, |
| 401 | 407 | headers: requestPlan.headers, |
| 402 | − ...(requestPlan.body !== undefined ? { body: requestPlan.body } : {}), | |
| 408 | + ...(body !== undefined ? { body } : {}), | |
| 403 | 409 | }); |
| 404 | 410 | const responseBody = await decodeFetchBody(response); |
| 405 | 411 | return executionEnvelope({ |
| @@ -57,7 +57,7 @@ import { · 56 unmodified lines | ||
| 57 | 57 | const FIXTURE_WORKSPACE_ID = WorkspaceIdSchema.make("ws_source_fixture_matrix"); |
| 58 | 58 | |
| 59 | 59 | const readFixture = (name: string): string => |
| 60 | − readFileSync(new URL(`./fixtures/${name}`, import.meta.url), "utf8"); | |
| 60 | + readFileSync(new URL(`../fixtures/${name}`, import.meta.url), "utf8"); | |
| 61 | 61 | |
| 62 | 62 | const makeSource = (input: { |
| 63 | 63 | id: string; |