Skip to content

Commit

Permalink
[CLI] Remove dead init code (#31126)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 3b4c4eaf0a72fa70a194826d281eede5e400af21
  • Loading branch information
emmaling27 authored and Convex, Inc. committed Oct 28, 2024
1 parent 40a4965 commit ef76665
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions npm-packages/convex/src/cli/lib/api.ts
Original file line number Diff line number Diff line change
@@ -78,70 +78,6 @@ export async function createProject(
};
}

// Init
// Provision a new empty project and return the new deployment credentials.
export async function createProjectProvisioningDevOrProd(
ctx: Context,
{
teamSlug: selectedTeamSlug,
projectName,
}: { teamSlug: string; projectName: string },
firstDeploymentType: DeploymentType,
): Promise<{
projectSlug: string;
teamSlug: string;
deploymentName: string;
url: string;
adminKey: AdminKey;
projectsRemaining: number;
}> {
const provisioningArgs = {
team: selectedTeamSlug,
projectName,
deploymentType: firstDeploymentType,
backendVersionOverride: process.env.CONVEX_BACKEND_VERSION_OVERRIDE,
};
const data = await bigBrainAPI({
ctx,
method: "POST",
url: "create_project",
data: provisioningArgs,
});
const {
projectSlug,
teamSlug,
deploymentName,
adminKey,
projectsRemaining,
prodUrl: url,
} = data;
if (
projectSlug === undefined ||
teamSlug === undefined ||
deploymentName === undefined ||
url === undefined ||
adminKey === undefined ||
projectsRemaining === undefined
) {
const error =
"Unexpected response during provisioning: " + JSON.stringify(data);
return await ctx.crash({
exitCode: 1,
errorType: "transient",
errForSentry: error,
printedMessage: error,
});
}
return {
projectSlug,
teamSlug,
deploymentName,
url,
adminKey,
projectsRemaining,
};
}

// Dev
export async function fetchDeploymentCredentialsForName(
ctx: Context,

0 comments on commit ef76665

Please sign in to comment.