MCPcopy Index your code
hub / github.com/subquery/subql / promptImageVersion

Function promptImageVersion

packages/cli/src/controller/deploy-controller.ts:292–314  ·  view source on GitHub ↗
(
  runner: string,
  version: string,
  useDefaults: boolean | undefined,
  authToken: string,
  type: 'indexer' | 'query',
  prompt: Prompt | null
)

Source from the content-addressed store, hash-verified

290}
291
292export async function promptImageVersion(
293 runner: string,
294 version: string,
295 useDefaults: boolean | undefined,
296 authToken: string,
297 type: 'indexer' | 'query',
298 prompt: Prompt | null
299): Promise<string> {
300 const versions = await imageVersions(runner, version, authToken, ROOT_API_URL_PROD);
301 if (useDefaults) {
302 return versions[0];
303 }
304 if (!prompt) {
305 throw new Error(`${type} is required`);
306 }
307
308 return prompt({
309 message: `Enter ${type} version for ${runner}`,
310 type: 'string',
311 options: versions,
312 defaultValue: versions[0],
313 });
314}
315
316export function logDeployment(logger: Logger, org: string, projectName: string, deploymentOutput?: DeploymentDataType) {
317 if (deploymentOutput) {

Callers 2

createDeploymentAdapterFunction · 0.90

Calls 1

imageVersionsFunction · 0.85

Tested by

no test coverage detected