Skip to content

Commit 996dabf

Browse files
author
deepshekhardas
committed
fix: resolve deployment list schema, stream response serialization, and github install url
1 parent 73eea12 commit 996dabf

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.github.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ export function ConnectGitHubRepoModal({
514514
<TextLink
515515
target="_blank"
516516
rel="noreferrer noopener"
517-
to={`https://github.com/settings/installations/${selectedInstallation?.appInstallationId}`}
517+
to={`https://github.com/apps/trigger-dev-app/installations/${selectedInstallation?.appInstallationId}`}
518518
>
519519
GitHub
520520
</TextLink>
@@ -632,9 +632,9 @@ export function ConnectedGitHubRepoForm({
632632
useEffect(() => {
633633
const hasChanges =
634634
gitSettingsValues.productionBranch !==
635-
(connectedGitHubRepo.branchTracking?.prod?.branch || "") ||
635+
(connectedGitHubRepo.branchTracking?.prod?.branch || "") ||
636636
gitSettingsValues.stagingBranch !==
637-
(connectedGitHubRepo.branchTracking?.staging?.branch || "") ||
637+
(connectedGitHubRepo.branchTracking?.staging?.branch || "") ||
638638
gitSettingsValues.previewDeploymentsEnabled !== connectedGitHubRepo.previewDeploymentsEnabled;
639639
setHasGitSettingsChanges(hasChanges);
640640
}, [gitSettingsValues, connectedGitHubRepo]);
@@ -898,6 +898,6 @@ export function GitHubSettingsPanel({
898898
</Hint>
899899
)}
900900
</div>
901-
901+
902902
);
903903
}

packages/core/src/v3/apiClient/index.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,20 +1366,28 @@ export class ApiClient {
13661366
});
13671367
}
13681368

1369-
async appendToStream<TBody extends BodyInit>(
1369+
async appendToStream<TBody>(
13701370
runId: string,
13711371
target: string,
13721372
streamId: string,
13731373
part: TBody,
13741374
requestOptions?: ZodFetchOptions
13751375
) {
1376+
// Serialize object payloads to JSON to prevent [object Object] coercion by fetch
1377+
const body =
1378+
typeof part === "string" || part instanceof ArrayBuffer || part instanceof Blob ||
1379+
part instanceof FormData || part instanceof URLSearchParams ||
1380+
(typeof ReadableStream !== "undefined" && part instanceof ReadableStream)
1381+
? (part as BodyInit)
1382+
: JSON.stringify(part);
1383+
13761384
return zodfetch(
13771385
AppendToStreamResponseBody,
13781386
`${this.baseUrl}/realtime/v1/streams/${runId}/${target}/${streamId}/append`,
13791387
{
13801388
method: "POST",
13811389
headers: this.#getHeaders(false),
1382-
body: part,
1390+
body,
13831391
},
13841392
mergeRequestOptions(this.defaultRequestOptions, requestOptions)
13851393
);

packages/core/src/v3/schemas/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,8 +1514,8 @@ export const ApiDeploymentListResponseItem = z.object({
15141514
createdAt: z.coerce.date(),
15151515
shortCode: z.string(),
15161516
version: z.string(),
1517-
runtime: z.string(),
1518-
runtimeVersion: z.string(),
1517+
runtime: z.string().nullable(),
1518+
runtimeVersion: z.string().nullable(),
15191519
status: z.enum([
15201520
"PENDING",
15211521
"BUILDING",

0 commit comments

Comments
 (0)