Skip to content

Commit

Permalink
chore(casing): change casing + minor style stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore03109 committed Nov 2, 2023
1 parent 3a15640 commit 666f8a6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/services/identity/DeploymentsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Deployment, Repo, Site } from "@database/models"
import { STAGING_BRANCH, STAGING_LITE_BRANCH } from "@root/constants"
import { NotFoundError } from "@root/errors/NotFoundError"
import { AmplifyError, AmplifyInfo } from "@root/types/index"
import { BuildStatus, statusStates } from "@root/types/stagingBuildStatus"
import { BuildStatus, StatusStates } from "@root/types/stagingBuildStatus"
import { Brand } from "@root/types/util"
import { decryptPassword, encryptPassword } from "@root/utils/crypto-utils"
import DeploymentClient from "@services/identity/DeploymentClient"
Expand Down Expand Up @@ -305,18 +305,18 @@ class DeploymentsService {
})
.andThen((jobSummaries) => {
if (jobSummaries.length === 0) {
return okAsync(statusStates.pending)
return okAsync(StatusStates.pending)
}

const jobSummary = jobSummaries[0]

switch (jobSummary.status) {
case JobStatus.SUCCEED:
return okAsync(statusStates.ready)
return okAsync(StatusStates.ready)
case JobStatus.FAILED:
return okAsync(statusStates.error)
return okAsync(StatusStates.error)
default:
return okAsync(statusStates.pending)
return okAsync(StatusStates.pending)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/identity/SitesService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ class SitesService {
isReduceBuildTimesWhitelistedRepo(growthbook)
)
)
.andThen((status) => okAsync({ status }))
.map((status) => ({ status }))
}
}

Expand Down
1 change: 0 additions & 1 deletion src/services/infra/InfraService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import {
SiteLaunchStatusObject,
} from "@root/types/siteInfo"
import { SiteLaunchMessage } from "@root/types/siteLaunch"
import { isReduceBuildTimesWhitelistedRepo } from "@root/utils/growthbook-utils"
import DeploymentsService from "@services/identity/DeploymentsService"
import {
SiteLaunchCreateParams,
Expand Down
4 changes: 2 additions & 2 deletions src/types/stagingBuildStatus.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const statusStates = {
export const StatusStates = {
pending: "PENDING",
ready: "READY",
error: "ERROR",
} as const
export type BuildStatus = typeof statusStates[keyof typeof statusStates]
export type BuildStatus = typeof StatusStates[keyof typeof StatusStates]

export interface StagingBuildStatus {
status: BuildStatus
Expand Down

0 comments on commit 666f8a6

Please sign in to comment.