From 13a5c91ca06ee8450052ebab5cfc2e7ea1f51569 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 14 Sep 2023 14:14:29 -0400 Subject: [PATCH 1/2] Add Bun support --- README.md | 4 ++-- docs/examples/projects/create-domain.md | 3 +++ docs/examples/projects/delete-domain.md | 3 +++ docs/examples/projects/get-domain.md | 3 +++ docs/examples/projects/list-domains.md | 2 ++ docs/examples/projects/update-domain-verification.md | 3 +++ docs/examples/teams/update-membership-roles.md | 4 ++++ install.ps1 | 4 ++-- install.sh | 2 +- lib/client.js | 4 ++-- lib/questions.js | 5 +++++ package.json | 2 +- scoop/appwrite.json | 6 +++--- 13 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 docs/examples/projects/create-domain.md create mode 100644 docs/examples/projects/delete-domain.md create mode 100644 docs/examples/projects/get-domain.md create mode 100644 docs/examples/projects/list-domains.md create mode 100644 docs/examples/projects/update-domain-verification.md create mode 100644 docs/examples/teams/update-membership-roles.md diff --git a/README.md b/README.md index 4a1b614..94078ba 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 -4.0.0 +4.1.0 ``` ### Install using prebuilt binaries @@ -63,7 +63,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 -4.0.0 +4.1.0 ``` ## Getting Started diff --git a/docs/examples/projects/create-domain.md b/docs/examples/projects/create-domain.md new file mode 100644 index 0000000..6ae89cc --- /dev/null +++ b/docs/examples/projects/create-domain.md @@ -0,0 +1,3 @@ +appwrite projects createDomain \ + --projectId [PROJECT_ID] \ + --domain '' diff --git a/docs/examples/projects/delete-domain.md b/docs/examples/projects/delete-domain.md new file mode 100644 index 0000000..c469008 --- /dev/null +++ b/docs/examples/projects/delete-domain.md @@ -0,0 +1,3 @@ +appwrite projects deleteDomain \ + --projectId [PROJECT_ID] \ + --domainId [DOMAIN_ID] diff --git a/docs/examples/projects/get-domain.md b/docs/examples/projects/get-domain.md new file mode 100644 index 0000000..367679a --- /dev/null +++ b/docs/examples/projects/get-domain.md @@ -0,0 +1,3 @@ +appwrite projects getDomain \ + --projectId [PROJECT_ID] \ + --domainId [DOMAIN_ID] diff --git a/docs/examples/projects/list-domains.md b/docs/examples/projects/list-domains.md new file mode 100644 index 0000000..2967713 --- /dev/null +++ b/docs/examples/projects/list-domains.md @@ -0,0 +1,2 @@ +appwrite projects listDomains \ + --projectId [PROJECT_ID] diff --git a/docs/examples/projects/update-domain-verification.md b/docs/examples/projects/update-domain-verification.md new file mode 100644 index 0000000..bb07cdb --- /dev/null +++ b/docs/examples/projects/update-domain-verification.md @@ -0,0 +1,3 @@ +appwrite projects updateDomainVerification \ + --projectId [PROJECT_ID] \ + --domainId [DOMAIN_ID] diff --git a/docs/examples/teams/update-membership-roles.md b/docs/examples/teams/update-membership-roles.md new file mode 100644 index 0000000..c6684d2 --- /dev/null +++ b/docs/examples/teams/update-membership-roles.md @@ -0,0 +1,4 @@ +appwrite teams updateMembershipRoles \ + --teamId [TEAM_ID] \ + --membershipId [MEMBERSHIP_ID] \ + --roles one two three diff --git a/install.ps1 b/install.ps1 index e39dc89..d5812a8 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/4.0.0/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.0.0/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.1.0/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.1.0/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index 2110683..d476a2f 100644 --- a/install.sh +++ b/install.sh @@ -97,7 +97,7 @@ printSuccess() { downloadBinary() { echo "[2/4] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="4.0.0" + GITHUB_LATEST_VERSION="4.1.0" 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 77795ab..1ea7063 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': '4.0.0', - 'user-agent' : `AppwriteCLI/4.0.0 (${os.type()} ${os.version()}; ${os.arch()})`, + 'x-sdk-version': '4.1.0', + 'user-agent' : `AppwriteCLI/4.1.0 (${os.type()} ${os.version()}; ${os.arch()})`, 'X-Appwrite-Response-Format' : '1.4.0', }; } diff --git a/lib/questions.js b/lib/questions.js index ed310c9..54a6244 100644 --- a/lib/questions.js +++ b/lib/questions.js @@ -20,6 +20,7 @@ const getIgnores = (runtime) => { case 'kotlin': return ['build']; case 'node': + case 'bun': return ['node_modules', '.npm']; case 'php': return ['vendor']; @@ -46,6 +47,8 @@ const getEntrypoint = (runtime) => { return 'src/main.ts'; case 'node': return 'src/main.js'; + case 'bun': + return 'src/main.ts'; case 'php': return 'src/index.php'; case 'python': @@ -79,6 +82,8 @@ const getInstallCommand = (runtime) => { return "deno install"; case 'node': return 'npm install'; + case 'bun': + return 'bun install'; case 'php': return 'composer install'; case 'python': diff --git a/package.json b/package.json index 2d17366..0202a1a 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": "4.0.0", + "version": "4.1.0", "license": "BSD-3-Clause", "main": "index.js", "bin": { diff --git a/scoop/appwrite.json b/scoop/appwrite.json index 16299eb..5f96b3f 100644 --- a/scoop/appwrite.json +++ b/scoop/appwrite.json @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json", - "version": "4.0.0", + "version": "4.1.0", "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/4.0.0/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/4.1.0/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/4.0.0/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/4.1.0/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe", From 96581f21f8f1eccd3cfae721c20ed181ff1c2cbb Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 14 Sep 2023 14:43:46 -0400 Subject: [PATCH 2/2] Add Bun support --- docs/examples/projects/create-domain.md | 3 --- docs/examples/projects/delete-domain.md | 3 --- docs/examples/projects/get-domain.md | 3 --- docs/examples/projects/list-domains.md | 2 -- docs/examples/projects/update-domain-verification.md | 3 --- docs/examples/teams/update-membership-roles.md | 4 ---- 6 files changed, 18 deletions(-) delete mode 100644 docs/examples/projects/create-domain.md delete mode 100644 docs/examples/projects/delete-domain.md delete mode 100644 docs/examples/projects/get-domain.md delete mode 100644 docs/examples/projects/list-domains.md delete mode 100644 docs/examples/projects/update-domain-verification.md delete mode 100644 docs/examples/teams/update-membership-roles.md diff --git a/docs/examples/projects/create-domain.md b/docs/examples/projects/create-domain.md deleted file mode 100644 index 6ae89cc..0000000 --- a/docs/examples/projects/create-domain.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite projects createDomain \ - --projectId [PROJECT_ID] \ - --domain '' diff --git a/docs/examples/projects/delete-domain.md b/docs/examples/projects/delete-domain.md deleted file mode 100644 index c469008..0000000 --- a/docs/examples/projects/delete-domain.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite projects deleteDomain \ - --projectId [PROJECT_ID] \ - --domainId [DOMAIN_ID] diff --git a/docs/examples/projects/get-domain.md b/docs/examples/projects/get-domain.md deleted file mode 100644 index 367679a..0000000 --- a/docs/examples/projects/get-domain.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite projects getDomain \ - --projectId [PROJECT_ID] \ - --domainId [DOMAIN_ID] diff --git a/docs/examples/projects/list-domains.md b/docs/examples/projects/list-domains.md deleted file mode 100644 index 2967713..0000000 --- a/docs/examples/projects/list-domains.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite projects listDomains \ - --projectId [PROJECT_ID] diff --git a/docs/examples/projects/update-domain-verification.md b/docs/examples/projects/update-domain-verification.md deleted file mode 100644 index bb07cdb..0000000 --- a/docs/examples/projects/update-domain-verification.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite projects updateDomainVerification \ - --projectId [PROJECT_ID] \ - --domainId [DOMAIN_ID] diff --git a/docs/examples/teams/update-membership-roles.md b/docs/examples/teams/update-membership-roles.md deleted file mode 100644 index c6684d2..0000000 --- a/docs/examples/teams/update-membership-roles.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite teams updateMembershipRoles \ - --teamId [TEAM_ID] \ - --membershipId [MEMBERSHIP_ID] \ - --roles one two three