Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ type CurrentVersion = {
tag: string;
name: string;
status: string;
deploymentId: string;
createdAt: string;
message: string | null;
metadata: Record<string, string>;
};

type Target = {
Expand Down Expand Up @@ -60,6 +64,10 @@ function evalSelector(selector: string, version: CurrentVersion | null) {
tag: version.tag,
name: version.name,
status: version.status,
deploymentId: version.deploymentId,
createdAt: version.createdAt,
message: version.message ?? "",
metadata: version.metadata ?? {},
},
}),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ type CurrentVersion = {
tag: string;
name: string;
status: string;
deploymentId: string;
createdAt: string;
message: string | null;
metadata: Record<string, string>;
environmentId: string;
completedAt: string | null;
};
Expand All @@ -35,6 +39,10 @@ function evalSelector(selector: string, version: CurrentVersion | null) {
tag: version.tag,
name: version.name,
status: version.status,
deploymentId: version.deploymentId,
createdAt: version.createdAt,
message: version.message ?? "",
metadata: version.metadata ?? {},
},
}),
);
Expand Down
11 changes: 11 additions & 0 deletions packages/trpc/src/routes/deployment-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ export const deploymentVersionsRouter = router({
tag: string;
name: string;
status: string;
deploymentId: string;
createdAt: string;
message: string | null;
metadata: Record<string, string>;
};
const currentReleaseKey = (
depDeploymentId: string,
Expand All @@ -291,6 +295,9 @@ export const deploymentVersionsRouter = router({
tag: schema.deploymentVersion.tag,
name: schema.deploymentVersion.name,
status: schema.deploymentVersion.status,
versionCreatedAt: schema.deploymentVersion.createdAt,
message: schema.deploymentVersion.message,
metadata: schema.deploymentVersion.metadata,
})
.from(schema.release)
.innerJoin(
Expand Down Expand Up @@ -324,6 +331,10 @@ export const deploymentVersionsRouter = router({
tag: row.tag,
name: row.name,
status: row.status,
deploymentId: row.deploymentId,
createdAt: row.versionCreatedAt.toISOString(),
message: row.message,
metadata: row.metadata,
});
}
}
Expand Down
15 changes: 15 additions & 0 deletions packages/trpc/src/routes/release-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ export const releaseTargetsRouter = router({
versionTag: string;
versionName: string;
versionStatus: string;
versionCreatedAt: Date;
versionMessage: string | null;
versionMetadata: Record<string, string>;
deploymentId: string;
environmentId: string;
completedAt: Date | null;
};
Expand All @@ -406,6 +410,9 @@ export const releaseTargetsRouter = router({
versionTag: schema.deploymentVersion.tag,
versionName: schema.deploymentVersion.name,
versionStatus: schema.deploymentVersion.status,
versionCreatedAt: schema.deploymentVersion.createdAt,
versionMessage: schema.deploymentVersion.message,
versionMetadata: schema.deploymentVersion.metadata,
environmentId: schema.release.environmentId,
completedAt: schema.job.completedAt,
})
Expand Down Expand Up @@ -437,6 +444,10 @@ export const releaseTargetsRouter = router({
versionTag: row.versionTag,
versionName: row.versionName,
versionStatus: row.versionStatus,
versionCreatedAt: row.versionCreatedAt,
versionMessage: row.versionMessage,
versionMetadata: row.versionMetadata,
deploymentId: row.deploymentId,
environmentId: row.environmentId,
completedAt: row.completedAt,
});
Expand All @@ -457,6 +468,10 @@ export const releaseTargetsRouter = router({
tag: cur.versionTag,
name: cur.versionName,
status: cur.versionStatus,
deploymentId: cur.deploymentId,
createdAt: cur.versionCreatedAt.toISOString(),
message: cur.versionMessage,
metadata: cur.versionMetadata,
environmentId: cur.environmentId,
completedAt: cur.completedAt?.toISOString() ?? null,
},
Expand Down
Loading