0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

[ci] format

This commit is contained in:
Matthew Phillips 2024-03-18 12:06:35 +00:00 committed by astrobot-houston
parent 37a485b4d1
commit 34206ed60f

View file

@ -44,7 +44,10 @@ class ManagedRemoteAppToken implements ManagedAppToken {
});
}
static async createToken(sessionToken: string, projectId: string): Promise<{ token: string; ttl: number; }> {
static async createToken(
sessionToken: string,
projectId: string
): Promise<{ token: string; ttl: number }> {
const spinner = ora('Connecting to remote database...').start();
const response = await safeFetch(
new URL(`${getAstroStudioUrl()}/auth/cli/token-create`),
@ -120,7 +123,10 @@ class ManagedRemoteAppToken implements ManagedAppToken {
}
} else {
try {
const { token, ttl } = await ManagedRemoteAppToken.createToken(this.session, this.projectId);
const { token, ttl } = await ManagedRemoteAppToken.createToken(
this.session,
this.projectId
);
this.token = token;
this.ttl = ttl;
this.expires = getExpiresFromTtl(ttl);
@ -128,7 +134,9 @@ class ManagedRemoteAppToken implements ManagedAppToken {
} catch {
// If we get here we couldn't create a new token. Since the existing token
// is expired we really can't do anything and should exit.
throw new Error(`Token has expired and attempts to renew it have failed, please try again.`);
throw new Error(
`Token has expired and attempts to renew it have failed, please try again.`
);
}
}
}