From 2219520025e1c702ea1823b7d6b4927e543a5a19 Mon Sep 17 00:00:00 2001 From: mo4islona Date: Thu, 14 Mar 2024 15:21:11 +0400 Subject: [PATCH] fix: deploy new squid --- package.json | 2 +- src/deploy-command.ts | 5 +++-- yarn.lock | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ee58575..b8e5fad 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@subsquid/cli", "description": "squid cli tool", - "version": "2.9.0", + "version": "2.9.1", "license": "GPL-3.0-or-later", "repository": "git@github.com:subsquid/squid-cli.git", "publishConfig": { diff --git a/src/deploy-command.ts b/src/deploy-command.ts index c3eb966..c02cbd3 100644 --- a/src/deploy-command.ts +++ b/src/deploy-command.ts @@ -3,6 +3,7 @@ import chalk from 'chalk'; import inquirer from 'inquirer'; import { + ApiError, DeployResponse, DeployStatus, getDeploy, @@ -21,8 +22,8 @@ export abstract class DeployCommand extends CliCommand { async findSquid({ orgCode, squidName }: { orgCode: string; squidName: string }) { try { return await getSquid({ orgCode, squidName }); - } catch (e: any) { - if (e.status === 404) { + } catch (e: unknown) { + if (e instanceof ApiError && e.request.status === 404) { return null; } diff --git a/yarn.lock b/yarn.lock index 7acbca0..80e4384 100644 --- a/yarn.lock +++ b/yarn.lock @@ -736,7 +736,7 @@ is-wsl "^2.1.1" tslib "^2.3.1" -"@oclif/core@^3.19.1": +"@oclif/core@3.19.1", "@oclif/core@^3.19.1": version "3.19.1" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.19.1.tgz#18af989f4b086ba9b6dfac891fb27f8281664084" integrity sha512-dd1h4Hz+LwpuYhKvgBjDmW3/HgUAm93JM95cnbzSv5VcmiBeC+utjLvY96PmPbYxxDoz7XazEOl8oOpSLSEgcg== @@ -840,7 +840,7 @@ chalk "^4.1.0" tslib "^2.4.1" -"@oclif/plugin-autocomplete@^3.0.8": +"@oclif/plugin-autocomplete@3.0.8": version "3.0.8" resolved "https://registry.yarnpkg.com/@oclif/plugin-autocomplete/-/plugin-autocomplete-3.0.8.tgz#e874172bbf48b4ae6f019411582c56cedfcfa8cd" integrity sha512-8h9PU56msmSD+s+mZcS/b+YYJwyxDwONC8FFQUbfeWAB/rRqMFj2tOMbh7VGk6ZUTU5KcQvMDeDQ3UXfTKVPqA==