diff --git a/package.json b/package.json index 0e61e13..f9af3f8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@subsquid/cli", "description": "squid cli tool", - "version": "2.2.2", + "version": "2.3.0", "license": "GPL-3.0-or-later", "repository": "git@github.com:subsquid/squid-cli.git", "publishConfig": { diff --git a/src/api/me.ts b/src/api/me.ts index 678bd5a..ae57cd0 100644 --- a/src/api/me.ts +++ b/src/api/me.ts @@ -7,7 +7,7 @@ export async function me(auth?: { apiUrl: string; credentials: string }): Promis path: `/client/me`, }); - if (!body || !body.username) { + if (!body) { throw new ApiError(401, { error: 'username is missing' }); } diff --git a/src/commands/redeploy.ts b/src/commands/restart.ts similarity index 87% rename from src/commands/redeploy.ts rename to src/commands/restart.ts index 308e191..5049d23 100644 --- a/src/commands/redeploy.ts +++ b/src/commands/restart.ts @@ -4,10 +4,10 @@ import { redeploySquid } from '../api'; import { DeployCommand } from '../deploy-command'; import { parseEnvs, parseNameAndVersion } from '../utils'; -export default class Redeploy extends DeployCommand { - static aliases = ['squid:redeploy']; +export default class Restart extends DeployCommand { + static aliases = ['squid:redeploy', 'redeploy']; - static description = 'Restart a squid version'; + static description = 'Restart a squid'; static args = [ { name: 'nameAndVersion', @@ -39,7 +39,7 @@ export default class Redeploy extends DeployCommand { const { flags, args: { nameAndVersion, 'no-stream-logs': disableStreamLogs }, - } = await this.parse(Redeploy); + } = await this.parse(Restart); const { squidName, versionName } = parseNameAndVersion(nameAndVersion, this); const envs = parseEnvs(flags.env, flags.envFile);