subquery / subql

SubQuery is an Open, Flexible, Fast and Universal data indexing framework for web3. Our mission is to help developers create the decentralised products of the future.
https://subquery.network
GNU General Public License v3.0
19.06k stars 328 forks source link

Remove ipfs types, simplify code and get tests passing #2483

Closed jiqiang90 closed 2 months ago

jiqiang90 commented 2 months ago

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)

Type of change

Please delete options that are not relevant.

Checklist

github-actions[bot] commented 2 months ago

Coverage report for .

[!CAUTION] Test run failed

St.:grey_question:
Category Percentage Covered / Total
πŸ”΄ Statements
52.1% (-18.01% πŸ”»)
15238/29247
🟑 Branches
76.34% (-1.95% πŸ”»)
2059/2697
🟑 Functions
60.74% (-1.76% πŸ”»)
840/1383
πŸ”΄ Lines
52.1% (-18.01% πŸ”»)
15238/29247

:warning: Details were not displayed: the report size has exceeded the limit.

Test suite run failed

Failed tests: 13/500. Failed suites: 21/99.
``` ● 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/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/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( ~~~~~~~~~~~~~~ ``` --- ``` ● SubqueryProject β€Ί loads chainTypes from deployment Failed to fetch project from IPFS: ipfs://Qmab25SoVT4U7YJLFSzt4UXNQpyG9Du2Q7VGDu2b4w2eGr 51 | } catch (e) { 52 | console.error(`Failed to fetch project from IPFS: ${fileName}`, e); > 53 | throw new Error(`Failed to fetch project from IPFS: ${fileName}`, {cause: e}); | ^ 54 | } 55 | } 56 | at IPFSReader.getFile (packages/common/src/project/readers/ipfs-reader.ts:53:13) at loadDataSourceScript (packages/node-core/src/utils/project.ts:219:23) at packages/node-core/src/utils/project.ts:131:27 at async Promise.all (index 0) at loadProjectFromManifestBase (packages/node/src/configure/SubqueryProject.ts:159:23) at Object. (packages/node/src/configure/SubqueryProject.spec.ts:139:21) Cause: RangeError: Maximum call stack size exceeded 60 | scriptBufferArray.push(res); 61 | } > 62 | return Buffer.from(u8aConcat(...scriptBufferArray)).toString('utf8'); | ^ 63 | } 64 | } 65 | at IPFSReader.resultToBuffer (packages/common/src/project/readers/ipfs-reader.ts:62:33) at IPFSReader.getFile (packages/common/src/project/readers/ipfs-reader.ts:50:14) at loadDataSourceScript (packages/node-core/src/utils/project.ts:219:23) at packages/node-core/src/utils/project.ts:131:27 at async Promise.all (index 0) at loadProjectFromManifestBase (packages/node/src/configure/SubqueryProject.ts:159:23) at Object. (packages/node/src/configure/SubqueryProject.spec.ts:139:21) ● SubqueryProject β€Ί loads asset file correctly from deployment Failed to fetch project from IPFS: ipfs://QmYoHL3BvEW6nH1zYZqnziUHjajadu5ErJHavHS2zXkZhv 51 | } catch (e) { 52 | console.error(`Failed to fetch project from IPFS: ${fileName}`, e); > 53 | throw new Error(`Failed to fetch project from IPFS: ${fileName}`, {cause: e}); | ^ 54 | } 55 | } 56 | at IPFSReader.getFile (packages/common/src/project/readers/ipfs-reader.ts:53:13) at fetchAndSaveFile (packages/node-core/src/utils/project.ts:186:15) at packages/node-core/src/utils/project.ts:138:26 at async Promise.all (index 0) at loadProjectFromManifestBase (packages/node/src/configure/SubqueryProject.ts:159:23) at Object. (packages/node/src/configure/SubqueryProject.spec.ts:158:21) Cause: TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object 7 | const stream = (await response).data; 8 | for await (const chunk of stream) { > 9 | yield new Uint8Array(Buffer.from(chunk)); | ^ 10 | } 11 | } 12 | at asyncIterableFromStream (packages/common/src/project/IpfsHttpClientLite/utils.ts:9:33) at IPFSReader.resultToBuffer (packages/common/src/project/readers/ipfs-reader.ts:59:22) at IPFSReader.getFile (packages/common/src/project/readers/ipfs-reader.ts:50:14) at fetchAndSaveFile (packages/node-core/src/utils/project.ts:186:15) at packages/node-core/src/utils/project.ts:138:26 at async Promise.all (index 0) at loadProjectFromManifestBase (packages/node/src/configure/SubqueryProject.ts:159:23) at Object. (packages/node/src/configure/SubqueryProject.spec.ts:158:21) ● load asset with updateDataSourcesV1_0_0 β€Ί After fix, it could load asset correctly Failed to fetch project from IPFS: ipfs://QmYoHL3BvEW6nH1zYZqnziUHjajadu5ErJHavHS2zXkZhv 51 | } catch (e) { 52 | console.error(`Failed to fetch project from IPFS: ${fileName}`, e); > 53 | throw new Error(`Failed to fetch project from IPFS: ${fileName}`, {cause: e}); | ^ 54 | } 55 | } 56 | at IPFSReader.getFile (packages/common/src/project/readers/ipfs-reader.ts:53:13) at fetchAndSaveFile (packages/node-core/src/utils/project.ts:186:15) at packages/node-core/src/utils/project.ts:138:26 at async Promise.all (index 0) at Object. (packages/node/src/configure/SubqueryProject.spec.ts:234:16) Cause: TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object 7 | const stream = (await response).data; 8 | for await (const chunk of stream) { > 9 | yield new Uint8Array(Buffer.from(chunk)); | ^ 10 | } 11 | } 12 | at asyncIterableFromStream (packages/common/src/project/IpfsHttpClientLite/utils.ts:9:33) at IPFSReader.resultToBuffer (packages/common/src/project/readers/ipfs-reader.ts:59:22) at IPFSReader.getFile (packages/common/src/project/readers/ipfs-reader.ts:50:14) at fetchAndSaveFile (packages/node-core/src/utils/project.ts:186:15) at packages/node-core/src/utils/project.ts:138:26 at async Promise.all (index 0) at Object. (packages/node/src/configure/SubqueryProject.spec.ts:234:16) ``` --- ``` ● 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( ~~~~~~~~~~~~~~ ``` --- ``` ● SubIPFSClient β€Ί should upload files and yield results HTTPError: 403 Forbidden

403 Forbidden


nginx
31 | const originalOutput: Map = new Map(); 32 | const originalResults = originalWriteClient.addAll(source, {pin: true, cidVersion: 0, wrapWithDirectory: false}); > 33 | for await (const result of originalResults) { | ^ 34 | originalOutput.set(result.path, result.cid.toString()); 35 | } 36 | const results = await writeClient.addAll(source, {pin: true, cidVersion: 0, wrapWithDirectory: false}); at Object.errorHandler [as handleError] (node_modules/ipfs-http-client/cjs/src/lib/core.js:84:15) at Client.fetch (node_modules/ipfs-utils/src/http.js:161:9) at Object.addAll (node_modules/ipfs-http-client/cjs/src/add-all.js:21:17) at Object. (packages/common/src/project/IpfsHttpClientLite/IpfsHttpClientLite.spec.ts:33:22) ● SubIPFSClient β€Ί should add a file to IPFS and return AddResult Failed to upload files to IPFS 125 | return jsonLines.map((line) => JSON.parse(line)).map(mapResponse); 126 | } catch (error) { > 127 | throw new Error(`Failed to upload files to IPFS`, {cause: error}); | ^ 128 | } 129 | } 130 | at IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:127:13) at IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:61:21) at Object. (packages/common/src/project/IpfsHttpClientLite/IpfsHttpClientLite.spec.ts:61:23) Cause: AxiosError: Request failed with status code 403 at settle (node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:382:11) ● SubIPFSClient β€Ί should pin a content with given CID to a remote pinning service Failed to pin CID QmQKeYj2UZJoTN5yXSvzJy4A3CjUuSmEWAKeZV4herh5bS to remote service 83 | return response.data; 84 | } catch (e) { > 85 | throw new Error(`Failed to pin CID ${cid} to remote service`, {cause: e}); | ^ 86 | } 87 | } 88 | at IPFSHTTPClientLite.pinRemoteAdd (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:85:13) at Object. (packages/common/src/project/IpfsHttpClientLite/IpfsHttpClientLite.spec.ts:70:20) Cause: AxiosError: Request failed with status code 403 at settle (node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:382:11) ● Original IPFS Client β€Ί Upload multiple files to IPFS HTTPError: 403 Forbidden

403 Forbidden


nginx
87 | const output: Map = new Map(); 88 | const results = ipfsWrite.addAll(source, {pin: true, cidVersion: 0, wrapWithDirectory: false}); > 89 | for await (const result of results) { | ^ 90 | output.set(result.path, result.cid.toString()); 91 | } 92 | console.log(output); at Object.errorHandler [as handleError] (node_modules/ipfs-http-client/cjs/src/lib/core.js:84:15) at Client.fetch (node_modules/ipfs-utils/src/http.js:161:9) at Object.addAll (node_modules/ipfs-http-client/cjs/src/add-all.js:21:17) at Object. (packages/common/src/project/IpfsHttpClientLite/IpfsHttpClientLite.spec.ts:89:22) ``` --- ``` ● 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 { ~~~~~~~~~~~ ``` --- ``` ● 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 { ~~~~~~~~~~~ ``` --- ``` ● 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 3) at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:90:9) at async Promise.all (index 0) at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:78:17) at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:92:26 at async Promise.all (index 5) 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. (packages/cli/src/controller/publish-controller.spec.ts:38:21) Cause: HTTPError: 403 Forbidden

403 Forbidden


nginx
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 3) at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:90:9) at async Promise.all (index 0) at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:78:17) at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:92:26 at async Promise.all (index 5) 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. (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: 403 Forbidden

403 Forbidden


nginx
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. (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. (packages/cli/src/commands/publish.test.ts:15:1) ● Intergration test - Publish β€Ί file name consistent with manfiest file name, if -f 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 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. (packages/cli/src/commands/publish.test.ts:15:1) ```

Report generated by πŸ§ͺjest coverage report action from e269f69cb611758a03e324a8abc57b8b57280263