Skip to content

feat: SDK update for version 22.1.2#327

Merged
ChiragAgg5k merged 1 commit into
masterfrom
dev
Jun 20, 2026
Merged

feat: SDK update for version 22.1.2#327
ChiragAgg5k merged 1 commit into
masterfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jun 20, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 22.1.2.

What's Changed

  • Added: OAuth2 login now requests the account.admin scope
  • Fixed: logout now reports the underlying server error when a session can't be revoked
  • Fixed: logout and client --reset no longer report success when the server session revocation fails

@ChiragAgg5k ChiragAgg5k changed the title feat: Command Line SDK update for version 22.1.2 feat: SDK update for version 22.1.2 Jun 20, 2026
@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR bumps the CLI version to 22.1.2 and delivers three targeted improvements: richer error propagation from server session revocation, correct failure behavior in logout and client --reset (no longer reporting success when the server call fails), and the addition of the account.admin OAuth2 scope.

  • deleteServerSession return type is widened from boolean to { deleted, error? } so callers can surface the actual server error message; logoutSessions and logoutFailure in generic.ts wire this through correctly.
  • logout (single-session) and client --reset now call error() and return early on failure instead of hinting and continuing; the multi-session logout path intentionally does not return early to allow the current-session pointer to reflect partial success.
  • OAUTH2_SCOPES gains account.admin to support admin-level operations in the OAuth device flow.

Confidence Score: 4/5

Safe to merge; the error-handling improvements are correct and the version bump is consistent across all install surfaces.

The core logic change — surfacing server errors from session revocation instead of silently swallowing them — is implemented correctly. The multi-session logout path intentionally continues after an error rather than returning early, but this means a silent session switch can happen without informing the user when a partial failure occurs. The new account.admin OAuth scope may also cause login failures against older self-hosted Appwrite instances that don't yet recognize the scope.

lib/commands/generic.ts (multi-session logout post-error flow) and lib/constants.ts (new OAuth scope and its server-version dependency).

Important Files Changed

Filename Overview
lib/auth/session.ts Refactored deleteServerSession return type from boolean to { deleted, error? } and propagates server errors through logoutSessions; logic is correct but the no-endpoint early-exit returns { deleted: false } without an error string, potentially causing silent failure counts.
lib/commands/generic.ts Logout and client-reset commands now surface server errors and return early on failure instead of falsely reporting success; the multi-session logout path intentionally continues to update session state after an error (unlike single-session and reset paths).
lib/constants.ts Added account.admin to OAUTH2_SCOPES; this wider scope is intentional per the PR but may break login against Appwrite server versions that don't yet recognize the scope.
CHANGELOG.md Added 22.1.2 changelog entry accurately reflecting the three changes in this PR.
package.json Version bumped from 22.1.1 to 22.1.2.
install.sh Download version string updated from 22.1.1 to 22.1.2.
install.ps1 Download URLs updated from 22.1.1 to 22.1.2 for both x64 and arm64.
scoop/appwrite.config.json Scoop manifest version and download URLs updated from 22.1.1 to 22.1.2.
package-lock.json Lock file version bumped to 22.1.2 in both root and packages entry.
README.md Version reference in install verification examples updated from 22.1.1 to 22.1.2.

Reviews (1): Last reviewed commit: "chore: update Command Line SDK to 22.1.2" | Re-trigger Greptile

Comment thread lib/commands/generic.ts
Comment thread lib/constants.ts
@ChiragAgg5k ChiragAgg5k merged commit 276a2f9 into master Jun 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants