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