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
18.94k stars 331 forks source link

enable ts strict in query package #2457

Closed yoozo closed 4 months ago

yoozo commented 4 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)

enable ts strict mode in query package

Type of change

Please delete options that are not relevant.

Checklist

github-actions[bot] commented 4 months ago

Coverage report for .

[!CAUTION] Test run failed

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
65.63% (-4.47% πŸ”»)
18848/28717
🟑 Branches
79.51% (+1.22% πŸ”Ό)
2437/3065
🟑 Functions
67.41% (+4.91% πŸ”Ό)
1055/1565
🟑 Lines
65.63% (-4.47% πŸ”»)
18848/28717
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | 🟒 |
`...` / migrate.ts
| 85.09% | 18.18% | 100% | 85.09% | | 🟒 |
`...` / migrate-abis.controller.ts
| 95% | 87.5% | 100% | 95% | | 🟒 |
`...` / constants.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / ethereum.ts
| 82.05% | 83.33% | 100% | 82.05% | | 🟒 |
`...` / migrate-manifest.controller.ts
| 88% | 73.33% | 88.89% | 88% | | 🟒 |
`...` / migrate-mapping.controller.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / migrate-controller.ts
| 92.31% | 84.62% | 100% | 92.31% | | 🟒 |
`...` / migrate.fixtures.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / migrate-schema.controller.ts
| 100% | 100% | 100% | 100% | | πŸ”΄ |
`...` / types.ts
| 0% | 0% | 0% | 0% | | 🟒 |
`...` / createProject.fixtures.ts
| 96.88% | 80% | 100% | 96.88% | | 🟒 |
`...` / networkFamily.ts
| 92.59% | 88.89% | 100% | 92.59% | | 🟑 |
`...` / admin.controller.ts
| 77.24% | 96.3% | 78.57% | 77.24% | | πŸ”΄ |
`...` / blockRange.ts
| 46.67% | 100% | 50% | 46.67% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / dictionary.fixtures.ts
| 100% | 100% | 100% | 100% | | 🟑 |
`...` / monitor.service.ts
| 66.16% | 86.08% | 94.12% | 66.16% | | πŸ”΄ |
`...` / sandbox.service.ts
| 33.33% | 50% | 25% | 33.33% | | πŸ”΄ |
`...` / worker.monitor.service.ts
| 41.46% | 100% | 0% | 41.46% | | πŸ”΄ |
`...` / process.ts
| 55.56% | 100% | 40% | 55.56% | | πŸ”΄ |
`...` / foreceClean.init.ts
| 47.62% | 100% | 0% | 47.62% | | πŸ”΄ |
`...` / reindex.init.ts
| 34.48% | 100% | 0% | 34.48% | | 🟒 |
`...` / string.ts
| 100% | 100% | 100% | 100% | | πŸ”΄ |
`...` / admin.module.ts
| 0% | 0% | 0% | 0% | | πŸ”΄ |
`...` / datasourceProcessors.ts
| 0% | 0% | 0% | 0% |
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | πŸ”΄ |
`...` / deploy.ts
|
18.91% (-2.24% πŸ”»)
| 100% |
50% (+50% πŸ”Ό)
|
18.91% (-2.24% πŸ”»)
| | πŸ”΄ |
`...` / publish.ts
|
44% (-45.33% πŸ”»)
|
40% (-17.14% πŸ”»)
| 100% |
44% (-45.33% πŸ”»)
| | πŸ”΄ |
`...` / deploy-controller.ts
|
32.49% (-4.98% πŸ”»)
|
100% (+22.22% πŸ”Ό)
|
12.5% (-12.5% πŸ”»)
|
32.49% (-4.98% πŸ”»)
| | 🟒 |
`...` / generate-controller.ts
| 97.65% |
93.85% (-0.18% πŸ”»)
| 100% | 97.65% | | 🟑 |
`...` / init-controller.ts
|
76.73% (+6.24% πŸ”Ό)
|
67.65% (-0.35% πŸ”»)
|
61.11% (+7.78% πŸ”Ό)
|
76.73% (+6.24% πŸ”Ό)
| | πŸ”΄ |
`...` / project-controller.ts
|
17.81% (-79.45% πŸ”»)
|
100% (+40% πŸ”Ό)
|
0% (-100% πŸ”»)
|
17.81% (-79.45% πŸ”»)
| | πŸ”΄ |
`...` / publish-controller.ts
|
59.34% (-20.91% πŸ”»)
|
58.62% (-12.49% πŸ”»)
|
60% (-40% πŸ”»)
|
59.34% (-20.91% πŸ”»)
| | 🟒 |
`...` / ProjectManifestVersioned.ts
|
82.19% (-2.74% πŸ”»)
|
88.89% (-11.11% πŸ”»)
|
61.54% (+3.21% πŸ”Ό)
|
82.19% (-2.74% πŸ”»)
| | 🟒 |
`...` / model.ts
|
95.43% (-2.29% πŸ”»)
| 100% |
80% (+8.57% πŸ”Ό)
|
95.43% (-2.29% πŸ”»)
| | πŸ”΄ |
`...` / models.ts
|
47.06% (-52.94% πŸ”»)
| 100% |
0% (-100% πŸ”»)
|
47.06% (-52.94% πŸ”»)
| | πŸ”΄ |
`...` / load.ts
| 59.18% |
50% (-5.56% πŸ”»)
| 66.67% | 59.18% | | πŸ”΄ |
`...` / utils.ts
|
55.7% (-7% πŸ”»)
|
77.42% (+4.25% πŸ”Ό)
|
52% (-4% πŸ”»)
|
55.7% (-7% πŸ”»)
| | 🟒 |
`...` / base.ts
|
94.95% (-3.05% πŸ”»)
|
92.31% (-7.69% πŸ”»)
|
90% (+10% πŸ”Ό)
|
94.95% (-3.05% πŸ”»)
| | πŸ”΄ |
`...` / models.ts
|
54.43% (-45.57% πŸ”»)
| 100% |
50% (-50% πŸ”»)
|
54.43% (-45.57% πŸ”»)
| | 🟒 |
`...` / NodeConfig.ts
|
88.48% (-0.12% πŸ”»)
|
77.59% (-2.04% πŸ”»)
|
86.96% (+0.91% πŸ”Ό)
|
88.48% (-0.12% πŸ”»)
| | 🟑 |
`...` / ProjectUpgrade.service.ts
|
73.91% (-13.16% πŸ”»)
|
93.67% (+2.31% πŸ”Ό)
|
84% (-7.3% πŸ”»)
|
73.91% (-13.16% πŸ”»)
| | 🟒 |
`...` / db.module.ts
|
89.06% (+0.78% πŸ”Ό)
|
62.5% (-20.83% πŸ”»)
| 80% |
89.06% (+0.78% πŸ”Ό)
| | 🟑 |
`...` / migration-helpers.ts
|
75.28% (-0.74% πŸ”»)
|
88.24% (+7.64% πŸ”Ό)
| 90.91% |
75.28% (-0.74% πŸ”»)
| | 🟒 |
`...` / sync-helper.ts
|
85.42% (-2.96% πŸ”»)
| 88.04% |
73.77% (-1.23% πŸ”»)
|
85.42% (-2.96% πŸ”»)
| | 🟑 |
`...` / StoreOperations.ts
|
72.94% (-19.37% πŸ”»)
|
86.36% (+1.36% πŸ”Ό)
|
87.5% (-12.5% πŸ”»)
|
72.94% (-19.37% πŸ”»)
| | πŸ”΄ |
`...` / benchmark.service.ts
|
43.36% (-11.89% πŸ”»)
| 66.67% |
36.36% (-3.64% πŸ”»)
|
43.36% (-11.89% πŸ”»)
| | πŸ”΄ |
`...` / base-block-dispatcher.ts
|
19% (-28.35% πŸ”»)
| 100% |
4.35% (-5.65% πŸ”»)
|
19% (-28.35% πŸ”»)
| | πŸ”΄ |
`...` / block-dispatcher.ts
|
26.98% (-14.01% πŸ”»)
| 66.67% |
25% (-3.57% πŸ”»)
|
26.98% (-14.01% πŸ”»)
| | πŸ”΄ |
`...` / worker-block-dispatcher.ts
|
36.17% (-14.04% πŸ”»)
| 100% |
25% (-2.27% πŸ”»)
|
36.17% (-14.04% πŸ”»)
| | πŸ”΄ |
`...` / coreDictionary.ts
|
45.33% (-54.67% πŸ”»)
|
87.5% (-6.94% πŸ”»)
|
77.78% (-22.22% πŸ”»)
|
45.33% (-54.67% πŸ”»)
| | 🟑 |
`...` / dictionary.service.ts
|
67% (-18.15% πŸ”»)
|
80% (-5.71% πŸ”»)
|
83.33% (-7.58% πŸ”»)
|
67% (-18.15% πŸ”»)
| | 🟒 |
`...` / utils.ts
|
92.59% (-3.7% πŸ”»)
|
69.23% (-24.89% πŸ”»)
| 100% |
92.59% (-3.7% πŸ”»)
| | 🟑 |
`...` / dictionaryV1.ts
|
75.1% (-18.13% πŸ”»)
|
76.09% (-2.17% πŸ”»)
|
91.67% (-8.33% πŸ”»)
|
75.1% (-18.13% πŸ”»)
| | 🟑 |
`...` / dictionaryV2.ts
|
67.37% (-14.31% πŸ”»)
|
68% (+2.78% πŸ”Ό)
|
88.89% (-11.11% πŸ”»)
|
67.37% (-14.31% πŸ”»)
| | πŸ”΄ |
`...` / ds-processor.service.ts
|
33.48% (-28.61% πŸ”»)
|
73.33% (-1.67% πŸ”»)
|
58.33% (-29.17% πŸ”»)
|
33.48% (-28.61% πŸ”»)
| | πŸ”΄ |
`...` / dynamic-ds.service.ts
|
59.84% (-30.35% πŸ”»)
|
65% (-1.67% πŸ”»)
|
80% (-5.71% πŸ”»)
|
59.84% (-30.35% πŸ”»)
| | 🟒 |
`...` / inMemoryCache.service.ts
|
86.21% (-13.79% πŸ”»)
| 100% |
75% (-25% πŸ”»)
|
86.21% (-13.79% πŸ”»)
| | πŸ”΄ |
`...` / indexer.manager.ts
|
16.13% (-17.08% πŸ”»)
| 100% |
10% (-2.5% πŸ”»)
|
16.13% (-17.08% πŸ”»)
| | 🟒 |
`...` / PoiBlock.ts
|
83.87% (-14.52% πŸ”»)
| 96.55% |
75% (-25% πŸ”»)
|
83.87% (-14.52% πŸ”»)
| | πŸ”΄ |
`...` / poi.service.ts
|
56.64% (+32.71% πŸ”Ό)
|
55.56% (-44.44% πŸ”»)
|
80% (+51.43% πŸ”Ό)
|
56.64% (+32.71% πŸ”Ό)
| | πŸ”΄ |
`...` / poiModel.ts
|
40% (-23.64% πŸ”»)
| 71.43% |
44.44% (-12.7% πŸ”»)
|
40% (-23.64% πŸ”»)
| | πŸ”΄ |
`...` / poiSync.service.ts
|
55.88% (-31% πŸ”»)
|
77.61% (+1.05% πŸ”Ό)
|
88.89% (-3.42% πŸ”»)
|
55.88% (-31% πŸ”»)
| | 🟑 |
`...` / project.service.ts
|
66.45% (-13.55% πŸ”»)
|
71.93% (+1.75% πŸ”Ό)
|
80.77% (-3.23% πŸ”»)
|
66.45% (-13.55% πŸ”»)
| | 🟑 |
`...` / sandbox.ts
|
60.49% (-7.49% πŸ”»)
| 57.14% |
57.14% (-4.4% πŸ”»)
|
60.49% (-7.49% πŸ”»)
| | πŸ”΄ |
`...` / smartBatch.service.ts
|
10.43% (-13.91% πŸ”»)
| 100% |
12.5% (-1.79% πŸ”»)
|
10.43% (-13.91% πŸ”»)
| | 🟑 |
`...` / store.service.ts
|
64.45% (-1.59% πŸ”»)
|
69.23% (+0.81% πŸ”Ό)
|
54.84% (-2.3% πŸ”»)
|
64.45% (-1.59% πŸ”»)
| | πŸ”΄ |
`...` / entity.ts
|
19.23% (-42.31% πŸ”»)
| 100% | 0% |
19.23% (-42.31% πŸ”»)
| | πŸ”΄ |
`...` / store.ts
|
13.11% (-19.09% πŸ”»)
| 100% | 0% |
13.11% (-19.09% πŸ”»)
| | 🟑 |
`...` / cacheModel.ts
|
67.85% (-17.22% πŸ”»)
|
85.71% (+7.4% πŸ”Ό)
|
71.43% (-4.76% πŸ”»)
|
67.85% (-17.22% πŸ”»)
| | 🟑 |
`...` / cachePoi.ts
|
75.53% (-18.09% πŸ”»)
| 88.89% |
71.43% (-11.9% πŸ”»)
|
75.53% (-18.09% πŸ”»)
| | 🟒 |
`...` / cacheable.ts
|
89.66% (-0.97% πŸ”»)
| 75% | 100% |
89.66% (-0.97% πŸ”»)
| | 🟑 |
`...` / csvStore.service.ts
|
76.92% (-14.1% πŸ”»)
| 80% |
80% (-20% πŸ”»)
|
76.92% (-14.1% πŸ”»)
| | 🟒 |
`...` / test.runner.ts
|
94.67% (-4.67% πŸ”»)
| 73.33% |
66.67% (-33.33% πŸ”»)
|
94.67% (-4.67% πŸ”»)
| | πŸ”΄ |
`...` / testing.service.ts
|
12% (-16.57% πŸ”»)
| 100% | 0% |
12% (-16.57% πŸ”»)
| | 🟑 |
`...` / unfinalizedBlocks.service.ts
|
63.19% (-20.79% πŸ”»)
| 96.72% |
88% (-3.67% πŸ”»)
|
63.19% (-20.79% πŸ”»)
| | πŸ”΄ |
`...` / worker.builder.ts
|
59.83% (-19.36% πŸ”»)
| 65.38% | 80% |
59.83% (-19.36% πŸ”»)
| | πŸ”΄ |
`...` / worker.cache.service.ts
|
48.78% (-9.76% πŸ”»)
| 100% | 0% |
48.78% (-9.76% πŸ”»)
| | πŸ”΄ |
`...` / worker.connectionPoolState.manager.ts
|
38.21% (-22.76% πŸ”»)
| 100% | 0% |
38.21% (-22.76% πŸ”»)
| | πŸ”΄ |
`...` / worker.dynamic-ds.service.ts
|
44.44% (-17.78% πŸ”»)
| 100% | 0% |
44.44% (-17.78% πŸ”»)
| | πŸ”΄ |
`...` / worker.service.ts
|
20.35% (-24.29% πŸ”»)
| 100% | 0% |
20.35% (-24.29% πŸ”»)
| | 🟒 |
`...` / worker.store.service.ts
|
80% (-2.61% πŸ”»)
| 100% | 50% |
80% (-2.61% πŸ”»)
| | πŸ”΄ |
`...` / worker.ts
|
41.82% (-0.63% πŸ”»)
| 100% | 0% |
41.82% (-0.63% πŸ”»)
| | πŸ”΄ |
`...` / worker.unfinalizedBlocks.service.ts
|
33.33% (-66.67% πŸ”»)
| 100% |
0% (-100% πŸ”»)
|
33.33% (-66.67% πŸ”»)
| | πŸ”΄ |
`...` / logger.ts
|
44.74% (-19.74% πŸ”»)
| 33.33% |
40% (+20% πŸ”Ό)
|
44.74% (-19.74% πŸ”»)
| | πŸ”΄ |
`...` / event.listener.ts
|
43.43% (-37.37% πŸ”»)
| 100% |
23.08% (-1.92% πŸ”»)
|
43.43% (-37.37% πŸ”»)
| | πŸ”΄ |
`...` / health.controller.ts
|
37.93% (-17.24% πŸ”»)
| 100% |
33.33% (-16.67% πŸ”»)
|
37.93% (-17.24% πŸ”»)
| | πŸ”΄ |
`...` / health.service.ts
|
26.03% (-31.51% πŸ”»)
| 100% |
16.67% (-3.33% πŸ”»)
|
26.03% (-31.51% πŸ”»)
| | πŸ”΄ |
`...` / meta.service.ts
|
24.76% (-44.76% πŸ”»)
| 80% |
36.36% (-3.64% πŸ”»)
|
24.76% (-44.76% πŸ”»)
| | πŸ”΄ |
`...` / ready.controller.ts
|
34.78% (-21.74% πŸ”»)
| 100% |
33.33% (-16.67% πŸ”»)
|
34.78% (-21.74% πŸ”»)
| | πŸ”΄ |
`...` / ready.service.ts
|
54.17% (-37.5% πŸ”»)
| 100% |
50% (-16.67% πŸ”»)
|
54.17% (-37.5% πŸ”»)
| | πŸ”΄ |
`...` / forceClean.service.ts
|
22.08% (-4.24% πŸ”»)
| 100% | 0% |
22.08% (-4.24% πŸ”»)
| | πŸ”΄ |
`...` / reindex.service.ts
|
14.73% (-18.6% πŸ”»)
| 100% | 0% |
14.73% (-18.6% πŸ”»)
| | 🟑 |
`...` / autoQueue.ts
|
60.3% (-28.09% πŸ”»)
| 85.11% |
73.08% (-6.09% πŸ”»)
|
60.3% (-28.09% πŸ”»)
| | 🟑 |
`...` / blocks.ts
|
77.78% (-22.22% πŸ”»)
| 88.89% |
66.67% (-33.33% πŸ”»)
|
77.78% (-22.22% πŸ”»)
| | 🟒 |
`...` / promise.ts
|
86.44% (-5.32% πŸ”»)
|
100% (+13.64% πŸ”Ό)
|
71.43% (-14.29% πŸ”»)
|
86.44% (-5.32% πŸ”»)
| | πŸ”΄ |
`...` / yargs.ts
|
44.38% (-1.11% πŸ”»)
| 100% | 14.29% |
44.38% (-1.11% πŸ”»)
| | 🟒 |
`...` / SubqueryProject.ts
|
95.38% (-0.14% πŸ”»)
|
83.33% (+0.98% πŸ”Ό)
|
87.5% (+1.79% πŸ”Ό)
|
95.38% (-0.14% πŸ”»)
| | 🟑 |
`...` / apiPromise.connection.ts
|
77.08% (+8% πŸ”Ό)
|
50% (-30% πŸ”»)
|
62.5% (+19.64% πŸ”Ό)
|
77.08% (+8% πŸ”Ό)
| | πŸ”΄ |
`...` / worker-block-dispatcher.service.ts
|
24.64% (-12.32% πŸ”»)
| 100% | 0% |
24.64% (-12.32% πŸ”»)
| | 🟒 |
`...` / substrateDictionary.service.ts
|
93.2% (+2.64% πŸ”Ό)
|
41.67% (-31.06% πŸ”»)
|
100% (+20% πŸ”Ό)
|
93.2% (+2.64% πŸ”Ό)
| | 🟒 |
`...` / substrateDictionaryV1.ts
|
85.05% (-0.43% πŸ”»)
|
70.45% (+0.69% πŸ”Ό)
|
84.62% (+1.28% πŸ”Ό)
|
85.05% (-0.43% πŸ”»)
| | 🟑 |
`...` / substrateDictionaryV2.ts
|
70.79% (-4.72% πŸ”»)
|
50% (-25% πŸ”»)
| 33.33% |
70.79% (-4.72% πŸ”»)
| | 🟒 |
`...` / fetch.module.ts
|
90% (-1.88% πŸ”»)
|
50% (-25% πŸ”»)
| 100% |
90% (-1.88% πŸ”»)
| | πŸ”΄ |
`...` / indexer.manager.ts
|
56.35% (-1.2% πŸ”»)
| 100% |
20% (+10.91% πŸ”Ό)
|
56.35% (-1.2% πŸ”»)
| | 🟒 |
`...` / runtimeService.ts
|
94.29% (+2.08% πŸ”Ό)
|
81.82% (-7.07% πŸ”»)
|
100% (+20% πŸ”Ό)
|
94.29% (+2.08% πŸ”Ό)
| | πŸ”΄ |
`...` / http.ts
|
49.03% (-30.89% πŸ”»)
| 40% |
28.57% (-2.2% πŸ”»)
|
49.03% (-30.89% πŸ”»)
| | 🟒 |
`...` / project.ts
|
88.81% (-0.08% πŸ”»)
| 68.18% | 87.5% |
88.81% (-0.08% πŸ”»)
| | 🟒 |
`...` / buffer.ts
|
95.12% (-4.88% πŸ”»)
|
95.65% (-4.35% πŸ”»)
|
85.71% (+1.5% πŸ”Ό)
|
95.12% (-4.88% πŸ”»)
| | 🟑 |
`...` / logger.ts
|
69.01% (-0.59% πŸ”»)
|
50% (-5% πŸ”»)
|
78.57% (+3.57% πŸ”Ό)
|
69.01% (-0.59% πŸ”»)
|

