Skip to content

Commit

Permalink
Bump prettier from 2.8.8 to 3.2.5 (#105)
Browse files Browse the repository at this point in the history
* Bump prettier from 2.8.8 to 3.2.5

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@2.8.8...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Format the codebase with Prettier 3.2.5

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: William Calderipe <wcalderipe@gmail.com>
  • Loading branch information
dependabot[bot] and wcalderipe authored Feb 19, 2024
1 parent cb5972e commit 468254e
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 44 deletions.
5 changes: 4 additions & 1 deletion apps/authz/src/app/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ export const finalizeDecision = (response: OpaResult[]) => {

@Injectable()
export class AppService {
constructor(private opaService: OpaService, private entityRepository: EntityRepository) {}
constructor(
private opaService: OpaService,
private entityRepository: EntityRepository
) {}

async #verifySignature(requestSignature: Signature, verificationMessage: string): Promise<CredentialEntity> {
const { pubKey, alg, sig } = requestSignature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import { DataFeed } from '../type/data-feed.type'
export class PriceFeedService implements DataFeed<Prices> {
static SOURCE_ID = 'armory/price-feed'

constructor(private priceService: PriceService, private configService: ConfigService<Config, true>) {}
constructor(
private priceService: PriceService,
private configService: ConfigService<Config, true>
) {}

getId(): string {
return PriceFeedService.SOURCE_ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,16 @@ export class ClusterService {
nodes: Node[],
responses: EvaluationResponse[]
): { node: Node; response: EvaluationResponse }[] {
return zip(nodes, responses).reduce((acc, [node, response]) => {
if (node && response) {
return [...acc, { node, response }]
}
return zip(nodes, responses).reduce(
(acc, [node, response]) => {
if (node && response) {
return [...acc, { node, response }]
}

return acc
}, [] as { node: Node; response: EvaluationResponse }[])
return acc
},
[] as { node: Node; response: EvaluationResponse }[]
)
}

private async recoverPubKey(response: EvaluationResponse) {
Expand Down
38 changes: 22 additions & 16 deletions apps/orchestration/src/price/core/service/price.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ type GetPricesOption = {
export class PriceService {
private logger = new Logger(PriceService.name)

constructor(private coinGeckoClient: CoinGeckoClient, private coinGeckoAssetRepository: CoinGeckoAssetRepository) {}
constructor(
private coinGeckoClient: CoinGeckoClient,
private coinGeckoAssetRepository: CoinGeckoAssetRepository
) {}

async getPrices(options: GetPricesOption): Promise<Prices> {
this.logger.log('Get prices', options)
Expand Down Expand Up @@ -68,22 +71,25 @@ export class PriceService {
}

private getAssetsPriceInformation(simplePrice: SimplePrice) {
return Object.keys(simplePrice).reduce((acc, coinId) => {
const sourceAssetIds = this.coinGeckoAssetRepository.getAssetIds(coinId)

if (sourceAssetIds) {
return [
...acc,
...sourceAssetIds.map((sourceAssetId) => ({
sourceAssetId,
coinId,
values: this.getValues(simplePrice, coinId)
}))
]
}
return Object.keys(simplePrice).reduce(
(acc, coinId) => {
const sourceAssetIds = this.coinGeckoAssetRepository.getAssetIds(coinId)

return acc
}, [] as { sourceAssetId: AssetId; coinId: string; values: unknown }[])
if (sourceAssetIds) {
return [
...acc,
...sourceAssetIds.map((sourceAssetId) => ({
sourceAssetId,
coinId,
values: this.getValues(simplePrice, coinId)
}))
]
}

return acc
},
[] as { sourceAssetId: AssetId; coinId: string; values: unknown }[]
)
}

private getValues(simplePrice: SimplePrice, coinId: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { UserService } from './user.service'

@Injectable()
export class OrganizationService {
constructor(private orgRepository: OrganizationRepository, private userService: UserService) {}
constructor(
private orgRepository: OrganizationRepository,
private userService: UserService
) {}

async create(input: { uid: string; rootCredential: CredentialEntity }): Promise<{
organization: OrganizationEntity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { UserRepository } from '../../persistence/repository/user.repository'

@Injectable()
export class UserService {
constructor(private userRepository: UserRepository, private userWalletRepository: UserWalletRepository) {}
constructor(
private userRepository: UserRepository,
private userWalletRepository: UserWalletRepository
) {}

create(orgId: string, user: UserEntity, credential?: CredentialEntity): Promise<UserEntity> {
return this.userRepository.create(orgId, user, credential)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WalletRepository } from '../../persistence/repository/wallet.repository

@Injectable()
export class WalletService {
constructor(private walletRepository: WalletRepository, private walletGroupRepository: WalletGroupRepository) {}
constructor(
private walletRepository: WalletRepository,
private walletGroupRepository: WalletGroupRepository
) {}

async create(orgId: string, wallet: WalletEntity): Promise<WalletEntity> {
return this.walletRepository.create(orgId, wallet)
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lint-staged": "15.2.0",
"nock": "^13.5.1",
"nx": "17.1.3",
"prettier": "^2.6.2",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"prisma": "^5.8.1",
"supertest": "^6.3.4",
Expand Down
23 changes: 13 additions & 10 deletions packages/authz-shared/src/lib/util/enum.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@ export const convertEnums = <T extends Record<string, string>>(
enumMap: EnumMap<T>,
data: T
): EnumConverted<T, EnumMap<T>> => {
return Object.entries(data).reduce((acc, [key, value]) => {
if (key in enumMap) {
acc[key as keyof T] = toEnum(enumMap[key as keyof EnumMap<T>], value) as EnumConverted<T, EnumMap<T>>[keyof T]
if (acc[key] === undefined || acc[key] === null) {
throw new Error(`Invalid enum value for key ${key}: ${value}`)
return Object.entries(data).reduce(
(acc, [key, value]) => {
if (key in enumMap) {
acc[key as keyof T] = toEnum(enumMap[key as keyof EnumMap<T>], value) as EnumConverted<T, EnumMap<T>>[keyof T]
if (acc[key] === undefined || acc[key] === null) {
throw new Error(`Invalid enum value for key ${key}: ${value}`)
}
} else {
acc[key as keyof T] = value as EnumConverted<T, EnumMap<T>>[keyof T]
}
} else {
acc[key as keyof T] = value as EnumConverted<T, EnumMap<T>>[keyof T]
}
return acc
}, {} as EnumConverted<T, EnumMap<T>>)
return acc
},
{} as EnumConverted<T, EnumMap<T>>
)
}

export const convertEnumsArray = <T extends Record<string, string>>(
Expand Down

0 comments on commit 468254e

Please sign in to comment.