-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strict cli #2465
Strict cli #2465
Conversation
packages/cli/src/commands/init.ts
Outdated
private projectPath!: string; //path on GitHub | ||
private project!: ProjectSpecBase; | ||
private location!: string; | ||
private networkFamily!: NETWORK_FAMILY; | ||
private network!: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need some of these private variables.
networkFamily
and network
are only used within run
location
can be passed as an argument to cloneCustomRepo
I think similar changes could be made for project
and projectPath
too
packages/cli/src/commands/migrate.ts
Outdated
@@ -94,9 +96,9 @@ export default class Migrate extends Command { | |||
await migrateManifest(chainInfo, subgraphManifest, subqlManifestPath); | |||
// render package.json | |||
await preparePackage(subqlDir, { | |||
name: subgraphManifest.name, | |||
name: subgraphManifest.name || '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: subgraphManifest.name || '', | |
name: subgraphManifest.name ?? '', |
packages/cli/src/commands/migrate.ts
Outdated
description: subgraphManifest.description, | ||
author: subgraphManifest.author, | ||
author: subgraphManifest.author || '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
author: subgraphManifest.author || '', | |
author: subgraphManifest.author ?? '', |
@@ -74,15 +74,15 @@ export async function runWebpack( | |||
|
|||
await new Promise((resolve, reject) => { | |||
webpack(config).run((error, stats) => { | |||
if (error) { | |||
if (error || !stats) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be separated. If !stats then error could also be undefined so it would reject with undefined.
reject(error); | ||
return; | ||
} | ||
|
||
if (stats.hasErrors()) { | ||
const info = stats.toJson(); | ||
|
||
reject(info.errors[0].message); | ||
reject(info.errors?.map((e) => e.message).join('\n')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reject(info.errors?.map((e) => e.message).join('\n')); | |
reject(info.errors?.map((e) => e.message).join('\n') ?? 'Unknown error'); |
@@ -39,6 +41,7 @@ async function deployTestProject( | |||
testAuth: string, | |||
url: string | |||
): Promise<DeploymentDataType> { | |||
assert(validator.manifestRunner, 'Please set manifestRunner in your project'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in tests we can have non-null assertions, everything is in our control
try { | ||
assert; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be asserting the cid?
@@ -287,7 +287,7 @@ describe('CLI codegen:generate', () => { | |||
}); | |||
it('filter out existing methods, input address === undefined && ds address === "", should filter', () => { | |||
const ds = mockDsFn(); | |||
ds[0].options.address = ''; | |||
ds[0].options = Object.assign(ds[0].options ?? {}, {address: ''}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, i think in tests its easier to use non-null assertions
ds[0].options = Object.assign(ds[0].options ?? {}, {address: ''}); | |
ds[0].options!.address = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If changed this way, ESlint checks will report an error.
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🔴 | Statements | 53.36% (-16.75% 🔻) |
15520/29086 |
🟡 | Branches | 78.96% (+0.67% 🔼) |
2132/2700 |
🟡 | Functions | 62.35% (-0.15% 🔻) |
856/1373 |
🔴 | Lines | 53.36% (-16.75% 🔻) |
15520/29086 |
⚠️ Details were not displayed: the report size has exceeded the limit.
Test suite run failed
Failed tests: 6/495. Failed suites: 19/98.
● Test suite failed to run
packages/node/src/indexer/x-provider/cachedProvider.ts:22:5 - error TS7006: Parameter 'target' implicitly has an 'any' type.
22 target,
~~~~~~
packages/node/src/indexer/x-provider/cachedProvider.ts:23:5 - error TS7006: Parameter 'args' implicitly has an 'any' type.
23 args,
~~~~
● Test suite failed to run
packages/node/src/indexer/store.service.test.ts:293:24 - error TS7006: Parameter 'r' implicitly has an 'any' type.
293 expect(result.map((r) => r.enum_type)).toStrictEqual([
~
● Test suite failed to run
packages/query/src/graphql/graphql.test.ts:13:33 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ name: string; aggregate: boolean; }'.
No index signature with a parameter of type 'string' was found on type '{ name: string; aggregate: boolean; }'.
13 const argv = (arg: string) => getYargsOption().argv[arg];
~~~~~~~~~~~~~~~~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/dictionary/v1/substrateDictionaryV1.ts:58:20 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'SubstrateCallFilter'.
No index signature with a parameter of type 'string' was found on type 'SubstrateCallFilter'.
58 value: filter[key],
~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/api.service.ts:68:7 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ default: typeof import("/home/runner/work/subql/subql/node_modules/@polkadot/util-crypto/index"); packageInfo: { name: string; path: string; type: string; version: string; }; addressToEvm: (address: string | Uint8Array, ignoreChecksum?: boolean | undefined) => Uint8Array; ... 101 more ...; xxhashAsU8a: (data: stri...'.
No index signature with a parameter of type 'string' was found on type '{ default: typeof import("/home/runner/work/subql/subql/node_modules/@polkadot/util-crypto/index"); packageInfo: { name: string; path: string; type: string; version: string; }; addressToEvm: (address: string | Uint8Array, ignoreChecksum?: boolean | undefined) => Uint8Array; ... 101 more ...; xxhashAsU8a: (data: stri...'.
68 if (module[methodName]) {
~~~~~~~~~~~~~~~~~~
packages/node/src/indexer/api.service.ts:69:12 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ default: typeof import("/home/runner/work/subql/subql/node_modules/@polkadot/util-crypto/index"); packageInfo: { name: string; path: string; type: string; version: string; }; addressToEvm: (address: string | Uint8Array, ignoreChecksum?: boolean | undefined) => Uint8Array; ... 101 more ...; xxhashAsU8a: (data: stri...'.
No index signature with a parameter of type 'string' was found on type '{ default: typeof import("/home/runner/work/subql/subql/node_modules/@polkadot/util-crypto/index"); packageInfo: { name: string; path: string; type: string; version: string; }; addressToEvm: (address: string | Uint8Array, ignoreChecksum?: boolean | undefined) => Uint8Array; ... 101 more ...; xxhashAsU8a: (data: stri...'.
69 return module[methodName];
~~~~~~~~~~~~~~~~~~
packages/node/src/indexer/api.service.ts:158:9 - error TS7034: Variable 'chainTypes' implicitly has type 'any' in some locations where its type cannot be determined.
158 let chainTypes, network;
~~~~~~~~~~
packages/node/src/indexer/api.service.ts:164:26 - error TS2339: Property 'push' does not exist on type 'string | string[]'.
Property 'push' does not exist on type 'string'.
164 network.endpoint.push(this.nodeConfig.primaryNetworkEndpoint);
~~~~
packages/node/src/indexer/api.service.ts:179:11 - error TS7005: Variable 'chainTypes' implicitly has an 'any' type.
179 chainTypes,
~~~~~~~~~~
packages/node/src/indexer/api.service.ts:325:9 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'DecoratedRpc<"promise", RpcInterface>'.
No index signature with a parameter of type 'string' was found on type 'DecoratedRpc<"promise", RpcInterface>'.
325 acc[module] = Object.entries(rpcMethods).reduce(
~~~~~~~~~~~
packages/node/src/indexer/api.service.ts:327:13 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
No index signature with a parameter of type 'string' was found on type '{}'.
327 accInner[name] = this.redecorateRpcFunction(
~~~~~~~~~~~~~~
● Test suite failed to run
packages/query/src/graphql/plugins/index.ts:16:8 - error TS7016: Could not find a declaration file for module 'graphile-build/node8plus/plugins'. '/home/runner/work/subql/subql/node_modules/graphile-build/node8plus/plugins/index.js' implicitly has an 'any' type.
If the 'graphile-build' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'graphile-build/node8plus/plugins';`
16 } from 'graphile-build/node8plus/plugins';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:17:28 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin';`
17 import PgBasicsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:19:27 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin';`
19 import PgTypesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:20:28 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin';`
20 import PgTablesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:21:48 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue';`
21 import PgConnectionArgOrderByDefaultValue from '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:22:45 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin';`
22 import PgConditionComputedColumnPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:23:23 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows';`
23 import PgAllRows from '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:24:29 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin';`
24 import PgColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:25:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin';`
25 import PgColumnDeprecationPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:26:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin';`
26 import PgForwardRelationPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:27:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint';`
27 import PgRowByUniqueConstraint from '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:28:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin';`
28 import PgComputedColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:29:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin';`
29 import PgQueryProceduresPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:30:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin';`
30 import PgOrderAllColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:31:42 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin';`
31 import PgOrderComputedColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:32:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin';`
32 import PgOrderByPrimaryKeyPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:33:23 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode';`
33 import PgRowNode from '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:34:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile';`
34 import PgNodeAliasPostGraphile from '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:35:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin';`
35 import PgRecordReturnTypesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:36:46 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin';`
36 import PgRecordFunctionConnectionPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:37:46 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin';`
37 import PgScalarFunctionConnectionPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:38:36 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor';`
38 import PageInfoStartEndCursor from '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:39:36 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount';`
39 import PgConnectionTotalCount from '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
● Test suite failed to run
packages/node/src/configure/SchemaMigration.service.test.ts:66:14 - error TS7053: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'.
Property '0' does not exist on type '{}'.
66 return row[0];
~~~~~~
● Test suite failed to run
packages/node/src/indexer/x-provider/cachedProvider.ts:22:5 - error TS7006: Parameter 'target' implicitly has an 'any' type.
22 target,
~~~~~~
packages/node/src/indexer/x-provider/cachedProvider.ts:23:5 - error TS7006: Parameter 'args' implicitly has an 'any' type.
23 args,
~~~~
● Codegen can generate schema › Should dedupe enums
ENOENT: no such file or directory, open '/home/runner/work/subql/subql/packages/cli/test/schemaTest/src/types/models/foo.ts'
● Test suite failed to run
packages/node/src/indexer/api.service.ts:68:7 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ default: typeof import("/home/runner/work/subql/subql/node_modules/@polkadot/util-crypto/index"); packageInfo: { name: string; path: string; type: string; version: string; }; addressToEvm: (address: string | Uint8Array, ignoreChecksum?: boolean | undefined) => Uint8Array; ... 101 more ...; xxhashAsU8a: (data: stri...'.
No index signature with a parameter of type 'string' was found on type '{ default: typeof import("/home/runner/work/subql/subql/node_modules/@polkadot/util-crypto/index"); packageInfo: { name: string; path: string; type: string; version: string; }; addressToEvm: (address: string | Uint8Array, ignoreChecksum?: boolean | undefined) => Uint8Array; ... 101 more ...; xxhashAsU8a: (data: stri...'.
68 if (module[methodName]) {
~~~~~~~~~~~~~~~~~~
packages/node/src/indexer/api.service.ts:69:12 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ default: typeof import("/home/runner/work/subql/subql/node_modules/@polkadot/util-crypto/index"); packageInfo: { name: string; path: string; type: string; version: string; }; addressToEvm: (address: string | Uint8Array, ignoreChecksum?: boolean | undefined) => Uint8Array; ... 101 more ...; xxhashAsU8a: (data: stri...'.
No index signature with a parameter of type 'string' was found on type '{ default: typeof import("/home/runner/work/subql/subql/node_modules/@polkadot/util-crypto/index"); packageInfo: { name: string; path: string; type: string; version: string; }; addressToEvm: (address: string | Uint8Array, ignoreChecksum?: boolean | undefined) => Uint8Array; ... 101 more ...; xxhashAsU8a: (data: stri...'.
69 return module[methodName];
~~~~~~~~~~~~~~~~~~
packages/node/src/indexer/api.service.ts:158:9 - error TS7034: Variable 'chainTypes' implicitly has type 'any' in some locations where its type cannot be determined.
158 let chainTypes, network;
~~~~~~~~~~
packages/node/src/indexer/api.service.ts:164:26 - error TS2339: Property 'push' does not exist on type 'string | string[]'.
Property 'push' does not exist on type 'string'.
164 network.endpoint.push(this.nodeConfig.primaryNetworkEndpoint);
~~~~
packages/node/src/indexer/api.service.ts:179:11 - error TS7005: Variable 'chainTypes' implicitly has an 'any' type.
179 chainTypes,
~~~~~~~~~~
packages/node/src/indexer/api.service.ts:325:9 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'DecoratedRpc<"promise", RpcInterface>'.
No index signature with a parameter of type 'string' was found on type 'DecoratedRpc<"promise", RpcInterface>'.
325 acc[module] = Object.entries(rpcMethods).reduce(
~~~~~~~~~~~
packages/node/src/indexer/api.service.ts:327:13 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
No index signature with a parameter of type 'string' was found on type '{}'.
327 accInner[name] = this.redecorateRpcFunction(
~~~~~~~~~~~~~~
● Test suite failed to run
packages/query/src/graphql/plugins/index.ts:16:8 - error TS7016: Could not find a declaration file for module 'graphile-build/node8plus/plugins'. '/home/runner/work/subql/subql/node_modules/graphile-build/node8plus/plugins/index.js' implicitly has an 'any' type.
If the 'graphile-build' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'graphile-build/node8plus/plugins';`
16 } from 'graphile-build/node8plus/plugins';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:17:28 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin';`
17 import PgBasicsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:19:27 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin';`
19 import PgTypesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:20:28 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin';`
20 import PgTablesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:21:48 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue';`
21 import PgConnectionArgOrderByDefaultValue from '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:22:45 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin';`
22 import PgConditionComputedColumnPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:23:23 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows';`
23 import PgAllRows from '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:24:29 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin';`
24 import PgColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:25:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin';`
25 import PgColumnDeprecationPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:26:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin';`
26 import PgForwardRelationPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:27:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint';`
27 import PgRowByUniqueConstraint from '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:28:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin';`
28 import PgComputedColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:29:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin';`
29 import PgQueryProceduresPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:30:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin';`
30 import PgOrderAllColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:31:42 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin';`
31 import PgOrderComputedColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:32:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin';`
32 import PgOrderByPrimaryKeyPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:33:23 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode';`
33 import PgRowNode from '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:34:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile';`
34 import PgNodeAliasPostGraphile from '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:35:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin';`
35 import PgRecordReturnTypesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:36:46 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin';`
36 import PgRecordFunctionConnectionPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:37:46 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin';`
37 import PgScalarFunctionConnectionPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:38:36 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor';`
38 import PageInfoStartEndCursor from '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:39:36 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount';`
39 import PgConnectionTotalCount from '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/dictionary/substrateDictionary.service.spec.ts:76:10 - error TS7006: Parameter 'd' implicitly has an 'any' type.
76 (d) => d instanceof SubstrateDictionaryV1,
~
● Test suite failed to run
packages/node/src/indexer/x-provider/cachedProvider.ts:22:5 - error TS7006: Parameter 'target' implicitly has an 'any' type.
22 target,
~~~~~~
packages/node/src/indexer/x-provider/cachedProvider.ts:23:5 - error TS7006: Parameter 'args' implicitly has an 'any' type.
23 args,
~~~~
● Test suite failed to run
packages/node/src/indexer/x-provider/cachedProvider.ts:22:5 - error TS7006: Parameter 'target' implicitly has an 'any' type.
22 target,
~~~~~~
packages/node/src/indexer/x-provider/cachedProvider.ts:23:5 - error TS7006: Parameter 'args' implicitly has an 'any' type.
23 args,
~~~~
● Test suite failed to run
packages/node/src/indexer/fetch.service.ts:93:33 - error TS7031: Binding element 'startHeight' implicitly has an 'any' type.
93 protected async preLoopHook({ startHeight }): Promise<void> {
~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/fetch.service.ts:93:33 - error TS7031: Binding element 'startHeight' implicitly has an 'any' type.
93 protected async preLoopHook({ startHeight }): Promise<void> {
~~~~~~~~~~~
● Test suite failed to run
packages/query/src/graphql/plugins/QueryDepthLimitPlugin.ts:41:5 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
No index signature with a parameter of type 'string' was found on type '{}'.
41 frags[def.name.value] = def;
~~~~~~~~~~~~~~~~~~~~~
● Cli publish › should upload appropriate project to IPFS
Publish project to default IPFS failed
160 | try {
161 | const results = ipfsWrite.addAll(contents, {pin: true, cidVersion: 0, wrapWithDirectory: isMultichain});
> 162 | for await (const result of results) {
| ^
163 | fileCidMap.set(result.path, result.cid.toString());
164 |
165 | await ipfsWrite.pin.remote.add(result.cid, {service: PIN_SERVICE}).catch((e) => {
at packages/cli/src/controller/publish-controller.ts:162:15
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:87:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:92:26
at async Promise.all (index 1)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:90:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:57:28)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:38:21)
Cause:
HTTPError: <html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>
163 | fileCidMap.set(result.path, result.cid.toString());
164 |
> 165 | await ipfsWrite.pin.remote.add(result.cid, {service: PIN_SERVICE}).catch((e) => {
| ^
166 | console.warn(
167 | `Failed to pin file ${result.path}. There might be problems with this file being accessible later. ${e}`
168 | );
at Object.errorHandler [as handleError] (node_modules/ipfs-http-client/cjs/src/lib/core.js:84:15)
at async Client.fetch (node_modules/ipfs-utils/src/http.js:161:9)
at async addAll (node_modules/ipfs-http-client/cjs/src/add-all.js:21:17)
at async Object.last [as default] (node_modules/it-last/index.js:13:20)
at async Object.add (node_modules/ipfs-http-client/cjs/src/add.js:18:14)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:87:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:92:26
at async Promise.all (index 1)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:90:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:57:28)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:38:21)
● Cli publish › Get directory CID from multi-chain project
Publish project to default IPFS failed
160 | try {
161 | const results = ipfsWrite.addAll(contents, {pin: true, cidVersion: 0, wrapWithDirectory: isMultichain});
> 162 | for await (const result of results) {
| ^
163 | fileCidMap.set(result.path, result.cid.toString());
164 |
165 | await ipfsWrite.pin.remote.add(result.cid, {service: PIN_SERVICE}).catch((e) => {
at packages/cli/src/controller/publish-controller.ts:162:15
Cause:
HTTPError: <html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>
at Object.errorHandler [as handleError] (node_modules/ipfs-http-client/cjs/src/lib/core.js:84:15)
at async Client.fetch (node_modules/ipfs-utils/src/http.js:161:9)
at async addAll (node_modules/ipfs-http-client/cjs/src/add-all.js:21:17)
at async Object.last [as default] (node_modules/it-last/index.js:13:20)
at async Object.add (node_modules/ipfs-http-client/cjs/src/add.js:18:14)
● Intergration test - Publish › overwrites any exisiting CID files
thrown: "Exceeded timeout of 300000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
28 | it('overwrites any exisiting CID files', async () => {
29 | const initCID = 'QmWLxg7xV7ZWUyc7ZxZ8XuQQ7NmH8WQGXzg7VZ3QQNqF-testing';
> 30 | const cidFilePath = path.resolve(projectDir, '.project-cid');
| ^
31 | await fs.promises.writeFile(cidFilePath, initCID);
32 | await Publish.run(['-f', projectDir, '-o']);
33 | const cidValue = await fs.promises.readFile(cidFilePath, 'utf8');
at packages/cli/src/commands/publish.test.ts:30:5
at Object.<anonymous> (packages/cli/src/commands/publish.test.ts:15:1)
● Intergration test - Publish › create ipfsCID file stored in local with dictiory path
thrown: "Exceeded timeout of 300000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
36 |
37 | it('create ipfsCID file stored in local with dictiory path', async () => {
> 38 | await Publish.run(['-f', projectDir]);
| ^
39 | const cidFile = path.resolve(projectDir, '.project-cid');
40 | const fileExists = fs.existsSync(cidFile);
41 | const IPFScontent = await fs.promises.readFile(cidFile, 'utf8');
at packages/cli/src/commands/publish.test.ts:38:5
at Object.<anonymous> (packages/cli/src/commands/publish.test.ts:15:1)
● Intergration test - Publish › file name consistent with manfiest file name, if -f <manifest path> is used
thrown: "Exceeded timeout of 300000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
45 |
46 | // Run this last because it modifies the project
> 47 | it('file name consistent with manfiest file name, if -f <manifest path> is used', async () => {
| ^
48 | const manifestPath = path.resolve(projectDir, 'project.yaml');
49 | const testManifestPath = path.resolve(projectDir, 'test.yaml');
50 | fs.renameSync(manifestPath, testManifestPath);
at packages/cli/src/commands/publish.test.ts:47:5
at Object.<anonymous> (packages/cli/src/commands/publish.test.ts:15:1)
Report generated by 🧪jest coverage report action from 51adfa4
assert(validator.chainId, 'Please set chainId in your project'); | ||
const validateDictEndpoint = processEndpoints(await dictionaryEndpoints(ROOT_API_URL_PROD), validator.chainId); | ||
if (!flags.useDefaults && !validateDictEndpoint) { | ||
flags.dict = await promptWithDefaultValues(cli, 'Enter dictionary', validateDictEndpoint, null, false); | ||
flags.dict = await promptWithDefaultValues(cli, 'Enter dictionary', validateDictEndpoint, undefined, false); | ||
} else { | ||
flags.dict = validateDictEndpoint; | ||
} | ||
|
||
assert(flags.dict, 'Dictionary is required'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think dictionary is required, this is a change in behaviour
} | ||
|
||
assert(validator.manifestRunner, 'Please set manifestRunner in your project'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the validator type correct? Im not sure if this would ever be undefined.
This can also be moved to under the if
statements, if the user provides the versions then manifestRunner is no required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manifestRunner in the validator type is currently defined as optional.
assert(validator.chainId, 'Please set chainId in your project'); | ||
if (!indexerVersions[validator.chainId]) { | ||
try { | ||
assert(validator.manifestRunner, 'Please set manifestRunner in your project'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code looks very similar to the non-multichain deploy. Do you think theres a way we can deduplicate this code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we should deduplicate it. However, there is a fixed version that needs to be released now. We can start this work after that version is released
packages/cli/src/constants.ts
Outdated
'.subql/SUBQL_ACCESS_TOKEN' | ||
); | ||
const rootPath = process.env[process.platform === 'win32' ? 'USERPROFILE' : 'HOME']; | ||
assert(rootPath, 'Cannot determine root path'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert(rootPath, 'Cannot determine root path'); | |
assert(rootPath, 'Cannot determine root path, please create an issue and include your OS. https://github.com/subquery/subql/issues/new'); |
subqlNodeService.command.push(`-f=app/${path.basename(chainManifestPath)}`); | ||
|
||
assert(subqlNodeService.healthcheck, 'healthcheck is required'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this needs to throw, we can just do nothing in this case
@@ -60,6 +61,7 @@ export default class Migrate extends Command { | |||
subgraphDir = path.join(tempSubgraphDir, gitSubDirectory); | |||
await git(tempSubgraphDir).init().addRemote('origin', link); | |||
await git(tempSubgraphDir).raw('sparse-checkout', 'set', `${gitSubDirectory}`); | |||
assert(branch, 'Branch is required for git subdirectory'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it required? If its not, does it just use the default branch?
@@ -319,6 +327,7 @@ export async function executeProjectDeployment(data: ProjectDeploymentInterface) | |||
ROOT_API_URL_PROD | |||
); | |||
data.log(`Project: ${data.projectName} has been re-deployed`); | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think rather than returning here, deploymentOutput
could be defined within the else
const topics = (handler.filter as EthereumLogFilter).topics?.[0]; | ||
const func = (handler.filter as EthereumTransactionFilter).function; | ||
|
||
if ('topics' in handler.filter && topics) { | ||
existingEvents.push(topics); | ||
} | ||
if ('function' in handler.filter) { | ||
existingFunctions.push((handler.filter as EthereumTransactionFilter).function); | ||
if ('function' in handler.filter && func) { | ||
existingFunctions.push(func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reads a bit funny, we extract the values then check if the key exists. It seems redundant to do the in
checks.
packages/cli/src/commands/init.ts
Outdated
private location: string; | ||
private networkFamily: NETWORK_FAMILY; | ||
private network: string; | ||
// private projectPath!: string; //path on GitHub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Enable ts strict in cli
Type of change
Please delete options that are not relevant.
Checklist