Test suite run failed

Failed tests: 6/546. Failed suites: 4/98.
``` ● Dictionary V1 β€Ί coreDictionary β€Ί can use scoped dictionary query expect(received).toEqual(expected) // deep equality Expected: 0 Received: undefined 95 | // Out of range of scoped entries 96 | const result = await dictionary.getData(100, 199, 10); > 97 | expect(result?.batchBlocks.length).toEqual(0); | ^ 98 | 99 | const result2 = await dictionary.getData(1000, 10000, 10); 100 | expect(result2?.batchBlocks.length).toBeGreaterThan(0); at Object. (packages/node-core/src/indexer/dictionary/v1/dictionaryV1.spec.ts:97:42) ``` --- ``` ● 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' ``` --- ``` ● Cli publish β€Ί should upload appropriate project to IPFS Publish project to default IPFS failed 172 | const results = ipfsWrite.addAll(contents, {pin: true, cidVersion: 0, wrapWithDirectory: isMultichain}); 173 | for await (const result of results) { > 174 | fileCidMap.set(result.path, result.cid.toString()); | ^ 175 | 176 | await ipfsWrite.pin.remote.add(result.cid, {service: PIN_SERVICE}).catch((e) => { 177 | console.warn( at packages/cli/src/controller/publish-controller.ts:174:15 at async Promise.all (index 0) at async uploadFile (packages/cli/src/controller/publish-controller.ts:177:30) at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:100:26) at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:105:26 at async Promise.all (index 1) at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:103:9) at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:70:28) at async Object. (packages/cli/src/controller/publish-controller.spec.ts:33:21) Cause: HTTPError: 403 Forbidden

403 Forbidden


nginx/1.17.7
175 | 176 | await ipfsWrite.pin.remote.add(result.cid, {service: PIN_SERVICE}).catch((e) => { > 177 | console.warn( | ^ 178 | `Failed to pin file ${result.path}. There might be problems with this file being accessible later. ${e}` 179 | ); 180 | }); at Object.errorHandler [as handleError] (node_modules/ipfs-http-client/cjs/src/lib/core.js:84:15) at async Client.fetch (node_modules/ipfs-http-client/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:177:30) at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:100:26) at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:105:26 at async Promise.all (index 1) at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:103:9) at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:70:28) at async Object. (packages/cli/src/controller/publish-controller.spec.ts:33:21) ``` --- ``` ● 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 81ca1977ec1ba769de0eefb50d2a52977288cf72