From 2d587598f39b9a630ff482177441c61c0dc2832a Mon Sep 17 00:00:00 2001 From: root Date: Mon, 20 May 2024 22:15:40 +0000 Subject: [PATCH] fix: update usage of old teamUpdate method --- README.md | 4 ++-- install.ps1 | 4 ++-- install.sh | 2 +- lib/client.js | 4 ++-- lib/commands/deploy.js | 10 +++++----- package.json | 2 +- scoop/appwrite.json | 6 +++--- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 9709f8e..c9568fb 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using ```sh $ appwrite -v -5.0.3 +5.0.5 ``` ### Install using prebuilt binaries @@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc Once the installation completes, you can verify your install using ``` $ appwrite -v -5.0.3 +5.0.5 ``` ## Getting Started diff --git a/install.ps1 b/install.ps1 index 9794aa5..0c9310b 100644 --- a/install.ps1 +++ b/install.ps1 @@ -13,8 +13,8 @@ # You can use "View source" of this page to see the full script. # REPO -$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.3/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.3/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.5/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.5/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index ee7b5ca..70f8948 100644 --- a/install.sh +++ b/install.sh @@ -97,7 +97,7 @@ printSuccess() { downloadBinary() { echo "[2/4] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="5.0.3" + GITHUB_LATEST_VERSION="5.0.5" GITHUB_FILE="appwrite-cli-${OS}-${ARCH}" GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE" diff --git a/lib/client.js b/lib/client.js index 51a5527..1fd7c26 100644 --- a/lib/client.js +++ b/lib/client.js @@ -15,8 +15,8 @@ class Client { 'x-sdk-name': 'Command Line', 'x-sdk-platform': 'console', 'x-sdk-language': 'cli', - 'x-sdk-version': '5.0.3', - 'user-agent' : `AppwriteCLI/5.0.3 (${os.type()} ${os.version()}; ${os.arch()})`, + 'x-sdk-version': '5.0.5', + 'user-agent' : `AppwriteCLI/5.0.5 (${os.type()} ${os.version()}; ${os.arch()})`, 'X-Appwrite-Response-Format' : '1.5.0', }; } diff --git a/lib/commands/deploy.js b/lib/commands/deploy.js index 4b0216f..3ae7a17 100644 --- a/lib/commands/deploy.js +++ b/lib/commands/deploy.js @@ -34,7 +34,7 @@ const { } = require("./storage"); const { teamsGet, - teamsUpdate, + teamsUpdateName, teamsCreate } = require("./teams"); const { checkDeployConditions } = require('../utils'); @@ -355,7 +355,7 @@ const deployFunction = async ({ functionId, all, yes } = {}) => { functionId: func['$id'], parseOutput: false }, 100, 'variables'); - + await Promise.all(variables.map(async variable => { await functionsDeleteVariable({ functionId: func['$id'], @@ -363,7 +363,7 @@ const deployFunction = async ({ functionId, all, yes } = {}) => { parseOutput: false }); })); - + let result = await awaitPools.wipeVariables(func['$id']); if (!result) { throw new Error("Variable deletion timed out."); @@ -881,7 +881,7 @@ const deployTeam = async ({ all, yes } = {}) => { log(`Updating team ...`) - await teamsUpdate({ + await teamsUpdateName({ teamId: team['$id'], name: team.name, parseOutput: false @@ -937,4 +937,4 @@ deploy module.exports = { deploy -} \ No newline at end of file +} diff --git a/package.json b/package.json index dbf170b..7a87f62 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "appwrite-cli", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "5.0.3", + "version": "5.0.5", "license": "BSD-3-Clause", "main": "index.js", "bin": { diff --git a/scoop/appwrite.json b/scoop/appwrite.json index 2224dcd..1289e25 100644 --- a/scoop/appwrite.json +++ b/scoop/appwrite.json @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json", - "version": "5.0.3", + "version": "5.0.5", "description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.", "homepage": "https://github.com/appwrite/sdk-for-cli", "license": "BSD-3-Clause", "architecture": { "64bit": { - "url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.3/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.5/appwrite-cli-win-x64.exe", "bin": [ [ "appwrite-cli-win-x64.exe", @@ -15,7 +15,7 @@ ] }, "arm64": { - "url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.3/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.5/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe",