diff --git a/packages/codegen/src/templates/database-template.handlebars b/packages/codegen/src/templates/database-template.handlebars index ba6a4351..f9bcd963 100644 --- a/packages/codegen/src/templates/database-template.handlebars +++ b/packages/codegen/src/templates/database-template.handlebars @@ -37,7 +37,7 @@ export const SUBGRAPH_ENTITIES = new Set([ {{~/each}}]); {{/if}} export const ENTITIES = [ - {{~#each queries as | query |}}{{query.entityName}}, {{/each}} + {{~#each queries as | query |}}{{~#if @index }}, {{/if}}{{query.entityName}}{{/each}} {{~#if (subgraphPath)}}...SUBGRAPH_ENTITIES{{/if}}]; {{#if (subgraphPath)}} // Map: Entity to suitable query type. @@ -50,7 +50,7 @@ export class Database implements DatabaseInterface { _config: ConnectionOptions; _conn!: Connection; _baseDatabase: BaseDatabase; - _propColMaps: { [key: string]: Map; } + _propColMaps: { [key: string]: Map; }; constructor (config: ConnectionOptions) { assert(config); diff --git a/packages/codegen/src/templates/entity-template.handlebars b/packages/codegen/src/templates/entity-template.handlebars index b4b8ff0e..3a812537 100644 --- a/packages/codegen/src/templates/entity-template.handlebars +++ b/packages/codegen/src/templates/entity-template.handlebars @@ -32,7 +32,7 @@ export class {{className}} {{~#if implements}} implements {{implements}} {{~/if} {{~#unless @last}},{{/unless}} {{~/each}} } {{~/if}}) - {{column.name}}!: {{column.tsType}}; + {{column.name}}!: {{column.tsType}}; {{~#unless @last}} {{/unless}} diff --git a/packages/codegen/src/templates/indexer-template.handlebars b/packages/codegen/src/templates/indexer-template.handlebars index e1bbcf05..787e2d4e 100644 --- a/packages/codegen/src/templates/indexer-template.handlebars +++ b/packages/codegen/src/templates/indexer-template.handlebars @@ -72,24 +72,24 @@ const {{capitalize event}}_EVENT = '{{event}}'; {{/each}} export class Indexer implements IndexerInterface { - _db: Database - _ethClient: EthClient - _ethProvider: BaseProvider - _baseIndexer: BaseIndexer - _serverConfig: ServerConfig + _db: Database; + _ethClient: EthClient; + _ethProvider: BaseProvider; + _baseIndexer: BaseIndexer; + _serverConfig: ServerConfig; {{#if (subgraphPath)}} _graphWatcher: GraphWatcher; {{/if}} - _abiMap: Map - _storageLayoutMap: Map - _contractMap: Map + _abiMap: Map; + _storageLayoutMap: Map; + _contractMap: Map; {{#if (subgraphPath)}} - _entityTypesMap: Map - _relationsMap: Map + _entityTypesMap: Map; + _relationsMap: Map; - _subgraphStateMap: Map + _subgraphStateMap: Map; {{/if}} constructor (serverConfig: ServerConfig, db: DatabaseInterface, clients: Clients, ethProvider: BaseProvider, jobQueue: JobQueue{{#if (subgraphPath)}}, graphWatcher?: GraphWatcherInterface{{/if}}) { diff --git a/packages/codegen/src/templates/package-template.handlebars b/packages/codegen/src/templates/package-template.handlebars index 3dccd22d..19f5bdcb 100644 --- a/packages/codegen/src/templates/package-template.handlebars +++ b/packages/codegen/src/templates/package-template.handlebars @@ -63,7 +63,7 @@ "@types/yargs": "^17.0.0", "@typescript-eslint/eslint-plugin": "^5.47.1", "@typescript-eslint/parser": "^5.47.1", - "eslint": "^7.27.0", + "eslint": "^8.35.0", "eslint-config-semistandard": "^15.0.1", "eslint-config-standard": "^16.0.3", "eslint-plugin-import": "^2.27.5", @@ -71,7 +71,7 @@ "eslint-plugin-promise": "^5.1.0", "eslint-plugin-standard": "^5.0.0", "ts-node": "^10.2.1", - "typescript": "^4.3.2", + "typescript": "^5.0.2", "copyfiles": "^2.4.1" } }