( data: ProjectDeploymentInterface )
| 254 | } |
| 255 | |
| 256 | export async function executeProjectDeployment( |
| 257 | data: ProjectDeploymentInterface |
| 258 | ): Promise<DeploymentDataType | undefined> { |
| 259 | // This should not happe, the commands that call this should set the query version |
| 260 | if (!data.flags.queryVersion) { |
| 261 | throw new Error('Query version is required'); |
| 262 | } |
| 263 | if (data.projectInfo !== undefined) { |
| 264 | await updateDeployment( |
| 265 | data.flags.org, |
| 266 | data.flags.projectName, |
| 267 | data.projectInfo.id, |
| 268 | data.authToken, |
| 269 | data.ipfsCID, |
| 270 | data.flags.queryVersion, |
| 271 | generateAdvancedQueryOptions(data.flags), |
| 272 | data.chains, |
| 273 | ROOT_API_URL_PROD |
| 274 | ); |
| 275 | } else { |
| 276 | const deploymentOutput = await createDeployment( |
| 277 | data.flags.org, |
| 278 | data.flags.projectName, |
| 279 | data.authToken, |
| 280 | data.ipfsCID, |
| 281 | data.flags.queryVersion, |
| 282 | data.flags.type, |
| 283 | generateAdvancedQueryOptions(data.flags), |
| 284 | data.chains, |
| 285 | ROOT_API_URL_PROD |
| 286 | ); |
| 287 | |
| 288 | return deploymentOutput; |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | export async function promptImageVersion( |
| 293 | runner: string, |
no test coverage detected