Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/indexer-cli/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
// The glob patterns Jest uses to detect test files
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', '.yalc'],
transformIgnorePatterns: ['!node_modules/'],
testTimeout: 60000,
globals: {
__DATABASE__: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
┌────┬──────────────────┬────────────┬────────────────────────────────────────────────┬──────────────┬────────┬──────┬───────┬──────────┬───────┬────────┬───────────────┬─────────────┬────────┐
│ id │ protocolNetwork │ type │ deploymentID │ allocationID │ amount │ poi │ force │ priority │ status │ source │ failureReason │ transaction │ reason │
├────┼──────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────┼──────────┼───────┼────────┼───────────────┼─────────────┼────────┤
│ 2 │ arbitrum-sepolia │ unallocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null 0 │ failed │ test │ null │ null │ test │
└────┴──────────────────┴────────────┴────────────────────────────────────────────────┴──────────────┴────────┴──────┴───────┴──────────┴───────┴────────┴───────────────┴─────────────┴────────┘
┌────┬──────────────────┬────────────┬────────────────────────────────────────────────┬──────────────┬────────┬──────┬───────────┬────────────────┬───────┬──────────┬────────┬───────────────────────┬─────────────┬────────┬──────────┐
│ id │ protocolNetwork │ type │ deploymentID │ allocationID │ amount │ poi │ publicPOI │ poiBlockNumber │ force │ priority │ status │ source │ failureReason │ transaction │ reason │ isLegacy
├────┼──────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────────┼────────────────┼───────┼──────────┼────────┼───────────────────────┼─────────────┼────────┼──────────┤
│ 2 │ arbitrum-sepolia │ unallocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null │ null │ null │ 0 │ failed │ test │ null │ null │ test │ false
└────┴──────────────────┴────────────┴────────────────────────────────────────────────┴──────────────┴────────┴──────┴───────────┴────────────────┴───────┴──────────┴────────┴───────────────────────┴─────────────┴────────┴──────────┘
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
┌────┬──────────────────┬────────────┬────────────────────────────────────────────────┬──────────────┬────────┬──────┬───────┬──────────┬─────────┬────────┬───────────────┬─────────────┬────────┐
│ id │ protocolNetwork │ type │ deploymentID │ allocationID │ amount │ poi │ force │ priority │ status │ source │ failureReason │ transaction │ reason │
├────┼──────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────┼──────────┼─────────┼────────┼───────────────┼─────────────┼────────┤
│ 2 │ arbitrum-sepolia │ unallocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null 0 │ failed │ test │ null │ null │ test │
├────┼──────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────┼──────────┼─────────┼────────┼───────────────┼─────────────┼────────┤
│ 1 │ arbitrum-sepolia │ allocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null 0 │ success │ test │ null │ null │ test │
└────┴──────────────────┴────────────┴────────────────────────────────────────────────┴──────────────┴────────┴──────┴───────┴──────────┴─────────┴────────┴───────────────┴─────────────┴────────┘
┌────┬──────────────────┬────────────┬────────────────────────────────────────────────┬──────────────┬────────┬──────┬───────────┬────────────────┬───────┬──────────┬────────┬───────────────────────┬─────────────┬────────┬──────────┐
│ id │ protocolNetwork │ type │ deploymentID │ allocationID │ amount │ poi │ publicPOI │ poiBlockNumber │ force │ priority │ status │ source │ failureReason │ transaction │ reason │ isLegacy
├────┼──────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────────┼────────────────┼───────┼──────────┼────────┼───────────────────────┼─────────────┼────────┼──────────┤
│ 2 │ arbitrum-sepolia │ unallocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null │ null │ null │ 0 │ failed │ test │ null │ null │ test │ false
├────┼──────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────────┼────────────────┼───────┼──────────┼────────┼───────────────────────┼─────────────┼────────┼──────────┤
│ 1 │ arbitrum-sepolia │ allocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null │ null │ null │ 0 │ success │ test │ null │ null │ test │ false
└────┴──────────────────┴────────────┴────────────────────────────────────────────────┴──────────────┴────────┴──────┴───────────┴────────────────┴───────┴──────────┴────────┴───────────────────────┴─────────────┴────────┴──────────┘
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
Error: Indexing rule attribute 'allocationAmoewt' not supported, did you mean?
- allocationAmount
- allocationLifetime
- maxAllocationPercentage
Error: allocationAmoewt
19 changes: 18 additions & 1 deletion packages/indexer-cli/src/__tests__/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Socket } from 'net'
import { URL } from 'url'
import path from 'path'
import { Sequelize } from 'sequelize'
import stripAnsi from 'strip-ansi'
import {
ActionStatus,
ActionType,
Expand Down Expand Up @@ -56,6 +55,22 @@ let metrics: Metrics
const yamlObj = loadTestYamlConfig()
const testNetworkSpecification = specification.NetworkSpecification.parse(yamlObj)

// Replace strip-ansi with a simple function using the same regex pattern
// Based on ansi-regex v6.1.0 pattern
function stripAnsi(str: string): string {
if (typeof str !== 'string') {
throw new TypeError(`Expected a string, got ${typeof str}`)
}

// Regex pattern from ansi-regex
const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
].join('|')

return str.replace(new RegExp(pattern, 'g'), '')
}

export const setupMultiNetworks = async () => {
return await setup(true)
}
Expand Down Expand Up @@ -279,6 +294,7 @@ export const seedActions = async () => {
source: 'test',
reason: 'test',
protocolNetwork: 'eip155:421614',
isLegacy: false,
})
await models.Action.create({
id: 2,
Expand All @@ -288,6 +304,7 @@ export const seedActions = async () => {
source: 'test',
reason: 'test',
protocolNetwork: 'eip155:421614',
isLegacy: false,
})
} catch (e) {
logger.error('Failed to seed ', { error: e })
Expand Down
2 changes: 2 additions & 0 deletions packages/indexer-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"dependencies": {
"@pinax/graph-networks-registry": "0.6.7",
"@graphprotocol/common-ts": "3.0.1",
"@graphprotocol/horizon": "0.4.1",
"@graphprotocol/subgraph-service": "0.4.1",
"@graphprotocol/toolshed": "0.6.5",
"@semiotic-labs/tap-contracts-bindings": "2.0.0",
"@thi.ng/heaps": "1.2.38",
Expand Down
Loading