UNPKG

convex

Version:

Client for the Convex Cloud

21 lines (20 loc) 872 B
"use strict"; import { Command } from "commander"; import { readProjectConfig } from "./lib/config.js"; import chalk from "chalk"; import { bigBrainAPI } from "./lib/utils.js"; import { oneoffContext } from "./lib/context.js"; export const deployments = new Command("deployments").description("List deployments associated with a project").action(async () => { const ctx = oneoffContext; const { projectConfig: config } = await readProjectConfig(ctx); const url = `/teams/${config.team}/projects/${config.project}/deployments`; console.error( chalk.yellow(`Deployments for project ${config.team}/${config.project}`) ); const deployments2 = await bigBrainAPI(ctx, "GET", url); console.log(deployments2); if (deployments2.length === 0) { console.error(chalk.yellow(`No deployments exist for project`)); } }); //# sourceMappingURL=deployments.js.map