Skip to content

Commit

Permalink
chore: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-sainchuk committed Dec 15, 2023
1 parent ef66dd6 commit 9f72bae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/cli/src/blue-harvest/commands/push-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ export async function handlePushStatus(argv: PushStatusOptions, config: Config)
} else {
process.stderr.write(
`${colors.magenta('Status')}: ${getDeploymentAndBuildStatuses(
push.status.deploy.status
push.status.preview.deploy.status
)}\n\n`
);

if (push.status.deploy.url) {
if (push.status.preview.deploy.url) {
process.stderr.write(
`${colors.magenta('Preview URL')}: ${colors.cyan(push.status.deploy.url)}\n`
`${colors.magenta('Preview URL')}: ${colors.cyan(push.status.preview.deploy.url)}\n`
);
}

if (push.status.scorecard.length) {
printScorecard(push.status.scorecard);
if (push.status.preview.scorecard.length) {
printScorecard(push.status.preview.scorecard);
}
}

Expand Down
7 changes: 6 additions & 1 deletion packages/core/src/redocly/blue-harvest/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,19 @@ export type PushResponse = {
status: PushStatusResponse;
};

export type PushStatusResponse = {
type DeploymentStatusResponse = {
deploy: {
url: string | null;
status: DeploymentStatus;
};
scorecard: ScorecardItem[];
};

export type PushStatusResponse = {
preview: DeploymentStatusResponse;
production: DeploymentStatusResponse;
};

export type ScorecardItem = {
name: string;
status: PushStatusBase;
Expand Down

0 comments on commit 9f72bae

Please sign in to comment.