Skip to content

Commit d91c596

Browse files
authored
Merge pull request #326 from appwrite/dev
feat: SDK update for version 22.1.1
2 parents b9fe809 + bce7f15 commit d91c596

9 files changed

Lines changed: 29 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## 22.1.1
4+
5+
* Added: Support for logging into staging Cloud environments (`stage.cloud.appwrite.io`)
6+
* Updated: Compiled binaries now built with `--minify` instead of inline sourcemaps
7+
38
## 22.1.0
49

510
* Fixed: `organization get-invoice-download` and `get-invoice-view` now save the invoice to disk via `--destination`

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
2929

3030
```sh
3131
$ appwrite -v
32-
22.1.0
32+
22.1.1
3333
```
3434

3535
### Install using prebuilt binaries
@@ -83,7 +83,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
8383
Once the installation completes, you can verify your install using
8484
```
8585
$ appwrite -v
86-
22.1.0
86+
22.1.1
8787
```
8888

8989
## Getting Started

install.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# You can use "View source" of this page to see the full script.
1414

1515
# REPO
16-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/22.1.0/appwrite-cli-win-x64.exe"
17-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/22.1.0/appwrite-cli-win-arm64.exe"
16+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/22.1.1/appwrite-cli-win-x64.exe"
17+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/22.1.1/appwrite-cli-win-arm64.exe"
1818

1919
$APPWRITE_BINARY_NAME = "appwrite.exe"
2020

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ verifyMacOSCodeSignature() {
120120
downloadBinary() {
121121
echo "[2/5] Downloading executable for $OS ($ARCH) ..."
122122

123-
GITHUB_LATEST_VERSION="22.1.0"
123+
GITHUB_LATEST_VERSION="22.1.1"
124124
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
125125
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
126126

lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SDK
22
export const SDK_TITLE = 'Appwrite';
33
export const SDK_TITLE_LOWER = 'appwrite';
4-
export const SDK_VERSION = '22.1.0';
4+
export const SDK_VERSION = '22.1.1';
55
export const SDK_NAME = 'Command Line';
66
export const SDK_PLATFORM = 'console';
77
export const SDK_LANGUAGE = 'cli';

lib/utils.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ const getHomebrewLatestVersion = async (
364364

365365
// TODO: Derive this list from the regions in the API spec.
366366
const CLOUD_REGION_CODES = new Set(["fra", "nyc", "syd", "sfo", "sgp", "tor"]);
367+
const CLOUD_LOGIN_ENVIRONMENTS = new Set(["stage"]);
367368

368369
export const isCloudHostname = (hostname: string): boolean => {
369370
if (hostname === "cloud.appwrite.io") {
@@ -389,11 +390,16 @@ export const isRegionalCloudEndpoint = (endpoint: string): boolean => {
389390
export const isLocalhostHostname = (hostname: string): boolean =>
390391
hostname === "localhost" || hostname === "127.0.0.1" || hostname === "[::1]";
391392

393+
const isCloudEnvironmentHostname = (hostname: string): boolean =>
394+
hostname.endsWith(".cloud.appwrite.io") &&
395+
CLOUD_LOGIN_ENVIRONMENTS.has(hostname.split(".")[0]);
396+
392397
export const isCloudLoginEndpoint = (endpoint: string): boolean => {
393398
try {
394399
const hostname = new URL(endpoint).hostname;
395400
return (
396401
isCloudHostname(hostname) ||
402+
isCloudEnvironmentHostname(hostname) ||
397403
(isFlagEnabled("devCloudLogin") && isLocalhostHostname(hostname))
398404
);
399405
} catch (_error) {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"homepage": "https://appwrite.io/support",
55
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
6-
"version": "22.1.0",
6+
"version": "22.1.1",
77
"license": "BSD-3-Clause",
88
"main": "dist/index.cjs",
99
"module": "dist/index.js",
@@ -43,12 +43,12 @@
4343
"generate": "tsx scripts/generate-commands.ts",
4444
"prepublishOnly": "npm run build",
4545
"test": "echo \"Error: no test specified\" && exit 1",
46-
"linux-x64": "bun build cli.ts --compile --sourcemap=inline --target=bun-linux-x64 --outfile build/appwrite-cli-linux-x64",
47-
"linux-arm64": "bun build cli.ts --compile --sourcemap=inline --target=bun-linux-arm64 --outfile build/appwrite-cli-linux-arm64",
48-
"mac-x64": "bun build cli.ts --compile --sourcemap=inline --target=bun-darwin-x64 --outfile build/appwrite-cli-darwin-x64",
49-
"mac-arm64": "bun build cli.ts --compile --sourcemap=inline --target=bun-darwin-arm64 --outfile build/appwrite-cli-darwin-arm64",
50-
"windows-x64": "bun build cli.ts --compile --sourcemap=inline --target=bun-windows-x64 --outfile build/appwrite-cli-win-x64.exe",
51-
"windows-arm64": "bun build cli.ts --compile --sourcemap=inline --target=bun-windows-arm64 --outfile build/appwrite-cli-win-arm64.exe"
46+
"linux-x64": "bun build cli.ts --compile --minify --target=bun-linux-x64 --outfile build/appwrite-cli-linux-x64",
47+
"linux-arm64": "bun build cli.ts --compile --minify --target=bun-linux-arm64 --outfile build/appwrite-cli-linux-arm64",
48+
"mac-x64": "bun build cli.ts --compile --minify --target=bun-darwin-x64 --outfile build/appwrite-cli-darwin-x64",
49+
"mac-arm64": "bun build cli.ts --compile --minify --target=bun-darwin-arm64 --outfile build/appwrite-cli-darwin-arm64",
50+
"windows-x64": "bun build cli.ts --compile --minify --target=bun-windows-x64 --outfile build/appwrite-cli-win-x64.exe",
51+
"windows-arm64": "bun build cli.ts --compile --minify --target=bun-windows-arm64 --outfile build/appwrite-cli-win-arm64.exe"
5252
},
5353
"dependencies": {
5454
"@appwrite.io/console": "^15.0.0",

scoop/appwrite.config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
3-
"version": "22.1.0",
3+
"version": "22.1.1",
44
"description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
55
"homepage": "https://github.com/appwrite/sdk-for-cli",
66
"license": "BSD-3-Clause",
77
"architecture": {
88
"64bit": {
9-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/22.1.0/appwrite-cli-win-x64.exe",
9+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/22.1.1/appwrite-cli-win-x64.exe",
1010
"bin": [
1111
[
1212
"appwrite-cli-win-x64.exe",
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"arm64": {
18-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/22.1.0/appwrite-cli-win-arm64.exe",
18+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/22.1.1/appwrite-cli-win-arm64.exe",
1919
"bin": [
2020
[
2121
"appwrite-cli-win-arm64.exe",

0 commit comments

Comments
 (0)