style: align multiline ternary operators
Backend security / security (push) Successful in 8s
Backend verify / verify (push) Failing after 2m11s
Backend security / security (pull_request) Successful in 8s
Backend verify / verify (pull_request) Failing after 2m17s
Conventional commits / commits (pull_request) Successful in 34s

This commit is contained in:
2026-09-28 12:33:56 +03:00
parent 9cc9fbdcff
commit 0303e60b64
54 changed files with 986 additions and 982 deletions
@@ -100,14 +100,14 @@ export class CandleRepository {
priority: nextPriority,
intent: {
...previousIntent,
...(intent.force ?
{
...(intent.force
? {
force: true,
...(intent.now && intent.now > previousNow ?
{ now: intent.now } :
{}),
} :
{}),
...(intent.now && intent.now > previousNow
? { now: intent.now }
: {}),
}
: {}),
},
},
});
@@ -263,12 +263,12 @@ export class CandleRepository {
// Preserve coverage outside the requested reconciliation boundaries.
for (const previous of old) {
for (const part of [
...(previous.from < range.from ?
[{ from: previous.from, to: range.from }] :
[]),
...(previous.to > range.to ?
[{ from: range.to, to: previous.to }] :
[]),
...(previous.from < range.from
? [{ from: previous.from, to: range.from }]
: []),
...(previous.to > range.to
? [{ from: range.to, to: previous.to }]
: []),
]) {
await tx.tbankCandleCoverage.create({
data: { ...previous, ...part },
@@ -66,8 +66,8 @@ export class CatalogDiscoveryRepository {
read(input: CatalogQuery) {
return this.prisma.$transaction(async (tx) => {
const alias = input.exactTicker ?
await tx.tbankInstrumentLookup.findUnique({
const alias = input.exactTicker
? await tx.tbankInstrumentLookup.findUnique({
where: {
provider_identifierType_identifier: {
provider,
@@ -75,17 +75,17 @@ export class CatalogDiscoveryRepository {
identifier: input.query,
},
},
}) :
null;
const discovery = input.exactTicker ?
alias ?
{
})
: null;
const discovery = input.exactTicker
? alias
? {
instrumentUids: alias.matchedUids,
fetchedAt: alias.fetchedAt,
dataRevision: alias.dataRevision,
} :
null :
await tx.tbankCatalogDiscovery.findUnique({
}
: null
: await tx.tbankCatalogDiscovery.findUnique({
where: {
provider_instrumentType_query: {
provider,
@@ -134,9 +134,9 @@ export class CatalogDiscoveryRepository {
kind: input.kind,
source: sourceProvider(input),
rangeKey:
input.kind === 'detail' ?
input.instrumentType :
(input.rangeKey ?? ''),
input.kind === 'detail'
? input.instrumentType
: (input.rangeKey ?? ''),
})),
},
});
@@ -232,9 +232,9 @@ export class CatalogDiscoveryRepository {
increment: isDeepStrictEqual(
previousAlias?.matchedUids,
matchedUids,
) ?
UNCHANGED_REVISION_INCREMENT :
REVISION_INCREMENT,
)
? UNCHANGED_REVISION_INCREMENT
: REVISION_INCREMENT,
},
},
});
@@ -246,9 +246,9 @@ export class CatalogDiscoveryRepository {
source: sourceProvider(input),
kind: input.kind,
rangeKey:
input.kind === 'detail' ?
input.instrumentType :
(input.rangeKey ?? ''),
input.kind === 'detail'
? input.instrumentType
: (input.rangeKey ?? ''),
};
const previous = await tx.tbankInstrumentSource.findUnique({
where: { provider_instrumentUid_source_kind_rangeKey: key },
@@ -359,9 +359,9 @@ export class CatalogDiscoveryRepository {
instrumentKind: instrument.instrumentKind,
apiTradeAvailableFlag: instrument.apiTradeAvailableFlag,
currency: instrument.currency,
brand: instrument.brand ?
{ logoName: instrument.brand.logoName } :
undefined,
brand: instrument.brand
? { logoName: instrument.brand.logoName }
: undefined,
}),
) as Prisma.InputJsonObject;
await tx.tbankInstrument.upsert({
@@ -418,9 +418,9 @@ export class CatalogDiscoveryRepository {
increment: isDeepStrictEqual(
previous?.matchedUids,
instrumentUids,
) ?
UNCHANGED_REVISION_INCREMENT :
REVISION_INCREMENT,
)
? UNCHANGED_REVISION_INCREMENT
: REVISION_INCREMENT,
},
},
});
@@ -444,9 +444,9 @@ export class CatalogDiscoveryRepository {
increment: isDeepStrictEqual(
previous?.instrumentUids,
instrumentUids,
) ?
UNCHANGED_REVISION_INCREMENT :
REVISION_INCREMENT,
)
? UNCHANGED_REVISION_INCREMENT
: REVISION_INCREMENT,
},
},
});
@@ -480,9 +480,9 @@ export class CatalogDiscoveryRepository {
}
function sourceProvider(input: CatalogSource) {
return input.kind === 'yield' || input.kind === 'bond-events' ?
'moex' :
input.kind === 'rating' ?
'ncr' :
'tbank';
return input.kind === 'yield' || input.kind === 'bond-events'
? 'moex'
: input.kind === 'rating'
? 'ncr'
: 'tbank';
}