Skip to content

Commit 2bd307e

Browse files
committed
*: use common-ts v2.0.3
1 parent 2cf7335 commit 2bd307e

File tree

8 files changed

+12
-55
lines changed

8 files changed

+12
-55
lines changed

packages/indexer-agent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"graph-indexer-agent": "bin/graph-indexer-agent"
3030
},
3131
"dependencies": {
32-
"@graphprotocol/common-ts": "2.0.1",
32+
"@graphprotocol/common-ts": "2.0.3",
3333
"@graphprotocol/indexer-common": "^0.20.20",
3434
"@thi.ng/heaps": "^1.3.1",
3535
"@uniswap/sdk": "3.0.3",

packages/indexer-agent/src/commands/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { Argv } from 'yargs'
44
import { SequelizeStorage, Umzug } from 'umzug'
55
import {
66
createMetrics,
7+
connectDatabase,
78
createMetricsServer,
89
formatGRT,
910
Logger,
1011
SubgraphDeploymentID,
1112
} from '@graphprotocol/common-ts'
1213
import {
13-
connectDatabase,
1414
createIndexerManagementClient,
1515
createIndexerManagementServer,
1616
defineIndexerManagementModels,

packages/indexer-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"test:watch": "jest --watch --detectOpenHandles --verbose"
2727
},
2828
"dependencies": {
29-
"@graphprotocol/common-ts": "2.0.1",
29+
"@graphprotocol/common-ts": "2.0.3",
3030
"@graphprotocol/indexer-common": "^0.20.20",
3131
"@iarna/toml": "2.2.5",
3232
"@thi.ng/iterators": "5.1.74",

packages/indexer-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"clean": "rm -rf ./node_modules ./dist ./tsconfig.tsbuildinfo"
2323
},
2424
"dependencies": {
25-
"@graphprotocol/common-ts": "2.0.1",
25+
"@graphprotocol/common-ts": "2.0.3",
2626
"@graphprotocol/cost-model": "0.1.16",
2727
"@thi.ng/heaps": "1.2.38",
2828
"@types/lodash.intersection": "^4.4.7",

packages/indexer-common/src/utils.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ import { Logger, Metrics, timer } from '@graphprotocol/common-ts'
88
import { indexerError, IndexerErrorCode } from './errors'
99
import { Sequelize } from 'sequelize'
1010

11-
interface ConnectOptions {
12-
host: string
13-
port?: number
14-
username: string
15-
password: string
16-
database: string
17-
logging?: (sql: string, timing?: number) => void
18-
poolMin?: number
19-
poolMax?: number
20-
}
21-
2211
export const parseBoolean = (
2312
val: string | boolean | number | undefined | null,
2413
): boolean => {
@@ -74,35 +63,3 @@ export async function monitorEthBalance(
7463
}
7564
})
7665
}
77-
78-
// Copied from @graphprotocol/common-ts, but adding pool size options
79-
// TODO: Add these options in common-ts and remove this
80-
export const connectDatabase = async (options: ConnectOptions): Promise<Sequelize> => {
81-
const { host, username, password, database, logging } = options
82-
83-
// Use port 5432 by default
84-
const port = options.port || 5432
85-
const poolMin = options.poolMin || 0
86-
const poolMax = options.poolMax || 10
87-
88-
// Connect to the database
89-
const sequelize = new Sequelize({
90-
dialect: 'postgres',
91-
host,
92-
port,
93-
username,
94-
password,
95-
database,
96-
pool: {
97-
max: poolMax,
98-
min: poolMin,
99-
},
100-
logging,
101-
})
102-
103-
// Test the connection
104-
await sequelize.authenticate()
105-
106-
// All good, return the connection
107-
return sequelize
108-
}

packages/indexer-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"clean": "rm -rf ./node_modules ./binary ./build ./coverage ./native/target ./native/artifacts.json ./native/index.node"
4747
},
4848
"dependencies": {
49-
"@graphprotocol/common-ts": "2.0.1",
49+
"@graphprotocol/common-ts": "2.0.3",
5050
"@mapbox/node-pre-gyp": "1.0.10",
5151
"cargo-cp-artifact": "0.1.7",
5252
"node-pre-gyp-github": "1.4.4"

packages/indexer-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"dependencies": {
3434
"@google-cloud/profiler": "4.1.7",
35-
"@graphprotocol/common-ts": "2.0.1",
35+
"@graphprotocol/common-ts": "2.0.3",
3636
"@graphprotocol/indexer-common": "^0.20.20",
3737
"@graphprotocol/indexer-native": "0.20.11",
3838
"@graphql-tools/load": "7.5.8",

yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -775,10 +775,10 @@
775775
resolved "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.4.tgz"
776776
integrity sha512-j8yRSSqswWi1QqUGKVEKOG03Q7qOoZP6/h2zN2YO+F5h2+DHU0bSrHCK9Y7lo2DI9fBd8qGAw795sf+3Jva4yA==
777777

778-
"@graphprotocol/[email protected].1":
779-
version "2.0.1"
780-
resolved "https://registry.npmjs.org/@graphprotocol/common-ts/-/common-ts-2.0.1.tgz"
781-
integrity sha512-dmcTWVOS4HEvglMtH0wZTMeqlzniLAo+k04kZ7/cY+QgLXAYB7X1Sz3sHqkGmNbn89kBQ3Z/nPDLLSlln69hYg==
778+
"@graphprotocol/[email protected].3":
779+
version "2.0.3"
780+
resolved "https://registry.npmjs.org/@graphprotocol/common-ts/-/common-ts-2.0.3.tgz#d72eda1022aad8a0fcdcd6a5bfc52d5f7ec050ca"
781+
integrity sha512-HMa5DhpIMKVEu9O0h73OlwZjw5SrIFPng0dNLA3mlniO7rdTynJRCGf0Sf7yUEh4qdPoy9oAaPEWnpJiBsbRfg==
782782
dependencies:
783783
"@graphprotocol/contracts" "2.1.0"
784784
"@graphprotocol/pino-sentry-simple" "0.7.1"
@@ -800,7 +800,7 @@
800800
pino "7.6.0"
801801
pino-multi-stream "6.0.0"
802802
prom-client "14.0.1"
803-
sequelize "6.19.0"
803+
sequelize "6.31.1"
804804

805805
"@graphprotocol/[email protected]":
806806
version "2.1.0"
@@ -9779,7 +9779,7 @@ sequelize-pool@^7.1.0:
97799779
resolved "https://registry.npmjs.org/sequelize-pool/-/sequelize-pool-7.1.0.tgz"
97809780
integrity sha512-G9c0qlIWQSK29pR/5U2JF5dDQeqqHRragoyahj/Nx4KOOQ3CPPfzxnfqFPCSB7x5UgjOgnZ61nSxz+fjDpRlJg==
97819781

9782-
sequelize@6.19.0, sequelize@6.31.1:
9782+
97839783
version "6.31.1"
97849784
resolved "https://registry.npmjs.org/sequelize/-/sequelize-6.31.1.tgz"
97859785
integrity sha512-cahWtRrYLjqoZP/aurGBoaxn29qQCF4bxkAUPEQ/ozjJjt6mtL4Q113S3N39mQRmX5fgxRbli+bzZARP/N51eg==

0 commit comments

Comments
 (0)