From cf36de1ffb0c7d39d4e39ed007d5fac28a994533 Mon Sep 17 00:00:00 2001 From: alexweininger Date: Fri, 21 May 2021 00:40:14 -0700 Subject: [PATCH] Temporary fix for Appwrite issue https://github.com/appwrite/appwrite/issues/1171 --- CHANGELOG.md | 2 ++ package.json | 2 +- src/appwrite/Health.ts | 4 ++-- src/tree/health/HealthTreeItemProvider.ts | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67a12d7..9d1bb2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ## [Unreleased] +## [0.0.8] - 2021-5-21 +- Temp fix for Appwrite https://github.com/appwrite/appwrite/issues/1171 ## [0.0.7] - 2021-5-14 ### Fixed diff --git a/package.json b/package.json index d5c7404..1384fe9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-appwrite", "displayName": "Appwrite", "description": "Manage your Appwrite resources right from VS Code!", - "version": "0.0.7", + "version": "0.0.8", "engines": { "vscode": "^1.55.0" }, diff --git a/src/appwrite/Health.ts b/src/appwrite/Health.ts index 27cbc9b..8ffe6a4 100644 --- a/src/appwrite/Health.ts +++ b/src/appwrite/Health.ts @@ -11,7 +11,7 @@ export class Health { /** * @returns The health of all Appwrite services. */ - public async checkup(): Promise { + public async checkup(): Promise> { return { HTTP: await this.health.get(), DB: await this.health.getDB(), @@ -24,7 +24,7 @@ export class Health { QueueCertificates: await this.health.getQueueCertificates(), QueueFunctions: await this.health.getQueueFunctions(), StorageLocal: await this.health.getStorageLocal(), - AntiVirus: await this.health.getAntiVirus(), + // AntiVirus: await this.health.getAntiVirus(), }; } } diff --git a/src/tree/health/HealthTreeItemProvider.ts b/src/tree/health/HealthTreeItemProvider.ts index b5f7403..2d508b1 100644 --- a/src/tree/health/HealthTreeItemProvider.ts +++ b/src/tree/health/HealthTreeItemProvider.ts @@ -35,12 +35,13 @@ export class HealthTreeItemProvider implements vscode.TreeDataProvider( + const health = await promiseWithTimeout | undefined>( 10000, async () => { try { return await healthClient?.checkup(); } catch (e) { + ext.outputChannel?.append('Error: ' + e.message); vscode.window.showErrorMessage('Could not connect to Appwrite project'); } },