diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0c2fb849..0a91f735 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,6 +17,7 @@ jobs: # them on launch (oven-sh/bun#29120). Unpin once a Bun release includes the # upstream fix (oven-sh/bun#29122). CLI_BUN_VERSION: '1.3.11' + HOMEBREW_TAP_REPO: appwrite/homebrew-appwrite steps: - uses: actions/checkout@v4 with: @@ -75,33 +76,34 @@ jobs: GHR_REPLACE: false GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Update Homebrew formula checksums + - name: Check out Homebrew tap + uses: actions/checkout@v4 + with: + repository: ${{ env.HOMEBREW_TAP_REPO }} + token: ${{ secrets.HOMEBREW_TAP_GH_TOKEN }} + path: homebrew-tap + fetch-depth: 0 + + - name: Update Homebrew formula in tap + id: tap + working-directory: homebrew-tap env: RELEASE_TAG: ${{ github.event.release.tag_name }} - TARGET_COMMITISH: ${{ github.event.release.target_commitish }} run: | set -euo pipefail - TARGET_BRANCH="$TARGET_COMMITISH" - if ! git ls-remote --exit-code --heads origin "$TARGET_BRANCH" >/dev/null 2>&1; then - TARGET_BRANCH="master" - fi - - git fetch origin "$TARGET_BRANCH" - git switch -C "$TARGET_BRANCH" "origin/$TARGET_BRANCH" - FORMULA_PATH="$(find Formula -maxdepth 1 -name '*.rb' | head -n 1)" if [ -z "$FORMULA_PATH" ]; then - echo "Formula file not found" + echo "No formula found in Homebrew tap" exit 1 fi - EXECUTABLE_NAME="$(basename "$FORMULA_PATH" .rb)" - export FORMULA_PATH RELEASE_TAG EXECUTABLE_NAME - export MAC_ARM64_SHA256="$(sha256sum "build/${EXECUTABLE_NAME}-cli-darwin-arm64" | awk '{print $1}')" - export MAC_X64_SHA256="$(sha256sum "build/${EXECUTABLE_NAME}-cli-darwin-x64" | awk '{print $1}')" - export LINUX_ARM64_SHA256="$(sha256sum "build/${EXECUTABLE_NAME}-cli-linux-arm64" | awk '{print $1}')" - export LINUX_X64_SHA256="$(sha256sum "build/${EXECUTABLE_NAME}-cli-linux-x64" | awk '{print $1}')" + + export FORMULA_PATH EXECUTABLE_NAME + export MAC_ARM64_SHA256="$(sha256sum "../build/${EXECUTABLE_NAME}-cli-darwin-arm64" | awk '{print $1}')" + export MAC_X64_SHA256="$(sha256sum "../build/${EXECUTABLE_NAME}-cli-darwin-x64" | awk '{print $1}')" + export LINUX_ARM64_SHA256="$(sha256sum "../build/${EXECUTABLE_NAME}-cli-linux-arm64" | awk '{print $1}')" + export LINUX_X64_SHA256="$(sha256sum "../build/${EXECUTABLE_NAME}-cli-linux-x64" | awk '{print $1}')" ruby <<'RUBY' formula_path = ENV.fetch("FORMULA_PATH") @@ -132,13 +134,49 @@ jobs: ruby -c "$FORMULA_PATH" + { + echo "executable=${EXECUTABLE_NAME}" + echo "formula_path=${FORMULA_PATH}" + } >> "$GITHUB_OUTPUT" + + - name: Open pull request on Homebrew tap + working-directory: homebrew-tap + env: + RELEASE_TAG: ${{ github.event.release.tag_name }} + EXECUTABLE_NAME: ${{ steps.tap.outputs.executable }} + FORMULA_PATH: ${{ steps.tap.outputs.formula_path }} + SOURCE_REPO: ${{ github.repository }} + SERVER_URL: ${{ github.server_url }} + GH_TOKEN: ${{ secrets.HOMEBREW_TAP_GH_TOKEN }} + run: | + set -euo pipefail + if git diff --quiet -- "$FORMULA_PATH"; then - echo "Homebrew formula already up to date" + echo "Homebrew formula already up to date for ${RELEASE_TAG}" exit 0 fi - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + 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 checkout -B "$BRANCH" git add "$FORMULA_PATH" - git commit -m "chore: update Homebrew formula for ${RELEASE_TAG}" - git push origin "$TARGET_BRANCH" + git commit -m "${EXECUTABLE_NAME} ${RELEASE_TAG}" + git push -f -u origin "$BRANCH" + + PR_TITLE="${EXECUTABLE_NAME} ${RELEASE_TAG}" + PR_BODY=$(printf 'Automated formula update for the `%s` CLI release [`%s`](%s/%s/releases/tag/%s).\n\nOpened automatically by the `%s` publish workflow after release binaries were uploaded.' "$EXECUTABLE_NAME" "$RELEASE_TAG" "$SERVER_URL" "$SOURCE_REPO" "$RELEASE_TAG" "${SOURCE_REPO#*/}") + + EXISTING_PR="$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number' || true)" + if [ -n "$EXISTING_PR" ]; then + gh pr edit "$EXISTING_PR" --title "$PR_TITLE" --body "$PR_BODY" + else + gh pr create \ + --title "$PR_TITLE" \ + --body "$PR_BODY" \ + --base "$BASE_BRANCH" \ + --head "$BRANCH" + fi diff --git a/CHANGELOG.md b/CHANGELOG.md index a3593755..72dd1760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Change Log +## 19.0.0 + +* Breaking: Renamed `project update-protocol-status` to `project update-protocol` +* Breaking: Renamed `project update-service-status` to `project update-service` +* Breaking: Removed `projects get-sms-template`, `projects update-sms-template`, and `projects delete-sms-template` commands +* Breaking: Made `--locale` optional on `projects get-email-template`, `projects update-email-template`, and `projects delete-email-template` +* Breaking: Reordered `projects update-email-template` parameters — `--locale` is now optional and placed after `--message` +* Added `--path` prompt during `init site` to choose the local site directory +* Added support for initializing sites into existing non-empty directories without a starter template +* Added structured column renderer for `runtimes` listings +* Added activity-based deployment timeout tracking so healthy long builds in `push function` and `push site` no longer time out prematurely +* Updated `brew install`/`brew upgrade` to use the fully-qualified `appwrite/appwrite/appwrite` formula from the `appwrite/homebrew-appwrite` tap +* Updated `deploymentRetention` prompt to clarify it counts days of non-active deployments +* Updated CLI help and error output to display the correct program name `appwrite` +* Removed `enabled` field from site entries in `appwrite.config.json` +* Fixed command help text to render links inline without markdown brackets + ## 18.2.0 * Added source code and entrypoint validation before local function execution diff --git a/Formula/appwrite.rb b/Formula/appwrite.rb deleted file mode 100644 index 59b5af47..00000000 --- a/Formula/appwrite.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Appwrite < Formula - desc "Command-line tool for interacting with the Appwrite API" - homepage "https://appwrite.io" - license "BSD-3-Clause" - version "18.2.0" - - def self.binary_arch - Hardware::CPU.arm? ? "arm64" : "x64" - end - - def self.binary_os - return "darwin" if OS.mac? - return "linux" if OS.linux? - - raise "Homebrew formula is only supported on macOS and Linux" - end - - def self.binary_name - "appwrite-cli-#{binary_os}-#{binary_arch}" - end - - def self.build_target - return "mac-#{binary_arch}" if OS.mac? - return "linux-#{binary_arch}" if OS.linux? - - raise "Homebrew formula is only supported on macOS and Linux" - end - - # Release automation injects per-target SHA256 values when publishing binaries. - on_macos do - if Hardware::CPU.arm? - url "https://github.com/appwrite/sdk-for-cli/releases/download/#{version}/appwrite-cli-darwin-arm64" - sha256 "14ea83b1fc962b7be91c7a6e8723f83369b5ce0e6b3f56f61093cd00381ac086" - else - url "https://github.com/appwrite/sdk-for-cli/releases/download/#{version}/appwrite-cli-darwin-x64" - sha256 "83703a86d2cb22966beb4afd0f88f11319ca81fbf64a91e9e0f8d6375d4506d4" - end - end - - on_linux do - if Hardware::CPU.arm? - url "https://github.com/appwrite/sdk-for-cli/releases/download/#{version}/appwrite-cli-linux-arm64" - sha256 "d215cd4c1f0b70916436d7061797d407a7b0ce9830cfc29aa735b1405dafbd00" - else - url "https://github.com/appwrite/sdk-for-cli/releases/download/#{version}/appwrite-cli-linux-x64" - sha256 "38c127e173b5ea2e5b2f170979681156cd30060e39960cefb9a7abfda3353988" - end - end - - head "https://github.com/appwrite/sdk-for-cli.git", branch: "master" do - depends_on "bun" => :build - end - - def install - if build.head? - system "bun", "install", "--frozen-lockfile" - system "bun", "run", self.class.build_target - bin.install "build/#{self.class.binary_name}" => "appwrite" - return - end - - bin.install self.class.binary_name => "appwrite" - end - - test do - assert_match "Usage:", shell_output("#{bin}/appwrite --help") - end -end diff --git a/README.md b/README.md index aa6accfa..00c2f00d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Appwrite Command Line SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-cli.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.9.1-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.9.2-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using ```sh $ appwrite -v -18.2.0 +19.0.0 ``` ### Install using prebuilt binaries @@ -42,12 +42,12 @@ If you do not have `npm` installed, you can always install the prebuilt binaries $ wget -q https://appwrite.io/cli/install.sh -O - | /bin/bash ``` -### MacOS via [Homebrew](https://brew.sh) +### MacOS / Linux via [Homebrew](https://brew.sh) ```bash -$ brew install appwrite +$ brew install appwrite/appwrite/appwrite ``` -Homebrew installs the native binary for your platform. +Homebrew pulls the formula from the [`appwrite/homebrew-appwrite`](https://github.com/appwrite/homebrew-appwrite) tap and downloads the native binary for your platform. ### Windows Via Powershell @@ -62,7 +62,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 -18.2.0 +19.0.0 ``` ## Getting Started diff --git a/bun.lock b/bun.lock index ed3d63d8..67781618 100644 --- a/bun.lock +++ b/bun.lock @@ -5,7 +5,7 @@ "": { "name": "appwrite-cli", "dependencies": { - "@appwrite.io/console": "~9.1.0", + "@appwrite.io/console": "11.0.0", "chalk": "4.1.2", "chokidar": "^3.6.0", "cli-progress": "^3.12.0", @@ -46,10 +46,11 @@ }, }, "overrides": { + "@xmldom/xmldom": "^0.9.10", "phin": "3.7.1", }, "packages": { - "@appwrite.io/console": ["@appwrite.io/console@9.1.0", "", { "dependencies": { "json-bigint": "1.0.0" } }, "sha512-9G890Ia6Ul2jKtXsFsAr0jRyGbr+Qh+nNv30xrlu2onJaBIjFPBZcDfTh2qAE+GyniEtySLyLuyNYspeIf/Dew=="], + "@appwrite.io/console": ["@appwrite.io/console@11.0.0", "", { "dependencies": { "json-bigint": "1.0.0" } }, "sha512-7w2MNVDP5cNLExJlEOttfBAvOFd1GA+rAUBoqhtvd81GLZZrMZck7QZv4cyhz3LO54jUg5zBWbyC1lsXCRWiEg=="], "@babel/code-frame": ["@babel/code-frame@7.29.0", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw=="], @@ -145,9 +146,11 @@ "@eslint/plugin-kit": ["@eslint/plugin-kit@0.4.1", "", { "dependencies": { "@eslint/core": "^0.17.0", "levn": "^0.4.1" } }, "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA=="], - "@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="], + "@humanfs/core": ["@humanfs/core@0.19.2", "", { "dependencies": { "@humanfs/types": "^0.15.0" } }, "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA=="], - "@humanfs/node": ["@humanfs/node@0.16.7", "", { "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.4.0" } }, "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ=="], + "@humanfs/node": ["@humanfs/node@0.16.8", "", { "dependencies": { "@humanfs/core": "^0.19.2", "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" } }, "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ=="], + + "@humanfs/types": ["@humanfs/types@0.15.0", "", {}, "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q=="], "@humanwhocodes/module-importer": ["@humanwhocodes/module-importer@1.0.1", "", {}, "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA=="], @@ -251,7 +254,7 @@ "@tokenizer/token": ["@tokenizer/token@0.3.0", "", {}, "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="], - "@types/bun": ["@types/bun@1.3.12", "", { "dependencies": { "bun-types": "1.3.12" } }, "sha512-DBv81elK+/VSwXHDlnH3Qduw+KxkTIWi7TXkAeh24zpi5l0B2kUg9Ga3tb4nJaPcOFswflgi/yAvMVBPrxMB+A=="], + "@types/bun": ["@types/bun@1.3.13", "", { "dependencies": { "bun-types": "1.3.13" } }, "sha512-9fqXWk5YIHGGnUau9TEi+qdlTYDAnOj+xLCmSTwXfAIqXr2x4tytJb43E9uCvt09zJURKXwAtkoH4nLQfzeTXw=="], "@types/cli-progress": ["@types/cli-progress@3.11.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA=="], @@ -269,29 +272,29 @@ "@types/through": ["@types/through@0.0.33", "", { "dependencies": { "@types/node": "*" } }, "sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ=="], - "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.58.2", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.58.2", "@typescript-eslint/type-utils": "8.58.2", "@typescript-eslint/utils": "8.58.2", "@typescript-eslint/visitor-keys": "8.58.2", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.58.2", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-aC2qc5thQahutKjP+cl8cgN9DWe3ZUqVko30CMSZHnFEHyhOYoZSzkGtAI2mcwZ38xeImDucI4dnqsHiOYuuCw=="], + "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.59.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.59.0", "@typescript-eslint/type-utils": "8.59.0", "@typescript-eslint/utils": "8.59.0", "@typescript-eslint/visitor-keys": "8.59.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.59.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-HyAZtpdkgZwpq8Sz3FSUvCR4c+ScbuWa9AksK2Jweub7w4M3yTz4O11AqVJzLYjy/B9ZWPyc81I+mOdJU/bDQw=="], - "@typescript-eslint/parser": ["@typescript-eslint/parser@8.58.2", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.58.2", "@typescript-eslint/types": "8.58.2", "@typescript-eslint/typescript-estree": "8.58.2", "@typescript-eslint/visitor-keys": "8.58.2", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-/Zb/xaIDfxeJnvishjGdcR4jmr7S+bda8PKNhRGdljDM+elXhlvN0FyPSsMnLmJUrVG9aPO6dof80wjMawsASg=="], + "@typescript-eslint/parser": ["@typescript-eslint/parser@8.59.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.59.0", "@typescript-eslint/types": "8.59.0", "@typescript-eslint/typescript-estree": "8.59.0", "@typescript-eslint/visitor-keys": "8.59.0", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-TI1XGwKbDpo9tRW8UDIXCOeLk55qe9ZFGs8MTKU6/M08HWTw52DD/IYhfQtOEhEdPhLMT26Ka/x7p70nd3dzDg=="], - "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.58.2", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.58.2", "@typescript-eslint/types": "^8.58.2", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-Cq6UfpZZk15+r87BkIh5rDpi38W4b+Sjnb8wQCPPDDweS/LRCFjCyViEbzHk5Ck3f2QDfgmlxqSa7S7clDtlfg=="], + "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.59.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.59.0", "@typescript-eslint/types": "^8.59.0", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-Lw5ITrR5s5TbC19YSvlr63ZfLaJoU6vtKTHyB0GQOpX0W7d5/Ir6vUahWi/8Sps/nOukZQ0IB3SmlxZnjaKVnw=="], - "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.58.2", "", { "dependencies": { "@typescript-eslint/types": "8.58.2", "@typescript-eslint/visitor-keys": "8.58.2" } }, "sha512-SgmyvDPexWETQek+qzZnrG6844IaO02UVyOLhI4wpo82dpZJY9+6YZCKAMFzXb7qhx37mFK1QcPQ18tud+vo6Q=="], + "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.59.0", "", { "dependencies": { "@typescript-eslint/types": "8.59.0", "@typescript-eslint/visitor-keys": "8.59.0" } }, "sha512-UzR16Ut8IpA3Mc4DbgAShlPPkVm8xXMWafXxB0BocaVRHs8ZGakAxGRskF7FId3sdk9lgGD73GSFaWmWFDE4dg=="], - "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.58.2", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-3SR+RukipDvkkKp/d0jP0dyzuls3DbGmwDpVEc5wqk5f38KFThakqAAO0XMirWAE+kT00oTauTbzMFGPoAzB0A=="], + "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.59.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-91Sbl3s4Kb3SybliIY6muFBmHVv+pYXfybC4Oolp3dvk8BvIE3wOPc+403CWIT7mJNkfQRGtdqghzs2+Z91Tqg=="], - "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.58.2", "", { "dependencies": { "@typescript-eslint/types": "8.58.2", "@typescript-eslint/typescript-estree": "8.58.2", "@typescript-eslint/utils": "8.58.2", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-Z7EloNR/B389FvabdGeTo2XMs4W9TjtPiO9DAsmT0yom0bwlPyRjkJ1uCdW1DvrrrYP50AJZ9Xc3sByZA9+dcg=="], + "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.59.0", "", { "dependencies": { "@typescript-eslint/types": "8.59.0", "@typescript-eslint/typescript-estree": "8.59.0", "@typescript-eslint/utils": "8.59.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-3TRiZaQSltGqGeNrJzzr1+8YcEobKH9rHnqIp/1psfKFmhRQDNMGP5hBufanYTGznwShzVLs3Mz+gDN7HkWfXg=="], - "@typescript-eslint/types": ["@typescript-eslint/types@8.58.2", "", {}, "sha512-9TukXyATBQf/Jq9AMQXfvurk+G5R2MwfqQGDR2GzGz28HvY/lXNKGhkY+6IOubwcquikWk5cjlgPvD2uAA7htQ=="], + "@typescript-eslint/types": ["@typescript-eslint/types@8.59.0", "", {}, "sha512-nLzdsT1gdOgFxxxwrlNVUBzSNBEEHJ86bblmk4QAS6stfig7rcJzWKqCyxFy3YRRHXDWEkb2NralA1nOYkkm/A=="], - "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.58.2", "", { "dependencies": { "@typescript-eslint/project-service": "8.58.2", "@typescript-eslint/tsconfig-utils": "8.58.2", "@typescript-eslint/types": "8.58.2", "@typescript-eslint/visitor-keys": "8.58.2", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-ELGuoofuhhoCvNbQjFFiobFcGgcDCEm0ThWdmO4Z0UzLqPXS3KFvnEZ+SHewwOYHjM09tkzOWXNTv9u6Gqtyuw=="], + "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.59.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.59.0", "@typescript-eslint/tsconfig-utils": "8.59.0", "@typescript-eslint/types": "8.59.0", "@typescript-eslint/visitor-keys": "8.59.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-O9Re9P1BmBLFJyikRbQpLku/QA3/AueZNO9WePLBwQrvkixTmDe8u76B6CYUAITRl/rHawggEqUGn5QIkVRLMw=="], - "@typescript-eslint/utils": ["@typescript-eslint/utils@8.58.2", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.58.2", "@typescript-eslint/types": "8.58.2", "@typescript-eslint/typescript-estree": "8.58.2" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-QZfjHNEzPY8+l0+fIXMvuQ2sJlplB4zgDZvA+NmvZsZv3EQwOcc1DuIU1VJUTWZ/RKouBMhDyNaBMx4sWvrzRA=="], + "@typescript-eslint/utils": ["@typescript-eslint/utils@8.59.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.59.0", "@typescript-eslint/types": "8.59.0", "@typescript-eslint/typescript-estree": "8.59.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-I1R/K7V07XsMJ12Oaxg/O9GfrysGTmCRhvZJBv0RE0NcULMzjqVpR5kRRQjHsz3J/bElU7HwCO7zkqL+MSUz+g=="], - "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.58.2", "", { "dependencies": { "@typescript-eslint/types": "8.58.2", "eslint-visitor-keys": "^5.0.0" } }, "sha512-f1WO2Lx8a9t8DARmcWAUPJbu0G20bJlj8L4z72K00TMeJAoyLr/tHhI/pzYBLrR4dXWkcxO1cWYZEOX8DKHTqA=="], + "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.59.0", "", { "dependencies": { "@typescript-eslint/types": "8.59.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-/uejZt4dSere1bx12WLlPfv8GktzcaDtuJ7s42/HEZ5zGj9oxRaD4bj7qwSunXkf+pbAhFt2zjpHYUiT5lHf0Q=="], - "@xmldom/xmldom": ["@xmldom/xmldom@0.8.12", "", {}, "sha512-9k/gHF6n/pAi/9tqr3m3aqkuiNosYTurLLUtc7xQ9sxB/wm7WPygCv8GYa6mS0fLJEHhqMC1ATYhz++U/lRHqg=="], + "@xmldom/xmldom": ["@xmldom/xmldom@0.9.10", "", {}, "sha512-A9gOqLdi6cV4ibazAjcQufGj0B1y/vDqYrcuP6d/6x8P27gRS8643Dj9o1dEKtB6O7fwxb2FgBmJS2mX7gpvdw=="], - "@yao-pkg/pkg": ["@yao-pkg/pkg@6.15.0", "", { "dependencies": { "@babel/generator": "^7.23.0", "@babel/parser": "^7.23.0", "@babel/traverse": "^7.23.0", "@babel/types": "^7.23.0", "@roberts_lando/vfs": "^0.3.2", "@yao-pkg/pkg-fetch": "3.5.33", "esbuild": "^0.27.3", "into-stream": "^9.1.0", "minimist": "^1.2.6", "multistream": "^4.1.0", "picocolors": "^1.1.0", "picomatch": "^4.0.2", "postject": "^1.0.0-alpha.6", "prebuild-install": "^7.1.1", "resolve": "^1.22.10", "resolve.exports": "^2.0.3", "stream-meter": "^1.0.4", "tar": "^7.5.7", "tinyglobby": "^0.2.11", "unzipper": "^0.12.3" }, "bin": { "pkg": "lib-es5/bin.js" } }, "sha512-mYfCg5AgM3nzI2aT8lGuRYZxB1YUY00qViu47gJXOTjxkF+XY8evNQERnj/jRkCmEkLgsEXhx9Z0npOn2yx56A=="], + "@yao-pkg/pkg": ["@yao-pkg/pkg@6.18.2", "", { "dependencies": { "@babel/generator": "^7.23.0", "@babel/parser": "^7.23.0", "@babel/traverse": "^7.23.0", "@babel/types": "^7.23.0", "@roberts_lando/vfs": "^0.3.2", "@yao-pkg/pkg-fetch": "3.5.33", "esbuild": "^0.27.3", "into-stream": "^9.1.0", "minimist": "^1.2.6", "multistream": "^4.1.0", "picocolors": "^1.1.0", "picomatch": "^4.0.2", "postject": "^1.0.0-alpha.6", "prebuild-install": "^7.1.1", "resolve": "^1.22.10", "resolve.exports": "^2.0.3", "stream-meter": "^1.0.4", "tar": "^7.5.7", "tinyglobby": "^0.2.11", "unzipper": "^0.12.3" }, "bin": { "pkg": "lib-es5/bin.js" } }, "sha512-lo+fNeV10ldTeTrDbgK2eYTIhKDqCUVVq7a4W3s7LiTwd9/8UKYdxBodVNNCbEd2JBtqKA4BZpevitfsOzyXig=="], "@yao-pkg/pkg-fetch": ["@yao-pkg/pkg-fetch@3.5.33", "", { "dependencies": { "https-proxy-agent": "^5.0.0", "node-fetch": "^2.6.6", "picocolors": "^1.1.0", "progress": "^2.0.3", "semver": "^7.3.5", "tar-fs": "^3.1.1", "yargs": "^16.2.0" }, "bin": { "pkg-fetch": "lib-es5/bin.js" } }, "sha512-j2UoH+eP4VobfovQg1gkWwDoB4O/tv8rlLnEjUEEHuWXJ5eBLNUIrobMSEp773/2pgUJUfqqPUFIhS1pN8OZuQ=="], @@ -329,15 +332,15 @@ "bare-events": ["bare-events@2.8.2", "", { "peerDependencies": { "bare-abort-controller": "*" }, "optionalPeers": ["bare-abort-controller"] }, "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ=="], - "bare-fs": ["bare-fs@4.7.0", "", { "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", "bare-stream": "^2.6.4", "bare-url": "^2.2.2", "fast-fifo": "^1.3.2" }, "peerDependencies": { "bare-buffer": "*" }, "optionalPeers": ["bare-buffer"] }, "sha512-xzqKsCFxAek9aezYhjJuJRXBIaYlg/0OGDTZp+T8eYmYMlm66cs6cYko02drIyjN2CBbi+I6L7YfXyqpqtKRXA=="], + "bare-fs": ["bare-fs@4.7.1", "", { "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", "bare-stream": "^2.6.4", "bare-url": "^2.2.2", "fast-fifo": "^1.3.2" }, "peerDependencies": { "bare-buffer": "*" }, "optionalPeers": ["bare-buffer"] }, "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw=="], - "bare-os": ["bare-os@3.8.7", "", {}, "sha512-G4Gr1UsGeEy2qtDTZwL7JFLo2wapUarz7iTMcYcMFdS89AIQuBoyjgXZz0Utv7uHs3xA9LckhVbeBi8lEQrC+w=="], + "bare-os": ["bare-os@3.9.0", "", {}, "sha512-JTjuZyNIDpw+GytMO4a6TK1VXdVKKJr6DRxEHasyuYyShV2deuiHJK/ahGZlebc+SG0/wJCB9XK8gprBGDFi/Q=="], "bare-path": ["bare-path@3.0.0", "", { "dependencies": { "bare-os": "^3.0.1" } }, "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw=="], "bare-stream": ["bare-stream@2.13.0", "", { "dependencies": { "streamx": "^2.25.0", "teex": "^1.0.1" }, "peerDependencies": { "bare-abort-controller": "*", "bare-buffer": "*", "bare-events": "*" }, "optionalPeers": ["bare-abort-controller", "bare-buffer"] }, "sha512-3zAJRZMDFGjdn+RVnNpF9kuELw+0Fl3lpndM4NcEOhb9zwtSo/deETfuIwMSE5BXanA0FrN1qVjffGwAg2Y7EA=="], - "bare-url": ["bare-url@2.4.0", "", { "dependencies": { "bare-path": "^3.0.0" } }, "sha512-NSTU5WN+fy/L0DDenfE8SXQna4voXuW0FHM7wH8i3/q9khUSchfPbPezO4zSFMnDGIf9YE+mt/RWhZgNRKRIXA=="], + "bare-url": ["bare-url@2.4.2", "", { "dependencies": { "bare-path": "^3.0.0" } }, "sha512-/9a2j4ac6ckpmAHvod/ob7x439OAHst/drc2Clnq+reRYd/ovddwcF4LfoxHyNk5AuGBnPg+HqFjmE/Zpq6v0A=="], "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], @@ -361,7 +364,7 @@ "buffer-equal": ["buffer-equal@0.0.1", "", {}, "sha512-RgSV6InVQ9ODPdLWJ5UAqBqJBOg370Nz6ZQtRzpt6nUjc8v0St97uJ4PYC6NztqIScrAXafKM3mZPMygSe1ggA=="], - "bun-types": ["bun-types@1.3.12", "", { "dependencies": { "@types/node": "*" } }, "sha512-HqOLj5PoFajAQciOMRiIZGNoKxDJSr6qigAttOX40vJuSp6DN/CxWp9s3C1Xwm4oH7ybueITwiaOcWXoYVoRkA=="], + "bun-types": ["bun-types@1.3.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-QXKeHLlOLqQX9LgYaHJfzdBaV21T63HhFJnvuRCcjZiaUDpbs5ED1MgxbMra71CsryN/1dAoXuJJJwIv/2drVA=="], "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="], @@ -531,7 +534,7 @@ "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], - "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + "hasown": ["hasown@2.0.3", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg=="], "https-proxy-agent": ["https-proxy-agent@5.0.1", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="], @@ -607,7 +610,7 @@ "json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="], - "jsonfile": ["jsonfile@6.2.0", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg=="], + "jsonfile": ["jsonfile@6.2.1", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q=="], "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], @@ -855,7 +858,7 @@ "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], - "typescript-eslint": ["typescript-eslint@8.58.2", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.58.2", "@typescript-eslint/parser": "8.58.2", "@typescript-eslint/typescript-estree": "8.58.2", "@typescript-eslint/utils": "8.58.2" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-V8iSng9mRbdZjl54VJ9NKr6ZB+dW0J3TzRXRGcSbLIej9jV86ZRtlYeTKDR/QLxXykocJ5icNzbsl2+5TzIvcQ=="], + "typescript-eslint": ["typescript-eslint@8.59.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.59.0", "@typescript-eslint/parser": "8.59.0", "@typescript-eslint/typescript-estree": "8.59.0", "@typescript-eslint/utils": "8.59.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-BU3ONW9X+v90EcCH9ZS6LMackcVtxRLlI3XrYyqZIwVSHIk7Qf7bFw1z0M9Q0IUxhTMZCf8piY9hTYaNEIASrw=="], "uglify-js": ["uglify-js@3.19.3", "", { "bin": { "uglifyjs": "bin/uglifyjs" } }, "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ=="], diff --git a/cli.ts b/cli.ts index ff785c0b..298f94e8 100644 --- a/cli.ts +++ b/cli.ts @@ -129,6 +129,7 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) { await maybeShowUpdateNotice(); program + .name('appwrite') .description(commandDescriptions['main']) .configureHelp({ helpWidth: process.stdout.columns || 80, diff --git a/docs/examples/project/create-smtp-test.md b/docs/examples/project/create-smtp-test.md new file mode 100644 index 00000000..01393020 --- /dev/null +++ b/docs/examples/project/create-smtp-test.md @@ -0,0 +1,4 @@ +```bash +appwrite project create-smtp-test \ + --emails one two three +``` diff --git a/docs/examples/project/get-email-template.md b/docs/examples/project/get-email-template.md new file mode 100644 index 00000000..f9219fd7 --- /dev/null +++ b/docs/examples/project/get-email-template.md @@ -0,0 +1,4 @@ +```bash +appwrite project get-email-template \ + --template-id verification +``` diff --git a/docs/examples/project/update-email-template.md b/docs/examples/project/update-email-template.md new file mode 100644 index 00000000..4b1d0976 --- /dev/null +++ b/docs/examples/project/update-email-template.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-email-template \ + --template-id verification +``` diff --git a/docs/examples/project/update-membership-privacy-policy.md b/docs/examples/project/update-membership-privacy-policy.md new file mode 100644 index 00000000..e700fd9d --- /dev/null +++ b/docs/examples/project/update-membership-privacy-policy.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-membership-privacy-policy +``` diff --git a/docs/examples/project/update-password-dictionary-policy.md b/docs/examples/project/update-password-dictionary-policy.md new file mode 100644 index 00000000..37b9a564 --- /dev/null +++ b/docs/examples/project/update-password-dictionary-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-password-dictionary-policy \ + --enabled false +``` diff --git a/docs/examples/project/update-password-history-policy.md b/docs/examples/project/update-password-history-policy.md new file mode 100644 index 00000000..4d5fa257 --- /dev/null +++ b/docs/examples/project/update-password-history-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-password-history-policy \ + --total 1 +``` diff --git a/docs/examples/project/update-password-personal-data-policy.md b/docs/examples/project/update-password-personal-data-policy.md new file mode 100644 index 00000000..5adb1391 --- /dev/null +++ b/docs/examples/project/update-password-personal-data-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-password-personal-data-policy \ + --enabled false +``` diff --git a/docs/examples/project/update-protocol-status.md b/docs/examples/project/update-protocol.md similarity index 57% rename from docs/examples/project/update-protocol-status.md rename to docs/examples/project/update-protocol.md index 503a222f..ff486476 100644 --- a/docs/examples/project/update-protocol-status.md +++ b/docs/examples/project/update-protocol.md @@ -1,5 +1,5 @@ ```bash -appwrite project update-protocol-status \ +appwrite project update-protocol \ --protocol-id rest \ --enabled false ``` diff --git a/docs/examples/project/update-service-status.md b/docs/examples/project/update-service.md similarity index 59% rename from docs/examples/project/update-service-status.md rename to docs/examples/project/update-service.md index fbfe760d..77822481 100644 --- a/docs/examples/project/update-service-status.md +++ b/docs/examples/project/update-service.md @@ -1,5 +1,5 @@ ```bash -appwrite project update-service-status \ +appwrite project update-service \ --service-id account \ --enabled false ``` diff --git a/docs/examples/project/update-session-alert-policy.md b/docs/examples/project/update-session-alert-policy.md new file mode 100644 index 00000000..67e666be --- /dev/null +++ b/docs/examples/project/update-session-alert-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-session-alert-policy \ + --enabled false +``` diff --git a/docs/examples/project/update-session-duration-policy.md b/docs/examples/project/update-session-duration-policy.md new file mode 100644 index 00000000..dbb80ef1 --- /dev/null +++ b/docs/examples/project/update-session-duration-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-session-duration-policy \ + --duration 5 +``` diff --git a/docs/examples/project/update-session-invalidation-policy.md b/docs/examples/project/update-session-invalidation-policy.md new file mode 100644 index 00000000..14a54b82 --- /dev/null +++ b/docs/examples/project/update-session-invalidation-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-session-invalidation-policy \ + --enabled false +``` diff --git a/docs/examples/project/update-session-limit-policy.md b/docs/examples/project/update-session-limit-policy.md new file mode 100644 index 00000000..b706a9eb --- /dev/null +++ b/docs/examples/project/update-session-limit-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-session-limit-policy \ + --total 1 +``` diff --git a/docs/examples/project/update-smtp.md b/docs/examples/project/update-smtp.md new file mode 100644 index 00000000..bb7cd389 --- /dev/null +++ b/docs/examples/project/update-smtp.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-smtp +``` diff --git a/docs/examples/project/update-user-limit-policy.md b/docs/examples/project/update-user-limit-policy.md new file mode 100644 index 00000000..45e0fe90 --- /dev/null +++ b/docs/examples/project/update-user-limit-policy.md @@ -0,0 +1,4 @@ +```bash +appwrite project update-user-limit-policy \ + --total 1 +``` diff --git a/docs/examples/projects/create-smtp-test.md b/docs/examples/projects/create-smtp-test.md deleted file mode 100644 index bd5e2da8..00000000 --- a/docs/examples/projects/create-smtp-test.md +++ /dev/null @@ -1,8 +0,0 @@ -```bash -appwrite projects create-smtp-test \ - --project-id \ - --emails one two three \ - --sender-name \ - --sender-email email@example.com \ - --host '' -``` diff --git a/docs/examples/projects/delete-email-template.md b/docs/examples/projects/delete-email-template.md deleted file mode 100644 index a88536f3..00000000 --- a/docs/examples/projects/delete-email-template.md +++ /dev/null @@ -1,6 +0,0 @@ -```bash -appwrite projects delete-email-template \ - --project-id \ - --type verification \ - --locale af -``` diff --git a/docs/examples/projects/delete-sms-template.md b/docs/examples/projects/delete-sms-template.md deleted file mode 100644 index 06e2a45d..00000000 --- a/docs/examples/projects/delete-sms-template.md +++ /dev/null @@ -1,6 +0,0 @@ -```bash -appwrite projects delete-sms-template \ - --project-id \ - --type verification \ - --locale af -``` diff --git a/docs/examples/projects/get-email-template.md b/docs/examples/projects/get-email-template.md deleted file mode 100644 index 13d60fa3..00000000 --- a/docs/examples/projects/get-email-template.md +++ /dev/null @@ -1,6 +0,0 @@ -```bash -appwrite projects get-email-template \ - --project-id \ - --type verification \ - --locale af -``` diff --git a/docs/examples/projects/get-sms-template.md b/docs/examples/projects/get-sms-template.md deleted file mode 100644 index 00eeef74..00000000 --- a/docs/examples/projects/get-sms-template.md +++ /dev/null @@ -1,6 +0,0 @@ -```bash -appwrite projects get-sms-template \ - --project-id \ - --type verification \ - --locale af -``` diff --git a/docs/examples/projects/update-auth-duration.md b/docs/examples/projects/update-auth-duration.md deleted file mode 100644 index 5b2eed3d..00000000 --- a/docs/examples/projects/update-auth-duration.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-auth-duration \ - --project-id \ - --duration 0 -``` diff --git a/docs/examples/projects/update-auth-limit.md b/docs/examples/projects/update-auth-limit.md deleted file mode 100644 index 5403cb8d..00000000 --- a/docs/examples/projects/update-auth-limit.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-auth-limit \ - --project-id \ - --limit 0 -``` diff --git a/docs/examples/projects/update-auth-password-dictionary.md b/docs/examples/projects/update-auth-password-dictionary.md deleted file mode 100644 index 13c8fa9e..00000000 --- a/docs/examples/projects/update-auth-password-dictionary.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-auth-password-dictionary \ - --project-id \ - --enabled false -``` diff --git a/docs/examples/projects/update-auth-password-history.md b/docs/examples/projects/update-auth-password-history.md deleted file mode 100644 index 0a48049a..00000000 --- a/docs/examples/projects/update-auth-password-history.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-auth-password-history \ - --project-id \ - --limit 0 -``` diff --git a/docs/examples/projects/update-auth-sessions-limit.md b/docs/examples/projects/update-auth-sessions-limit.md deleted file mode 100644 index 080e99da..00000000 --- a/docs/examples/projects/update-auth-sessions-limit.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-auth-sessions-limit \ - --project-id \ - --limit 1 -``` diff --git a/docs/examples/projects/update-email-template.md b/docs/examples/projects/update-email-template.md deleted file mode 100644 index 996e75eb..00000000 --- a/docs/examples/projects/update-email-template.md +++ /dev/null @@ -1,8 +0,0 @@ -```bash -appwrite projects update-email-template \ - --project-id \ - --type verification \ - --locale af \ - --subject \ - --message -``` diff --git a/docs/examples/projects/update-memberships-privacy.md b/docs/examples/projects/update-memberships-privacy.md deleted file mode 100644 index 5544b7be..00000000 --- a/docs/examples/projects/update-memberships-privacy.md +++ /dev/null @@ -1,7 +0,0 @@ -```bash -appwrite projects update-memberships-privacy \ - --project-id \ - --user-name false \ - --user-email false \ - --mfa false -``` diff --git a/docs/examples/projects/update-personal-data-check.md b/docs/examples/projects/update-personal-data-check.md deleted file mode 100644 index c1d64f4a..00000000 --- a/docs/examples/projects/update-personal-data-check.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-personal-data-check \ - --project-id \ - --enabled false -``` diff --git a/docs/examples/projects/update-session-alerts.md b/docs/examples/projects/update-session-alerts.md deleted file mode 100644 index 10cd5f86..00000000 --- a/docs/examples/projects/update-session-alerts.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-session-alerts \ - --project-id \ - --alerts false -``` diff --git a/docs/examples/projects/update-session-invalidation.md b/docs/examples/projects/update-session-invalidation.md deleted file mode 100644 index 4a043c98..00000000 --- a/docs/examples/projects/update-session-invalidation.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-session-invalidation \ - --project-id \ - --enabled false -``` diff --git a/docs/examples/projects/update-sms-template.md b/docs/examples/projects/update-sms-template.md deleted file mode 100644 index ee6e8213..00000000 --- a/docs/examples/projects/update-sms-template.md +++ /dev/null @@ -1,7 +0,0 @@ -```bash -appwrite projects update-sms-template \ - --project-id \ - --type verification \ - --locale af \ - --message -``` diff --git a/docs/examples/projects/update-smtp.md b/docs/examples/projects/update-smtp.md deleted file mode 100644 index 46a432c5..00000000 --- a/docs/examples/projects/update-smtp.md +++ /dev/null @@ -1,5 +0,0 @@ -```bash -appwrite projects update-smtp \ - --project-id \ - --enabled false -``` diff --git a/install.ps1 b/install.ps1 index bbe34ed7..a87d5f0b 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/18.2.0/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/18.2.0/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/19.0.0/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/19.0.0/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index 9f60c230..e24b6e37 100644 --- a/install.sh +++ b/install.sh @@ -115,7 +115,7 @@ verifyMacOSCodeSignature() { downloadBinary() { echo "[2/4] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="18.2.0" + GITHUB_LATEST_VERSION="19.0.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/commands/config.ts b/lib/commands/config.ts index 4f4db308..c161197f 100644 --- a/lib/commands/config.ts +++ b/lib/commands/config.ts @@ -144,7 +144,6 @@ const SiteSchema = z path: z.string().optional(), $id: z.string(), name: z.string(), - enabled: z.boolean().optional(), logging: z.boolean().optional(), timeout: z.union([z.number(), z.bigint()]).optional(), framework: z.string().optional(), diff --git a/lib/commands/init.ts b/lib/commands/init.ts index 1e68f641..d39ccd61 100644 --- a/lib/commands/init.ts +++ b/lib/commands/init.ts @@ -791,27 +791,37 @@ const initSite = async (): Promise => { process.chdir(localConfig.configDirectoryPath); const answers = await inquirer.prompt(questionsCreateSite); + const siteId = answers.id === "unique()" ? ID.unique() : answers.id; + const sitePath = answers.path.trim(); + const siteDir = path.resolve(process.cwd(), sitePath); const siteFolder = path.join(process.cwd(), "sites"); + const templatesDir = path.join(siteFolder, `${siteId}-templates`); + const siteDirExists = fs.existsSync(siteDir); + const siteFolderExists = fs.existsSync(siteFolder); - if (!fs.existsSync(siteFolder)) { - fs.mkdirSync(siteFolder, { - recursive: true, - }); + if (siteDirExists && !fs.statSync(siteDir).isDirectory()) { + throw new Error( + `( ${sitePath} ) already exists and is not a directory. Please choose another path.`, + ); } - const siteId = answers.id === "unique()" ? ID.unique() : answers.id; - const siteName = answers.name; - const siteDirectoryName = getSafeDirectoryName(siteName, siteId); - const siteDir = path.join(siteFolder, siteDirectoryName); - const templatesDir = path.join(siteFolder, `${siteId}-templates`); + const siteDirIsEmpty = siteDirExists + ? fs.readdirSync(siteDir).length === 0 + : true; - if (fs.existsSync(siteDir)) { + if (answers.downloadTemplate && siteDirExists && !siteDirIsEmpty) { throw new Error( - `( ${siteDirectoryName} ) already exists in the current directory. Please choose another name.`, + `( ${sitePath} ) already exists and is not empty. Please choose another path.`, ); } - let templateDetails: SiteTemplateDetails; + if (!answers.downloadTemplate && siteDirExists && !siteDirIsEmpty) { + hint( + `Using existing non-empty site directory '${sitePath}'. No starter template code will be downloaded.`, + ); + } + + let templateDetails: SiteTemplateDetails | null = null; try { const sitesService = await getSitesService(); const response = await sitesService.listTemplates( @@ -827,132 +837,171 @@ const initSite = async (): Promise => { templateDetails = response.templates[0]; } catch (err) { const errorMessage = err instanceof Error ? err.message : String(err); - throw new Error( - `Failed to fetch template for framework ${answers.framework.key}: ${errorMessage}`, + if (answers.downloadTemplate) { + throw new Error( + `Failed to fetch template for framework ${answers.framework.key}: ${errorMessage}`, + ); + } + log( + `Failed to fetch template details for framework ${answers.framework.key}: ${errorMessage}`, ); } - fs.mkdirSync(siteDir, { mode: 0o777 }); - fs.mkdirSync(templatesDir, { mode: 0o777 }); - const repo = `https://github.com/${templateDetails.providerOwner}/${templateDetails.providerRepositoryId}`; - const selected = { - template: templateDetails.frameworks[0].providerRootDirectory, - }; + const templateFramework = templateDetails?.frameworks[0]; - let dirSetupCommands = ""; + const createdSiteDir = !siteDirExists; + if (!siteDirExists) { + fs.mkdirSync(siteDir, { recursive: true, mode: 0o777 }); + } - const sparse = selected.template.startsWith("./") - ? selected.template.substring(2) - : selected.template; + if (answers.downloadTemplate) { + try { + if (!templateDetails || !templateFramework) { + throw new Error( + `No starter template found for framework ${answers.framework.key}`, + ); + } - log("Fetching site code ..."); + if (!fs.existsSync(siteFolder)) { + fs.mkdirSync(siteFolder, { + recursive: true, + }); + } - if (selected.template === "./") { - dirSetupCommands = ` - cd ${templatesDir} - git init - git remote add origin ${repo} - git config --global init.defaultBranch main - `.trim(); - } else { - dirSetupCommands = ` - cd ${templatesDir} - git init - git remote add origin ${repo} - git config --global init.defaultBranch main - git config core.sparseCheckout true - echo "${sparse}" >> .git/info/sparse-checkout - git config --add remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' - git config remote.origin.tagopt --no-tags - `.trim(); - } - const windowsGitCloneCommands = ` - $tag = (git ls-remote --tags origin "${templateDetails.providerVersion}" | Select-Object -Last 1) -replace '.*refs/tags/', '' - git fetch --depth=1 origin "refs/tags/$tag" - git checkout FETCH_HEAD - `.trim(); - const unixGitCloneCommands = ` - git fetch --depth=1 origin refs/tags/$(git ls-remote --tags origin "${templateDetails.providerVersion}" | tail -n 1 | awk -F '/' '{print $3}') - git checkout FETCH_HEAD - `.trim(); - - let usedShell = null; - if (process.platform === "win32") { - dirSetupCommands = dirSetupCommands + "\n" + windowsGitCloneCommands; - usedShell = "powershell.exe"; - } else { - dirSetupCommands = dirSetupCommands + "\n" + unixGitCloneCommands; - } + fs.mkdirSync(templatesDir, { mode: 0o777 }); + const repo = `https://github.com/${templateDetails.providerOwner}/${templateDetails.providerRepositoryId}`; + const selected = { + template: templateFramework.providerRootDirectory, + }; - /* Execute the child process but do not print any std output */ - try { - childProcess.execSync(dirSetupCommands, { - stdio: "pipe", - cwd: templatesDir, - shell: usedShell, - }); - } catch (err) { - /* Specialised errors with recommended actions to take */ - const errorMessage = err instanceof Error ? err.message : String(err); - if (errorMessage.includes("error: unknown option")) { - throw new Error( - `${errorMessage} \n\nSuggestion: Try updating your git to the latest version, then trying to run this command again.`, - ); - } else if ( - errorMessage.includes( - "is not recognized as an internal or external command,", - ) || - errorMessage.includes("command not found") - ) { - throw new Error( - `${errorMessage} \n\nSuggestion: It appears that git is not installed, try installing git then trying to run this command again.`, - ); - } else { - throw err; - } - } + let dirSetupCommands = ""; - fs.rmSync(path.join(templatesDir, ".git"), { recursive: true, force: true }); + const sparse = selected.template.startsWith("./") + ? selected.template.substring(2) + : selected.template; - fs.cpSync( - selected.template === "./" - ? templatesDir - : path.join(templatesDir, selected.template), - siteDir, - { recursive: true, force: true }, - ); + log("Fetching site code ..."); - fs.rmSync(templatesDir, { recursive: true, force: true }); + if (selected.template === "./") { + dirSetupCommands = ` + cd ${templatesDir} + git init + git remote add origin ${repo} + git config --global init.defaultBranch main + `.trim(); + } else { + dirSetupCommands = ` + cd ${templatesDir} + git init + git remote add origin ${repo} + git config --global init.defaultBranch main + git config core.sparseCheckout true + echo "${sparse}" >> .git/info/sparse-checkout + git config --add remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' + git config remote.origin.tagopt --no-tags + `.trim(); + } + const windowsGitCloneCommands = ` + $tag = (git ls-remote --tags origin "${templateDetails.providerVersion}" | Select-Object -Last 1) -replace '.*refs/tags/', '' + git fetch --depth=1 origin "refs/tags/$tag" + git checkout FETCH_HEAD + `.trim(); + const unixGitCloneCommands = ` + git fetch --depth=1 origin refs/tags/$(git ls-remote --tags origin "${templateDetails.providerVersion}" | tail -n 1 | awk -F '/' '{print $3}') + git checkout FETCH_HEAD + `.trim(); + + let usedShell = null; + if (process.platform === "win32") { + dirSetupCommands = dirSetupCommands + "\n" + windowsGitCloneCommands; + usedShell = "powershell.exe"; + } else { + dirSetupCommands = dirSetupCommands + "\n" + unixGitCloneCommands; + } - const readmePath = path.join( - process.cwd(), - "sites", - siteDirectoryName, - "README.md", - ); - const readmeFile = fs.readFileSync(readmePath).toString(); - const newReadmeFile = readmeFile.split("\n"); - newReadmeFile[0] = `# ${answers.name}`; - newReadmeFile.splice(1, 2); - fs.writeFileSync(readmePath, newReadmeFile.join("\n")); + /* Execute the child process but do not print any std output */ + try { + childProcess.execSync(dirSetupCommands, { + stdio: "pipe", + cwd: templatesDir, + shell: usedShell, + }); + } catch (err) { + /* Specialised errors with recommended actions to take */ + const errorMessage = err instanceof Error ? err.message : String(err); + if (errorMessage.includes("error: unknown option")) { + throw new Error( + `${errorMessage} \n\nSuggestion: Try updating your git to the latest version, then trying to run this command again.`, + ); + } else if ( + errorMessage.includes( + "is not recognized as an internal or external command,", + ) || + errorMessage.includes("command not found") + ) { + throw new Error( + `${errorMessage} \n\nSuggestion: It appears that git is not installed, try installing git then trying to run this command again.`, + ); + } else { + throw err; + } + } + + fs.rmSync(path.join(templatesDir, ".git"), { + recursive: true, + force: true, + }); + + fs.cpSync( + selected.template === "./" + ? templatesDir + : path.join(templatesDir, selected.template), + siteDir, + { recursive: true, force: true }, + ); + + fs.rmSync(templatesDir, { recursive: true, force: true }); + + const readmePath = path.join(siteDir, "README.md"); + if (fs.existsSync(readmePath)) { + const readmeFile = fs.readFileSync(readmePath).toString(); + const newReadmeFile = readmeFile.split("\n"); + newReadmeFile[0] = `# ${answers.name}`; + newReadmeFile.splice(1, 2); + fs.writeFileSync(readmePath, newReadmeFile.join("\n")); + } + } catch (err) { + fs.rmSync(templatesDir, { recursive: true, force: true }); + if (createdSiteDir) { + fs.rmSync(siteDir, { recursive: true, force: true }); + } + if ( + !siteFolderExists && + fs.existsSync(siteFolder) && + fs.readdirSync(siteFolder).length === 0 + ) { + fs.rmSync(siteFolder, { recursive: true, force: true }); + } + throw err; + } + } const data = { $id: siteId, name: answers.name, framework: answers.framework.key, - adapter: templateDetails.frameworks[0].adapter || "", - buildRuntime: templateDetails.frameworks[0].buildRuntime || "", - installCommand: templateDetails.frameworks[0].installCommand || "", - buildCommand: templateDetails.frameworks[0].buildCommand || "", - outputDirectory: templateDetails.frameworks[0].outputDirectory || "", - fallbackFile: templateDetails.frameworks[0].fallbackFile || "", + adapter: templateFramework?.adapter || "", + buildRuntime: templateFramework?.buildRuntime || "", + installCommand: templateFramework?.installCommand || "", + buildCommand: templateFramework?.buildCommand || "", + outputDirectory: templateFramework?.outputDirectory || "", + fallbackFile: templateFramework?.fallbackFile || "", buildSpecification: answers.buildSpecification, runtimeSpecification: answers.runtimeSpecification, deploymentRetention: Number(answers.deploymentRetention), - enabled: true, timeout: 30, logging: true, - path: `sites/${siteDirectoryName}`, + path: sitePath, }; if (!data.buildRuntime) { diff --git a/lib/commands/pull.ts b/lib/commands/pull.ts index 251b42e5..f6179c2f 100644 --- a/lib/commands/pull.ts +++ b/lib/commands/pull.ts @@ -402,7 +402,6 @@ export class Pull { name: site.name, path: sitePath, framework: site.framework, - enabled: site.enabled, logging: site.logging, timeout: site.timeout, buildRuntime: site.buildRuntime, diff --git a/lib/commands/push.ts b/lib/commands/push.ts index 49243582..936f71d3 100644 --- a/lib/commands/push.ts +++ b/lib/commands/push.ts @@ -147,6 +147,59 @@ function getDeploymentTimeoutErrorMessage(): string { return `Deployment got stuck for more than ${DEPLOYMENT_TIMEOUT_MINUTES} minutes`; } +function getDeploymentProgressSignature( + deployment: Record, +): string { + const status = + typeof deployment["status"] === "string" ? deployment["status"] : ""; + const buildLogs = + typeof deployment["buildLogs"] === "string" + ? deployment["buildLogs"] + : ""; + const updatedAt = + typeof deployment["$updatedAt"] === "string" + ? deployment["$updatedAt"] + : ""; + const { screenshotLight, screenshotDark } = + getSiteDeploymentScreenshots(deployment); + + return JSON.stringify({ + status, + updatedAt, + buildLogsLength: buildLogs.length, + buildLogsTail: buildLogs.slice(-200), + screenshotLight: screenshotLight ?? "", + screenshotDark: screenshotDark ?? "", + }); +} + +function createDeploymentTimeoutTracker( + deployment: Record, +): { + touch: (deployment: Record) => void; + hasTimedOut: () => boolean; +} { + let lastActivityAt = Date.now(); + let lastSignature: string | null = null; + + const touch = (nextDeployment: Record): void => { + const nextSignature = getDeploymentProgressSignature(nextDeployment); + if (nextSignature === lastSignature) { + return; + } + + lastSignature = nextSignature; + lastActivityAt = Date.now(); + }; + + touch(deployment); + + return { + touch, + hasTimedOut: () => Date.now() - lastActivityAt > DEPLOYMENT_TIMEOUT_MS, + }; +} + async function getTerminalImage() { terminalImageModulePromise ??= import("terminal-image").then( (module) => module.default, @@ -956,7 +1009,7 @@ export class Push { if (settings.services) { this.log("Applying service statuses ..."); for (const [service, status] of Object.entries(settings.services)) { - await projectService.updateServiceStatus({ + await projectService.updateService({ serviceId: service as ServiceId, enabled: status, }); @@ -966,7 +1019,7 @@ export class Push { if (settings.protocols) { this.log("Applying protocol statuses ..."); for (const [protocol, status] of Object.entries(settings.protocols)) { - await projectService.updateProtocolStatus({ + await projectService.updateProtocol({ protocolId: protocol as ProtocolId, enabled: status, }); @@ -976,33 +1029,26 @@ export class Push { if (settings.auth) { if (settings.auth.security) { this.log("Applying auth security settings ..."); - await projectsService.updateAuthDuration({ - projectId, + await projectService.updateSessionDurationPolicy({ duration: Number(settings.auth.security.duration), }); - await projectsService.updateAuthLimit({ - projectId, - limit: Number(settings.auth.security.limit), + await projectService.updateUserLimitPolicy({ + total: Number(settings.auth.security.limit), }); - await projectsService.updateAuthSessionsLimit({ - projectId, - limit: Number(settings.auth.security.sessionsLimit), + await projectService.updateSessionLimitPolicy({ + total: Number(settings.auth.security.sessionsLimit), }); - await projectsService.updateAuthPasswordDictionary({ - projectId, + await projectService.updatePasswordDictionaryPolicy({ enabled: settings.auth.security.passwordDictionary, }); - await projectsService.updateAuthPasswordHistory({ - projectId, - limit: Number(settings.auth.security.passwordHistory), + await projectService.updatePasswordHistoryPolicy({ + total: Number(settings.auth.security.passwordHistory), }); - await projectsService.updatePersonalDataCheck({ - projectId, + await projectService.updatePasswordPersonalDataPolicy({ enabled: settings.auth.security.personalDataCheck, }); - await projectsService.updateSessionAlerts({ - projectId, - alerts: settings.auth.security.sessionAlerts, + await projectService.updateSessionAlertPolicy({ + enabled: settings.auth.security.sessionAlerts, }); await projectsService.updateMockNumbers({ projectId, @@ -1555,6 +1601,8 @@ export class Push { deploymentId, ); let waitingSince: number | null = null; + const deploymentTimeoutTracker = + createDeploymentTimeoutTracker(response); const deploymentLogPrinter = createDeploymentLogPrinter({ label: `function:${func.name}`, showPrefix: functions.length > 1, @@ -1567,6 +1615,7 @@ export class Push { localConfig.getEndpoint() || globalConfig.getEndpoint(), event: `functions.${func["$id"]}.deployments.${deploymentId}.update`, onDeploymentUpdate: (deployment) => { + deploymentTimeoutTracker.touch(deployment); deploymentLogPrinter.ingest(deployment); }, onClose: () => { @@ -1602,10 +1651,8 @@ export class Push { ), }); - let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS; - while (true) { - if (Date.now() > timeoutDeadline) { + if (deploymentTimeoutTracker.hasTimedOut()) { deploymentLogPrinter.complete(); failedDeployments.push({ name: func["name"], @@ -1630,6 +1677,7 @@ export class Push { functionId: func["$id"], deploymentId: deploymentId, }); + deploymentTimeoutTracker.touch(response); deploymentLogPrinter.ingest(response); const status = response["status"]; @@ -1840,7 +1888,6 @@ export class Push { siteId: site["$id"], name: site.name, framework: site.framework, - enabled: site.enabled, logging: site.logging, timeout: site.timeout, installCommand: site.installCommand, @@ -1876,7 +1923,6 @@ export class Push { siteId: site.$id, name: site.name, framework: site.framework, - enabled: site.enabled, logging: site.logging, timeout: site.timeout, installCommand: site.installCommand, @@ -2064,6 +2110,8 @@ export class Push { let waitingSince: number | null = null; let readyWithoutScreenshotsSince: number | null = null; let activationApplied = false; + const deploymentTimeoutTracker = + createDeploymentTimeoutTracker(response); const deploymentLogPrinter = createDeploymentLogPrinter({ label: `site:${site.name}`, showPrefix: sites.length > 1, @@ -2076,6 +2124,7 @@ export class Push { localConfig.getEndpoint() || globalConfig.getEndpoint(), event: `sites.${site["$id"]}.deployments.${deploymentId}.update`, onDeploymentUpdate: (deployment) => { + deploymentTimeoutTracker.touch(deployment); deploymentLogPrinter.ingest(deployment); }, onClose: () => { @@ -2111,10 +2160,8 @@ export class Push { ), }); - let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS; - while (true) { - if (Date.now() > timeoutDeadline) { + if (deploymentTimeoutTracker.hasTimedOut()) { deploymentLogPrinter.complete(); failedDeployments.push({ name: site["name"], @@ -2139,6 +2186,7 @@ export class Push { siteId: site["$id"], deploymentId: deploymentId, }); + deploymentTimeoutTracker.touch(response); deploymentLogPrinter.ingest(response); const status = response["status"]; @@ -2176,11 +2224,6 @@ export class Push { if (!screenshotsReady) { readyWithoutScreenshotsSince ??= Date.now(); - timeoutDeadline = Math.max( - timeoutDeadline, - readyWithoutScreenshotsSince + - SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS, - ); if ( Date.now() - readyWithoutScreenshotsSince < diff --git a/lib/commands/services/account.ts b/lib/commands/services/account.ts index 0478d8ab..3f601863 100644 --- a/lib/commands/services/account.ts +++ b/lib/commands/services/account.ts @@ -38,7 +38,7 @@ const accountGetCommand = account const accountCreateCommand = account .command(`create`) - .description(`Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).`) + .description(`Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the /account/verfication (https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new account session (https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `New user password. Must be between 8 and 256 chars.`) @@ -79,7 +79,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, const accountListIdentitiesCommand = account .command(`list-identities`) .description(`Get the list of identities for the currently logged in user.`) - .option(`--queries [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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`) + .option(`--queries [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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -140,7 +140,7 @@ const accountCreateKeyCommand = account .description(`Create a new account API key.`) .requiredOption(`--name `, `Key name. Max length: 128 chars.`) .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`) - .option(`--expire `, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) + .option(`--expire `, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) .action( actionRunner( async ({ name, scopes, expire }) => @@ -167,7 +167,7 @@ const accountUpdateKeyCommand = account .requiredOption(`--key-id `, `Key unique ID.`) .requiredOption(`--name `, `Key name. Max length: 128 chars.`) .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`) - .option(`--expire `, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) + .option(`--expire `, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) .action( actionRunner( async ({ keyId, name, scopes, expire }) => @@ -191,7 +191,7 @@ const accountDeleteKeyCommand = account const accountListLogsCommand = account .command(`list-logs`) .description(`Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.`) - .option(`--queries [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...]`, `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( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -220,7 +220,7 @@ const accountUpdateMFACommand = account const accountCreateMfaAuthenticatorCommand = account .command(`create-mfa-authenticator`) - .description(`Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.`) + .description(`Add an authenticator app to be used as an MFA factor. Verify the authenticator using the verify authenticator method.`) .requiredOption(`--type `, `Type of authenticator. Must be \`totp\``) .action( actionRunner( @@ -232,7 +232,7 @@ const accountCreateMfaAuthenticatorCommand = account const accountUpdateMfaAuthenticatorCommand = account .command(`update-mfa-authenticator`) - .description(`Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.`) + .description(`Verify an authenticator app after adding it using the add authenticator method.`) .requiredOption(`--type `, `Type of authenticator.`) .requiredOption(`--otp `, `Valid verification token.`) .action( @@ -257,7 +257,7 @@ const accountDeleteMfaAuthenticatorCommand = account const accountCreateMfaChallengeCommand = account .command(`create-mfa-challenge`) - .description(`Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.`) + .description(`Begin the process of MFA verification after sign-in. Finish the flow with updateMfaChallenge method.`) .requiredOption(`--factor `, `Factor used for verification. Must be one of following: \`email\`, \`phone\`, \`totp\`, \`recoveryCode\`.`) .action( actionRunner( @@ -269,7 +269,7 @@ const accountCreateMfaChallengeCommand = account const accountUpdateMfaChallengeCommand = account .command(`update-mfa-challenge`) - .description(`Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.`) + .description(`Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use createMfaChallenge method.`) .requiredOption(`--challenge-id `, `ID of the challenge.`) .requiredOption(`--otp `, `Valid verification token.`) .action( @@ -292,7 +292,7 @@ const accountListMfaFactorsCommand = account const accountGetMfaRecoveryCodesCommand = account .command(`get-mfa-recovery-codes`) - .description(`Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.`) + .description(`Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using createMfaRecoveryCodes method. An OTP challenge is required to read recovery codes.`) .action( actionRunner( async () => parse(await (await getAccountClient()).getMfaRecoveryCodes()), @@ -302,7 +302,7 @@ const accountGetMfaRecoveryCodesCommand = account const accountCreateMfaRecoveryCodesCommand = account .command(`create-mfa-recovery-codes`) - .description(`Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.`) + .description(`Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in createMfaChallenge method.`) .action( actionRunner( async () => parse(await (await getAccountClient()).createMfaRecoveryCodes()), @@ -312,7 +312,7 @@ const accountCreateMfaRecoveryCodesCommand = account const accountUpdateMfaRecoveryCodesCommand = account .command(`update-mfa-recovery-codes`) - .description(`Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.`) + .description(`Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using createMfaRecoveryCodes method. An OTP challenge is required to regenreate recovery codes.`) .action( actionRunner( async () => parse(await (await getAccountClient()).updateMfaRecoveryCodes()), @@ -347,7 +347,7 @@ const accountUpdatePasswordCommand = account const accountUpdatePhoneCommand = account .command(`update-phone`) - .description(`Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.`) + .description(`Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the POST /account/verification/phone (https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.`) .requiredOption(`--phone `, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`) .requiredOption(`--password `, `User password. Must be at least 8 chars.`) .action( @@ -382,9 +382,9 @@ const accountUpdatePrefsCommand = account const accountCreateRecoveryCommand = account .command(`create-recovery`) - .description(`Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.`) + .description(`Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the PUT /account/recovery (https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.`) .requiredOption(`--email `, `User email.`) - .requiredOption(`--url `, `URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .requiredOption(`--url `, `URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) .action( actionRunner( async ({ email, url }) => @@ -395,9 +395,9 @@ const accountCreateRecoveryCommand = account const accountUpdateRecoveryCommand = account .command(`update-recovery`) - .description(`Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. + .description(`Use this endpoint to complete the user account password reset. Both the userId and secret arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the POST /account/recovery (https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. -Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.`) +Please note that in order to avoid a Redirect Attack (https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--secret `, `Valid reset token.`) .requiredOption(`--password `, `New user password. Must be between 8 and 256 chars.`) @@ -431,7 +431,7 @@ const accountDeleteSessionsCommand = account const accountCreateAnonymousSessionCommand = account .command(`create-anonymous-session`) - .description(`Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).`) + .description(`Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its email and password (https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an OAuth2 session (https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).`) .action( actionRunner( async () => parse(await (await getAccountClient()).createAnonymousSession()), @@ -443,7 +443,7 @@ const accountCreateEmailPasswordSessionCommand = account .command(`create-email-password-session`) .description(`Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. -A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`) +A user is limited to 10 active sessions at a time by default. Learn more about session limits (https://appwrite.io/docs/authentication-security#limits).`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `User password. Must be at least 8 chars.`) .action( @@ -456,7 +456,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about const accountUpdateMagicURLSessionCommand = account .command(`update-magic-url-session`) - .description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) + .description(`Use this endpoint to create a session from token. Provide the userId and secret parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--secret `, `Valid verification token.`) .action( @@ -473,11 +473,11 @@ const accountCreateOAuth2SessionCommand = account If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. -A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). +A user is limited to 10 active sessions at a time by default. Learn more about session limits (https://appwrite.io/docs/authentication-security#limits). `) .requiredOption(`--provider `, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.`) - .option(`--success `, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) - .option(`--failure `, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .option(`--success `, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .option(`--failure `, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) .option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`) .action( actionRunner( @@ -491,7 +491,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about const accountUpdatePhoneSessionCommand = account .command(`update-phone-session`) - .description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) + .description(`Use this endpoint to create a session from token. Provide the userId and secret parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--secret `, `Valid verification token.`) .action( @@ -504,7 +504,7 @@ const accountUpdatePhoneSessionCommand = account const accountCreateSessionCommand = account .command(`create-session`) - .description(`Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) + .description(`Use this endpoint to create a session from token. Provide the userId and secret parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--secret `, `Secret of a token generated by login methods. For example, the \`createMagicURLToken\` or \`createPhoneToken\` methods.`) .action( @@ -541,7 +541,7 @@ const accountUpdateSessionCommand = account const accountDeleteSessionCommand = account .command(`delete-session`) - .description(`Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.`) + .description(`Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use Delete Sessions (https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.`) .requiredOption(`--session-id `, `Session ID. Use the string 'current' to delete the current device session.`) .action( actionRunner( @@ -602,9 +602,9 @@ const accountDeletePushTargetCommand = account const accountCreateEmailTokenCommand = account .command(`create-email-token`) - .description(`Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided \`userId\`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. + .description(`Sends the user an email with a secret key for creating a session. If the email address has never been used, a new account is created using the provided \`userId\`. Otherwise, if the email address is already attached to an account, the user ID is ignored. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the POST /v1/account/sessions/token (https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. -A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). +A user is limited to 10 active sessions at a time by default. Learn more about session limits (https://appwrite.io/docs/authentication-security#limits). `) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.`) .requiredOption(`--email `, `User email.`) @@ -624,13 +624,13 @@ A user is limited to 10 active sessions at a time by default. [Learn more about const accountCreateMagicURLTokenCommand = account .command(`create-magic-url-token`) - .description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. + .description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the POST /v1/account/sessions/token (https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. -A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). +A user is limited to 10 active sessions at a time by default. Learn more about session limits (https://appwrite.io/docs/authentication-security#limits). `) .requiredOption(`--user-id `, `Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.`) .requiredOption(`--email `, `User email.`) - .option(`--url `, `URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .option(`--url `, `URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) .option( `--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, @@ -649,12 +649,12 @@ const accountCreateOAuth2TokenCommand = account .command(`create-o-auth-2-token`) .description(`Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. -If authentication succeeds, \`userId\` and \`secret\` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. +If authentication succeeds, \`userId\` and \`secret\` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the Create session (https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint. -A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`) +A user is limited to 10 active sessions at a time by default. Learn more about session limits (https://appwrite.io/docs/authentication-security#limits).`) .requiredOption(`--provider `, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.`) - .option(`--success `, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) - .option(`--failure `, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .option(`--success `, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .option(`--failure `, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) .option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`) .action( actionRunner( @@ -668,9 +668,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about const accountCreatePhoneTokenCommand = account .command(`create-phone-token`) - .description(`Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. + .description(`Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the POST /v1/account/sessions/token (https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. -A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`) +A user is limited to 10 active sessions at a time by default. Learn more about session limits (https://appwrite.io/docs/authentication-security#limits).`) .requiredOption(`--user-id `, `Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.`) .requiredOption(`--phone `, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`) .action( @@ -683,11 +683,11 @@ A user is limited to 10 active sessions at a time by default. [Learn more about const accountCreateEmailVerificationCommand = account .command(`create-email-verification`) - .description(`Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. + .description(`Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the userId and secret arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the userId and secret parameters. Learn more about how to complete the verification process (https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. -Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. +Please note that in order to avoid a Redirect Attack (https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. `) - .requiredOption(`--url `, `URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .requiredOption(`--url `, `URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) .action( actionRunner( async ({ url }) => @@ -698,11 +698,11 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ const accountCreateVerificationCommand = account .command(`create-verification`) - .description(`Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. + .description(`Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the userId and secret arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the userId and secret parameters. Learn more about how to complete the verification process (https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. -Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. +Please note that in order to avoid a Redirect Attack (https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. `) - .requiredOption(`--url `, `URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .requiredOption(`--url `, `URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) .action( actionRunner( async ({ url }) => @@ -713,7 +713,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ const accountUpdateEmailVerificationCommand = account .command(`update-email-verification`) - .description(`Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.`) + .description(`Use this endpoint to complete the user email verification process. Use both the userId and secret parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--secret `, `Valid verification token.`) .action( @@ -726,7 +726,7 @@ const accountUpdateEmailVerificationCommand = account const accountUpdateVerificationCommand = account .command(`update-verification`) - .description(`Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.`) + .description(`Use this endpoint to complete the user email verification process. Use both the userId and secret parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--secret `, `Valid verification token.`) .action( @@ -739,7 +739,7 @@ const accountUpdateVerificationCommand = account const accountCreatePhoneVerificationCommand = account .command(`create-phone-verification`) - .description(`Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.`) + .description(`Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the accountUpdatePhone (https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to complete the verification process (https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.`) .action( actionRunner( async () => parse(await (await getAccountClient()).createPhoneVerification()), @@ -749,7 +749,7 @@ const accountCreatePhoneVerificationCommand = account const accountUpdatePhoneVerificationCommand = account .command(`update-phone-verification`) - .description(`Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.`) + .description(`Use this endpoint to complete the user phone verification process. Use the userId and secret that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--secret `, `Valid verification token.`) .action( diff --git a/lib/commands/services/activities.ts b/lib/commands/services/activities.ts index aeffcd49..edad1b4b 100644 --- a/lib/commands/services/activities.ts +++ b/lib/commands/services/activities.ts @@ -29,7 +29,7 @@ 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 `, `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.`) .action( actionRunner( async ({ queries }) => diff --git a/lib/commands/services/backups.ts b/lib/commands/services/backups.ts index 4f9fb7ec..abec1835 100644 --- a/lib/commands/services/backups.ts +++ b/lib/commands/services/backups.ts @@ -29,7 +29,7 @@ export const backups = new Command("backups") const backupsListArchivesCommand = backups .command(`list-archives`) .description(`List all archives for a project.`) - .option(`--queries [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(`--queries [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.`) .action( actionRunner( async ({ queries }) => @@ -78,7 +78,7 @@ const backupsDeleteArchiveCommand = backups const backupsListPoliciesCommand = backups .command(`list-policies`) .description(`List all policies for a project.`) - .option(`--queries [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(`--queries [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.`) .action( actionRunner( async ({ queries }) => @@ -173,7 +173,7 @@ const backupsCreateRestorationCommand = backups const backupsListRestorationsCommand = backups .command(`list-restorations`) .description(`List all backup restorations for a project.`) - .option(`--queries [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(`--queries [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.`) .action( actionRunner( async ({ queries }) => diff --git a/lib/commands/services/databases.ts b/lib/commands/services/databases.ts index 2387801b..d49df1cc 100644 --- a/lib/commands/services/databases.ts +++ b/lib/commands/services/databases.ts @@ -29,7 +29,7 @@ export const databases = new Command("databases") const databasesListCommand = databases .command(`list`) .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`) - .option(`--queries [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`) + .option(`--queries [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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -68,7 +68,7 @@ const databasesCreateCommand = databases const databasesListTransactionsCommand = databases .command(`list-transactions`) .description(`List transactions across all databases.`) - .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).`) + .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries).`) .action( actionRunner( async ({ queries }) => @@ -209,7 +209,7 @@ const databasesListCollectionsCommand = databases .command(`list-collections`) .description(`Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) - .option(`--queries [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, enabled, documentSecurity`) + .option(`--queries [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, enabled, documentSecurity`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -227,14 +227,14 @@ const databasesListCollectionsCommand = databases const databasesCreateCollectionCommand = databases .command(`create-collection`) - .description(`Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) + .description(`Create a new Collection. Before using this route, you should create a new database resource using either a server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--name `, `Collection name. Max length: 128 chars.`) - .option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option( `--document-security [value]`, - `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).`, + `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. Learn more about permissions (https://appwrite.io/docs/permissions).`, (value: string | undefined) => value === undefined ? true : parseBool(value), ) @@ -273,10 +273,10 @@ const databasesUpdateCollectionCommand = databases .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .option(`--name `, `Collection name. Max length: 128 chars.`) - .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option( `--document-security [value]`, - `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).`, + `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. Learn more about permissions (https://appwrite.io/docs/permissions).`, (value: string | undefined) => value === undefined ? true : parseBool(value), ) @@ -318,7 +318,7 @@ const databasesListAttributesCommand = databases .description(`List attributes in the collection.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) - .option(`--queries [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: key, type, size, required, array, status, error`) + .option(`--queries [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: key, type, size, required, array, status, error`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -338,7 +338,7 @@ const databasesCreateBooleanAttributeCommand = databases .description(`Create a boolean attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option( @@ -365,7 +365,7 @@ const databasesUpdateBooleanAttributeCommand = databases .command(`update-boolean-attribute`) .description(`Update a boolean attribute. Changing the \`default\` value will not update already existing documents.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#createCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .requiredOption(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseBool) @@ -382,10 +382,10 @@ const databasesCreateDatetimeAttributeCommand = databases .command(`create-datetime-attribute`) .description(`Create a date time attribute according to the ISO 8601 standard.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#createCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) - .option(`--xdefault `, `Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.`) + .option(`--xdefault `, `Default value for the attribute in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.`) .option( `--array [value]`, `Is attribute an array?`, @@ -636,7 +636,7 @@ const databasesCreateLineAttributeCommand = databases .command(`create-line-attribute`) .description(`Create a geometric line attribute.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.`) @@ -652,7 +652,7 @@ const databasesUpdateLineAttributeCommand = databases .command(`update-line-attribute`) .description(`Update a line attribute. Changing the \`default\` value will not update already existing documents.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#createCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.`) @@ -670,7 +670,7 @@ const databasesCreateLongtextAttributeCommand = databases .description(`Create a longtext attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -699,7 +699,7 @@ const databasesUpdateLongtextAttributeCommand = databases .description(`Update a longtext attribute. Changing the \`default\` value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .requiredOption(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -717,7 +717,7 @@ const databasesCreateMediumtextAttributeCommand = databases .description(`Create a mediumtext attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -746,7 +746,7 @@ const databasesUpdateMediumtextAttributeCommand = databases .description(`Update a mediumtext attribute. Changing the \`default\` value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .requiredOption(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -763,7 +763,7 @@ const databasesCreatePointAttributeCommand = databases .command(`create-point-attribute`) .description(`Create a geometric point attribute.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.`) @@ -779,7 +779,7 @@ const databasesUpdatePointAttributeCommand = databases .command(`update-point-attribute`) .description(`Update a point attribute. Changing the \`default\` value will not update already existing documents.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#createCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.`) @@ -796,7 +796,7 @@ const databasesCreatePolygonAttributeCommand = databases .command(`create-polygon-attribute`) .description(`Create a geometric polygon attribute.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.`) @@ -812,7 +812,7 @@ const databasesUpdatePolygonAttributeCommand = databases .command(`update-polygon-attribute`) .description(`Update a polygon attribute. Changing the \`default\` value will not update already existing documents.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#createCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.`) @@ -827,7 +827,7 @@ const databasesUpdatePolygonAttributeCommand = databases const databasesCreateRelationshipAttributeCommand = databases .command(`create-relationship-attribute`) - .description(`Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). + .description(`Create relationship attribute. Learn more about relationship attributes (https://appwrite.io/docs/databases-relationships#relationship-attributes). `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) @@ -852,7 +852,7 @@ const databasesCreateRelationshipAttributeCommand = databases const databasesUpdateRelationshipAttributeCommand = databases .command(`update-relationship-attribute`) - .description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). + .description(`Update relationship attribute. Learn more about relationship attributes (https://appwrite.io/docs/databases-relationships#relationship-attributes). `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) @@ -872,7 +872,7 @@ const databasesCreateStringAttributeCommand = databases .description(`Create a string attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--size `, `Attribute size for text attributes, in number of characters.`, parseInteger) .requiredOption(`--required `, `Is attribute required?`, parseBool) @@ -902,7 +902,7 @@ const databasesUpdateStringAttributeCommand = databases .description(`Update a string attribute. Changing the \`default\` value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .requiredOption(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -921,7 +921,7 @@ const databasesCreateTextAttributeCommand = databases .description(`Create a text attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .option(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -950,7 +950,7 @@ const databasesUpdateTextAttributeCommand = databases .description(`Update a text attribute. Changing the \`default\` value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .requiredOption(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -1009,7 +1009,7 @@ const databasesCreateVarcharAttributeCommand = databases .description(`Create a varchar attribute. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--size `, `Attribute size for varchar attributes, in number of characters. Maximum size is 16381.`, parseInteger) .requiredOption(`--required `, `Is attribute required?`, parseBool) @@ -1039,7 +1039,7 @@ const databasesUpdateVarcharAttributeCommand = databases .description(`Update a varchar attribute. Changing the \`default\` value will not update already existing documents. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Attribute Key.`) .requiredOption(`--required `, `Is attribute required?`, parseBool) .requiredOption(`--xdefault `, `Default value for attribute when not provided. Cannot be set when attribute is required.`) @@ -1085,8 +1085,8 @@ const databasesListDocumentsCommand = databases .command(`list-documents`) .description(`Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) - .option(`--queries [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.`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .option(`--queries [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(`--transaction-id `, `Transaction ID to read uncommitted changes within the transaction.`) .option( `--total [value]`, @@ -1105,12 +1105,12 @@ const databasesListDocumentsCommand = databases const databasesCreateDocumentCommand = databases .command(`create-document`) - .description(`Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) + .description(`Create a new Document. Before using this route, you should create a new collection resource using either a server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`) .requiredOption(`--document-id `, `Document ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--data `, `Document data as JSON object.`) - .option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1122,9 +1122,9 @@ const databasesCreateDocumentCommand = databases const databasesCreateDocumentsCommand = databases .command(`create-documents`) - .description(`Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) + .description(`Create new Documents. Before using this route, you should create a new collection resource using either a server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`) .requiredOption(`--documents [documents...]`, `Array of documents data as JSON objects.`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( @@ -1137,7 +1137,7 @@ const databasesCreateDocumentsCommand = databases const databasesUpsertDocumentsCommand = databases .command(`upsert-documents`) - .description(`Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + .description(`Create or update Documents. Before using this route, you should create a new collection resource using either a server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) @@ -1157,7 +1157,7 @@ const databasesUpdateDocumentsCommand = databases .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .option(`--data `, `Document data as JSON object. Include only attribute and value pairs to be updated.`) - .option(`--queries [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(`--queries [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(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1171,8 +1171,8 @@ const databasesDeleteDocumentsCommand = databases .command(`delete-documents`) .description(`Bulk delete documents using queries, if no queries are passed then all documents are deleted.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) - .option(`--queries [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.`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .option(`--queries [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(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1186,9 +1186,9 @@ const databasesGetDocumentCommand = databases .command(`get-document`) .description(`Get a document by its unique ID. This endpoint response returns a JSON object with the document data.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--document-id `, `Document ID.`) - .option(`--queries [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(`--queries [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(`--transaction-id `, `Transaction ID to read uncommitted changes within the transaction.`) .action( actionRunner( @@ -1200,12 +1200,12 @@ const databasesGetDocumentCommand = databases const databasesUpsertDocumentCommand = databases .command(`upsert-document`) - .description(`Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) + .description(`Create or update a Document. Before using this route, you should create a new collection resource using either a server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--document-id `, `Document ID.`) .option(`--data `, `Document data as JSON object. Include all required attributes of the document to be created or updated.`) - .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1222,7 +1222,7 @@ const databasesUpdateDocumentCommand = databases .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--document-id `, `Document ID.`) .option(`--data `, `Document data as JSON object. Include only attribute and value pairs to be updated.`) - .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1236,7 +1236,7 @@ const databasesDeleteDocumentCommand = databases .command(`delete-document`) .description(`Delete a document by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--document-id `, `Document ID.`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( @@ -1253,7 +1253,7 @@ const databasesListDocumentLogsCommand = databases .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) .requiredOption(`--document-id `, `Document ID.`) - .option(`--queries [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...]`, `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`) .action( actionRunner( async ({ databaseId, collectionId, documentId, queries }) => @@ -1302,8 +1302,8 @@ const databasesListIndexesCommand = databases .command(`list-indexes`) .description(`List indexes in the collection.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) - .option(`--queries [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: key, type, status, attributes, error`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .option(`--queries [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: key, type, status, attributes, error`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -1323,7 +1323,7 @@ const databasesCreateIndexCommand = databases .description(`Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be \`key\`, \`fulltext\`, and \`unique\`.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Index Key.`) .requiredOption(`--type `, `Index type.`) .requiredOption(`--attributes [attributes...]`, `Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.`) @@ -1341,7 +1341,7 @@ const databasesGetIndexCommand = databases .command(`get-index`) .description(`Get an index by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Index Key.`) .action( actionRunner( @@ -1355,7 +1355,7 @@ const databasesDeleteIndexCommand = databases .command(`delete-index`) .description(`Delete an index.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`) + .requiredOption(`--collection-id `, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`) .requiredOption(`--key `, `Index Key.`) .action( actionRunner( @@ -1370,7 +1370,7 @@ const databasesListCollectionLogsCommand = databases .description(`Get the collection activity logs list by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--collection-id `, `Collection ID.`) - .option(`--queries [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...]`, `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`) .action( actionRunner( async ({ databaseId, collectionId, queries }) => @@ -1397,7 +1397,7 @@ const databasesListLogsCommand = databases .command(`list-logs`) .description(`Get the database activity logs list by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) - .option(`--queries [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...]`, `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`) .action( actionRunner( async ({ databaseId, queries }) => diff --git a/lib/commands/services/functions.ts b/lib/commands/services/functions.ts index 3477c5db..00f8595a 100644 --- a/lib/commands/services/functions.ts +++ b/lib/commands/services/functions.ts @@ -31,7 +31,7 @@ export const functions = new Command("functions") const functionsListCommand = functions .command(`list`) .description(`Get a list of all the project's functions. You can use the query params to filter your results.`) - .option(`--queries [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, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId`) + .option(`--queries [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, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -49,11 +49,11 @@ const functionsListCommand = functions const functionsCreateCommand = functions .command(`create`) - .description(`Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.`) + .description(`Create a new function. You can pass a list of permissions (https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.`) .requiredOption(`--function-id `, `Function ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--name `, `Function name. Max length: 128 chars.`) .requiredOption(`--runtime `, `Execution runtime.`) - .option(`--execute [execute...]`, `An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`) + .option(`--execute [execute...]`, `An array of role strings with execution permissions. By default no user is granted with any execute permissions. learn more about roles (https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`) .option(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`) .option(`--schedule `, `Schedule CRON syntax.`) .option(`--timeout `, `Function maximum execution time in seconds.`, parseInteger) @@ -115,7 +115,7 @@ const functionsListSpecificationsCommand = functions const functionsListTemplatesCommand = functions .command(`list-templates`) - .description(`List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.`) + .description(`List available function templates. You can use template details in createFunction method.`) .option(`--runtimes [runtimes...]`, `List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.`) .option(`--use-cases [use-cases...]`, `List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.`) .option(`--limit `, `Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.`, parseInteger) @@ -136,7 +136,7 @@ const functionsListTemplatesCommand = functions const functionsGetTemplateCommand = functions .command(`get-template`) - .description(`Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.`) + .description(`Get a function template using ID. You can use template details in createFunction method.`) .requiredOption(`--template-id `, `Template ID.`) .action( actionRunner( @@ -176,7 +176,7 @@ const functionsUpdateCommand = functions .requiredOption(`--function-id `, `Function ID.`) .requiredOption(`--name `, `Function name. Max length: 128 chars.`) .option(`--runtime `, `Execution runtime.`) - .option(`--execute [execute...]`, `An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`) + .option(`--execute [execute...]`, `An array of role strings with execution permissions. By default no user is granted with any execute permissions. learn more about roles (https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`) .option(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`) .option(`--schedule `, `Schedule CRON syntax.`) .option(`--timeout `, `Maximum execution time in seconds.`, parseInteger) @@ -245,7 +245,7 @@ const functionsListDeploymentsCommand = functions .command(`list-deployments`) .description(`Get a list of all the function's code deployments. You can use the query params to filter your results.`) .requiredOption(`--function-id `, `Function ID.`) - .option(`--queries [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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`) + .option(`--queries [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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -265,7 +265,7 @@ const functionsCreateDeploymentCommand = functions .command(`create-deployment`) .description(`Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. -This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). +This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the Appwrite Cloud Functions tutorial (https://appwrite.io/docs/functions). Use the "command" param to set the entrypoint used to execute your code.`) .requiredOption(`--function-id `, `Function ID.`) @@ -299,7 +299,7 @@ const functionsCreateTemplateDeploymentCommand = functions .command(`create-template-deployment`) .description(`Create a deployment based on a template. -Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/functions/templates) to find the template details.`) +Use this endpoint with combination of listTemplates (https://appwrite.io/docs/products/functions/templates) to find the template details.`) .requiredOption(`--function-id `, `Function ID.`) .requiredOption(`--repository `, `Repository name of the template.`) .requiredOption(`--owner `, `The name of the owner of the template.`) @@ -405,7 +405,7 @@ const functionsListExecutionsCommand = functions .command(`list-executions`) .description(`Get a list of all the current user function execution logs. You can use the query params to filter your results.`) .requiredOption(`--function-id `, `Function ID.`) - .option(`--queries [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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`) + .option(`--queries [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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -434,7 +434,7 @@ const functionsCreateExecutionCommand = functions .option(`--path `, `HTTP path of execution. Path can include query params. Default value is /`) .option(`--method `, `HTTP method of execution. Default value is POST.`) .option(`--headers `, `HTTP headers of execution. Defaults to empty.`) - .option(`--scheduled-at `, `Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.`) + .option(`--scheduled-at `, `Scheduled execution time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.`) .action( actionRunner( async ({ functionId, body, async, path, method, headers, scheduledAt }) => diff --git a/lib/commands/services/health.ts b/lib/commands/services/health.ts index df988ef9..be71c3b2 100644 --- a/lib/commands/services/health.ts +++ b/lib/commands/services/health.ts @@ -115,7 +115,7 @@ const healthGetQueueBuildsCommand = health const healthGetQueueCertificatesCommand = health .command(`get-queue-certificates`) - .description(`Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.`) + .description(`Get the number of certificates that are waiting to be issued against Letsencrypt (https://letsencrypt.org/) in the Appwrite internal queue server.`) .option(`--threshold `, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger) .action( actionRunner( @@ -282,7 +282,7 @@ const healthGetStorageLocalCommand = health const healthGetTimeCommand = health .command(`get-time`) - .description(`Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.`) + .description(`Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The Network Time Protocol (https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.`) .action( actionRunner( async () => parse(await (await getHealthClient()).getTime()), diff --git a/lib/commands/services/locale.ts b/lib/commands/services/locale.ts index 6715abbb..598d853e 100644 --- a/lib/commands/services/locale.ts +++ b/lib/commands/services/locale.ts @@ -30,7 +30,7 @@ const localeGetCommand = locale .command(`get`) .description(`Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. -([IP Geolocation by DB-IP](https://db-ip.com))`) +(IP Geolocation by DB-IP (https://db-ip.com))`) .action( actionRunner( async () => parse(await (await getLocaleClient()).get()), @@ -40,7 +40,7 @@ const localeGetCommand = locale const localeListCodesCommand = locale .command(`list-codes`) - .description(`List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).`) + .description(`List of all locale codes in ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).`) .action( actionRunner( async () => parse(await (await getLocaleClient()).listCodes()), diff --git a/lib/commands/services/messaging.ts b/lib/commands/services/messaging.ts index d3b8f740..71a47973 100644 --- a/lib/commands/services/messaging.ts +++ b/lib/commands/services/messaging.ts @@ -29,7 +29,7 @@ export const messaging = new Command("messaging") const messagingListMessagesCommand = messaging .command(`list-messages`) .description(`Get a list of all messages from the current Appwrite project.`) - .option(`--queries [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: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType`) + .option(`--queries [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: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -69,7 +69,7 @@ const messagingCreateEmailCommand = messaging (value: string | undefined) => value === undefined ? true : parseBool(value), ) - .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .option(`--scheduled-at `, `Scheduled delivery time for message in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .action( actionRunner( async ({ messageId, subject, content, topics, users, targets, cc, bcc, attachments, draft, html, scheduledAt }) => @@ -102,7 +102,7 @@ const messagingUpdateEmailCommand = messaging ) .option(`--cc [cc...]`, `Array of target IDs to be added as CC.`) .option(`--bcc [bcc...]`, `Array of target IDs to be added as BCC.`) - .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .option(`--scheduled-at `, `Scheduled delivery time for message in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .option(`--attachments [attachments...]`, `Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.`) .action( actionRunner( @@ -135,7 +135,7 @@ const messagingCreatePushCommand = messaging (value: string | undefined) => value === undefined ? true : parseBool(value), ) - .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .option(`--scheduled-at `, `Scheduled delivery time for message in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .option( `--content-available [value]`, `If set to true, the notification will be delivered in the background. Available only for iOS Platform.`, @@ -181,7 +181,7 @@ const messagingUpdatePushCommand = messaging (value: string | undefined) => value === undefined ? true : parseBool(value), ) - .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .option(`--scheduled-at `, `Scheduled delivery time for message in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .option( `--content-available [value]`, `If set to true, the notification will be delivered in the background. Available only for iOS Platform.`, @@ -217,7 +217,7 @@ const messagingCreateSmsCommand = messaging (value: string | undefined) => value === undefined ? true : parseBool(value), ) - .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .option(`--scheduled-at `, `Scheduled delivery time for message in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .action( actionRunner( async ({ messageId, content, topics, users, targets, draft, scheduledAt }) => @@ -241,7 +241,7 @@ const messagingUpdateSmsCommand = messaging (value: string | undefined) => value === undefined ? true : parseBool(value), ) - .option(`--scheduled-at `, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .option(`--scheduled-at `, `Scheduled delivery time for message in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) .action( actionRunner( async ({ messageId, topics, users, targets, content, draft, scheduledAt }) => @@ -279,7 +279,7 @@ const messagingListMessageLogsCommand = messaging .command(`list-message-logs`) .description(`Get the message activity logs listed by its unique ID.`) .requiredOption(`--message-id `, `Message ID.`) - .option(`--queries [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...]`, `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( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -298,7 +298,7 @@ const messagingListTargetsCommand = messaging .command(`list-targets`) .description(`Get a list of the targets associated with a message.`) .requiredOption(`--message-id `, `Message ID.`) - .option(`--queries [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: userId, providerId, identifier, providerType`) + .option(`--queries [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: userId, providerId, identifier, providerType`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -316,7 +316,7 @@ const messagingListTargetsCommand = messaging const messagingListProvidersCommand = messaging .command(`list-providers`) .description(`Get a list of all providers from the current Appwrite project.`) - .option(`--queries [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, provider, type, enabled`) + .option(`--queries [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, provider, type, enabled`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -907,7 +907,7 @@ const messagingListProviderLogsCommand = messaging .command(`list-provider-logs`) .description(`Get the provider activity logs listed by its unique ID.`) .requiredOption(`--provider-id `, `Provider ID.`) - .option(`--queries [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...]`, `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( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -926,7 +926,7 @@ const messagingListSubscriberLogsCommand = messaging .command(`list-subscriber-logs`) .description(`Get the subscriber activity logs listed by its unique ID.`) .requiredOption(`--subscriber-id `, `Subscriber ID.`) - .option(`--queries [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...]`, `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( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -944,7 +944,7 @@ const messagingListSubscriberLogsCommand = messaging const messagingListTopicsCommand = messaging .command(`list-topics`) .description(`Get a list of all topics from the current Appwrite project.`) - .option(`--queries [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, description, emailTotal, smsTotal, pushTotal`) + .option(`--queries [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, description, emailTotal, smsTotal, pushTotal`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -965,7 +965,7 @@ const messagingCreateTopicCommand = messaging .description(`Create a new topic.`) .requiredOption(`--topic-id `, `Topic ID. Choose a custom Topic ID or a new Topic ID.`) .requiredOption(`--name `, `Topic Name.`) - .option(`--subscribe [subscribe...]`, `An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`) + .option(`--subscribe [subscribe...]`, `An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. learn more about roles (https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`) .action( actionRunner( async ({ topicId, name, subscribe }) => @@ -993,7 +993,7 @@ const messagingUpdateTopicCommand = messaging `) .requiredOption(`--topic-id `, `Topic ID.`) .option(`--name `, `Topic Name.`) - .option(`--subscribe [subscribe...]`, `An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`) + .option(`--subscribe [subscribe...]`, `An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. learn more about roles (https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`) .action( actionRunner( async ({ topicId, name, subscribe }) => @@ -1018,7 +1018,7 @@ const messagingListTopicLogsCommand = messaging .command(`list-topic-logs`) .description(`Get the topic activity logs listed by its unique ID.`) .requiredOption(`--topic-id `, `Topic ID.`) - .option(`--queries [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...]`, `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( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -1037,7 +1037,7 @@ const messagingListSubscribersCommand = messaging .command(`list-subscribers`) .description(`Get a list of all subscribers from the current Appwrite project.`) .requiredOption(`--topic-id `, `Topic ID. The topic ID subscribed to.`) - .option(`--queries [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: targetId, topicId, userId, providerType`) + .option(`--queries [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: targetId, topicId, userId, providerType`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, diff --git a/lib/commands/services/migrations.ts b/lib/commands/services/migrations.ts index ee087bba..bad5715a 100644 --- a/lib/commands/services/migrations.ts +++ b/lib/commands/services/migrations.ts @@ -29,7 +29,7 @@ export const migrations = new Command("migrations") const migrationsListCommand = migrations .command(`list`) .description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`) - .option(`--queries [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 the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors`) + .option(`--queries [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 the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -81,7 +81,7 @@ const migrationsCreateCSVExportCommand = migrations .requiredOption(`--resource-id `, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`) .requiredOption(`--filename `, `The name of the file to be created for the export, excluding the .csv extension.`) .option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the \`*\` wildcard to export all attributes from the collection.`) - .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`) + .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`) .option(`--delimiter `, `The character that separates each column value. Default is comma.`) .option(`--enclosure `, `The character that encloses each column value. Default is double quotes.`) .option(`--escape `, `The escape character for the enclosure character. Default is double quotes.`) @@ -108,7 +108,7 @@ const migrationsCreateCSVExportCommand = migrations const migrationsCreateCSVImportCommand = migrations .command(`create-csv-import`) .description(`Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.`) - .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).`) + .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).`) .requiredOption(`--file-id `, `File ID.`) .requiredOption(`--resource-id `, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.`) .option( @@ -158,7 +158,7 @@ const migrationsCreateJSONExportCommand = migrations .requiredOption(`--resource-id `, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`) .requiredOption(`--filename `, `The name of the file to be created for the export, excluding the .json extension.`) .option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the \`*\` wildcard to export all attributes from the collection.`) - .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`) + .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`) .option( `--notify [value]`, `Set to true to receive an email when the export is complete. Default is true.`, @@ -177,7 +177,7 @@ const migrationsCreateJSONImportCommand = migrations .command(`create-json-import`) .description(`Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket. `) - .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).`) + .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).`) .requiredOption(`--file-id `, `File ID.`) .requiredOption(`--resource-id `, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.`) .option( diff --git a/lib/commands/services/organizations.ts b/lib/commands/services/organizations.ts index f3a507e1..cd12ccec 100644 --- a/lib/commands/services/organizations.ts +++ b/lib/commands/services/organizations.ts @@ -29,7 +29,7 @@ export const organizations = new Command("organizations") const organizationsListCommand = organizations .command(`list`) .description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`) - .option(`--queries [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, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform`) + .option(`--queries [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, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .action( actionRunner( @@ -175,7 +175,7 @@ const organizationsListAggregationsCommand = organizations .command(`list-aggregations`) .description(`Get a list of all aggregations for an organization.`) .requiredOption(`--organization-id `, `Organization ID`) - .option(`--queries [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 the following attributes: teamId, aggregationId, from, to`) + .option(`--queries [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 the following attributes: teamId, aggregationId, from, to`) .action( actionRunner( async ({ organizationId, queries }) => @@ -244,7 +244,7 @@ const organizationsListCreditsCommand = organizations .description(`List all credits for an organization. `) .requiredOption(`--organization-id `, `Organization ID`) - .option(`--queries [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 the following attributes: teamId, couponId, credits, expiration, status`) + .option(`--queries [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 the following attributes: teamId, couponId, credits, expiration, status`) .action( actionRunner( async ({ organizationId, queries }) => @@ -425,7 +425,7 @@ const organizationsCreateKeyCommand = organizations .requiredOption(`--organization-id `, `Organization Unique ID`) .requiredOption(`--name `, `Key name. Max length: 128 chars.`) .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`) - .option(`--expire `, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) + .option(`--expire `, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) .action( actionRunner( async ({ organizationId, name, scopes, expire }) => @@ -454,7 +454,7 @@ const organizationsUpdateKeyCommand = organizations .requiredOption(`--key-id `, `Key unique ID.`) .requiredOption(`--name `, `Key name. Max length: 128 chars.`) .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`) - .option(`--expire `, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) + .option(`--expire `, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) .action( actionRunner( async ({ organizationId, keyId, name, scopes, expire }) => diff --git a/lib/commands/services/project.ts b/lib/commands/services/project.ts index 03125b31..3a9d8c0c 100644 --- a/lib/commands/services/project.ts +++ b/lib/commands/services/project.ts @@ -65,7 +65,7 @@ const projectUpdateFreeEmailsCommand = project const projectListKeysCommand = project .command(`list-keys`) .description(`Get a list of all API keys from the current project.`) - .option(`--queries [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: expire, accessedAt, name, scopes`) + .option(`--queries [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: expire, accessedAt, name, scopes`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -86,7 +86,7 @@ const projectCreateKeyCommand = project .requiredOption(`--key-id `, `Key ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--name `, `Key name. Max length: 128 chars.`) .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`) - .option(`--expire `, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) + .option(`--expire `, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) .action( actionRunner( async ({ keyId, name, scopes, expire }) => @@ -113,7 +113,7 @@ const projectUpdateKeyCommand = project .requiredOption(`--key-id `, `Key ID.`) .requiredOption(`--name `, `Key name. Max length: 128 chars.`) .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`) - .option(`--expire `, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) + .option(`--expire `, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`) .action( actionRunner( async ({ keyId, name, scopes, expire }) => @@ -149,7 +149,7 @@ const projectUpdateLabelsCommand = project const projectListPlatformsCommand = project .command(`list-platforms`) .description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.`) - .option(`--queries [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: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName`) + .option(`--queries [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: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -328,28 +328,237 @@ const projectDeletePlatformCommand = project ); -const projectUpdateProtocolStatusCommand = project - .command(`update-protocol-status`) - .description(`Update the status of a specific protocol. Use this endpoint to enable or disable a protocol in your project. `) +const projectUpdateMembershipPrivacyPolicyCommand = project + .command(`update-membership-privacy-policy`) + .description(`Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..`) + .option( + `--user-id [value]`, + `Set to true if you want make user ID visible to all team members, or false to hide it.`, + (value: string | undefined) => + value === undefined ? true : parseBool(value), + ) + .option( + `--user-email [value]`, + `Set to true if you want make user email visible to all team members, or false to hide it.`, + (value: string | undefined) => + value === undefined ? true : parseBool(value), + ) + .option( + `--user-phone [value]`, + `Set to true if you want make user phone number visible to all team members, or false to hide it.`, + (value: string | undefined) => + value === undefined ? true : parseBool(value), + ) + .option( + `--user-name [value]`, + `Set to true if you want make user name visible to all team members, or false to hide it.`, + (value: string | undefined) => + value === undefined ? true : parseBool(value), + ) + .option( + `--user-mfa [value]`, + `Set to true if you want make user MFA status visible to all team members, or false to hide it.`, + (value: string | undefined) => + value === undefined ? true : parseBool(value), + ) + .action( + actionRunner( + async ({ userId, userEmail, userPhone, userName, userMfa }) => + parse(await (await getProjectClient()).updateMembershipPrivacyPolicy(userId, userEmail, userPhone, userName, userMfa)), + ), + ); + + +const projectUpdatePasswordDictionaryPolicyCommand = project + .command(`update-password-dictionary-policy`) + .description(`Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.`) + .requiredOption(`--enabled `, `Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.`, parseBool) + .action( + actionRunner( + async ({ enabled }) => + parse(await (await getProjectClient()).updatePasswordDictionaryPolicy(enabled)), + ), + ); + + +const projectUpdatePasswordHistoryPolicyCommand = project + .command(`update-password-history-policy`) + .description(`Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery. + +Keep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.`) + .requiredOption(`--total `, `Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.`, parseInteger) + .action( + actionRunner( + async ({ total }) => + parse(await (await getProjectClient()).updatePasswordHistoryPolicy(total)), + ), + ); + + +const projectUpdatePasswordPersonalDataPolicyCommand = project + .command(`update-password-personal-data-policy`) + .description(`Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.`) + .requiredOption(`--enabled `, `Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.`, parseBool) + .action( + actionRunner( + async ({ enabled }) => + parse(await (await getProjectClient()).updatePasswordPersonalDataPolicy(enabled)), + ), + ); + + +const projectUpdateSessionAlertPolicyCommand = project + .command(`update-session-alert-policy`) + .description(`Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.`) + .requiredOption(`--enabled `, `Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.`, parseBool) + .action( + actionRunner( + async ({ enabled }) => + parse(await (await getProjectClient()).updateSessionAlertPolicy(enabled)), + ), + ); + + +const projectUpdateSessionDurationPolicyCommand = project + .command(`update-session-duration-policy`) + .description(`Update maximum duration how long sessions created within a project should stay active for.`) + .requiredOption(`--duration `, `Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.`, parseInteger) + .action( + actionRunner( + async ({ duration }) => + parse(await (await getProjectClient()).updateSessionDurationPolicy(duration)), + ), + ); + + +const projectUpdateSessionInvalidationPolicyCommand = project + .command(`update-session-invalidation-policy`) + .description(`Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.`) + .requiredOption(`--enabled `, `Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.`, parseBool) + .action( + actionRunner( + async ({ enabled }) => + parse(await (await getProjectClient()).updateSessionInvalidationPolicy(enabled)), + ), + ); + + +const projectUpdateSessionLimitPolicyCommand = project + .command(`update-session-limit-policy`) + .description(`Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.`) + .requiredOption(`--total `, `Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.`, parseInteger) + .action( + actionRunner( + async ({ total }) => + parse(await (await getProjectClient()).updateSessionLimitPolicy(total)), + ), + ); + + +const projectUpdateUserLimitPolicyCommand = project + .command(`update-user-limit-policy`) + .description(`Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.`) + .requiredOption(`--total `, `Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.`, parseInteger) + .action( + actionRunner( + async ({ total }) => + parse(await (await getProjectClient()).updateUserLimitPolicy(total)), + ), + ); + + +const projectUpdateProtocolCommand = project + .command(`update-protocol`) + .description(`Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. `) .requiredOption(`--protocol-id `, `Protocol name. Can be one of: rest, graphql, websocket`) .requiredOption(`--enabled `, `Protocol status.`, parseBool) .action( actionRunner( async ({ protocolId, enabled }) => - parse(await (await getProjectClient()).updateProtocolStatus(protocolId, enabled)), + parse(await (await getProjectClient()).updateProtocol(protocolId, enabled)), ), ); -const projectUpdateServiceStatusCommand = project - .command(`update-service-status`) - .description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `) +const projectUpdateServiceCommand = project + .command(`update-service`) + .description(`Update properties of a specific service. Use this endpoint to enable or disable a service in your project. `) .requiredOption(`--service-id `, `Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging`) .requiredOption(`--enabled `, `Service status.`, parseBool) .action( actionRunner( async ({ serviceId, enabled }) => - parse(await (await getProjectClient()).updateServiceStatus(serviceId, enabled)), + parse(await (await getProjectClient()).updateService(serviceId, enabled)), + ), + ); + + +const projectUpdateSMTPCommand = project + .command(`update-smtp`) + .description(`Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.`) + .option(`--host `, `SMTP server hostname (domain)`) + .option(`--port `, `SMTP server port`, parseInteger) + .option(`--username `, `SMTP server username. Leave empty for no authorization.`) + .option(`--password `, `SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).`) + .option(`--sender-email `, `Email address shown in inbox as the sender of the email.`) + .option(`--sender-name `, `Name shown in inbox as the sender of the email.`) + .option(`--reply-to-email `, `Email used when user replies to the email.`) + .option(`--reply-to-name `, `Name used when user replies to the email.`) + .option(`--secure `, `Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.`) + .option( + `--enabled [value]`, + `Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.`, + (value: string | undefined) => + value === undefined ? true : parseBool(value), + ) + .action( + actionRunner( + async ({ host, port, username, password, senderEmail, senderName, replyToEmail, replyToName, secure, enabled }) => + parse(await (await getProjectClient()).updateSMTP(host, port, username, password, senderEmail, senderName, replyToEmail, replyToName, secure, enabled)), + ), + ); + + +const projectCreateSMTPTestCommand = project + .command(`create-smtp-test`) + .description(`Send a test email to verify SMTP configuration. `) + .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`) + .action( + actionRunner( + async ({ emails }) => + parse(await (await getProjectClient()).createSMTPTest(emails)), + ), + ); + + +const projectUpdateEmailTemplateCommand = project + .command(`update-email-template`) + .description(`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`) + .requiredOption(`--template-id `, `Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession`) + .option(`--locale `, `Custom email template locale. If left empty, the fallback locale (en) will be used.`) + .option(`--subject `, `Subject of the email template. Can be up to 255 characters.`) + .option(`--message `, `Plain or HTML body of the email template message. Can be up to 10MB of content.`) + .option(`--sender-name `, `Name of the email sender.`) + .option(`--sender-email `, `Email of the sender.`) + .option(`--reply-to-email `, `Reply to email.`) + .option(`--reply-to-name `, `Reply to name.`) + .action( + actionRunner( + async ({ templateId, locale, subject, message, senderName, senderEmail, replyToEmail, replyToName }) => + parse(await (await getProjectClient()).updateEmailTemplate(templateId, locale, subject, message, senderName, senderEmail, replyToEmail, replyToName)), + ), + ); + + +const projectGetEmailTemplateCommand = project + .command(`get-email-template`) + .description(`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.`) + .requiredOption(`--template-id `, `Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession`) + .option(`--locale `, `Custom email template locale. If left empty, the fallback locale (en) will be used.`) + .action( + actionRunner( + async ({ templateId, locale }) => + parse(await (await getProjectClient()).getEmailTemplate(templateId, locale)), ), ); @@ -371,7 +580,7 @@ const projectGetUsageCommand = project const projectListVariablesCommand = project .command(`list-variables`) .description(`Get a list of all project environment variables.`) - .option(`--queries [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: key, resourceType, resourceId, secret`) + .option(`--queries [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: key, resourceType, resourceId, secret`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, diff --git a/lib/commands/services/projects.ts b/lib/commands/services/projects.ts index 9e9823d2..a239656f 100644 --- a/lib/commands/services/projects.ts +++ b/lib/commands/services/projects.ts @@ -29,7 +29,7 @@ export const projects = new Command("projects") const projectsListCommand = projects .command(`list`) .description(`Get a list of all projects. You can use the query params to filter your results. `) - .option(`--queries [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, teamId, labels, search`) + .option(`--queries [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, teamId, labels, search`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -116,60 +116,6 @@ const projectsDeleteCommand = projects ); -const projectsUpdateAuthDurationCommand = projects - .command(`update-auth-duration`) - .description(`Update how long sessions created within a project should stay active for.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--duration `, `Project session length in seconds. Max length: 31536000 seconds.`, parseInteger) - .action( - actionRunner( - async ({ projectId, duration }) => - parse(await (await getProjectsClient()).updateAuthDuration(projectId, duration)), - ), - ); - - -const projectsUpdateAuthLimitCommand = projects - .command(`update-auth-limit`) - .description(`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--limit `, `Set the max number of users allowed in this project. Use 0 for unlimited.`, parseInteger) - .action( - actionRunner( - async ({ projectId, limit }) => - parse(await (await getProjectsClient()).updateAuthLimit(projectId, limit)), - ), - ); - - -const projectsUpdateAuthSessionsLimitCommand = projects - .command(`update-auth-sessions-limit`) - .description(`Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--limit `, `Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`, parseInteger) - .action( - actionRunner( - async ({ projectId, limit }) => - parse(await (await getProjectsClient()).updateAuthSessionsLimit(projectId, limit)), - ), - ); - - -const projectsUpdateMembershipsPrivacyCommand = projects - .command(`update-memberships-privacy`) - .description(`Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--user-name `, `Set to true to show userName to members of a team.`, parseBool) - .requiredOption(`--user-email `, `Set to true to show email to members of a team.`, parseBool) - .requiredOption(`--mfa `, `Set to true to show mfa to members of a team.`, parseBool) - .action( - actionRunner( - async ({ projectId, userName, userEmail, mfa }) => - parse(await (await getProjectsClient()).updateMembershipsPrivacy(projectId, userName, userEmail, mfa)), - ), - ); - - const projectsUpdateMockNumbersCommand = projects .command(`update-mock-numbers`) .description(`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `) @@ -183,71 +129,6 @@ const projectsUpdateMockNumbersCommand = projects ); -const projectsUpdateAuthPasswordDictionaryCommand = projects - .command(`update-auth-password-dictionary`) - .description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--enabled `, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, parseBool) - .action( - actionRunner( - async ({ projectId, enabled }) => - parse(await (await getProjectsClient()).updateAuthPasswordDictionary(projectId, enabled)), - ), - ); - - -const projectsUpdateAuthPasswordHistoryCommand = projects - .command(`update-auth-password-history`) - .description(`Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--limit `, `Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0`, parseInteger) - .action( - actionRunner( - async ({ projectId, limit }) => - parse(await (await getProjectsClient()).updateAuthPasswordHistory(projectId, limit)), - ), - ); - - -const projectsUpdatePersonalDataCheckCommand = projects - .command(`update-personal-data-check`) - .description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--enabled `, `Set whether or not to check a password for similarity with personal data. Default is false.`, parseBool) - .action( - actionRunner( - async ({ projectId, enabled }) => - parse(await (await getProjectsClient()).updatePersonalDataCheck(projectId, enabled)), - ), - ); - - -const projectsUpdateSessionAlertsCommand = projects - .command(`update-session-alerts`) - .description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--alerts `, `Set to true to enable session emails.`, parseBool) - .action( - actionRunner( - async ({ projectId, alerts }) => - parse(await (await getProjectsClient()).updateSessionAlerts(projectId, alerts)), - ), - ); - - -const projectsUpdateSessionInvalidationCommand = projects - .command(`update-session-invalidation`) - .description(`Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--enabled `, `Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change`, parseBool) - .action( - actionRunner( - async ({ projectId, enabled }) => - parse(await (await getProjectsClient()).updateSessionInvalidation(projectId, enabled)), - ), - ); - - const projectsUpdateAuthStatusCommand = projects .command(`update-auth-status`) .description(`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `) @@ -266,7 +147,7 @@ const projectsListDevKeysCommand = projects .command(`list-dev-keys`) .description(`List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`) .requiredOption(`--project-id `, `Project unique ID.`) - .option(`--queries [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: accessedAt, expire`) + .option(`--queries [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: accessedAt, expire`) .action( actionRunner( async ({ projectId, queries }) => @@ -280,7 +161,7 @@ const projectsCreateDevKeyCommand = projects .description(`Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.`) .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--name `, `Key name. Max length: 128 chars.`) - .requiredOption(`--expire `, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`) + .requiredOption(`--expire `, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format.`) .action( actionRunner( async ({ projectId, name, expire }) => @@ -308,7 +189,7 @@ const projectsUpdateDevKeyCommand = projects .requiredOption(`--project-id `, `Project unique ID.`) .requiredOption(`--key-id `, `Key unique ID.`) .requiredOption(`--name `, `Key name. Max length: 128 chars.`) - .requiredOption(`--expire `, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`) + .requiredOption(`--expire `, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format.`) .action( actionRunner( async ({ projectId, keyId, name, expire }) => @@ -369,7 +250,7 @@ const projectsListSchedulesCommand = projects .command(`list-schedules`) .description(`Get a list of all the project's schedules. You can use the query params to filter your results.`) .requiredOption(`--project-id `, `Project unique ID.`) - .option(`--queries [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: resourceType, resourceId, projectId, schedule, active, region`) + .option(`--queries [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: resourceType, resourceId, projectId, schedule, active, region`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -419,48 +300,6 @@ const projectsGetScheduleCommand = projects ); -const projectsUpdateSmtpCommand = projects - .command(`update-smtp`) - .description(`Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--enabled `, `Enable custom SMTP service`, parseBool) - .option(`--sender-name `, `Name of the email sender`) - .option(`--sender-email `, `Email of the sender`) - .option(`--reply-to `, `Reply to email`) - .option(`--host `, `SMTP server host name`) - .option(`--port `, `SMTP server port`, parseInteger) - .option(`--username `, `SMTP server username`) - .option(`--password `, `SMTP server password`) - .option(`--secure `, `Does SMTP server use secure connection`) - .action( - actionRunner( - async ({ projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure }) => - parse(await (await getProjectsClient()).updateSmtp(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure)), - ), - ); - - -const projectsCreateSmtpTestCommand = projects - .command(`create-smtp-test`) - .description(`Send a test email to verify SMTP configuration. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`) - .requiredOption(`--sender-name `, `Name of the email sender`) - .requiredOption(`--sender-email `, `Email of the sender`) - .requiredOption(`--host `, `SMTP server host name`) - .option(`--reply-to `, `Reply to email`) - .option(`--port `, `SMTP server port`, parseInteger) - .option(`--username `, `SMTP server username`) - .option(`--password `, `SMTP server password`) - .option(`--secure `, `Does SMTP server use secure connection`) - .action( - actionRunner( - async ({ projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure }) => - parse(await (await getProjectsClient()).createSmtpTest(projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure)), - ), - ); - - const projectsUpdateStatusCommand = projects .command(`update-status`) .description(`Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity. @@ -488,93 +327,3 @@ const projectsUpdateTeamCommand = projects ); -const projectsGetEmailTemplateCommand = projects - .command(`get-email-template`) - .description(`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .action( - actionRunner( - async ({ projectId, type, locale }) => - parse(await (await getProjectsClient()).getEmailTemplate(projectId, type, locale)), - ), - ); - - -const projectsUpdateEmailTemplateCommand = projects - .command(`update-email-template`) - .description(`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .requiredOption(`--subject `, `Email Subject`) - .requiredOption(`--message `, `Template message`) - .option(`--sender-name `, `Name of the email sender`) - .option(`--sender-email `, `Email of the sender`) - .option(`--reply-to `, `Reply to email`) - .action( - actionRunner( - async ({ projectId, type, locale, subject, message, senderName, senderEmail, replyTo }) => - parse(await (await getProjectsClient()).updateEmailTemplate(projectId, type, locale, subject, message, senderName, senderEmail, replyTo)), - ), - ); - - -const projectsDeleteEmailTemplateCommand = projects - .command(`delete-email-template`) - .description(`Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .action( - actionRunner( - async ({ projectId, type, locale }) => - parse(await (await getProjectsClient()).deleteEmailTemplate(projectId, type, locale)), - ), - ); - - -const projectsGetSmsTemplateCommand = projects - .command(`get-sms-template`) - .description(`Get a custom SMS template for the specified locale and type returning it's contents.`) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .action( - actionRunner( - async ({ projectId, type, locale }) => - parse(await (await getProjectsClient()).getSmsTemplate(projectId, type, locale)), - ), - ); - - -const projectsUpdateSmsTemplateCommand = projects - .command(`update-sms-template`) - .description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .requiredOption(`--message `, `Template message`) - .action( - actionRunner( - async ({ projectId, type, locale, message }) => - parse(await (await getProjectsClient()).updateSmsTemplate(projectId, type, locale, message)), - ), - ); - - -const projectsDeleteSmsTemplateCommand = projects - .command(`delete-sms-template`) - .description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `) - .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Template type`) - .requiredOption(`--locale `, `Template locale`) - .action( - actionRunner( - async ({ projectId, type, locale }) => - parse(await (await getProjectsClient()).deleteSmsTemplate(projectId, type, locale)), - ), - ); - - diff --git a/lib/commands/services/proxy.ts b/lib/commands/services/proxy.ts index 923a5d79..919e6952 100644 --- a/lib/commands/services/proxy.ts +++ b/lib/commands/services/proxy.ts @@ -29,7 +29,7 @@ export const proxy = new Command("proxy") const proxyListRulesCommand = proxy .command(`list-rules`) .description(`Get a list of all the proxy rules. You can use the query params to filter your results.`) - .option(`--queries [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 the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch`) + .option(`--queries [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 the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, diff --git a/lib/commands/services/sites.ts b/lib/commands/services/sites.ts index 209ffa82..563e64bb 100644 --- a/lib/commands/services/sites.ts +++ b/lib/commands/services/sites.ts @@ -31,7 +31,7 @@ export const sites = new Command("sites") const sitesListCommand = sites .command(`list`) .description(`Get a list of all the project's sites. You can use the query params to filter your results.`) - .option(`--queries [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, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId`) + .option(`--queries [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, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -116,7 +116,7 @@ const sitesListSpecificationsCommand = sites const sitesListTemplatesCommand = sites .command(`list-templates`) - .description(`List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.`) + .description(`List available site templates. You can use template details in createSite method.`) .option(`--frameworks [frameworks...]`, `List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.`) .option(`--use-cases [use-cases...]`, `List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.`) .option(`--limit `, `Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.`, parseInteger) @@ -131,7 +131,7 @@ const sitesListTemplatesCommand = sites const sitesGetTemplateCommand = sites .command(`get-template`) - .description(`Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.`) + .description(`Get a site template using ID. You can use template details in createSite method.`) .requiredOption(`--template-id `, `Template ID.`) .action( actionRunner( @@ -241,7 +241,7 @@ const sitesListDeploymentsCommand = sites .command(`list-deployments`) .description(`Get a list of all the site's code deployments. You can use the query params to filter your results.`) .requiredOption(`--site-id `, `Site ID.`) - .option(`--queries [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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`) + .option(`--queries [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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -296,7 +296,7 @@ const sitesCreateTemplateDeploymentCommand = sites .command(`create-template-deployment`) .description(`Create a deployment based on a template. -Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details.`) +Use this endpoint with combination of listTemplates (https://appwrite.io/docs/products/sites/templates) to find the template details.`) .requiredOption(`--site-id `, `Site ID.`) .requiredOption(`--repository `, `Repository name of the template.`) .requiredOption(`--owner `, `The name of the owner of the template.`) @@ -402,7 +402,7 @@ const sitesListLogsCommand = sites .command(`list-logs`) .description(`Get a list of all site logs. You can use the query params to filter your results.`) .requiredOption(`--site-id `, `Site ID.`) - .option(`--queries [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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`) + .option(`--queries [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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, diff --git a/lib/commands/services/storage.ts b/lib/commands/services/storage.ts index 3da5b5da7..e48df45d 100644 --- a/lib/commands/services/storage.ts +++ b/lib/commands/services/storage.ts @@ -31,7 +31,7 @@ export const storage = new Command("storage") const storageListBucketsCommand = storage .command(`list-buckets`) .description(`Get a list of all the storage buckets. You can use the query params to filter your results.`) - .option(`--queries [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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations`) + .option(`--queries [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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -52,10 +52,10 @@ const storageCreateBucketCommand = storage .description(`Create a new storage bucket.`) .requiredOption(`--bucket-id `, `Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--name `, `Bucket name`) - .option(`--permissions [permissions...]`, `An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permission strings. By default, no user is granted with any permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option( `--file-security [value]`, - `Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).`, + `Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. Learn more about permissions (https://appwrite.io/docs/permissions).`, (value: string | undefined) => value === undefined ? true : parseBool(value), ) @@ -67,7 +67,7 @@ const storageCreateBucketCommand = storage ) .option(`--maximum-file-size `, `Maximum file size allowed in bytes. Maximum allowed value is 5GB.`, parseInteger) .option(`--allowed-file-extensions [allowed-file-extensions...]`, `Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.`) - .option(`--compression `, `Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`) + .option(`--compression `, `Compression algorithm chosen for compression. Can be one of none, gzip (https://en.wikipedia.org/wiki/Gzip), or zstd (https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`) .option( `--encryption [value]`, `Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled`, @@ -111,10 +111,10 @@ const storageUpdateBucketCommand = storage .description(`Update a storage bucket by its unique ID.`) .requiredOption(`--bucket-id `, `Bucket unique ID.`) .requiredOption(`--name `, `Bucket name`) - .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option( `--file-security [value]`, - `Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).`, + `Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. Learn more about permissions (https://appwrite.io/docs/permissions).`, (value: string | undefined) => value === undefined ? true : parseBool(value), ) @@ -126,7 +126,7 @@ const storageUpdateBucketCommand = storage ) .option(`--maximum-file-size `, `Maximum file size allowed in bytes. Maximum allowed value is 5GB.`, parseInteger) .option(`--allowed-file-extensions [allowed-file-extensions...]`, `Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.`) - .option(`--compression `, `Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`) + .option(`--compression `, `Compression algorithm chosen for compression. Can be one of none, gzip (https://en.wikipedia.org/wiki/Gzip), or zstd (https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`) .option( `--encryption [value]`, `Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled`, @@ -168,8 +168,8 @@ const storageDeleteBucketCommand = storage 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...]`, `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`) + .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...]`, `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(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -187,18 +187,18 @@ const storageListFilesCommand = storage const storageCreateFileCommand = storage .command(`create-file`) - .description(`Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. + .description(`Create a new file. Before using this route, you should create a new bucket resource using either a server integration (https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. -Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of \`5MB\`. The \`content-range\` header values should always be in bytes. +Larger files should be uploaded using multiple requests with the content-range (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of \`5MB\`. The \`content-range\` header values should always be in bytes. -When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in \`x-appwrite-id\` header to allow the server to know that the partial upload is for the existing file and not for a new one. +When the first request is sent, the server will return the File object, and the subsequent part request must include the file's id in \`x-appwrite-id\` header to allow the server to know that the partial upload is for the existing file and not for a new one. If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. `) - .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).`) + .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).`) .requiredOption(`--file-id `, `File ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) - .requiredOption(`--file `, `Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).`) - .option(`--permissions [permissions...]`, `An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .requiredOption(`--file `, `Binary file. Appwrite SDKs provide helpers to handle file input. Learn about file input (https://appwrite.io/docs/products/storage/upload-download#input-file).`) + .option(`--permissions [permissions...]`, `An array of permission strings. By default, only the current user is granted all permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`) .action( actionRunner( async ({ bucketId, fileId, file, permissions }) => @@ -210,7 +210,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunking l const storageGetFileCommand = storage .command(`get-file`) .description(`Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.`) - .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).`) + .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).`) .requiredOption(`--file-id `, `File ID.`) .action( actionRunner( @@ -226,7 +226,7 @@ const storageUpdateFileCommand = storage .requiredOption(`--bucket-id `, `Bucket unique ID.`) .requiredOption(`--file-id `, `File ID.`) .option(`--name `, `File name.`) - .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`) .action( actionRunner( async ({ bucketId, fileId, name, permissions }) => @@ -238,7 +238,7 @@ const storageUpdateFileCommand = storage const storageDeleteFileCommand = storage .command(`delete-file`) .description(`Delete a file by its unique ID. Only users with write permissions have access to delete this resource.`) - .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).`) + .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).`) .requiredOption(`--file-id `, `File ID.`) .action( actionRunner( @@ -251,7 +251,7 @@ const storageDeleteFileCommand = storage const storageGetFileDownloadCommand = storage .command(`get-file-download`) .description(`Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.`) - .requiredOption(`--bucket-id `, `Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`) + .requiredOption(`--bucket-id `, `Storage bucket ID. You can create a new storage bucket using the Storage service server integration (https://appwrite.io/docs/server/storage#createBucket).`) .requiredOption(`--file-id `, `File ID.`) .option(`--token `, `File token for accessing this file.`) .requiredOption(`--destination `, `Path to save the file to.`) @@ -271,7 +271,7 @@ const storageGetFileDownloadCommand = storage const storageGetFilePreviewCommand = storage .command(`get-file-preview`) .description(`Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.`) - .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).`) + .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).`) .requiredOption(`--file-id `, `File ID`) .option(`--width `, `Resize preview image width, Pass an integer between 0 to 4000.`, parseInteger) .option(`--height `, `Resize preview image height, Pass an integer between 0 to 4000.`, parseInteger) @@ -302,7 +302,7 @@ const storageGetFilePreviewCommand = storage const storageGetFileViewCommand = storage .command(`get-file-view`) .description(`Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.`) - .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).`) + .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).`) .requiredOption(`--file-id `, `File ID.`) .option(`--token `, `File token for accessing this file.`) .requiredOption(`--destination `, `Path to save the file to.`) diff --git a/lib/commands/services/tables-db.ts b/lib/commands/services/tables-db.ts index 77a57ea6..1fade326 100644 --- a/lib/commands/services/tables-db.ts +++ b/lib/commands/services/tables-db.ts @@ -29,7 +29,7 @@ export const tablesDB = new Command("tables-db") const tablesDBListCommand = tablesDB .command(`list`) .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`) - .option(`--queries [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 columns: name`) + .option(`--queries [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 columns: name`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -68,7 +68,7 @@ const tablesDBCreateCommand = tablesDB const tablesDBListTransactionsCommand = tablesDB .command(`list-transactions`) .description(`List transactions across all databases.`) - .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).`) + .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries).`) .action( actionRunner( async ({ queries }) => @@ -209,7 +209,7 @@ const tablesDBListTablesCommand = tablesDB .command(`list-tables`) .description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) - .option(`--queries [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 columns: name, enabled, rowSecurity`) + .option(`--queries [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 columns: name, enabled, rowSecurity`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -227,14 +227,14 @@ const tablesDBListTablesCommand = tablesDB const tablesDBCreateTableCommand = tablesDB .command(`create-table`) - .description(`Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`) + .description(`Create a new Table. Before using this route, you should create a new database resource using either a server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--name `, `Table name. Max length: 128 chars.`) - .option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option( `--row-security [value]`, - `Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).`, + `Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. Learn more about permissions (https://appwrite.io/docs/permissions).`, (value: string | undefined) => value === undefined ? true : parseBool(value), ) @@ -273,10 +273,10 @@ const tablesDBUpdateTableCommand = tablesDB .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .option(`--name `, `Table name. Max length: 128 chars.`) - .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option( `--row-security [value]`, - `Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).`, + `Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. Learn more about permissions (https://appwrite.io/docs/permissions).`, (value: string | undefined) => value === undefined ? true : parseBool(value), ) @@ -318,7 +318,7 @@ const tablesDBListColumnsCommand = tablesDB .description(`List columns in the table.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) - .option(`--queries [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 columns: key, type, size, required, array, status, error`) + .option(`--queries [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 columns: key, type, size, required, array, status, error`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -338,7 +338,7 @@ const tablesDBCreateBooleanColumnCommand = tablesDB .description(`Create a boolean column. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option( @@ -365,7 +365,7 @@ const tablesDBUpdateBooleanColumnCommand = tablesDB .command(`update-boolean-column`) .description(`Update a boolean column. Changing the \`default\` value will not update already existing rows.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .requiredOption(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`, parseBool) @@ -385,7 +385,7 @@ const tablesDBCreateDatetimeColumnCommand = tablesDB .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) - .option(`--xdefault `, `Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.`) + .option(`--xdefault `, `Default value for the column in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.`) .option( `--array [value]`, `Is column an array?`, @@ -635,7 +635,7 @@ const tablesDBCreateLineColumnCommand = tablesDB .command(`create-line-column`) .description(`Create a geometric line column.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`) @@ -651,7 +651,7 @@ const tablesDBUpdateLineColumnCommand = tablesDB .command(`update-line-column`) .description(`Update a line column. Changing the \`default\` value will not update already existing rows.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`) @@ -669,7 +669,7 @@ const tablesDBCreateLongtextColumnCommand = tablesDB .description(`Create a longtext column. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -698,7 +698,7 @@ const tablesDBUpdateLongtextColumnCommand = tablesDB .description(`Update a longtext column. Changing the \`default\` value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .requiredOption(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -716,7 +716,7 @@ const tablesDBCreateMediumtextColumnCommand = tablesDB .description(`Create a mediumtext column. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -745,7 +745,7 @@ const tablesDBUpdateMediumtextColumnCommand = tablesDB .description(`Update a mediumtext column. Changing the \`default\` value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .requiredOption(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -762,7 +762,7 @@ const tablesDBCreatePointColumnCommand = tablesDB .command(`create-point-column`) .description(`Create a geometric point column.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`) @@ -778,7 +778,7 @@ const tablesDBUpdatePointColumnCommand = tablesDB .command(`update-point-column`) .description(`Update a point column. Changing the \`default\` value will not update already existing rows.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`) @@ -795,7 +795,7 @@ const tablesDBCreatePolygonColumnCommand = tablesDB .command(`create-polygon-column`) .description(`Create a geometric polygon column.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`) @@ -811,7 +811,7 @@ const tablesDBUpdatePolygonColumnCommand = tablesDB .command(`update-polygon-column`) .description(`Update a polygon column. Changing the \`default\` value will not update already existing rows.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault [xdefault...]`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`) @@ -826,7 +826,7 @@ const tablesDBUpdatePolygonColumnCommand = tablesDB const tablesDBCreateRelationshipColumnCommand = tablesDB .command(`create-relationship-column`) - .description(`Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). + .description(`Create relationship column. Learn more about relationship columns (https://appwrite.io/docs/databases-relationships#relationship-columns). `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) @@ -854,7 +854,7 @@ const tablesDBCreateStringColumnCommand = tablesDB .description(`Create a string column. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--size `, `Column size for text columns, in number of characters.`, parseInteger) .requiredOption(`--required `, `Is column required?`, parseBool) @@ -884,7 +884,7 @@ const tablesDBUpdateStringColumnCommand = tablesDB .description(`Update a string column. Changing the \`default\` value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .requiredOption(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -903,7 +903,7 @@ const tablesDBCreateTextColumnCommand = tablesDB .description(`Create a text column. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .option(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -932,7 +932,7 @@ const tablesDBUpdateTextColumnCommand = tablesDB .description(`Update a text column. Changing the \`default\` value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .requiredOption(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -991,7 +991,7 @@ const tablesDBCreateVarcharColumnCommand = tablesDB .description(`Create a varchar column. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--size `, `Column size for varchar columns, in number of characters. Maximum size is 16381.`, parseInteger) .requiredOption(`--required `, `Is column required?`, parseBool) @@ -1021,7 +1021,7 @@ const tablesDBUpdateVarcharColumnCommand = tablesDB .description(`Update a varchar column. Changing the \`default\` value will not update already existing rows. `) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Column Key.`) .requiredOption(`--required `, `Is column required?`, parseBool) .requiredOption(`--xdefault `, `Default value for column when not provided. Cannot be set when column is required.`) @@ -1065,7 +1065,7 @@ const tablesDBDeleteColumnCommand = tablesDB const tablesDBUpdateRelationshipColumnCommand = tablesDB .command(`update-relationship-column`) - .description(`Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). + .description(`Update relationship column. Learn more about relationship columns (https://appwrite.io/docs/databases-relationships#relationship-columns). `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) @@ -1084,8 +1084,8 @@ const tablesDBListIndexesCommand = tablesDB .command(`list-indexes`) .description(`List indexes on the table.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) - .option(`--queries [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 columns: key, type, status, attributes, error`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .option(`--queries [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 columns: key, type, status, attributes, error`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -1105,7 +1105,7 @@ const tablesDBCreateIndexCommand = tablesDB .description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request. Type can be \`key\`, \`fulltext\`, or \`unique\`.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Index Key.`) .requiredOption(`--type `, `Index type.`) .requiredOption(`--columns [columns...]`, `Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.`) @@ -1123,7 +1123,7 @@ const tablesDBGetIndexCommand = tablesDB .command(`get-index`) .description(`Get index by ID.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Index Key.`) .action( actionRunner( @@ -1137,7 +1137,7 @@ const tablesDBDeleteIndexCommand = tablesDB .command(`delete-index`) .description(`Delete an index.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--key `, `Index Key.`) .action( actionRunner( @@ -1152,7 +1152,7 @@ const tablesDBListTableLogsCommand = tablesDB .description(`Get the table activity logs list by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) - .option(`--queries [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...]`, `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`) .action( actionRunner( async ({ databaseId, tableId, queries }) => @@ -1165,8 +1165,8 @@ const tablesDBListRowsCommand = tablesDB .command(`list-rows`) .description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).`) - .option(`--queries [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.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/products/databases/tables#create-table).`) + .option(`--queries [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(`--transaction-id `, `Transaction ID to read uncommitted changes within the transaction.`) .option( `--total [value]`, @@ -1185,12 +1185,12 @@ const tablesDBListRowsCommand = tablesDB const tablesDBCreateRowCommand = tablesDB .command(`create-row`) - .description(`Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`) + .description(`Create a new Row. Before using this route, you should create a new table resource using either a server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.`) .requiredOption(`--row-id `, `Row ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--data `, `Row data as JSON object.`) - .option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1202,9 +1202,9 @@ const tablesDBCreateRowCommand = tablesDB const tablesDBCreateRowsCommand = tablesDB .command(`create-rows`) - .description(`Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`) + .description(`Create new Rows. Before using this route, you should create a new table resource using either a server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.`) .requiredOption(`--rows [rows...]`, `Array of rows data as JSON objects.`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( @@ -1217,7 +1217,7 @@ const tablesDBCreateRowsCommand = tablesDB const tablesDBUpsertRowsCommand = tablesDB .command(`upsert-rows`) - .description(`Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console. + .description(`Create or update Rows. Before using this route, you should create a new table resource using either a server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console. `) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) @@ -1237,7 +1237,7 @@ const tablesDBUpdateRowsCommand = tablesDB .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .option(`--data `, `Row data as JSON object. Include only column and value pairs to be updated.`) - .option(`--queries [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(`--queries [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(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1251,8 +1251,8 @@ const tablesDBDeleteRowsCommand = tablesDB .command(`delete-rows`) .description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) - .option(`--queries [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.`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .option(`--queries [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(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1266,9 +1266,9 @@ const tablesDBGetRowCommand = tablesDB .command(`get-row`) .description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--row-id `, `Row ID.`) - .option(`--queries [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(`--queries [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(`--transaction-id `, `Transaction ID to read uncommitted changes within the transaction.`) .action( actionRunner( @@ -1280,12 +1280,12 @@ const tablesDBGetRowCommand = tablesDB const tablesDBUpsertRowCommand = tablesDB .command(`upsert-row`) - .description(`Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`) + .description(`Create or update a Row. Before using this route, you should create a new table resource using either a server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`) .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--row-id `, `Row ID.`) .option(`--data `, `Row data as JSON object. Include all required columns of the row to be created or updated.`) - .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1302,7 +1302,7 @@ const tablesDBUpdateRowCommand = tablesDB .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--row-id `, `Row ID.`) .option(`--data `, `Row data as JSON object. Include only columns and value pairs to be updated.`) - .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`) + .option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( actionRunner( @@ -1316,7 +1316,7 @@ const tablesDBDeleteRowCommand = tablesDB .command(`delete-row`) .description(`Delete a row by its unique ID.`) .requiredOption(`--database-id `, `Database ID.`) - .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) + .requiredOption(`--table-id `, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`) .requiredOption(`--row-id `, `Row ID.`) .option(`--transaction-id `, `Transaction ID for staging the operation.`) .action( @@ -1333,7 +1333,7 @@ const tablesDBListRowLogsCommand = tablesDB .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--table-id `, `Table ID.`) .requiredOption(`--row-id `, `Row ID.`) - .option(`--queries [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...]`, `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`) .action( actionRunner( async ({ databaseId, tableId, rowId, queries }) => diff --git a/lib/commands/services/teams.ts b/lib/commands/services/teams.ts index 1d51b70f..ed6e2642 100644 --- a/lib/commands/services/teams.ts +++ b/lib/commands/services/teams.ts @@ -38,7 +38,7 @@ export const teams = new Command("teams") const teamsListCommand = teams .command(`list`) .description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`) - .option(`--queries [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, total, billingPlan`) + .option(`--queries [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, total, billingPlan`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -59,7 +59,7 @@ const teamsCreateCommand = teams .description(`Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.`) .requiredOption(`--team-id `, `Team ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--name `, `Team name. Max length: 128 chars.`) - .option(`--roles [roles...]`, `Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.`) + .option(`--roles [roles...]`, `Array of strings. Use this param to set the roles in the team for the user who created it. The default role is owner. A role can be any string. Learn more about roles and permissions (https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.`) .action( actionRunner( async ({ teamId, name, roles }) => @@ -109,7 +109,7 @@ const teamsListLogsCommand = teams .command(`list-logs`) .description(`Get the team activity logs list by its unique ID.`) .requiredOption(`--team-id `, `Team ID.`) - .option(`--queries [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...]`, `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( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -128,7 +128,7 @@ const teamsListMembershipsCommand = teams .command(`list-memberships`) .description(`Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.`) .requiredOption(`--team-id `, `Team ID.`) - .option(`--queries [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: userId, teamId, invited, joined, confirm, roles`) + .option(`--queries [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: userId, teamId, invited, joined, confirm, roles`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -150,16 +150,16 @@ const teamsCreateMembershipCommand = teams You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. -Use the \`url\` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. +Use the \`url\` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the Update Team Membership Status (https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. -Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. +Please note that to avoid a Redirect Attack (https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. `) .requiredOption(`--team-id `, `Team ID.`) - .requiredOption(`--roles [roles...]`, `Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`) + .requiredOption(`--roles [roles...]`, `Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about roles and permissions (https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`) .option(`--email `, `Email of the new team member.`) .option(`--user-id `, `ID of the user to be added to a team.`) .option(`--phone `, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`) - .option(`--url `, `URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) + .option(`--url `, `URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`) .option(`--name `, `Name of the new team member. Max length: 128 chars.`) .action( actionRunner( @@ -184,11 +184,11 @@ const teamsGetMembershipCommand = teams const teamsUpdateMembershipCommand = teams .command(`update-membership`) - .description(`Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). + .description(`Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about roles and permissions (https://appwrite.io/docs/permissions). `) .requiredOption(`--team-id `, `Team ID.`) .requiredOption(`--membership-id `, `Membership ID.`) - .requiredOption(`--roles [roles...]`, `An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`) + .requiredOption(`--roles [roles...]`, `An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about roles and permissions (https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`) .action( actionRunner( async ({ teamId, membershipId, roles }) => @@ -230,7 +230,7 @@ If the request is successful, a session for the user is automatically created. const teamsGetPrefsCommand = teams .command(`get-prefs`) - .description(`Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).`) + .description(`Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in user preferences (https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).`) .requiredOption(`--team-id `, `Team ID.`) .action( actionRunner( diff --git a/lib/commands/services/tokens.ts b/lib/commands/services/tokens.ts index b3c486c4..85dbb31e 100644 --- a/lib/commands/services/tokens.ts +++ b/lib/commands/services/tokens.ts @@ -29,9 +29,9 @@ export const tokens = new Command("tokens") const tokensListCommand = tokens .command(`list`) .description(`List all the tokens created for a specific file or bucket. 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).`) + .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).`) .requiredOption(`--file-id `, `File unique ID.`) - .option(`--queries [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: expire`) + .option(`--queries [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: expire`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -49,7 +49,7 @@ const tokensListCommand = tokens const tokensCreateFileTokenCommand = tokens .command(`create-file-token`) .description(`Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.`) - .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).`) + .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).`) .requiredOption(`--file-id `, `File unique ID.`) .option(`--expire `, `Token expiry date`) .action( diff --git a/lib/commands/services/users.ts b/lib/commands/services/users.ts index 1861e645..281deab5 100644 --- a/lib/commands/services/users.ts +++ b/lib/commands/services/users.ts @@ -29,7 +29,7 @@ export const users = new Command("users") const usersListCommand = users .command(`list`) .description(`Get a list of all the project's users. You can use the query params to filter your results.`) - .option(`--queries [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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator`) + .option(`--queries [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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -63,7 +63,7 @@ const usersCreateCommand = users const usersCreateArgon2UserCommand = users .command(`create-argon-2-user`) - .description(`Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) + .description(`Create a new user. Password provided must be hashed with the Argon2 (https://en.wikipedia.org/wiki/Argon2) algorithm. Use the POST /users (https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `User password hashed using Argon2.`) @@ -78,7 +78,7 @@ const usersCreateArgon2UserCommand = users const usersCreateBcryptUserCommand = users .command(`create-bcrypt-user`) - .description(`Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) + .description(`Create a new user. Password provided must be hashed with the Bcrypt (https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the POST /users (https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `User password hashed using Bcrypt.`) @@ -94,7 +94,7 @@ const usersCreateBcryptUserCommand = users const usersListIdentitiesCommand = users .command(`list-identities`) .description(`Get identities for all users.`) - .option(`--queries [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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`) + .option(`--queries [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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -124,7 +124,7 @@ const usersDeleteIdentityCommand = users const usersCreateMD5UserCommand = users .command(`create-md-5-user`) - .description(`Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) + .description(`Create a new user. Password provided must be hashed with the MD5 (https://en.wikipedia.org/wiki/MD5) algorithm. Use the POST /users (https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `User password hashed using MD5.`) @@ -139,7 +139,7 @@ const usersCreateMD5UserCommand = users const usersCreatePHPassUserCommand = users .command(`create-ph-pass-user`) - .description(`Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) + .description(`Create a new user. Password provided must be hashed with the PHPass (https://www.openwall.com/phpass/) algorithm. Use the POST /users (https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or pass the string \`ID.unique()\`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `User password hashed using PHPass.`) @@ -154,7 +154,7 @@ const usersCreatePHPassUserCommand = users const usersCreateScryptUserCommand = users .command(`create-scrypt-user`) - .description(`Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) + .description(`Create a new user. Password provided must be hashed with the Scrypt (https://github.com/Tarsnap/scrypt) algorithm. Use the POST /users (https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `User password hashed using Scrypt.`) @@ -174,7 +174,7 @@ const usersCreateScryptUserCommand = users const usersCreateScryptModifiedUserCommand = users .command(`create-scrypt-modified-user`) - .description(`Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) + .description(`Create a new user. Password provided must be hashed with the Scrypt Modified (https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the POST /users (https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `User password hashed using Scrypt Modified.`) @@ -192,7 +192,7 @@ const usersCreateScryptModifiedUserCommand = users const usersCreateSHAUserCommand = users .command(`create-sha-user`) - .description(`Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) + .description(`Create a new user. Password provided must be hashed with the SHA (https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the POST /users (https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .requiredOption(`--email `, `User email.`) .requiredOption(`--password `, `User password hashed using SHA.`) @@ -233,7 +233,7 @@ const usersGetCommand = users const usersDeleteCommand = users .command(`delete`) - .description(`Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.`) + .description(`Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the updateStatus (https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.`) .requiredOption(`--user-id `, `User ID.`) .action( actionRunner( @@ -288,7 +288,7 @@ const usersUpdateLabelsCommand = users .command(`update-labels`) .description(`Update the user labels by its unique ID. -Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.`) +Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the Permissions docs (https://appwrite.io/docs/permissions) for more info.`) .requiredOption(`--user-id `, `User ID.`) .requiredOption(`--labels [labels...]`, `Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.`) .action( @@ -303,7 +303,7 @@ const usersListLogsCommand = users .command(`list-logs`) .description(`Get the user activity logs list by its unique ID.`) .requiredOption(`--user-id `, `User ID.`) - .option(`--queries [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...]`, `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( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -322,7 +322,7 @@ const usersListMembershipsCommand = users .command(`list-memberships`) .description(`Get the user membership list by its unique ID.`) .requiredOption(`--user-id `, `User ID.`) - .option(`--queries [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: userId, teamId, invited, joined, confirm, roles`) + .option(`--queries [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: userId, teamId, invited, joined, confirm, roles`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, @@ -378,7 +378,7 @@ const usersListMfaFactorsCommand = users const usersGetMfaRecoveryCodesCommand = users .command(`get-mfa-recovery-codes`) - .description(`Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`) + .description(`Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using createMfaRecoveryCodes method.`) .requiredOption(`--user-id `, `User ID.`) .action( actionRunner( @@ -390,7 +390,7 @@ const usersGetMfaRecoveryCodesCommand = users const usersUpdateMfaRecoveryCodesCommand = users .command(`update-mfa-recovery-codes`) - .description(`Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`) + .description(`Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using createMfaRecoveryCodes method.`) .requiredOption(`--user-id `, `User ID.`) .action( actionRunner( @@ -402,7 +402,7 @@ const usersUpdateMfaRecoveryCodesCommand = users const usersCreateMfaRecoveryCodesCommand = users .command(`create-mfa-recovery-codes`) - .description(`Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.`) + .description(`Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in createMfaChallenge method by client SDK.`) .requiredOption(`--user-id `, `User ID.`) .action( actionRunner( @@ -498,7 +498,7 @@ const usersCreateSessionCommand = users .command(`create-session`) .description(`Creates a session for a user. Returns an immediately usable session object. -If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.`) +If you want to generate a token for a custom authentication flow, use the POST /users/{userId}/tokens (https://appwrite.io/docs/server/users#createToken) endpoint.`) .requiredOption(`--user-id `, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`) .action( actionRunner( @@ -550,7 +550,7 @@ const usersListTargetsCommand = users .command(`list-targets`) .description(`List the messaging targets that are associated with a user.`) .requiredOption(`--user-id `, `User ID.`) - .option(`--queries [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: userId, providerId, identifier, providerType`) + .option(`--queries [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: userId, providerId, identifier, providerType`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, @@ -626,7 +626,7 @@ const usersDeleteTargetCommand = users const usersCreateTokenCommand = users .command(`create-token`) - .description(`Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. + .description(`Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the PUT /account/sessions/token (https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. `) .requiredOption(`--user-id `, `User ID.`) .option(`--length `, `Token length in characters. The default length is 6 characters`, parseInteger) diff --git a/lib/commands/services/vcs.ts b/lib/commands/services/vcs.ts index ce4d8710..76f753ef 100644 --- a/lib/commands/services/vcs.ts +++ b/lib/commands/services/vcs.ts @@ -47,7 +47,7 @@ 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...]`, `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...]`, `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`) .action( actionRunner( async ({ installationId, type, search, queries }) => @@ -130,7 +130,7 @@ const vcsListInstallationsCommand = vcs .command(`list-installations`) .description(`List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details. `) - .option(`--queries [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: provider, organization`) + .option(`--queries [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: provider, organization`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option( `--total [value]`, diff --git a/lib/commands/services/webhooks.ts b/lib/commands/services/webhooks.ts index 546ebbf5..f7dfbb5d 100644 --- a/lib/commands/services/webhooks.ts +++ b/lib/commands/services/webhooks.ts @@ -29,7 +29,7 @@ export const webhooks = new Command("webhooks") const webhooksListCommand = webhooks .command(`list`) .description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results.`) - .option(`--queries [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, url, authUsername, tls, events, enabled, logs, attempts`) + .option(`--queries [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, url, authUsername, tls, events, enabled, logs, attempts`) .option( `--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, diff --git a/lib/commands/update.ts b/lib/commands/update.ts index dc77b319..a0155609 100644 --- a/lib/commands/update.ts +++ b/lib/commands/update.ts @@ -15,6 +15,7 @@ import { import { EXECUTABLE_NAME, GITHUB_RELEASES_URL, + HOMEBREW_FORMULA, NPM_PACKAGE_NAME, SDK_TITLE, } from "../constants.js"; @@ -164,10 +165,10 @@ const updateViaNpm = async (): Promise => { */ const updateViaHomebrew = async (): Promise => { try { - await execCommand("brew", ["upgrade", "appwrite"]); + await execCommand("brew", ["upgrade", HOMEBREW_FORMULA]); console.log(""); success("Updated to latest version via Homebrew!"); - hint("Run 'appwrite --version' to verify the new version."); + hint(`Run '${EXECUTABLE_NAME} --version' to verify the new version.`); } catch (e: unknown) { const message = getErrorMessage(e); @@ -177,11 +178,13 @@ const updateViaHomebrew = async (): Promise => { ) { console.log(""); success("Latest version is already installed via Homebrew!"); - hint("The CLI is up to date. Run 'appwrite --version' to verify."); + hint( + `The CLI is up to date. Run '${EXECUTABLE_NAME} --version' to verify.`, + ); } else { console.log(""); error(`Failed to update via Homebrew: ${message}`); - hint("Try running: brew upgrade appwrite"); + hint(`Try running: brew upgrade ${HOMEBREW_FORMULA}`); } } }; @@ -258,7 +261,7 @@ const showManualInstructions = (latestVersion: string): void => { console.log(""); log(`${chalk.bold("Option 2: Homebrew")}`); - console.log(` brew upgrade appwrite`); + console.log(` brew upgrade ${HOMEBREW_FORMULA}`); console.log(""); if (process.platform !== "win32") { diff --git a/lib/config.ts b/lib/config.ts index 89afeaec..6b5f6092 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -128,6 +128,7 @@ function pruneDeprecatedSiteFields>(data: T): T { sanitized.sites = sanitized.sites.map((site) => { if (site && typeof site === "object") { const { + enabled: _enabled, vars: _vars, ignore: _ignore, ...rest @@ -358,7 +359,10 @@ class Local extends Config { if (!this.has("sites")) { return []; } - return this.get("sites") ?? []; + return ((this.get("sites") ?? []) as Record[]).map((site) => { + const { enabled: _enabled, vars: _vars, ignore: _ignore, ...rest } = site; + return rest; + }) as SiteType[]; } getSite($id: string): SiteType | Record { @@ -366,7 +370,7 @@ class Local extends Config { return {}; } - const sites = this.get("sites") ?? []; + const sites = this.getSites(); for (let i = 0; i < sites.length; i++) { if (sites[i]["$id"] == $id) { return sites[i]; diff --git a/lib/constants.ts b/lib/constants.ts index c2405679..8a9516cb 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 = '18.2.0'; +export const SDK_VERSION = '19.0.0'; export const SDK_NAME = 'Command Line'; export const SDK_PLATFORM = 'console'; export const SDK_LANGUAGE = 'cli'; @@ -12,6 +12,10 @@ export const EXECUTABLE_NAME = 'appwrite'; // 1 day export const UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; +// Homebrew — fully-qualified `//` reference +export const HOMEBREW_TAP = 'appwrite/appwrite'; +export const HOMEBREW_FORMULA = `${HOMEBREW_TAP}/appwrite`; + // NPM export const NPM_PACKAGE_NAME = 'appwrite-cli'; export const NPM_REGISTRY_URL = `https://registry.npmjs.org/${NPM_PACKAGE_NAME}/latest`; diff --git a/lib/questions.ts b/lib/questions.ts index 4b8702a4..3f7a5183 100644 --- a/lib/questions.ts +++ b/lib/questions.ts @@ -1,9 +1,15 @@ +import fs from "fs"; +import path from "path"; import chalk from "chalk"; import { localConfig, globalConfig } from "./config.js"; import { sdkForConsole } from "./sdks.js"; import { validateRequired } from "./validations.js"; import { paginate } from "./paginate.js"; -import { checkDeployConditions, isCloud } from "./utils.js"; +import { + checkDeployConditions, + getSafeDirectoryName, + isCloud, +} from "./utils.js"; import { Account, Client } from "@appwrite.io/console"; import { getOrganizationsService, @@ -57,6 +63,34 @@ const validateNonNegativeInteger = (value: string): boolean | string => { return true; }; +const getDefaultSitePath = (answers: Answers): string => { + const siteDirectoryName = getSafeDirectoryName( + String(answers.name ?? ""), + "my-awesome-site", + ); + + return `sites/${siteDirectoryName}`; +}; + +const validateSitePath = (value: unknown): boolean | string => { + const required = validateRequired("site path", value); + if (required !== true) { + return required; + } + + const sitePath = String(value).trim(); + const absoluteSitePath = path.resolve(process.cwd(), sitePath); + + if ( + fs.existsSync(absoluteSitePath) && + !fs.statSync(absoluteSitePath).isDirectory() + ) { + return "Site path already exists and is not a directory."; + } + + return true; +}; + const buildSelectionLabel = (name: string, id: string): string => `${name} (${id})`; @@ -1256,6 +1290,13 @@ export const questionsCreateSite: Question[] = [ message: "What ID would you like to have for your site?", default: "unique()", }, + { + type: "input", + name: "path", + message: "What local path would you like to use for your site?", + default: getDefaultSitePath, + validate: validateSitePath, + }, { type: "list", name: "framework", @@ -1309,8 +1350,15 @@ export const questionsCreateSite: Question[] = [ { type: "input", name: "deploymentRetention", - message: "How many deployments would you like to retain? (0 = unlimited)", + message: + "How many days would you like to keep non-active deployments? (0 = keep all deployments)", default: "0", validate: validateNonNegativeInteger, }, + { + type: "confirm", + name: "downloadTemplate", + message: "Do you want to download the starter template code?", + default: false, + }, ]; diff --git a/lib/response-config.ts b/lib/response-config.ts index 9f0d55c0..31282b4e 100644 --- a/lib/response-config.ts +++ b/lib/response-config.ts @@ -214,6 +214,20 @@ const InvoiceSummarySchema = createSummarySchema( "Expected an invoice summary row", ); +const RuntimeSummarySchema = createSummarySchema( + { + $id: z.string().nullable().optional(), + key: z.string().nullable().optional(), + name: z.string().nullable().optional(), + version: z.union([z.string(), z.number()]).nullable().optional(), + base: z.string().nullable().optional(), + image: z.string().nullable().optional(), + logo: z.string().nullable().optional(), + }, + ["$id", "name", "version", "base", "image"], + "Expected a runtime summary row", +); + const paymentMethodLabel = (row: JsonObject): string => { const brand = valueFrom(row, "brand") ?? ""; const last4 = valueFrom(row, "last4") ?? ""; @@ -264,10 +278,41 @@ const paymentMethodStatus = (row: JsonObject): string => { return "status: pending"; }; +const runtimeLabel = (row: JsonObject): string => { + const name = compactText(valueFrom(row, "name"), ""); + const key = compactText(valueFrom(row, "key"), ""); + const version = valueFrom(row, "version"); + const runtimeName = name || (key ? toTitleCase(key) : "Runtime"); + + if (version == null || String(version).trim() === "") { + return runtimeName; + } + + return `${runtimeName} ${version}`; +}; + const structuredCollectionRenderers: Record< string, StructuredCollectionRenderer > = { + runtimes: createColumnRenderer(RuntimeSummarySchema, [ + { + header: "runtime", + value: (row, context) => indexedLabel(runtimeLabel(row), context), + }, + { + header: "id", + value: (row) => compactText(valueFrom(row, "$id")), + }, + { + header: "base", + value: (row) => compactText(valueFrom(row, "base")), + }, + { + header: "image", + value: (row) => compactText(valueFrom(row, "image")), + }, + ]), identities: createColumnRenderer(IdentitySummarySchema, [ { header: "identity", diff --git a/lib/utils.ts b/lib/utils.ts index 519187ac..ffaedd28 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -12,6 +12,7 @@ import { NPM_PACKAGE_NAME, DEFAULT_ENDPOINT, EXECUTABLE_NAME, + HOMEBREW_FORMULA, UPDATE_CHECK_INTERVAL_MS, } from "./constants.js"; @@ -102,7 +103,6 @@ type HomebrewInfoResponse = { }; const WINDOWS_EXECUTABLE_NAME = `${EXECUTABLE_NAME.toLowerCase()}.exe`; -const HOMEBREW_FORMULA_NAME = EXECUTABLE_NAME.toLowerCase(); const getExecutablePaths = (): { execPath: string; @@ -227,7 +227,7 @@ const getHomebrewLatestVersion = async ( try { const output = childProcess.execFileSync( "brew", - ["info", "--json=v2", HOMEBREW_FORMULA_NAME], + ["info", "--json=v2", HOMEBREW_FORMULA], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], diff --git a/package-lock.json b/package-lock.json index 913b208d..c93a5d58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "appwrite-cli", - "version": "18.2.0", + "version": "19.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "appwrite-cli", - "version": "18.2.0", + "version": "19.0.0", "license": "BSD-3-Clause", "dependencies": { - "@appwrite.io/console": "~9.1.0", + "@appwrite.io/console": "11.0.0", "chalk": "4.1.2", "chokidar": "^3.6.0", "cli-progress": "^3.12.0", @@ -52,9 +52,9 @@ } }, "node_modules/@appwrite.io/console": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-9.1.0.tgz", - "integrity": "sha512-9G890Ia6Ul2jKtXsFsAr0jRyGbr+Qh+nNv30xrlu2onJaBIjFPBZcDfTh2qAE+GyniEtySLyLuyNYspeIf/Dew==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-11.0.0.tgz", + "integrity": "sha512-7w2MNVDP5cNLExJlEOttfBAvOFd1GA+rAUBoqhtvd81GLZZrMZck7QZv4cyhz3LO54jUg5zBWbyC1lsXCRWiEg==", "license": "BSD-3-Clause", "dependencies": { "json-bigint": "1.0.0" @@ -864,29 +864,43 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.1", + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -2040,13 +2054,13 @@ "license": "MIT" }, "node_modules/@types/bun": { - "version": "1.3.12", - "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.3.12.tgz", - "integrity": "sha512-DBv81elK+/VSwXHDlnH3Qduw+KxkTIWi7TXkAeh24zpi5l0B2kUg9Ga3tb4nJaPcOFswflgi/yAvMVBPrxMB+A==", + "version": "1.3.13", + "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.3.13.tgz", + "integrity": "sha512-9fqXWk5YIHGGnUau9TEi+qdlTYDAnOj+xLCmSTwXfAIqXr2x4tytJb43E9uCvt09zJURKXwAtkoH4nLQfzeTXw==", "dev": true, "license": "MIT", "dependencies": { - "bun-types": "1.3.12" + "bun-types": "1.3.13" } }, "node_modules/@types/cli-progress": { @@ -2123,17 +2137,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.58.2.tgz", - "integrity": "sha512-aC2qc5thQahutKjP+cl8cgN9DWe3ZUqVko30CMSZHnFEHyhOYoZSzkGtAI2mcwZ38xeImDucI4dnqsHiOYuuCw==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.0.tgz", + "integrity": "sha512-HyAZtpdkgZwpq8Sz3FSUvCR4c+ScbuWa9AksK2Jweub7w4M3yTz4O11AqVJzLYjy/B9ZWPyc81I+mOdJU/bDQw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.58.2", - "@typescript-eslint/type-utils": "8.58.2", - "@typescript-eslint/utils": "8.58.2", - "@typescript-eslint/visitor-keys": "8.58.2", + "@typescript-eslint/scope-manager": "8.59.0", + "@typescript-eslint/type-utils": "8.59.0", + "@typescript-eslint/utils": "8.59.0", + "@typescript-eslint/visitor-keys": "8.59.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -2146,22 +2160,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.58.2", + "@typescript-eslint/parser": "^8.59.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.58.2.tgz", - "integrity": "sha512-/Zb/xaIDfxeJnvishjGdcR4jmr7S+bda8PKNhRGdljDM+elXhlvN0FyPSsMnLmJUrVG9aPO6dof80wjMawsASg==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.0.tgz", + "integrity": "sha512-TI1XGwKbDpo9tRW8UDIXCOeLk55qe9ZFGs8MTKU6/M08HWTw52DD/IYhfQtOEhEdPhLMT26Ka/x7p70nd3dzDg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.58.2", - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/typescript-estree": "8.58.2", - "@typescript-eslint/visitor-keys": "8.58.2", + "@typescript-eslint/scope-manager": "8.59.0", + "@typescript-eslint/types": "8.59.0", + "@typescript-eslint/typescript-estree": "8.59.0", + "@typescript-eslint/visitor-keys": "8.59.0", "debug": "^4.4.3" }, "engines": { @@ -2177,14 +2191,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.58.2.tgz", - "integrity": "sha512-Cq6UfpZZk15+r87BkIh5rDpi38W4b+Sjnb8wQCPPDDweS/LRCFjCyViEbzHk5Ck3f2QDfgmlxqSa7S7clDtlfg==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.0.tgz", + "integrity": "sha512-Lw5ITrR5s5TbC19YSvlr63ZfLaJoU6vtKTHyB0GQOpX0W7d5/Ir6vUahWi/8Sps/nOukZQ0IB3SmlxZnjaKVnw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.58.2", - "@typescript-eslint/types": "^8.58.2", + "@typescript-eslint/tsconfig-utils": "^8.59.0", + "@typescript-eslint/types": "^8.59.0", "debug": "^4.4.3" }, "engines": { @@ -2199,14 +2213,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.58.2.tgz", - "integrity": "sha512-SgmyvDPexWETQek+qzZnrG6844IaO02UVyOLhI4wpo82dpZJY9+6YZCKAMFzXb7qhx37mFK1QcPQ18tud+vo6Q==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.0.tgz", + "integrity": "sha512-UzR16Ut8IpA3Mc4DbgAShlPPkVm8xXMWafXxB0BocaVRHs8ZGakAxGRskF7FId3sdk9lgGD73GSFaWmWFDE4dg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/visitor-keys": "8.58.2" + "@typescript-eslint/types": "8.59.0", + "@typescript-eslint/visitor-keys": "8.59.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2217,9 +2231,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.58.2.tgz", - "integrity": "sha512-3SR+RukipDvkkKp/d0jP0dyzuls3DbGmwDpVEc5wqk5f38KFThakqAAO0XMirWAE+kT00oTauTbzMFGPoAzB0A==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.0.tgz", + "integrity": "sha512-91Sbl3s4Kb3SybliIY6muFBmHVv+pYXfybC4Oolp3dvk8BvIE3wOPc+403CWIT7mJNkfQRGtdqghzs2+Z91Tqg==", "dev": true, "license": "MIT", "engines": { @@ -2234,15 +2248,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.58.2.tgz", - "integrity": "sha512-Z7EloNR/B389FvabdGeTo2XMs4W9TjtPiO9DAsmT0yom0bwlPyRjkJ1uCdW1DvrrrYP50AJZ9Xc3sByZA9+dcg==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.0.tgz", + "integrity": "sha512-3TRiZaQSltGqGeNrJzzr1+8YcEobKH9rHnqIp/1psfKFmhRQDNMGP5hBufanYTGznwShzVLs3Mz+gDN7HkWfXg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/typescript-estree": "8.58.2", - "@typescript-eslint/utils": "8.58.2", + "@typescript-eslint/types": "8.59.0", + "@typescript-eslint/typescript-estree": "8.59.0", + "@typescript-eslint/utils": "8.59.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -2259,9 +2273,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.58.2.tgz", - "integrity": "sha512-9TukXyATBQf/Jq9AMQXfvurk+G5R2MwfqQGDR2GzGz28HvY/lXNKGhkY+6IOubwcquikWk5cjlgPvD2uAA7htQ==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.0.tgz", + "integrity": "sha512-nLzdsT1gdOgFxxxwrlNVUBzSNBEEHJ86bblmk4QAS6stfig7rcJzWKqCyxFy3YRRHXDWEkb2NralA1nOYkkm/A==", "dev": true, "license": "MIT", "engines": { @@ -2273,16 +2287,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.58.2.tgz", - "integrity": "sha512-ELGuoofuhhoCvNbQjFFiobFcGgcDCEm0ThWdmO4Z0UzLqPXS3KFvnEZ+SHewwOYHjM09tkzOWXNTv9u6Gqtyuw==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.0.tgz", + "integrity": "sha512-O9Re9P1BmBLFJyikRbQpLku/QA3/AueZNO9WePLBwQrvkixTmDe8u76B6CYUAITRl/rHawggEqUGn5QIkVRLMw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.58.2", - "@typescript-eslint/tsconfig-utils": "8.58.2", - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/visitor-keys": "8.58.2", + "@typescript-eslint/project-service": "8.59.0", + "@typescript-eslint/tsconfig-utils": "8.59.0", + "@typescript-eslint/types": "8.59.0", + "@typescript-eslint/visitor-keys": "8.59.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -2301,16 +2315,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.58.2.tgz", - "integrity": "sha512-QZfjHNEzPY8+l0+fIXMvuQ2sJlplB4zgDZvA+NmvZsZv3EQwOcc1DuIU1VJUTWZ/RKouBMhDyNaBMx4sWvrzRA==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.0.tgz", + "integrity": "sha512-I1R/K7V07XsMJ12Oaxg/O9GfrysGTmCRhvZJBv0RE0NcULMzjqVpR5kRRQjHsz3J/bElU7HwCO7zkqL+MSUz+g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.58.2", - "@typescript-eslint/types": "8.58.2", - "@typescript-eslint/typescript-estree": "8.58.2" + "@typescript-eslint/scope-manager": "8.59.0", + "@typescript-eslint/types": "8.59.0", + "@typescript-eslint/typescript-estree": "8.59.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2325,13 +2339,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.58.2.tgz", - "integrity": "sha512-f1WO2Lx8a9t8DARmcWAUPJbu0G20bJlj8L4z72K00TMeJAoyLr/tHhI/pzYBLrR4dXWkcxO1cWYZEOX8DKHTqA==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.0.tgz", + "integrity": "sha512-/uejZt4dSere1bx12WLlPfv8GktzcaDtuJ7s42/HEZ5zGj9oxRaD4bj7qwSunXkf+pbAhFt2zjpHYUiT5lHf0Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.2", + "@typescript-eslint/types": "8.59.0", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -2356,18 +2370,18 @@ } }, "node_modules/@xmldom/xmldom": { - "version": "0.8.12", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.12.tgz", - "integrity": "sha512-9k/gHF6n/pAi/9tqr3m3aqkuiNosYTurLLUtc7xQ9sxB/wm7WPygCv8GYa6mS0fLJEHhqMC1ATYhz++U/lRHqg==", + "version": "0.9.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.10.tgz", + "integrity": "sha512-A9gOqLdi6cV4ibazAjcQufGj0B1y/vDqYrcuP6d/6x8P27gRS8643Dj9o1dEKtB6O7fwxb2FgBmJS2mX7gpvdw==", "license": "MIT", "engines": { - "node": ">=10.0.0" + "node": ">=14.6" } }, "node_modules/@yao-pkg/pkg": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/@yao-pkg/pkg/-/pkg-6.15.0.tgz", - "integrity": "sha512-mYfCg5AgM3nzI2aT8lGuRYZxB1YUY00qViu47gJXOTjxkF+XY8evNQERnj/jRkCmEkLgsEXhx9Z0npOn2yx56A==", + "version": "6.18.2", + "resolved": "https://registry.npmjs.org/@yao-pkg/pkg/-/pkg-6.18.2.tgz", + "integrity": "sha512-lo+fNeV10ldTeTrDbgK2eYTIhKDqCUVVq7a4W3s7LiTwd9/8UKYdxBodVNNCbEd2JBtqKA4BZpevitfsOzyXig==", "dev": true, "license": "MIT", "dependencies": { @@ -2625,9 +2639,9 @@ } }, "node_modules/bare-fs": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.0.tgz", - "integrity": "sha512-xzqKsCFxAek9aezYhjJuJRXBIaYlg/0OGDTZp+T8eYmYMlm66cs6cYko02drIyjN2CBbi+I6L7YfXyqpqtKRXA==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.1.tgz", + "integrity": "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2650,9 +2664,9 @@ } }, "node_modules/bare-os": { - "version": "3.8.7", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.8.7.tgz", - "integrity": "sha512-G4Gr1UsGeEy2qtDTZwL7JFLo2wapUarz7iTMcYcMFdS89AIQuBoyjgXZz0Utv7uHs3xA9LckhVbeBi8lEQrC+w==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.9.0.tgz", + "integrity": "sha512-JTjuZyNIDpw+GytMO4a6TK1VXdVKKJr6DRxEHasyuYyShV2deuiHJK/ahGZlebc+SG0/wJCB9XK8gprBGDFi/Q==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2697,9 +2711,9 @@ } }, "node_modules/bare-url": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.4.0.tgz", - "integrity": "sha512-NSTU5WN+fy/L0DDenfE8SXQna4voXuW0FHM7wH8i3/q9khUSchfPbPezO4zSFMnDGIf9YE+mt/RWhZgNRKRIXA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.4.2.tgz", + "integrity": "sha512-/9a2j4ac6ckpmAHvod/ob7x439OAHst/drc2Clnq+reRYd/ovddwcF4LfoxHyNk5AuGBnPg+HqFjmE/Zpq6v0A==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2836,9 +2850,9 @@ } }, "node_modules/bun-types": { - "version": "1.3.12", - "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.3.12.tgz", - "integrity": "sha512-HqOLj5PoFajAQciOMRiIZGNoKxDJSr6qigAttOX40vJuSp6DN/CxWp9s3C1Xwm4oH7ybueITwiaOcWXoYVoRkA==", + "version": "1.3.13", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.3.13.tgz", + "integrity": "sha512-QXKeHLlOLqQX9LgYaHJfzdBaV21T63HhFJnvuRCcjZiaUDpbs5ED1MgxbMra71CsryN/1dAoXuJJJwIv/2drVA==", "dev": true, "license": "MIT", "dependencies": { @@ -4178,9 +4192,9 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", "dev": true, "license": "MIT", "dependencies": { @@ -4889,9 +4903,9 @@ "license": "MIT" }, "node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", "dev": true, "license": "MIT", "dependencies": { @@ -6810,16 +6824,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.58.2", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.58.2.tgz", - "integrity": "sha512-V8iSng9mRbdZjl54VJ9NKr6ZB+dW0J3TzRXRGcSbLIej9jV86ZRtlYeTKDR/QLxXykocJ5icNzbsl2+5TzIvcQ==", + "version": "8.59.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.0.tgz", + "integrity": "sha512-BU3ONW9X+v90EcCH9ZS6LMackcVtxRLlI3XrYyqZIwVSHIk7Qf7bFw1z0M9Q0IUxhTMZCf8piY9hTYaNEIASrw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.58.2", - "@typescript-eslint/parser": "8.58.2", - "@typescript-eslint/typescript-estree": "8.58.2", - "@typescript-eslint/utils": "8.58.2" + "@typescript-eslint/eslint-plugin": "8.59.0", + "@typescript-eslint/parser": "8.59.0", + "@typescript-eslint/typescript-estree": "8.59.0", + "@typescript-eslint/utils": "8.59.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index 6c28362b..a4ed73f6 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": "18.2.0", + "version": "19.0.0", "license": "BSD-3-Clause", "main": "dist/index.cjs", "module": "dist/index.js", @@ -51,7 +51,7 @@ "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --external:terminal-image --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe" }, "dependencies": { - "@appwrite.io/console": "~9.1.0", + "@appwrite.io/console": "11.0.0", "chalk": "4.1.2", "chokidar": "^3.6.0", "cli-progress": "^3.12.0", @@ -72,7 +72,8 @@ "zod": "^4.3.5" }, "overrides": { - "phin": "3.7.1" + "phin": "3.7.1", + "@xmldom/xmldom": "^0.9.10" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^8.0.0", diff --git a/scoop/appwrite.config.json b/scoop/appwrite.config.json index 86e6afda..7d7b1792 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": "18.2.0", + "version": "19.0.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/18.2.0/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/19.0.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/18.2.0/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/19.0.0/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe",