Skip to content

Commit bff35ba

Browse files
committed
chore: update toolshed to 0.6.4
Signed-off-by: Tomás Migone <[email protected]>
1 parent 0e448be commit bff35ba

File tree

14 files changed

+237
-178
lines changed

14 files changed

+237
-178
lines changed

packages/indexer-agent/src/db/migrations/20-actions-add-poi-metadata.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ export async function up({ context }: Context): Promise<void> {
2525
const publicPOI = table.publicPOI
2626
const poiBlockNumber = table.poiBlockNumber
2727
if (publicPOI && poiBlockNumber) {
28-
logger.info(`'publicPOI' and 'poiBlockNumber' columns already exist, migration not necessary`)
28+
logger.info(
29+
`'publicPOI' and 'poiBlockNumber' columns already exist, migration not necessary`,
30+
)
2931
return
3032
}
3133

packages/indexer-cli/src/allocations.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ export const displayIndexerAllocations = (
151151
: table(
152152
[
153153
Object.keys(allocations[0]),
154-
...allocations.map(allocation => Object.values(allocation).map(value => wrapCell(value, wrapWidth))),
154+
...allocations.map(allocation =>
155+
Object.values(allocation).map(value => wrapCell(value, wrapWidth)),
156+
),
155157
],
156158
{
157159
border: getBorderCharacters('norc'),
@@ -167,9 +169,15 @@ export const displayIndexerAllocation = (
167169
? JSON.stringify(allocation, null, 2)
168170
: outputFormat === OutputFormat.Yaml
169171
? yaml.stringify(allocation).trim()
170-
: table([Object.keys(allocation), Object.values(allocation).map(value => wrapCell(value, wrapWidth))], {
171-
border: getBorderCharacters('norc'),
172-
}).trim()
172+
: table(
173+
[
174+
Object.keys(allocation),
175+
Object.values(allocation).map(value => wrapCell(value, wrapWidth)),
176+
],
177+
{
178+
border: getBorderCharacters('norc'),
179+
},
180+
).trim()
173181

174182
function nullPassThrough<T, U>(fn: (x: T) => U): (x: T | null) => U | null {
175183
return (x: T | null) => (x === null ? null : fn(x))

packages/indexer-cli/src/command-helpers.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,16 @@ export function pickFields(
100100
}
101101
}
102102
for (const key of drop) {
103-
delete obj[key]
103+
delete obj[key]
104104
}
105105
return obj
106106
}
107107

108-
export function displayObjectData(outputFormat: OutputFormat, data: object, wrapWidth: number): string {
108+
export function displayObjectData(
109+
outputFormat: OutputFormat,
110+
data: object,
111+
wrapWidth: number,
112+
): string {
109113
if (outputFormat === OutputFormat.Json) {
110114
return JSON.stringify(data, null, 2)
111115
} else if (outputFormat === OutputFormat.Yaml) {
@@ -269,9 +273,8 @@ export function requireProtocolNetworkOption(options: { [key: string]: any }): s
269273
return protocolNetwork
270274
}
271275

272-
273276
export function wrapCell(value: unknown, wrapWidth: number): string {
274277
return wrapWidth > 0
275278
? wrapAnsi(String(value), wrapWidth, { hard: true })
276279
: String(value)
277-
}
280+
}

packages/indexer-cli/src/commands/indexer/allocations/close.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,13 @@ module.exports = {
104104
)
105105

106106
spinner.succeed('Allocation closed')
107-
printObjectOrArray(print, outputFormat, closeResult, [
108-
'allocation',
109-
'allocatedTokens',
110-
'indexingRewards',
111-
], wrapWidth)
107+
printObjectOrArray(
108+
print,
109+
outputFormat,
110+
closeResult,
111+
['allocation', 'allocatedTokens', 'indexingRewards'],
112+
wrapWidth,
113+
)
112114
} catch (error) {
113115
spinner.fail(error.toString())
114116
process.exitCode = 1

packages/indexer-cli/src/commands/indexer/allocations/create.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ module.exports = {
8585
)
8686

8787
spinner.succeed('Allocation created')
88-
printObjectOrArray(print, outputFormat, allocateResult, [
89-
'allocation',
90-
'deployment',
91-
'allocatedTokens',
92-
'protocolNetwork',
93-
], wrapWidth)
88+
printObjectOrArray(
89+
print,
90+
outputFormat,
91+
allocateResult,
92+
['allocation', 'deployment', 'allocatedTokens', 'protocolNetwork'],
93+
wrapWidth,
94+
)
9495
} catch (error) {
9596
spinner.fail(error.toString())
9697
process.exitCode = 1

packages/indexer-cli/src/commands/indexer/allocations/get.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,13 @@ module.exports = {
171171
)
172172
}
173173
spinner.succeed('Allocations')
174-
printIndexerAllocations(print, outputFormat, allocations, displayProperties, wrapWidth)
174+
printIndexerAllocations(
175+
print,
176+
outputFormat,
177+
allocations,
178+
displayProperties,
179+
wrapWidth,
180+
)
175181
} catch (error) {
176182
spinner.fail(error.toString())
177183
process.exitCode = 1

packages/indexer-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dependencies": {
2525
"@pinax/graph-networks-registry": "0.6.7",
2626
"@graphprotocol/common-ts": "3.0.1",
27-
"@graphprotocol/toolshed": "0.5.5",
27+
"@graphprotocol/toolshed": "0.6.4",
2828
"@semiotic-labs/tap-contracts-bindings": "2.0.0",
2929
"@thi.ng/heaps": "1.2.38",
3030
"@types/lodash.clonedeep": "^4.5.7",

packages/indexer-common/src/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const isValidActionInput = (
8686
'deploymentID' in variableToCheck &&
8787
'allocationID' in variableToCheck &&
8888
'amount' in variableToCheck
89-
89+
9090
if (!variableToCheck.isLegacy && variableToCheck.poi !== undefined) {
9191
hasActionParams =
9292
hasActionParams &&

0 commit comments

Comments
 (0)