diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e3af73e1..5a589586 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -154,11 +154,20 @@ jobs: GHR_REPLACE: false GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Generate Appwrite Bot token for Homebrew tap + id: bot-token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + app-id: ${{ vars.APPWRITE_BOT_APP_ID }} + private-key: ${{ secrets.APPWRITE_BOT_PRIVATE_KEY }} + owner: appwrite + repositories: homebrew-appwrite + - name: Check out Homebrew tap uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: ${{ env.HOMEBREW_TAP_REPO }} - token: ${{ secrets.HOMEBREW_TAP_GH_TOKEN }} + token: ${{ steps.bot-token.outputs.token }} path: homebrew-tap fetch-depth: 0 @@ -225,7 +234,7 @@ jobs: FORMULA_PATH: ${{ steps.tap.outputs.formula_path }} SOURCE_REPO: ${{ github.repository }} SERVER_URL: ${{ github.server_url }} - GH_TOKEN: ${{ secrets.HOMEBREW_TAP_GH_TOKEN }} + GH_TOKEN: ${{ steps.bot-token.outputs.token }} run: | set -euo pipefail @@ -237,8 +246,8 @@ jobs: BASE_BRANCH="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')" BRANCH="release/${EXECUTABLE_NAME}-${RELEASE_TAG}" - git config user.name "appwrite-bot" - git config user.email "bot@appwrite.io" + git config user.name "appwrite-bot[bot]" + git config user.email "217594562+appwrite-bot[bot]@users.noreply.github.com" git checkout -B "$BRANCH" git add "$FORMULA_PATH" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8500bbda..c303cce9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Change Log +## 23.2.0 + +* Added: `apps` installation commands: `list-installations`, `get-installation`, `delete-installation`, `create-installation-token` +* Added: `vcs list-namespaces` command for listing provider namespaces of an installation +* Added: `--provider-namespace` option to `vcs create-repository` +* Added: `tablesdb list-operations` command for dedicated database lifecycle operations +* Added: Compact deployment summaries with human-readable sizes in deployment output +* Added: `--filter`, `--where`, `--sort-asc`, `--sort-desc`, `--limit`, `--offset`, `--cursor-after`, and `--cursor-before` options to `vcs list-repositories` and `activities list-events` +* Updated: Command groups now use compact service names: `tablesdb` and `oauth2`. `tables-db` still works as an alias +* Updated: `apps` command group now shows a service description in help output +* Updated: `storage list-files` documents `folder` as a filterable attribute +* Fixed: `push sites` and `pull sites` now carry `fallbackFile` and the VCS fields `installationId`, `providerRepositoryId`, `providerBranch`, `providerSilentMode`, and `providerRootDirectory` +* Fixed: Symlinks in function directories are resolved for `run` and `push`, confined to the project root +* Fixed: Token refresh now uses the logged-in session endpoint, and session credentials are no longer sent to a different endpoint +* Fixed: Site screenshot previews preserve the configured region + ## 23.1.0 * Added: `apps` service commands for managing OAuth2 applications, keys, secrets, and installations diff --git a/README.md b/README.md index 78fab7c0..91c82b1c 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 -23.1.0 +23.2.0 ``` ### Install using prebuilt binaries @@ -83,7 +83,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 -23.1.0 +23.2.0 ``` ## Getting Started diff --git a/bun.lock b/bun.lock index ce206e62..7910561a 100644 --- a/bun.lock +++ b/bun.lock @@ -5,7 +5,7 @@ "": { "name": "appwrite-cli", "dependencies": { - "@appwrite.io/console": "15.5.0", + "@appwrite.io/console": "15.6.0", "@napi-rs/keyring": "^1.3.0", "chalk": "4.1.2", "chokidar": "^3.6.0", @@ -23,6 +23,7 @@ "tail": "^2.2.6", "tar": "^7.4.3", "terminal-image": "^3.1.1", + "tinyglobby": "^0.2.17", "undici": "^6.24.0", "zod": "^4.3.5", }, @@ -47,12 +48,13 @@ }, "overrides": { "@xmldom/xmldom": "^0.9.10", + "brace-expansion": "5.0.8", "esbuild": "^0.28.1", "phin": "3.7.1", "tmp": "^0.2.6", }, "packages": { - "@appwrite.io/console": ["@appwrite.io/console@15.5.0", "", { "dependencies": { "json-bigint": "1.0.0" } }, "sha512-oVs0GB8aYGpdLyYY5GuS1Om5IJB49WUv3iv4Ev9E3mvbZ4KPOhJXZ5jVozBaGWMy1PuDHOHDXs3k5ANfAQBfYw=="], + "@appwrite.io/console": ["@appwrite.io/console@15.6.0", "", { "dependencies": { "json-bigint": "1.0.0" } }, "sha512-dSlNP01auhPeppdXEGg3mtg5nRTxqKX7H9aHsbxE/nOlJAzAGEcz9Lt/gwmY/NwzMcXrugU1+uLcXUA4Cu4XTQ=="], "@babel/runtime": ["@babel/runtime@7.29.7", "", {}, "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw=="], @@ -112,7 +114,7 @@ "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.1", "", { "os": "win32", "cpu": "x64" }, "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A=="], - "@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.10.0", "", { "dependencies": { "eslint-visitor-keys": "^5.0.1" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-rd6n9Sefya1R1Vd594TRwzeHq2VnmICbvh3jebyt1Hs/6OoCSYNVpjGRRsKSTwAq3SKl09w0AfRCU57hoDLmxg=="], + "@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.10.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg=="], "@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="], @@ -320,7 +322,7 @@ "await-to-js": ["await-to-js@3.0.0", "", {}, "sha512-zJAaP9zxTcvTHRlejau3ZOY4V7SRpiByf3/dxx2uyKxxor19tpmpV2QRsTKikckwhaPmr2dVpxxMr7jOCYVp5g=="], - "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + "balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="], "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], @@ -334,7 +336,7 @@ "bmp-ts": ["bmp-ts@1.0.9", "", {}, "sha512-cTEHk2jLrPyi+12M3dhpEbnnPOsaZuq7C45ylbbQIiWgDFZq4UVYPEY5mlqjvsj/6gJv9qX5sa+ebDzLXT28Vw=="], - "brace-expansion": ["brace-expansion@1.1.16", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw=="], + "brace-expansion": ["brace-expansion@5.0.8", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg=="], "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], @@ -374,8 +376,6 @@ "commander": ["commander@9.5.0", "", {}, "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ=="], - "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], - "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], "cycled": ["cycled@1.2.0", "", {}, "sha512-/BOOCEohSBflVHHtY/wUc1F6YDYPqyVs/A837gDoq4H1pm72nU/yChyGt91V4ML+MbbAmHs8uo2l1yJkkTIUdg=="], @@ -450,7 +450,7 @@ "flat-cache": ["flat-cache@4.0.1", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" } }, "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw=="], - "flatted": ["flatted@3.4.2", "", {}, "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA=="], + "flatted": ["flatted@3.4.3", "", {}, "sha512-/zipXxyO6rGvuNGDiULY9MvEGSkb2gaG4GGH4ygMi0ZZzyMHdUZBmntJmx5x1G2VuPytCwGN4xsJP6cw+sK+vQ=="], "follow-redirects": ["follow-redirects@1.16.0", "", {}, "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="], @@ -614,7 +614,7 @@ "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], - "picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + "picomatch": ["picomatch@4.0.5", "", {}, "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A=="], "pixelmatch": ["pixelmatch@5.3.0", "", { "dependencies": { "pngjs": "^6.0.0" }, "bin": "bin/pixelmatch" }, "sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q=="], @@ -654,7 +654,7 @@ "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], - "sax": ["sax@1.6.0", "", {}, "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA=="], + "sax": ["sax@1.6.1", "", {}, "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q=="], "semver": ["semver@7.8.5", "", { "bin": "bin/semver.js" }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], @@ -686,7 +686,7 @@ "tail": ["tail@2.2.6", "", {}, "sha512-IQ6G4wK/t8VBauYiGPLx+d3fA5XjSVagjWV5SIYzvEvglbQjwEcukeYI68JOPpdydjxhZ9sIgzRlSmwSpphHyw=="], - "tar": ["tar@7.5.21", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.1.0", "yallist": "^5.0.0" } }, "sha512-XdhtCvlMywwxpCW8YEq3lOXBJpUPTR2OHHcwLPO3HwsJqOHa2Ok/oJ7ruGzp+JrKoRPVCzJwAdEjqLW/vNRPHA=="], + "tar": ["tar@7.5.22", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.1.0", "yallist": "^5.0.0" } }, "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA=="], "term-img": ["term-img@7.1.0", "", { "dependencies": { "ansi-escapes": "^7.1.1", "iterm2-version": "^5.0.0" } }, "sha512-au++khgSDly2KXNhC6BOU3mLi2v+Dk5mChYKDcpB5xYwhlwqYQtj0z59dIqFEmr+w7ndZaNqurHapkGc6/hprQ=="], @@ -724,7 +724,7 @@ "uint8array-extras": ["uint8array-extras@1.5.0", "", {}, "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A=="], - "undici": ["undici@6.27.0", "", {}, "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg=="], + "undici": ["undici@6.28.0", "", {}, "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA=="], "undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="], @@ -762,7 +762,7 @@ "zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="], - "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="], + "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], "@eslint/config-array/minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="], @@ -860,10 +860,12 @@ "@jimp/types/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], - "@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="], + "@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.6", "", { "dependencies": { "brace-expansion": "^5.0.8" } }, "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A=="], "@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="], + "anymatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + "chokidar/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "cli-progress/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], @@ -878,8 +880,6 @@ "external-editor/iconv-lite": ["iconv-lite@0.4.24", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3" } }, "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="], - "fdir/picomatch": ["picomatch@4.0.5", "", {}, "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A=="], - "figures/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], "filelist/minimatch": ["minimatch@5.1.9", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw=="], @@ -908,6 +908,8 @@ "pixelmatch/pngjs": ["pngjs@6.0.0", "", {}, "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg=="], + "readdirp/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + "render-gif/jimp": ["jimp@0.14.0", "", { "dependencies": { "@babel/runtime": "^7.7.2", "@jimp/custom": "^0.14.0", "@jimp/plugins": "^0.14.0", "@jimp/types": "^0.14.0", "regenerator-runtime": "^0.13.3" } }, "sha512-8BXU+J8+SPmwwyq9ELihpSV4dWPTiOKBWCEgtkbnxxAVMjXdf3yGmyaLSshBfXc8sP/JQ9OZj5R8nZzz2wPXgA=="], "slice-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], @@ -922,16 +924,10 @@ "terminal-image/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], - "tinyglobby/picomatch": ["picomatch@4.0.5", "", {}, "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A=="], - "wrap-ansi/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], "xml2js/xmlbuilder": ["xmlbuilder@11.0.1", "", {}, "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="], - "@eslint/config-array/minimatch/brace-expansion": ["brace-expansion@1.1.16", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw=="], - - "@eslint/eslintrc/minimatch/brace-expansion": ["brace-expansion@1.1.16", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw=="], - "@jimp/custom/@jimp/core/@jimp/utils": ["@jimp/utils@0.14.0", "", { "dependencies": { "@babel/runtime": "^7.7.2", "regenerator-runtime": "^0.13.3" } }, "sha512-MY5KFYUru0y74IsgM/9asDwb3ERxWxXEu3CRCZEvE7DtT86y1bR1XgtlSliMrptjz4qbivNGMQSvUBpEFJDp1A=="], "@jimp/custom/@jimp/core/file-type": ["file-type@9.0.0", "", {}, "sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw=="], @@ -970,16 +966,12 @@ "@jimp/plugins/@jimp/plugin-threshold/@jimp/utils": ["@jimp/utils@0.14.0", "", { "dependencies": { "@babel/runtime": "^7.7.2", "regenerator-runtime": "^0.13.3" } }, "sha512-MY5KFYUru0y74IsgM/9asDwb3ERxWxXEu3CRCZEvE7DtT86y1bR1XgtlSliMrptjz4qbivNGMQSvUBpEFJDp1A=="], - "@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@5.0.7", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA=="], - "cli-progress/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], "cli-table3/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], "cli-table3/string-width/is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], - "filelist/minimatch/brace-expansion": ["brace-expansion@2.1.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA=="], - "inquirer-search-list/chalk/ansi-styles": ["ansi-styles@3.2.1", "", { "dependencies": { "color-convert": "^1.9.0" } }, "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA=="], "inquirer-search-list/chalk/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], @@ -1018,16 +1010,8 @@ "wrap-ansi/string-width/is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], - "@eslint/config-array/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], - - "@eslint/eslintrc/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], - "@jimp/custom/@jimp/core/pixelmatch/pngjs": ["pngjs@3.4.0", "", {}, "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="], - "@typescript-eslint/typescript-estree/minimatch/brace-expansion/balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="], - - "filelist/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], - "inquirer-search-list/chalk/ansi-styles/color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="], "inquirer-search-list/chalk/supports-color/has-flag": ["has-flag@3.0.0", "", {}, "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="], diff --git a/cli.ts b/cli.ts index c94bb251..43bdd7bb 100644 --- a/cli.ts +++ b/cli.ts @@ -45,7 +45,7 @@ import { locale } from './lib/commands/services/locale.js'; import { messaging } from './lib/commands/services/messaging.js'; import { migrations } from './lib/commands/services/migrations.js'; import { notifications } from './lib/commands/services/notifications.js'; -import { oauth2 } from './lib/commands/services/oauth-2.js'; +import { oauth2 } from './lib/commands/services/oauth2.js'; import { organization } from './lib/commands/services/organization.js'; import { organizations } from './lib/commands/services/organizations.js'; import { presences } from './lib/commands/services/presences.js'; @@ -53,7 +53,7 @@ import { project } from './lib/commands/services/project.js'; import { proxy } from './lib/commands/services/proxy.js'; import { sites } from './lib/commands/services/sites.js'; import { storage } from './lib/commands/services/storage.js'; -import { tablesDB } from './lib/commands/services/tables-db.js'; +import { tablesDB } from './lib/commands/services/tablesdb.js'; import { teams } from './lib/commands/services/teams.js'; import { tokens } from './lib/commands/services/tokens.js'; import { users } from './lib/commands/services/users.js'; diff --git a/docs/examples/activities/list-events.md b/docs/examples/activities/list-events.md index 9fa160dc..48685d8d 100644 --- a/docs/examples/activities/list-events.md +++ b/docs/examples/activities/list-events.md @@ -1,3 +1,4 @@ ```bash -appwrite activities list-events +appwrite activities list-events \ + --limit 25 ``` diff --git a/docs/examples/apps/create-installation-token.md b/docs/examples/apps/create-installation-token.md new file mode 100644 index 00000000..4aa905e6 --- /dev/null +++ b/docs/examples/apps/create-installation-token.md @@ -0,0 +1,5 @@ +```bash +appwrite apps create-installation-token \ + --app-id \ + --installation-id +``` diff --git a/docs/examples/apps/delete-installation.md b/docs/examples/apps/delete-installation.md new file mode 100644 index 00000000..92976ee8 --- /dev/null +++ b/docs/examples/apps/delete-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite apps delete-installation \ + --app-id \ + --installation-id +``` diff --git a/docs/examples/apps/get-installation.md b/docs/examples/apps/get-installation.md new file mode 100644 index 00000000..b945aa14 --- /dev/null +++ b/docs/examples/apps/get-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite apps get-installation \ + --app-id \ + --installation-id +``` diff --git a/docs/examples/apps/list-installations.md b/docs/examples/apps/list-installations.md new file mode 100644 index 00000000..67c359d6 --- /dev/null +++ b/docs/examples/apps/list-installations.md @@ -0,0 +1,5 @@ +```bash +appwrite apps list-installations \ + --app-id \ + --limit 25 +``` diff --git a/docs/examples/oauth2/authorize-post.md b/docs/examples/oauth2/authorize-post.md index ce42b34e..032a9df3 100644 --- a/docs/examples/oauth2/authorize-post.md +++ b/docs/examples/oauth2/authorize-post.md @@ -1,3 +1,3 @@ ```bash -appwrite oauth-2 authorize-post +appwrite oauth2 authorize-post ``` diff --git a/docs/examples/oauth2/authorize.md b/docs/examples/oauth2/authorize.md index 45bc9b68..f1a40a09 100644 --- a/docs/examples/oauth2/authorize.md +++ b/docs/examples/oauth2/authorize.md @@ -1,3 +1,3 @@ ```bash -appwrite oauth-2 authorize +appwrite oauth2 authorize ``` diff --git a/docs/examples/oauth2/create-device-authorization.md b/docs/examples/oauth2/create-device-authorization.md index 81655435..a9c91f05 100644 --- a/docs/examples/oauth2/create-device-authorization.md +++ b/docs/examples/oauth2/create-device-authorization.md @@ -1,3 +1,3 @@ ```bash -appwrite oauth-2 create-device-authorization +appwrite oauth2 create-device-authorization ``` diff --git a/docs/examples/oauth2/create-grant.md b/docs/examples/oauth2/create-grant.md index 5d234708..73d2d65a 100644 --- a/docs/examples/oauth2/create-grant.md +++ b/docs/examples/oauth2/create-grant.md @@ -1,4 +1,4 @@ ```bash -appwrite oauth-2 create-grant \ +appwrite oauth2 create-grant \ --user-_code ``` diff --git a/docs/examples/oauth2/create-par.md b/docs/examples/oauth2/create-par.md index 05e17f9e..99cf6522 100644 --- a/docs/examples/oauth2/create-par.md +++ b/docs/examples/oauth2/create-par.md @@ -1,5 +1,5 @@ ```bash -appwrite oauth-2 create-par \ +appwrite oauth2 create-par \ --client-_id \ --redirect-_uri https://example.com \ --response-_type code diff --git a/docs/examples/oauth2/create-token.md b/docs/examples/oauth2/create-token.md index a8fcc0a8..4c67b999 100644 --- a/docs/examples/oauth2/create-token.md +++ b/docs/examples/oauth2/create-token.md @@ -1,4 +1,4 @@ ```bash -appwrite oauth-2 create-token \ +appwrite oauth2 create-token \ --grant-_type ``` diff --git a/docs/examples/oauth2/get-grant.md b/docs/examples/oauth2/get-grant.md index 53ce6635..d2931d07 100644 --- a/docs/examples/oauth2/get-grant.md +++ b/docs/examples/oauth2/get-grant.md @@ -1,4 +1,4 @@ ```bash -appwrite oauth-2 get-grant \ +appwrite oauth2 get-grant \ --grant-_id ``` diff --git a/docs/examples/oauth2/list-organizations.md b/docs/examples/oauth2/list-organizations.md index 9c201aec..ea69368a 100644 --- a/docs/examples/oauth2/list-organizations.md +++ b/docs/examples/oauth2/list-organizations.md @@ -1,3 +1,3 @@ ```bash -appwrite oauth-2 list-organizations +appwrite oauth2 list-organizations ``` diff --git a/docs/examples/oauth2/list-projects.md b/docs/examples/oauth2/list-projects.md index 03160504..c8630be0 100644 --- a/docs/examples/oauth2/list-projects.md +++ b/docs/examples/oauth2/list-projects.md @@ -1,3 +1,3 @@ ```bash -appwrite oauth-2 list-projects +appwrite oauth2 list-projects ``` diff --git a/docs/examples/oauth2/logout-post.md b/docs/examples/oauth2/logout-post.md index 0a6b49d1..d5283fef 100644 --- a/docs/examples/oauth2/logout-post.md +++ b/docs/examples/oauth2/logout-post.md @@ -1,3 +1,3 @@ ```bash -appwrite oauth-2 logout-post +appwrite oauth2 logout-post ``` diff --git a/docs/examples/oauth2/logout.md b/docs/examples/oauth2/logout.md index ccb37f26..226f0246 100644 --- a/docs/examples/oauth2/logout.md +++ b/docs/examples/oauth2/logout.md @@ -1,3 +1,3 @@ ```bash -appwrite oauth-2 logout +appwrite oauth2 logout ``` diff --git a/docs/examples/oauth2/reject.md b/docs/examples/oauth2/reject.md index 941b4815..516f995d 100644 --- a/docs/examples/oauth2/reject.md +++ b/docs/examples/oauth2/reject.md @@ -1,4 +1,4 @@ ```bash -appwrite oauth-2 reject \ +appwrite oauth2 reject \ --grant-_id ``` diff --git a/docs/examples/oauth2/revoke.md b/docs/examples/oauth2/revoke.md index d83cc9d0..139379f9 100644 --- a/docs/examples/oauth2/revoke.md +++ b/docs/examples/oauth2/revoke.md @@ -1,4 +1,4 @@ ```bash -appwrite oauth-2 revoke \ +appwrite oauth2 revoke \ --token ``` diff --git a/docs/examples/tablesdb/create-big-int-column.md b/docs/examples/tablesdb/create-big-int-column.md index 49167996..9db00503 100644 --- a/docs/examples/tablesdb/create-big-int-column.md +++ b/docs/examples/tablesdb/create-big-int-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-big-int-column \ +appwrite tablesdb create-big-int-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index 07660633..b51e564b 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-boolean-column \ +appwrite tablesdb create-boolean-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index 3dac9837..23c4a164 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-datetime-column \ +appwrite tablesdb create-datetime-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 1f7aac87..c516cdf4 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-email-column \ +appwrite tablesdb create-email-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index 1fffdc80..5a101103 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-enum-column \ +appwrite tablesdb create-enum-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-failover.md b/docs/examples/tablesdb/create-failover.md index dc583623..ab899188 100644 --- a/docs/examples/tablesdb/create-failover.md +++ b/docs/examples/tablesdb/create-failover.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db create-failover \ +appwrite tablesdb create-failover \ --database-id ``` diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index f8828d37..0f08402c 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-float-column \ +appwrite tablesdb create-float-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index 2446ccf6..b246902a 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-index \ +appwrite tablesdb create-index \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index a6634cfa..59358765 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-integer-column \ +appwrite tablesdb create-integer-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index 51e54769..b304a5d4 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-ip-column \ +appwrite tablesdb create-ip-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index 9b7607b1..86d8d94a 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-line-column \ +appwrite tablesdb create-line-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index c24530d2..05776059 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-longtext-column \ +appwrite tablesdb create-longtext-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index db1aca5e..1c892f61 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-mediumtext-column \ +appwrite tablesdb create-mediumtext-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-migration.md b/docs/examples/tablesdb/create-migration.md index 9319ff27..266c5abf 100644 --- a/docs/examples/tablesdb/create-migration.md +++ b/docs/examples/tablesdb/create-migration.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-migration \ +appwrite tablesdb create-migration \ --database-id \ --specification s-1vcpu-1gb ``` diff --git a/docs/examples/tablesdb/create-operations.md b/docs/examples/tablesdb/create-operations.md index d89fb8dc..55d09b90 100644 --- a/docs/examples/tablesdb/create-operations.md +++ b/docs/examples/tablesdb/create-operations.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db create-operations \ +appwrite tablesdb create-operations \ --transaction-id ``` diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index 16260b11..53bada27 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-point-column \ +appwrite tablesdb create-point-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index 6103ed51..981832e0 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-polygon-column \ +appwrite tablesdb create-polygon-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index 194e9c53..2ffdbf71 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-relationship-column \ +appwrite tablesdb create-relationship-column \ --database-id \ --table-id \ --related-table-id \ diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md index 343d3bcc..58002727 100644 --- a/docs/examples/tablesdb/create-row.md +++ b/docs/examples/tablesdb/create-row.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-row \ +appwrite tablesdb create-row \ --database-id \ --table-id \ --row-id \ diff --git a/docs/examples/tablesdb/create-rows.md b/docs/examples/tablesdb/create-rows.md index 13e372ac..686b3ec3 100644 --- a/docs/examples/tablesdb/create-rows.md +++ b/docs/examples/tablesdb/create-rows.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-rows \ +appwrite tablesdb create-rows \ --database-id \ --table-id \ --rows one two three diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index 02da4b22..75cdcab4 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-string-column \ +appwrite tablesdb create-string-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index aaabdfc2..e2671f92 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-table \ +appwrite tablesdb create-table \ --database-id \ --table-id \ --name diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index 7fa1ea5f..7c0fff24 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-text-column \ +appwrite tablesdb create-text-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-transaction.md b/docs/examples/tablesdb/create-transaction.md index b1013a1f..149932ed 100644 --- a/docs/examples/tablesdb/create-transaction.md +++ b/docs/examples/tablesdb/create-transaction.md @@ -1,3 +1,3 @@ ```bash -appwrite tables-db create-transaction +appwrite tablesdb create-transaction ``` diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index fa167f56..61b04d1a 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-url-column \ +appwrite tablesdb create-url-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index 760c8704..db695239 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create-varchar-column \ +appwrite tablesdb create-varchar-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index ea3ddfcc..caf852cd 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db create \ +appwrite tablesdb create \ --database-id \ --name ``` diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md index df9c4860..f910e7fd 100644 --- a/docs/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db decrement-row-column \ +appwrite tablesdb decrement-row-column \ --database-id \ --table-id \ --row-id \ diff --git a/docs/examples/tablesdb/delete-column.md b/docs/examples/tablesdb/delete-column.md index bee77154..2e877949 100644 --- a/docs/examples/tablesdb/delete-column.md +++ b/docs/examples/tablesdb/delete-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db delete-column \ +appwrite tablesdb delete-column \ --database-id \ --table-id \ --key '' diff --git a/docs/examples/tablesdb/delete-index.md b/docs/examples/tablesdb/delete-index.md index b8478669..04df6e62 100644 --- a/docs/examples/tablesdb/delete-index.md +++ b/docs/examples/tablesdb/delete-index.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db delete-index \ +appwrite tablesdb delete-index \ --database-id \ --table-id \ --key '' diff --git a/docs/examples/tablesdb/delete-migration.md b/docs/examples/tablesdb/delete-migration.md index 9e242180..66c31296 100644 --- a/docs/examples/tablesdb/delete-migration.md +++ b/docs/examples/tablesdb/delete-migration.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db delete-migration \ +appwrite tablesdb delete-migration \ --database-id \ --migration-id ``` diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md index f7a58ca6..9a9e4359 100644 --- a/docs/examples/tablesdb/delete-row.md +++ b/docs/examples/tablesdb/delete-row.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db delete-row \ +appwrite tablesdb delete-row \ --database-id \ --table-id \ --row-id diff --git a/docs/examples/tablesdb/delete-rows.md b/docs/examples/tablesdb/delete-rows.md index dd8e9a61..26c23e6a 100644 --- a/docs/examples/tablesdb/delete-rows.md +++ b/docs/examples/tablesdb/delete-rows.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db delete-rows \ +appwrite tablesdb delete-rows \ --database-id \ --table-id \ --limit 25 diff --git a/docs/examples/tablesdb/delete-table.md b/docs/examples/tablesdb/delete-table.md index 39429f07..7ba2e9e0 100644 --- a/docs/examples/tablesdb/delete-table.md +++ b/docs/examples/tablesdb/delete-table.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db delete-table \ +appwrite tablesdb delete-table \ --database-id \ --table-id ``` diff --git a/docs/examples/tablesdb/delete-transaction.md b/docs/examples/tablesdb/delete-transaction.md index d807c91e..670f2143 100644 --- a/docs/examples/tablesdb/delete-transaction.md +++ b/docs/examples/tablesdb/delete-transaction.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db delete-transaction \ +appwrite tablesdb delete-transaction \ --transaction-id ``` diff --git a/docs/examples/tablesdb/delete.md b/docs/examples/tablesdb/delete.md index 00900873..ff360ec7 100644 --- a/docs/examples/tablesdb/delete.md +++ b/docs/examples/tablesdb/delete.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db delete \ +appwrite tablesdb delete \ --database-id ``` diff --git a/docs/examples/tablesdb/get-column.md b/docs/examples/tablesdb/get-column.md index 29f4689a..a7b46268 100644 --- a/docs/examples/tablesdb/get-column.md +++ b/docs/examples/tablesdb/get-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db get-column \ +appwrite tablesdb get-column \ --database-id \ --table-id \ --key '' diff --git a/docs/examples/tablesdb/get-index.md b/docs/examples/tablesdb/get-index.md index 44073c02..515f6403 100644 --- a/docs/examples/tablesdb/get-index.md +++ b/docs/examples/tablesdb/get-index.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db get-index \ +appwrite tablesdb get-index \ --database-id \ --table-id \ --key '' diff --git a/docs/examples/tablesdb/get-migration.md b/docs/examples/tablesdb/get-migration.md index f669dcc1..ddaeb598 100644 --- a/docs/examples/tablesdb/get-migration.md +++ b/docs/examples/tablesdb/get-migration.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db get-migration \ +appwrite tablesdb get-migration \ --database-id \ --migration-id ``` diff --git a/docs/examples/tablesdb/get-replicas.md b/docs/examples/tablesdb/get-replicas.md index 19bffa68..acc5488a 100644 --- a/docs/examples/tablesdb/get-replicas.md +++ b/docs/examples/tablesdb/get-replicas.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db get-replicas \ +appwrite tablesdb get-replicas \ --database-id ``` diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md index e8ccf4bd..b15be4d9 100644 --- a/docs/examples/tablesdb/get-row.md +++ b/docs/examples/tablesdb/get-row.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db get-row \ +appwrite tablesdb get-row \ --database-id \ --table-id \ --row-id diff --git a/docs/examples/tablesdb/get-status.md b/docs/examples/tablesdb/get-status.md index c5ed9a77..c32d6923 100644 --- a/docs/examples/tablesdb/get-status.md +++ b/docs/examples/tablesdb/get-status.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db get-status \ +appwrite tablesdb get-status \ --database-id ``` diff --git a/docs/examples/tablesdb/get-table.md b/docs/examples/tablesdb/get-table.md index a9be557c..5fcc75e6 100644 --- a/docs/examples/tablesdb/get-table.md +++ b/docs/examples/tablesdb/get-table.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db get-table \ +appwrite tablesdb get-table \ --database-id \ --table-id ``` diff --git a/docs/examples/tablesdb/get-transaction.md b/docs/examples/tablesdb/get-transaction.md index 74f2ffdc..42fb455a 100644 --- a/docs/examples/tablesdb/get-transaction.md +++ b/docs/examples/tablesdb/get-transaction.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db get-transaction \ +appwrite tablesdb get-transaction \ --transaction-id ``` diff --git a/docs/examples/tablesdb/get.md b/docs/examples/tablesdb/get.md index 1451a3bf..524ddf21 100644 --- a/docs/examples/tablesdb/get.md +++ b/docs/examples/tablesdb/get.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db get \ +appwrite tablesdb get \ --database-id ``` diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md index 750a6253..2f3d0fd4 100644 --- a/docs/examples/tablesdb/increment-row-column.md +++ b/docs/examples/tablesdb/increment-row-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db increment-row-column \ +appwrite tablesdb increment-row-column \ --database-id \ --table-id \ --row-id \ diff --git a/docs/examples/tablesdb/list-columns.md b/docs/examples/tablesdb/list-columns.md index 44fc8937..c075e675 100644 --- a/docs/examples/tablesdb/list-columns.md +++ b/docs/examples/tablesdb/list-columns.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db list-columns \ +appwrite tablesdb list-columns \ --database-id \ --table-id \ --limit 25 diff --git a/docs/examples/tablesdb/list-indexes.md b/docs/examples/tablesdb/list-indexes.md index c78ad6f1..4be3e4d7 100644 --- a/docs/examples/tablesdb/list-indexes.md +++ b/docs/examples/tablesdb/list-indexes.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db list-indexes \ +appwrite tablesdb list-indexes \ --database-id \ --table-id \ --limit 25 diff --git a/docs/examples/tablesdb/list-migrations.md b/docs/examples/tablesdb/list-migrations.md index 36bf6c17..8659e6ac 100644 --- a/docs/examples/tablesdb/list-migrations.md +++ b/docs/examples/tablesdb/list-migrations.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db list-migrations \ +appwrite tablesdb list-migrations \ --database-id ``` diff --git a/docs/examples/tablesdb/list-operations.md b/docs/examples/tablesdb/list-operations.md new file mode 100644 index 00000000..3f5a00f4 --- /dev/null +++ b/docs/examples/tablesdb/list-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite tablesdb list-operations \ + --database-id +``` diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md index 5a47f9fb..95a0498d 100644 --- a/docs/examples/tablesdb/list-rows.md +++ b/docs/examples/tablesdb/list-rows.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db list-rows \ +appwrite tablesdb list-rows \ --database-id \ --table-id \ --limit 25 diff --git a/docs/examples/tablesdb/list-specifications.md b/docs/examples/tablesdb/list-specifications.md index 029dd35f..70ed4394 100644 --- a/docs/examples/tablesdb/list-specifications.md +++ b/docs/examples/tablesdb/list-specifications.md @@ -1,3 +1,3 @@ ```bash -appwrite tables-db list-specifications +appwrite tablesdb list-specifications ``` diff --git a/docs/examples/tablesdb/list-tables.md b/docs/examples/tablesdb/list-tables.md index b7ff4209..a342713f 100644 --- a/docs/examples/tablesdb/list-tables.md +++ b/docs/examples/tablesdb/list-tables.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db list-tables \ +appwrite tablesdb list-tables \ --database-id \ --limit 25 ``` diff --git a/docs/examples/tablesdb/list-transactions.md b/docs/examples/tablesdb/list-transactions.md index 9554db6b..58802bf7 100644 --- a/docs/examples/tablesdb/list-transactions.md +++ b/docs/examples/tablesdb/list-transactions.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db list-transactions \ +appwrite tablesdb list-transactions \ --limit 25 ``` diff --git a/docs/examples/tablesdb/list.md b/docs/examples/tablesdb/list.md index c3e86e0f..97db8a14 100644 --- a/docs/examples/tablesdb/list.md +++ b/docs/examples/tablesdb/list.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db list \ +appwrite tablesdb list \ --limit 25 ``` diff --git a/docs/examples/tablesdb/update-big-int-column.md b/docs/examples/tablesdb/update-big-int-column.md index 267ec29d..62d496c1 100644 --- a/docs/examples/tablesdb/update-big-int-column.md +++ b/docs/examples/tablesdb/update-big-int-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-big-int-column \ +appwrite tablesdb update-big-int-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index efcdb41e..3d21b661 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-boolean-column \ +appwrite tablesdb update-boolean-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index a9926b45..b4483e22 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-datetime-column \ +appwrite tablesdb update-datetime-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index f4d07a30..c8a38cee 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-email-column \ +appwrite tablesdb update-email-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index 33571bae..987b230b 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-enum-column \ +appwrite tablesdb update-enum-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index 805feb09..b9b75138 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-float-column \ +appwrite tablesdb update-float-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index 3cd84bcc..6d169a4d 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-integer-column \ +appwrite tablesdb update-integer-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index b045fac2..f23914f6 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-ip-column \ +appwrite tablesdb update-ip-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index 0273d18d..8a7042ba 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-line-column \ +appwrite tablesdb update-line-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md index 5c37b21a..99e02f2d 100644 --- a/docs/examples/tablesdb/update-longtext-column.md +++ b/docs/examples/tablesdb/update-longtext-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-longtext-column \ +appwrite tablesdb update-longtext-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md index ab605d91..2fb547bd 100644 --- a/docs/examples/tablesdb/update-mediumtext-column.md +++ b/docs/examples/tablesdb/update-mediumtext-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-mediumtext-column \ +appwrite tablesdb update-mediumtext-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index 01516c2a..df7201c7 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-point-column \ +appwrite tablesdb update-point-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index 3758834a..2f582397 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-polygon-column \ +appwrite tablesdb update-polygon-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index 63dba1dd..e68bd4ba 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-relationship-column \ +appwrite tablesdb update-relationship-column \ --database-id \ --table-id \ --key '' diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md index 416d495a..0865548c 100644 --- a/docs/examples/tablesdb/update-row.md +++ b/docs/examples/tablesdb/update-row.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-row \ +appwrite tablesdb update-row \ --database-id \ --table-id \ --row-id diff --git a/docs/examples/tablesdb/update-rows.md b/docs/examples/tablesdb/update-rows.md index 7e46f618..79ba0e03 100644 --- a/docs/examples/tablesdb/update-rows.md +++ b/docs/examples/tablesdb/update-rows.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-rows \ +appwrite tablesdb update-rows \ --database-id \ --table-id \ --limit 25 diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index 6fd3cf29..d0e75389 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-string-column \ +appwrite tablesdb update-string-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index c260e4c8..df24cbc0 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-table \ +appwrite tablesdb update-table \ --database-id \ --table-id ``` diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md index 608ce2df..561a5ec0 100644 --- a/docs/examples/tablesdb/update-text-column.md +++ b/docs/examples/tablesdb/update-text-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-text-column \ +appwrite tablesdb update-text-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-transaction.md b/docs/examples/tablesdb/update-transaction.md index 295ec882..119b2a11 100644 --- a/docs/examples/tablesdb/update-transaction.md +++ b/docs/examples/tablesdb/update-transaction.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db update-transaction \ +appwrite tablesdb update-transaction \ --transaction-id ``` diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index 4a4c47b0..82792358 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-url-column \ +appwrite tablesdb update-url-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md index fdcfd83b..8a5e4885 100644 --- a/docs/examples/tablesdb/update-varchar-column.md +++ b/docs/examples/tablesdb/update-varchar-column.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db update-varchar-column \ +appwrite tablesdb update-varchar-column \ --database-id \ --table-id \ --key '' \ diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index 32cbef04..5ce695ab 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -1,4 +1,4 @@ ```bash -appwrite tables-db update \ +appwrite tablesdb update \ --database-id ``` diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md index 298f592a..39c0ab6e 100644 --- a/docs/examples/tablesdb/upsert-row.md +++ b/docs/examples/tablesdb/upsert-row.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db upsert-row \ +appwrite tablesdb upsert-row \ --database-id \ --table-id \ --row-id diff --git a/docs/examples/tablesdb/upsert-rows.md b/docs/examples/tablesdb/upsert-rows.md index e0ff1795..dadb54fd 100644 --- a/docs/examples/tablesdb/upsert-rows.md +++ b/docs/examples/tablesdb/upsert-rows.md @@ -1,5 +1,5 @@ ```bash -appwrite tables-db upsert-rows \ +appwrite tablesdb upsert-rows \ --database-id \ --table-id \ --rows one two three diff --git a/docs/examples/vcs/list-namespaces.md b/docs/examples/vcs/list-namespaces.md new file mode 100644 index 00000000..ff4adaac --- /dev/null +++ b/docs/examples/vcs/list-namespaces.md @@ -0,0 +1,5 @@ +```bash +appwrite vcs list-namespaces \ + --installation-id \ + --limit 25 +``` diff --git a/install.ps1 b/install.ps1 index 0478901e..46982784 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/23.1.0/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/23.1.0/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/23.2.0/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/23.2.0/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index 2d057ff8..aeecfc6c 100644 --- a/install.sh +++ b/install.sh @@ -120,7 +120,7 @@ verifyMacOSCodeSignature() { downloadBinary() { echo "[2/5] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="23.1.0" + GITHUB_LATEST_VERSION="23.2.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/auth/login.ts b/lib/auth/login.ts index 621bbcb0..ead58a4f 100644 --- a/lib/auth/login.ts +++ b/lib/auth/login.ts @@ -139,7 +139,7 @@ export const getCurrentAccount = async (): Promise => { } catch (err) { if (isGuestUnauthorizedError(err)) { try { - await getValidAccessToken(globalConfig.getEndpoint(), { + await getValidAccessToken({ forceRefresh: true, }); const refreshedClient = await sdkForConsole(); diff --git a/lib/commands/config.ts b/lib/commands/config.ts index 8b657e90..d4a148c8 100644 --- a/lib/commands/config.ts +++ b/lib/commands/config.ts @@ -154,6 +154,11 @@ const SiteSchema = z buildCommand: z.string().optional(), outputDirectory: z.string().optional(), fallbackFile: z.string().optional(), + installationId: z.string().optional(), + providerRepositoryId: z.string().optional(), + providerBranch: z.string().optional(), + providerSilentMode: z.boolean().optional(), + providerRootDirectory: z.string().optional(), buildSpecification: z.string().optional(), runtimeSpecification: z.string().optional(), deploymentRetention: z.number().optional(), diff --git a/lib/commands/pull.ts b/lib/commands/pull.ts index b0b7828a..b5c79e85 100644 --- a/lib/commands/pull.ts +++ b/lib/commands/pull.ts @@ -461,6 +461,11 @@ export class Pull { buildCommand: site.buildCommand, outputDirectory: site.outputDirectory, fallbackFile: site.fallbackFile, + installationId: site.installationId, + providerRepositoryId: site.providerRepositoryId, + providerBranch: site.providerBranch, + providerSilentMode: site.providerSilentMode, + providerRootDirectory: site.providerRootDirectory, startCommand: site.startCommand, buildSpecification: site.buildSpecification, runtimeSpecification: site.runtimeSpecification, diff --git a/lib/commands/push.ts b/lib/commands/push.ts index 2e474cfd..bef2aa5e 100644 --- a/lib/commands/push.ts +++ b/lib/commands/push.ts @@ -2311,6 +2311,12 @@ export class Push { buildRuntime: site.buildRuntime, adapter: site.adapter, startCommand: site.startCommand, + fallbackFile: site.fallbackFile, + installationId: site.installationId, + providerRepositoryId: site.providerRepositoryId, + providerBranch: site.providerBranch, + providerSilentMode: site.providerSilentMode, + providerRootDirectory: site.providerRootDirectory, buildSpecification: site.buildSpecification, runtimeSpecification: site.runtimeSpecification, deploymentRetention: site.deploymentRetention, @@ -2346,6 +2352,12 @@ export class Push { buildRuntime: site.buildRuntime, adapter: site.adapter, startCommand: site.startCommand, + fallbackFile: site.fallbackFile, + installationId: site.installationId, + providerRepositoryId: site.providerRepositoryId, + providerBranch: site.providerBranch, + providerSilentMode: site.providerSilentMode, + providerRootDirectory: site.providerRootDirectory, buildSpecification: site.buildSpecification, runtimeSpecification: site.runtimeSpecification, deploymentRetention: site.deploymentRetention, @@ -2760,6 +2772,7 @@ export class Push { requiresAuth: true, endpointOverride: localConfig.getEndpoint() || globalConfig.getEndpoint(), + preserveRegion: true, }); sitePreviewRenderer = { consoleClient, diff --git a/lib/commands/run.ts b/lib/commands/run.ts index 10b17788..36242fe2 100644 --- a/lib/commands/run.ts +++ b/lib/commands/run.ts @@ -279,12 +279,18 @@ const runFunction = async ({ .watch(".", { cwd: functionPath, ignoreInitial: true, + followSymlinks: true, ignored: (xpath: string) => { - const relativePath = path.relative(functionPath, xpath); + const relativePath = path + .relative(functionPath, path.resolve(functionPath, xpath)) + .split(path.sep) + .join("/"); - if (!relativePath) { + // The ignore package throws on paths outside its root. + if (!relativePath || relativePath.startsWith("../")) { return false; } + return ignorer.ignores(relativePath); }, }) @@ -346,8 +352,10 @@ const runFunction = async ({ ); } - const filesToCopy = getAllFiles(functionPath) - .map((file: string) => path.relative(functionPath, file)) + const filesToCopy = getAllFiles(functionPath, localConfig.getDirname()) + .map((file: string) => + path.relative(functionPath, file).split(path.sep).join("/"), + ) .filter((file: string) => !ignorer.ignores(file)); for (const f of filesToCopy) { const filePath = path.join(hotSwapPath, f); @@ -355,13 +363,8 @@ const runFunction = async ({ fs.rmSync(filePath, { force: true }); } - const fileDir = path.dirname(filePath); - if (!fs.existsSync(fileDir)) { - fs.mkdirSync(fileDir, { recursive: true }); - } - - const sourcePath = path.join(functionPath, f); - fs.copyFileSync(sourcePath, filePath); + fs.mkdirSync(path.dirname(filePath), { recursive: true }); + fs.copyFileSync(path.join(functionPath, f), filePath); } await create( diff --git a/lib/commands/services/activities.ts b/lib/commands/services/activities.ts index 5eeeaabc..14ea66e1 100644 --- a/lib/commands/services/activities.ts +++ b/lib/commands/services/activities.ts @@ -1,4 +1,10 @@ import { Command } from "commander"; +import { + buildQueries, + collectQueryValue, + parseDeprecatedWhereQuery, + parseFilterQuery, +} from "../utils/query.js"; import { sdkForProject } from "../../sdks.js"; import { actionRunner, @@ -29,11 +35,19 @@ export const activities = new Command("activities") const activitiesListEventsCommand = activities .command(`list-events`) .description(`List all events for selected filters.`) - .option(`--queries `, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc.`) + .option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc.`) + .option(`--filter `, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field collectQueryValue(parseFilterQuery(value), previous)) + .option(`--where `, `Deprecated. Use --filter instead. Filter using a simple comparison expression. Repeat for multiple filters.`, (value: string, previous: string[] | undefined) => collectQueryValue(parseDeprecatedWhereQuery(value), previous)) + .option(`--sort-asc `, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value: string, previous: string[] | undefined) => collectQueryValue(value, previous)) + .option(`--sort-desc `, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value: string, previous: string[] | undefined) => collectQueryValue(value, previous)) + .option(`--limit `, `Maximum number of results to return.`, parseInteger) + .option(`--offset `, `Number of results to skip.`, parseInteger) + .option(`--cursor-after `, `Return results after this cursor ID.`) + .option(`--cursor-before `, `Return results before this cursor ID.`) .action( actionRunner( - async ({ queries }) => - parse(await (await getActivitiesClient()).listEvents(queries)), + async ({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => + parse(await (await getActivitiesClient()).listEvents(buildQueries({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }))), ), ); diff --git a/lib/commands/services/apps.ts b/lib/commands/services/apps.ts index 8178f8dd..149425fa 100644 --- a/lib/commands/services/apps.ts +++ b/lib/commands/services/apps.ts @@ -27,7 +27,7 @@ const getAppsClient = async (): Promise => { }; export const apps = new Command("apps") - .description(commandDescriptions["apps"] ?? "") + .description(commandDescriptions["apps"] || "The Apps service allows you to manage OAuth2 applications, their keys, secrets, scopes, and installations.") .configureHelp({ helpWidth: process.stdout.columns || 80, }); @@ -183,6 +183,72 @@ const appsDeleteCommand = apps ); +const appsListInstallationsCommand = apps + .command(`list-installations`) + .description(`List installations of an application. Requires an app key sent in the \`X-Appwrite-Key\` header alongside the \`X-Appwrite-App\` header, or a caller with update access to the app.`) + .requiredOption(`--app-id `, `Application unique ID.`) + .option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`) + .option( + `--total [value]`, + `When set to false, the total count returned will be 0 and will not be calculated.`, + (value: string | undefined) => + value === undefined ? true : parseBool(value), + ) + .option(`--filter `, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field collectQueryValue(parseFilterQuery(value), previous)) + .option(`--where `, `Deprecated. Use --filter instead. Filter using a simple comparison expression. Repeat for multiple filters.`, (value: string, previous: string[] | undefined) => collectQueryValue(parseDeprecatedWhereQuery(value), previous)) + .option(`--sort-asc `, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value: string, previous: string[] | undefined) => collectQueryValue(value, previous)) + .option(`--sort-desc `, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value: string, previous: string[] | undefined) => collectQueryValue(value, previous)) + .option(`--limit `, `Maximum number of results to return.`, parseInteger) + .option(`--offset `, `Number of results to skip.`, parseInteger) + .option(`--cursor-after `, `Return results after this cursor ID.`) + .option(`--cursor-before `, `Return results before this cursor ID.`) + .action( + actionRunner( + async ({ appId, queries, total, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => + parse(await (await getAppsClient()).listInstallations(appId, buildQueries({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total)), + ), + ); + + +const appsGetInstallationCommand = apps + .command(`get-installation`) + .description(`Get an installation of an application by its unique ID. Requires an app key sent in the \`X-Appwrite-Key\` header alongside the \`X-Appwrite-App\` header, or a caller with update access to the app.`) + .requiredOption(`--app-id `, `Application unique ID.`) + .requiredOption(`--installation-id `, `Installation unique ID.`) + .action( + actionRunner( + async ({ appId, installationId }) => + parse(await (await getAppsClient()).getInstallation(appId, installationId)), + ), + ); + + +const appsDeleteInstallationCommand = apps + .command(`delete-installation`) + .description(`Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked.`) + .requiredOption(`--app-id `, `Application unique ID.`) + .requiredOption(`--installation-id `, `Installation unique ID.`) + .action( + actionRunner( + async ({ appId, installationId }) => + parse(await (await getAppsClient()).deleteInstallation(appId, installationId)), + ), + ); + + +const appsCreateInstallationTokenCommand = apps + .command(`create-installation-token`) + .description(`Create a token for an installation of an application. Requires an app key sent in the \`X-Appwrite-Key\` header alongside the \`X-Appwrite-App\` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an \`Authorization: Bearer\` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.`) + .requiredOption(`--app-id `, `Application unique ID.`) + .requiredOption(`--installation-id `, `Installation unique ID.`) + .action( + actionRunner( + async ({ appId, installationId }) => + parse(await (await getAppsClient()).createInstallationToken(appId, installationId)), + ), + ); + + const appsListKeysCommand = apps .command(`list-keys`) .description(`List app keys for an application.`) diff --git a/lib/commands/services/oauth-2.ts b/lib/commands/services/oauth2.ts similarity index 99% rename from lib/commands/services/oauth-2.ts rename to lib/commands/services/oauth2.ts index 0e1fe626..938cf31c 100644 --- a/lib/commands/services/oauth-2.ts +++ b/lib/commands/services/oauth2.ts @@ -20,7 +20,7 @@ const getOauth2Client = async (): Promise => { return oauth2Client; }; -export const oauth2 = new Command("oauth-2") +export const oauth2 = new Command("oauth2") .description(commandDescriptions["oauth2"] || "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens.") .configureHelp({ helpWidth: process.stdout.columns || 80, diff --git a/lib/commands/services/storage.ts b/lib/commands/services/storage.ts index 16cafc47..e168b4ec 100644 --- a/lib/commands/services/storage.ts +++ b/lib/commands/services/storage.ts @@ -183,7 +183,7 @@ const storageListFilesCommand = storage .command(`list-files`) .description(`Get a list of all the user files. You can use the query params to filter your results.`) .requiredOption(`--bucket-id `, `Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration (https://appwrite.io/docs/server/storage#createBucket).`) - .option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded`) + .option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, folder, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, diff --git a/lib/commands/services/tables-db.ts b/lib/commands/services/tablesdb.ts similarity index 98% rename from lib/commands/services/tables-db.ts rename to lib/commands/services/tablesdb.ts index 6698e099..0d1f4272 100644 --- a/lib/commands/services/tables-db.ts +++ b/lib/commands/services/tablesdb.ts @@ -27,7 +27,9 @@ const getTablesDBClient = async (): Promise => { return tablesDBClient; }; -export const tablesDB = new Command("tables-db") +export const tablesDB = new Command("tablesdb") + // TODO: Move CLI alias configuration to the API spec. + .alias("tables-db") .description(commandDescriptions["tablesDB"] || "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows") .configureHelp({ helpWidth: process.stdout.columns || 80, @@ -293,6 +295,21 @@ const tablesDBDeleteMigrationCommand = tablesDB ); +const tablesDBListOperationsCommand = tablesDB + .command(`list-operations`) + .description(`List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.`) + .requiredOption(`--database-id `, `Database ID.`) + .option(`--status `, `Filter by operation status.`) + .option(`--limit `, `Maximum number of operations to return.`, parseInteger) + .option(`--offset `, `Number of operations to skip.`, parseInteger) + .action( + actionRunner( + async ({ databaseId, status, limit, offset }) => + parse(await (await getTablesDBClient()).listOperations(databaseId, status, limit, offset)), + ), + ); + + const tablesDBGetReplicasCommand = tablesDB .command(`get-replicas`) .description(`Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.`) diff --git a/lib/commands/services/vcs.ts b/lib/commands/services/vcs.ts index 4157edf9..7bffacdc 100644 --- a/lib/commands/services/vcs.ts +++ b/lib/commands/services/vcs.ts @@ -53,13 +53,19 @@ const vcsListRepositoriesCommand = vcs .requiredOption(`--installation-id `, `Installation Id`) .requiredOption(`--type `, `Detector type. Must be one of the following: runtime, framework`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) - .option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`) + .option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit, offset, and equal on namespace.`) + .option(`--filter `, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field collectQueryValue(parseFilterQuery(value), previous)) + .option(`--where `, `Deprecated. Use --filter instead. Filter using a simple comparison expression. Repeat for multiple filters.`, (value: string, previous: string[] | undefined) => collectQueryValue(parseDeprecatedWhereQuery(value), previous)) + .option(`--sort-asc `, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value: string, previous: string[] | undefined) => collectQueryValue(value, previous)) + .option(`--sort-desc `, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value: string, previous: string[] | undefined) => collectQueryValue(value, previous)) .option(`--limit `, `Maximum number of results to return.`, parseInteger) .option(`--offset `, `Number of results to skip.`, parseInteger) + .option(`--cursor-after `, `Return results after this cursor ID.`) + .option(`--cursor-before `, `Return results before this cursor ID.`) .action( actionRunner( - async ({ installationId, type, search, queries, limit, offset }) => - parse(await (await getVcsClient()).listRepositories(installationId, type, search, buildQueries({ queries, limit, offset }))), + async ({ installationId, type, search, queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => + parse(await (await getVcsClient()).listRepositories(installationId, type, search, buildQueries({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }))), ), ); @@ -70,10 +76,11 @@ const vcsCreateRepositoryCommand = vcs .requiredOption(`--installation-id `, `Installation Id`) .requiredOption(`--name `, `Repository name (slug)`) .requiredOption(`--xprivate `, `Mark repository public or private`, parseBool) + .option(`--provider-namespace `, `Namespace of the git repository. Defaults to the installation's own namespace.`) .action( actionRunner( - async ({ installationId, name, xprivate }) => - parse(await (await getVcsClient()).createRepository(installationId, name, xprivate)), + async ({ installationId, name, xprivate, providerNamespace }) => + parse(await (await getVcsClient()).createRepository(installationId, name, xprivate, providerNamespace)), ), ); @@ -196,3 +203,19 @@ const vcsDeleteInstallationCommand = vcs ); +const vcsListNamespacesCommand = vcs + .command(`list-namespaces`) + .description(`List provider namespaces available to a VCS installation. This can include the user personal namespace and any groups or organizations the installation can browse.`) + .requiredOption(`--installation-id `, `Installation Id`) + .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) + .option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`) + .option(`--limit `, `Maximum number of results to return.`, parseInteger) + .option(`--offset `, `Number of results to skip.`, parseInteger) + .action( + actionRunner( + async ({ installationId, search, queries, limit, offset }) => + parse(await (await getVcsClient()).listNamespaces(installationId, search, buildQueries({ queries, limit, offset }))), + ), + ); + + diff --git a/lib/commands/utils/deployment.ts b/lib/commands/utils/deployment.ts index 3f064816..a1e9b3cd 100644 --- a/lib/commands/utils/deployment.ts +++ b/lib/commands/utils/deployment.ts @@ -6,10 +6,17 @@ import ignoreModule from "ignore"; import chalk from "chalk"; import { Agent, WebSocket } from "undici"; import { Client, AppwriteException } from "@appwrite.io/console"; -import { error } from "../../parser.js"; -import { globalConfig } from "../../config.js"; -import { getValidAccessToken } from "../../sdks.js"; -import { getErrorMessage } from "../../utils.js"; +import { error, warn } from "../../parser.js"; +import { globalConfig, localConfig } from "../../config.js"; +import { + assertSessionEndpointMatches, + getValidAccessToken, +} from "../../sdks.js"; +import { + getErrorMessage, + isPathInside, + resolveSymlinkBoundary, +} from "../../utils.js"; import { Spinner } from "../../spinner.js"; const ignore: typeof ignoreModule = @@ -280,6 +287,9 @@ export async function watchDeploymentUpdates( return null; } + // Never attach session credentials to a different environment. + assertSessionEndpointMatches(params.endpoint); + const sessionSecret = getSessionSecret(cookieHeader); const selfSigned = globalConfig.getSelfSigned(); const dispatcher = new Agent({ @@ -295,7 +305,7 @@ export async function watchDeploymentUpdates( headers.cookie = cookieHeader; } if (hasAccessToken) { - const accessToken = await getValidAccessToken(params.endpoint); + const accessToken = await getValidAccessToken(); headers.authorization = `Bearer ${accessToken}`; } @@ -412,9 +422,12 @@ export async function watchDeploymentUpdates( function listDeployableFiles( dirPath: string, extraIgnoreRules: string[] = [], + projectRoot?: string, ): string[] { const normalizePath = (value: string): string => value.split(path.sep).join("/"); + const boundary = resolveSymlinkBoundary(dirPath, projectRoot); + const skippedSymlinks: string[] = []; const createMatcher = (baseDir: string, rules: string[]): IgnoreMatcher => { const ignorer = ignore(); @@ -489,29 +502,63 @@ function listDeployableFiles( const files: string[] = []; - const walk = (relativeDir = "", inheritedMatchers = rootMatchers): void => { + const walk = ( + relativeDir = "", + inheritedMatchers = rootMatchers, + ancestors = new Set(), + ): void => { const absoluteDir = path.join(dirPath, relativeDir); + + // Tracked per branch, so a cycle terminates but a shared directory can + // still appear under two different paths. + const realDir = fs.realpathSync(absoluteDir); + if (ancestors.has(realDir)) { + return; + } + ancestors.add(realDir); + const localMatcher = relativeDir === "" ? null : loadMatcher(relativeDir); const activeMatchers = localMatcher ? [...inheritedMatchers, localMatcher] : inheritedMatchers; - for (const entry of fs.readdirSync(absoluteDir, { withFileTypes: true })) { - const relativePath = normalizePath(path.join(relativeDir, entry.name)); + for (const entry of fs.readdirSync(absoluteDir)) { + const relativePath = normalizePath(path.join(relativeDir, entry)); + + const absolutePath = path.join(dirPath, relativePath); - if (isIgnored(relativePath, activeMatchers, entry.isDirectory())) { + const stats = fs.statSync(absolutePath, { throwIfNoEntry: false }); + if (!stats) { continue; } - if (entry.isDirectory()) { - walk(relativePath, activeMatchers); - } else { + if (isIgnored(relativePath, activeMatchers, stats.isDirectory())) { + continue; + } + + if (!isPathInside(boundary, fs.realpathSync(absolutePath))) { + skippedSymlinks.push(relativePath); + continue; + } + + if (stats.isDirectory()) { + walk(relativePath, activeMatchers, ancestors); + } else if (stats.isFile()) { files.push(relativePath); } } + + ancestors.delete(realDir); }; walk(); + + if (skippedSymlinks.length > 0) { + warn( + `Skipped ${skippedSymlinks.length} symlink(s) pointing outside the project and left them out of the deployment: ${skippedSymlinks.join(", ")}`, + ); + } + return files; } @@ -519,11 +566,15 @@ async function packageDirectory( dirPath: string, extraIgnoreRules: string[] = [], ): Promise { - const tempFile = path.join( - os.tmpdir(), - `appwrite-deploy-${Date.now()}.tar.gz`, - ); - const files = listDeployableFiles(dirPath, extraIgnoreRules); + // Paths passed straight to the CLI can sit outside any project. + let projectRoot: string | undefined; + try { + projectRoot = localConfig.getDirname(); + } catch (_error) { + projectRoot = undefined; + } + + const files = listDeployableFiles(dirPath, extraIgnoreRules, projectRoot); if (files.length === 0) { throw new Error( @@ -531,24 +582,28 @@ async function packageDirectory( ); } - await create( - { - gzip: true, - file: tempFile, - cwd: dirPath, - }, - files, - ); + // A unique directory per call, so concurrent function and site pushes can + // never write to the same archive. + const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "appwrite-deploy-")); + const tempFile = path.join(tempDir, "code.tar.gz"); try { + await create( + { + gzip: true, + file: tempFile, + cwd: dirPath, + follow: true, + }, + files, + ); + const buffer = fs.readFileSync(tempFile); return new File([buffer], path.basename(tempFile), { type: "application/gzip", }); } finally { - if (fs.existsSync(tempFile)) { - fs.unlinkSync(tempFile); - } + fs.rmSync(tempDir, { recursive: true, force: true }); } } diff --git a/lib/constants.ts b/lib/constants.ts index 2a6e4fbf..f9029f17 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -1,7 +1,7 @@ // SDK export const SDK_TITLE = 'Appwrite'; export const SDK_TITLE_LOWER = 'appwrite'; -export const SDK_VERSION = '23.1.0'; +export const SDK_VERSION = '23.2.0'; export const SDK_NAME = 'Command Line'; export const SDK_PLATFORM = 'console'; export const SDK_LANGUAGE = 'cli'; diff --git a/lib/emulation/docker.ts b/lib/emulation/docker.ts index f764a21e..85eaf935 100644 --- a/lib/emulation/docker.ts +++ b/lib/emulation/docker.ts @@ -38,8 +38,8 @@ function getFunctionFiles(func: FunctionType): { } { const functionDir = localConfig.resolveResourcePath("functions", func.path); const ignorer = getFunctionIgnorer(func, functionDir); - const files = getAllFiles(functionDir) - .map((file) => path.relative(functionDir, file)) + const files = getAllFiles(functionDir, localConfig.getDirname()) + .map((file) => path.relative(functionDir, file).split(path.sep).join("/")) .filter((file) => !ignorer.ignores(file)); return { functionDir, files, ignorer }; @@ -222,13 +222,8 @@ export async function dockerBuild( try { for (const f of files) { const filePath = path.join(tmpBuildPath, f); - const fileDir = path.dirname(filePath); - if (!fs.existsSync(fileDir)) { - fs.mkdirSync(fileDir, { recursive: true }); - } - - const sourcePath = path.join(functionDir, f); - fs.copyFileSync(sourcePath, filePath); + fs.mkdirSync(path.dirname(filePath), { recursive: true }); + fs.copyFileSync(path.join(functionDir, f), filePath); } const params: string[] = ["run"]; diff --git a/lib/parser.ts b/lib/parser.ts index 9039aa47..5efc0a08 100644 --- a/lib/parser.ts +++ b/lib/parser.ts @@ -659,7 +659,7 @@ const printQueryErrorHint = (err: Error): void => { } hint( - `For common list filters, use flags like --limit 25, --sort-desc '$createdAt', or --filter 'status=active'. Raw --queries values must be Appwrite JSON query strings, for example: ${EXECUTABLE_NAME} tables-db list-rows --queries '{"method":"limit","values":[25]}'`, + `For common list filters, use flags like --limit 25, --sort-desc '$createdAt', or --filter 'status=active'. Raw --queries values must be Appwrite JSON query strings, for example: ${EXECUTABLE_NAME} tablesdb list-rows --queries '{"method":"limit","values":[25]}'`, ); }; @@ -879,7 +879,7 @@ export const commandDescriptions: Record = { avatars: `The avatars command aims to help you complete everyday tasks related to your app image, icons, and avatars.`, backups: `The backups command allows you to manage backup policies, archives, and restorations for your project.`, databases: `(Legacy) The databases command allows you to create structured collections of documents and query and filter lists of documents.`, - tablesDB: `The tables-db command allows you to create structured tables of columns and query and filter lists of rows.`, + tablesDB: `The tablesdb command allows you to create structured tables of columns and query and filter lists of rows.`, init: `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, messaging-topics, and skills in ${SDK_TITLE}.`, push: `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and messaging-topics.`, run: `The run command allows you to run the project locally to allow easy development and quick debugging.`, @@ -905,7 +905,7 @@ export const commandDescriptions: Record = { messaging: `The messaging command allows you to manage topics and targets and send messages.`, migrations: `The migrations command allows you to migrate data between services.`, notifications: `The notifications command allows you to read and manage your Appwrite Console notifications.`, - oauth2: `The oauth-2 command allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens.`, + oauth2: `The oauth2 command allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens.`, organization: `The organization command allows you to manage organization-level projects.`, organizations: `The organizations command allows you to manage organization billing, plans, invoices, and add-ons.`, presences: `The presences command allows you to track and manage real-time user presence in your project.`, diff --git a/lib/response-config.ts b/lib/response-config.ts index 31282b4e..d9a41432 100644 --- a/lib/response-config.ts +++ b/lib/response-config.ts @@ -107,6 +107,62 @@ const compactAmount = (value: unknown): string => { return "—"; }; +const compactBytes = (value: unknown): string => { + const bytes = + typeof value === "number" + ? value + : typeof value === "string" && value.trim() !== "" + ? Number(value) + : Number.NaN; + + if (!Number.isFinite(bytes) || bytes < 0) { + return "—"; + } + + if (bytes < 1024) { + return `${Math.round(bytes)} B`; + } + + const units = ["KB", "MB", "GB", "TB"]; + let amount = bytes / 1024; + let unitIndex = 0; + + while (amount >= 1024 && unitIndex < units.length - 1) { + amount /= 1024; + unitIndex++; + } + + return `${amount.toFixed(1).replace(/\.0$/, "")} ${units[unitIndex]}`; +}; + +const compactDuration = (value: unknown): string => { + const duration = + typeof value === "number" + ? value + : typeof value === "string" && value.trim() !== "" + ? Number(value) + : Number.NaN; + + if (!Number.isFinite(duration) || duration < 0) { + return "—"; + } + + const totalSeconds = Math.round(duration); + const hours = Math.floor(totalSeconds / 3600); + const minutes = Math.floor((totalSeconds % 3600) / 60); + const seconds = totalSeconds % 60; + + if (hours > 0) { + return `${hours}h ${minutes}m`; + } + + if (minutes > 0) { + return `${minutes}m ${seconds}s`; + } + + return `${seconds}s`; +}; + const isPresent = (value: unknown): boolean => { if (value == null) return false; if (typeof value === "string") return value.trim() !== ""; @@ -228,6 +284,17 @@ const RuntimeSummarySchema = createSummarySchema( "Expected a runtime summary row", ); +const DeploymentSummarySchema = z + .object({ + $id: z.string(), + status: z.string(), + type: z.string().nullable().optional(), + activate: z.boolean().optional(), + totalSize: z.union([z.string(), z.number()]).nullable().optional(), + buildDuration: z.union([z.string(), z.number()]).nullable().optional(), + }) + .passthrough(); + const paymentMethodLabel = (row: JsonObject): string => { const brand = valueFrom(row, "brand") ?? ""; const last4 = valueFrom(row, "last4") ?? ""; @@ -291,10 +358,56 @@ const runtimeLabel = (row: JsonObject): string => { return `${runtimeName} ${version}`; }; +const deploymentStatus = (row: JsonObject): string => { + const status = compactText(valueFrom(row, "status"), "unknown"); + + switch (status.toLowerCase()) { + case "ready": + return chalk.green(status); + case "failed": + return chalk.red(status); + case "waiting": + case "processing": + case "building": + return chalk.yellow(status); + case "canceled": + return chalk.dim(status); + default: + return status; + } +}; + const structuredCollectionRenderers: Record< string, StructuredCollectionRenderer > = { + deployments: createColumnRenderer(DeploymentSummarySchema, [ + { + header: "deployment", + value: (row, context) => + indexedLabel(compactText(valueFrom(row, "$id")), context), + }, + { + header: "status", + value: (row) => deploymentStatus(row), + }, + { + header: "type", + value: (row) => compactText(valueFrom(row, "type")), + }, + { + header: "auto-activate", + value: (row) => (row.activate === true ? "yes" : "no"), + }, + { + header: "size", + value: (row) => compactBytes(valueFrom(row, "totalSize")), + }, + { + header: "build", + value: (row) => compactDuration(valueFrom(row, "buildDuration")), + }, + ]), runtimes: createColumnRenderer(RuntimeSummarySchema, [ { header: "runtime", diff --git a/lib/sdks.ts b/lib/sdks.ts index 5bd714a9..c61c64c7 100644 --- a/lib/sdks.ts +++ b/lib/sdks.ts @@ -20,14 +20,26 @@ import { setStoredRefreshToken, } from "./auth/refresh-token.js"; +export const assertSessionEndpointMatches = (endpoint: string): void => { + const sessionEndpoint = globalConfig.getEndpoint() || DEFAULT_ENDPOINT; + if ( + normalizeCloudConsoleEndpoint(endpoint).replace(/\/+$/, "") !== + normalizeCloudConsoleEndpoint(sessionEndpoint).replace(/\/+$/, "") + ) { + throw new Error( + `Endpoint ${endpoint} does not match the current login session endpoint ${sessionEndpoint}. Switch to an account for this environment with \`${EXECUTABLE_NAME} login --switch\`.`, + ); + } +}; + export const getValidAccessToken = async ( - endpoint: string, options: { forceRefresh?: boolean } = {}, ): Promise => { const accessToken = globalConfig.getAccessToken(); const tokenExpiry = globalConfig.getTokenExpiry(); const clientId = globalConfig.getClientId() || OAUTH2_CLIENT_ID; const currentSession = globalConfig.getCurrentSession(); + const sessionEndpoint = globalConfig.getEndpoint() || DEFAULT_ENDPOINT; if ( !options.forceRefresh && @@ -53,7 +65,7 @@ export const getValidAccessToken = async ( const oauth2 = new Oauth2( new Client() - .setEndpoint(normalizeCloudConsoleEndpoint(endpoint)) + .setEndpoint(normalizeCloudConsoleEndpoint(sessionEndpoint)) .setProject("console") .setSelfSigned(globalConfig.getSelfSigned()), ); @@ -90,15 +102,19 @@ export const sdkForConsole = async ({ requiresAuth = true, endpointOverride, organizationId, + preserveRegion = false, }: { requiresAuth?: boolean; endpointOverride?: string; organizationId?: string; + preserveRegion?: boolean; } = {}): Promise => { const client = new Client(); - const endpoint = normalizeCloudConsoleEndpoint( - endpointOverride || globalConfig.getEndpoint() || DEFAULT_ENDPOINT, - ); + const configuredEndpoint = + endpointOverride || globalConfig.getEndpoint() || DEFAULT_ENDPOINT; + const endpoint = preserveRegion + ? configuredEndpoint + : normalizeCloudConsoleEndpoint(configuredEndpoint); const isCloudEndpoint = isCloudHostname(new URL(endpoint).hostname); const selfSigned = globalConfig.getSelfSigned(); @@ -129,9 +145,13 @@ export const sdkForConsole = async ({ .setSelfSigned(selfSigned) .setLocale("en-US"); + if (requiresAuth && (accessToken || cookie)) { + assertSessionEndpointMatches(endpoint); + } + if (requiresAuth) { if (accessToken) { - const validAccessToken = await getValidAccessToken(endpoint); + const validAccessToken = await getValidAccessToken(); client.headers["Authorization"] = `Bearer ${validAccessToken}`; } else if (cookie) { if (isCloudEndpoint) { @@ -185,8 +205,12 @@ export const sdkForProject = async (): Promise => { .setSelfSigned(selfSigned) .setLocale("en-US"); + if (accessToken || cookie) { + assertSessionEndpointMatches(endpoint); + } + if (accessToken) { - const validAccessToken = await getValidAccessToken(endpoint); + const validAccessToken = await getValidAccessToken(); client.headers["Authorization"] = `Bearer ${validAccessToken}`; return client.setMode("admin"); } diff --git a/lib/utils.ts b/lib/utils.ts index 793ca9a2..d92efc27 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -3,6 +3,7 @@ import os from "os"; import path from "path"; import net from "net"; import childProcess from "child_process"; +import { globSync } from "tinyglobby"; import type { Models } from "@appwrite.io/console"; import { ProjectPolicyId } from "@appwrite.io/console"; import { z } from "zod"; @@ -828,23 +829,53 @@ export async function getCachedUpdateNotification( } } -export function getAllFiles(folder: string): string[] { - const files: string[] = []; - for (const pathDir of fs.readdirSync(folder)) { - const pathAbsolute = path.join(folder, pathDir); - let stats: fs.Stats; - try { - stats = fs.statSync(pathAbsolute); - } catch (_error) { - continue; - } - if (stats.isDirectory()) { - files.push(...getAllFiles(pathAbsolute)); - } else { - files.push(pathAbsolute); - } +/** + * True when `child` is `parent` or sits beneath it. Both arguments must + * already be real paths, so that `/tmp` and `/private/tmp` compare equal. + */ +export function isPathInside(parent: string, child: string): boolean { + const relativePath = path.relative(parent, child); + return ( + relativePath === "" || + (!relativePath.startsWith("..") && !path.isAbsolute(relativePath)) + ); +} + +/** + * Symlinks are followed so that functions can share code, and the paths they + * produce stay rooted at the link (`src/common/util.js`, not the real + * `../../common/util.js`). Since a link can point anywhere on the host, this + * bounds how far one may be followed: to the Appwrite project directory when + * `folder` sits inside it, and to `folder` itself otherwise. Sharing + * `functions/common` stays possible; reaching `~/.ssh` does not. + */ +export function resolveSymlinkBoundary( + folder: string, + projectRoot?: string, +): string { + const realFolder = fs.realpathSync(folder); + + if (!projectRoot) { + return realFolder; } - return files; + + const realRoot = fs.realpathSync(projectRoot); + return isPathInside(realRoot, realFolder) ? realRoot : realFolder; +} + +/** + * Recursively list every file under `folder` as an absolute path. + */ +export function getAllFiles(folder: string, projectRoot?: string): string[] { + const boundary = resolveSymlinkBoundary(folder, projectRoot); + + return globSync("**/*", { + cwd: folder, + absolute: true, + dot: true, + onlyFiles: true, + followSymbolicLinks: true, + }).filter((file) => isPathInside(boundary, fs.realpathSync(file))); } export async function isPortTaken(port: number): Promise { diff --git a/package-lock.json b/package-lock.json index 58d53218..8e4163f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "appwrite-cli", - "version": "23.1.0", + "version": "23.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "appwrite-cli", - "version": "23.1.0", + "version": "23.2.0", "license": "BSD-3-Clause", "dependencies": { - "@appwrite.io/console": "15.5.0", + "@appwrite.io/console": "15.6.0", "@napi-rs/keyring": "^1.3.0", "chalk": "4.1.2", "chokidar": "^3.6.0", @@ -27,6 +27,7 @@ "tail": "^2.2.6", "tar": "^7.4.3", "terminal-image": "^3.1.1", + "tinyglobby": "^0.2.17", "undici": "^6.24.0", "zod": "^4.3.5" }, @@ -54,13 +55,14 @@ "phin": "3.7.1", "@xmldom/xmldom": "^0.9.10", "tmp": "^0.2.6", - "esbuild": "^0.28.1" + "esbuild": "^0.28.1", + "brace-expansion": "5.0.8" } }, "node_modules/@appwrite.io/console": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-15.5.0.tgz", - "integrity": "sha512-oVs0GB8aYGpdLyYY5GuS1Om5IJB49WUv3iv4Ev9E3mvbZ4KPOhJXZ5jVozBaGWMy1PuDHOHDXs3k5ANfAQBfYw==", + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-15.6.0.tgz", + "integrity": "sha512-dSlNP01auhPeppdXEGg3mtg5nRTxqKX7H9aHsbxE/nOlJAzAGEcz9Lt/gwmY/NwzMcXrugU1+uLcXUA4Cu4XTQ==", "license": "BSD-3-Clause", "dependencies": { "json-bigint": "1.0.0" @@ -541,16 +543,16 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.0.tgz", - "integrity": "sha512-rd6n9Sefya1R1Vd594TRwzeHq2VnmICbvh3jebyt1Hs/6OoCSYNVpjGRRsKSTwAq3SKl09w0AfRCU57hoDLmxg==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", "dev": true, "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^5.0.1" + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -584,24 +586,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/config-array/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", - "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/@eslint/config-array/node_modules/minimatch": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", @@ -665,24 +649,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", - "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -2406,6 +2372,19 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@xmldom/xmldom": { "version": "0.9.10", "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.10.tgz", @@ -2560,7 +2539,6 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, "license": "MIT", "engines": { "node": "18 || 20 || >=22" @@ -2631,16 +2609,15 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz", - "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==", - "dev": true, + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.8.tgz", + "integrity": "sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==", "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/braces": { @@ -2926,13 +2903,6 @@ "node": "^12.20.0 || >=14" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -3219,36 +3189,18 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "license": "Apache-2.0", "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", - "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", @@ -3520,21 +3472,6 @@ "minimatch": "^5.0.1" } }, - "node_modules/filelist/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.2.tgz", - "integrity": "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/filelist/node_modules/minimatch": { "version": "5.1.9", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", @@ -3591,9 +3528,9 @@ } }, "node_modules/flatted": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", - "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.3.tgz", + "integrity": "sha512-/zipXxyO6rGvuNGDiULY9MvEGSkb2gaG4GGH4ygMi0ZZzyMHdUZBmntJmx5x1G2VuPytCwGN4xsJP6cw+sK+vQ==", "dev": true, "license": "ISC" }, @@ -4663,13 +4600,13 @@ } }, "node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.5" + "brace-expansion": "^5.0.8" }, "engines": { "node": "18 || 20 || >=22" @@ -5314,9 +5251,9 @@ "license": "MIT" }, "node_modules/sax": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz", - "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.1.tgz", + "integrity": "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==", "license": "BlueOak-1.0.0", "engines": { "node": ">=11.0.0" @@ -5533,9 +5470,9 @@ } }, "node_modules/tar": { - "version": "7.5.21", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.21.tgz", - "integrity": "sha512-XdhtCvlMywwxpCW8YEq3lOXBJpUPTR2OHHcwLPO3HwsJqOHa2Ok/oJ7ruGzp+JrKoRPVCzJwAdEjqLW/vNRPHA==", + "version": "7.5.22", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.22.tgz", + "integrity": "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==", "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", @@ -5642,7 +5579,6 @@ "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", - "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", @@ -5659,7 +5595,6 @@ "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, "license": "MIT", "engines": { "node": ">=12.0.0" @@ -5677,7 +5612,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -5852,9 +5786,9 @@ } }, "node_modules/undici": { - "version": "6.27.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz", - "integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==", + "version": "6.28.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz", + "integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==", "license": "MIT", "engines": { "node": ">=18.17" diff --git a/package.json b/package.json index 47ec55e3..f910e10b 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "homepage": "https://appwrite.io/support", "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", - "version": "23.1.0", + "version": "23.2.0", "license": "BSD-3-Clause", "main": "dist/index.cjs", "module": "dist/index.js", @@ -36,8 +36,8 @@ "build:runtime": "npm run build:lib:runtime && npm run build:cli", "build:lib:runtime": "npm run build:lib:esm && npm run build:lib:cjs", "build:lib:esm": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --external:@napi-rs/keyring --external:@napi-rs/keyring-* --external:terminal-image --outfile=dist/index.js", - "build:lib:cjs": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:@napi-rs/keyring --external:@napi-rs/keyring-* --external:terminal-image --outfile=dist/index.cjs", - "build:cli": "esbuild cli.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:@napi-rs/keyring --external:@napi-rs/keyring-* --external:fsevents --external:terminal-image --outfile=dist/cli.cjs", + "build:lib:cjs": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:@napi-rs/keyring --external:@napi-rs/keyring-* --external:terminal-image --define:import.meta.url=__filename --outfile=dist/index.cjs", + "build:cli": "esbuild cli.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:@napi-rs/keyring --external:@napi-rs/keyring-* --external:fsevents --external:terminal-image --define:import.meta.url=__filename --outfile=dist/cli.cjs", "lint": "eslint .", "format": "prettier --write \"**/*.{js,ts,json,md}\"", "generate": "tsx scripts/generate-commands.ts", @@ -51,7 +51,7 @@ "windows-arm64": "bun build cli.ts --compile --minify --target=bun-windows-arm64 --outfile build/appwrite-cli-win-arm64.exe" }, "dependencies": { - "@appwrite.io/console": "15.5.0", + "@appwrite.io/console": "15.6.0", "@napi-rs/keyring": "^1.3.0", "chalk": "4.1.2", "chokidar": "^3.6.0", @@ -69,6 +69,7 @@ "tail": "^2.2.6", "tar": "^7.4.3", "terminal-image": "^3.1.1", + "tinyglobby": "^0.2.17", "undici": "^6.24.0", "zod": "^4.3.5" }, @@ -76,7 +77,8 @@ "phin": "3.7.1", "@xmldom/xmldom": "^0.9.10", "tmp": "^0.2.6", - "esbuild": "^0.28.1" + "esbuild": "^0.28.1", + "brace-expansion": "5.0.8" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^8.0.0", diff --git a/scoop/appwrite.config.json b/scoop/appwrite.config.json index 7acd7dc4..41ca51c4 100644 --- a/scoop/appwrite.config.json +++ b/scoop/appwrite.config.json @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json", - "version": "23.1.0", + "version": "23.2.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/23.1.0/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/23.2.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/23.1.0/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/23.2.0/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe",