diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c7eb01f..b41bcac 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -14,7 +14,7 @@ jobs: - name: Setup binfmt with QEMU run: | sudo apt update - sudo apt install qemu binfmt-support qemu-user-static + sudo apt install qemu-system binfmt-support qemu-user-static update-binfmts --display - name: Setup ldid run: | diff --git a/README.md b/README.md index 789870d..931a016 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 -6.2.1 +6.2.2 ``` ### 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 -6.2.1 +6.2.2 ``` ## Getting Started diff --git a/install.ps1 b/install.ps1 index 54c64b7..509b2cc 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/6.2.1/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.1/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index 45894cb..21eebf9 100644 --- a/install.sh +++ b/install.sh @@ -97,7 +97,7 @@ printSuccess() { downloadBinary() { echo "[2/4] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="6.2.1" + GITHUB_LATEST_VERSION="6.2.2" 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 70366be..563b4f8 100644 --- a/lib/client.js +++ b/lib/client.js @@ -16,8 +16,8 @@ class Client { 'x-sdk-name': 'Command Line', 'x-sdk-platform': 'console', 'x-sdk-language': 'cli', - 'x-sdk-version': '6.2.1', - 'user-agent' : `AppwriteCLI/6.2.1 (${os.type()} ${os.version()}; ${os.arch()})`, + 'x-sdk-version': '6.2.2', + 'user-agent' : `AppwriteCLI/6.2.2 (${os.type()} ${os.version()}; ${os.arch()})`, 'X-Appwrite-Response-Format' : '1.6.0', }; } @@ -208,7 +208,7 @@ class Client { globalConfig.setCurrentSession(''); globalConfig.removeSession(current); } - throw new AppwriteException(json.message, json.code, json.type, json); + throw new AppwriteException(json.message, json.code, json.type, text); } if (responseType === "arraybuffer") { diff --git a/lib/commands/push.js b/lib/commands/push.js index 7192248..1533f2e 100644 --- a/lib/commands/push.js +++ b/lib/commands/push.js @@ -450,12 +450,12 @@ const getObjectChanges = (remote, local, index, what) => { return changes; } -const createAttribute = async (databaseId, collectionId, attribute) => { +const createAttribute = (databaseId, collectionId, attribute) => { switch (attribute.type) { case 'string': switch (attribute.format) { case 'email': - return await databasesCreateEmailAttribute({ + return databasesCreateEmailAttribute({ databaseId, collectionId, key: attribute.key, @@ -465,7 +465,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => { parseOutput: false }) case 'url': - return await databasesCreateUrlAttribute({ + return databasesCreateUrlAttribute({ databaseId, collectionId, key: attribute.key, @@ -475,7 +475,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => { parseOutput: false }) case 'ip': - return await databasesCreateIpAttribute({ + return databasesCreateIpAttribute({ databaseId, collectionId, key: attribute.key, @@ -485,7 +485,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => { parseOutput: false }) case 'enum': - return await databasesCreateEnumAttribute({ + return databasesCreateEnumAttribute({ databaseId, collectionId, key: attribute.key, @@ -496,7 +496,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => { parseOutput: false }) default: - return await databasesCreateStringAttribute({ + return databasesCreateStringAttribute({ databaseId, collectionId, key: attribute.key, @@ -509,7 +509,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => { } case 'integer': - return await databasesCreateIntegerAttribute({ + return databasesCreateIntegerAttribute({ databaseId, collectionId, key: attribute.key, @@ -567,12 +567,12 @@ const createAttribute = async (databaseId, collectionId, attribute) => { } } -const updateAttribute = async (databaseId, collectionId, attribute) => { +const updateAttribute = (databaseId, collectionId, attribute) => { switch (attribute.type) { case 'string': switch (attribute.format) { case 'email': - return await databasesUpdateEmailAttribute({ + return databasesUpdateEmailAttribute({ databaseId, collectionId, key: attribute.key, @@ -582,7 +582,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => { parseOutput: false }) case 'url': - return await databasesUpdateUrlAttribute({ + return databasesUpdateUrlAttribute({ databaseId, collectionId, key: attribute.key, @@ -592,7 +592,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => { parseOutput: false }) case 'ip': - return await databasesUpdateIpAttribute({ + return databasesUpdateIpAttribute({ databaseId, collectionId, key: attribute.key, @@ -602,7 +602,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => { parseOutput: false }) case 'enum': - return await databasesUpdateEnumAttribute({ + return databasesUpdateEnumAttribute({ databaseId, collectionId, key: attribute.key, @@ -613,7 +613,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => { parseOutput: false }) default: - return await databasesUpdateStringAttribute({ + return databasesUpdateStringAttribute({ databaseId, collectionId, key: attribute.key, @@ -626,7 +626,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => { } case 'integer': - return await databasesUpdateIntegerAttribute({ + return databasesUpdateIntegerAttribute({ databaseId, collectionId, key: attribute.key, @@ -882,7 +882,7 @@ const createAttributes = async (attributes, collection) => { const result = await awaitPools.expectAttributes( collection['databaseId'], collection['$id'], - collection.attributes.map(attribute => attribute.key) + collection.attributes.filter(attribute => attribute.side !== 'child').map(attribute => attribute.key) ); if (!result) { diff --git a/lib/parser.js b/lib/parser.js index 48ea07b..ea350ec 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -120,7 +120,7 @@ const parseError = (err) => { } catch { } - const version = '6.2.1'; + const version = '6.2.2'; const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``; const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud}`; diff --git a/package.json b/package.json index 5056471..4e3470b 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": "6.2.1", + "version": "6.2.2", "license": "BSD-3-Clause", "main": "index.js", "bin": { diff --git a/scoop/appwrite.json b/scoop/appwrite.json index cdae220..05a1b52 100644 --- a/scoop/appwrite.json +++ b/scoop/appwrite.json @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json", - "version": "6.2.1", + "version": "6.2.2", "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/6.2.1/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/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/6.2.1/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe",