(dockerCompose: Document)
| 148 | } |
| 149 | |
| 150 | function getSubqlNodeService(dockerCompose: Document): DockerComposeService | undefined { |
| 151 | const services = dockerCompose.get('services'); |
| 152 | if (services && services instanceof YAMLMap) { |
| 153 | const service = services.items.find((item) => { |
| 154 | const image = item.value.get('image') as string; |
| 155 | return image?.startsWith('onfinality/subql-node'); |
| 156 | }); |
| 157 | |
| 158 | if (service && service.value instanceof YAMLMap) { |
| 159 | const commands = service.value.get('command') as YAMLSeq<string>; |
| 160 | if (!(commands.toJSON() as string[]).includes('--multi-chain')) { |
| 161 | commands.add('--multi-chain'); |
| 162 | } |
| 163 | return service.value.toJSON() as DockerComposeService; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | return undefined; |
| 168 | } |
| 169 | |
| 170 | async function getDefaultServiceConfiguration( |
| 171 | chainManifestPath: string, |
no test coverage detected