feat: SDK update for version 22.3.0#334
Conversation
Greptile SummaryThis PR bumps the CLI SDK to version 22.3.0 and ships several functional improvements: regional cloud endpoints are now derived from the user's configured endpoint rather than a hardcoded default;
Confidence Score: 3/5The PR is mostly safe, but the auth retry path in login.ts can silently remove a freshly-refreshed session whenever the subsequent Account.get() call fails for any reason other than auth failure. The auth recovery block in login.ts swallows all errors from the post-refresh Account.get() call and unconditionally proceeds to removeCurrentSession(). A transient 500 or network timeout after a successful token refresh will silently log the user out, even though their token is now valid. The rest of the changes — concurrent push, nullable policy totals, regional endpoint derivation, and the function proxy rule helper — are straightforward and well-handled. lib/auth/login.ts deserves a close look at the inner catch block and when removeCurrentSession() should and should not be reached after a successful token refresh. Important Files Changed
|
| const domains = variables["_APP_DOMAIN_FUNCTIONS"] | ||
| .split(",") | ||
| .map((value) => value.trim()) | ||
| .filter((value) => value.length > 0); | ||
|
|
There was a problem hiding this comment.
Unguarded property access on
_APP_DOMAIN_FUNCTIONS
If the console variables response does not include _APP_DOMAIN_FUNCTIONS (e.g., on a self-hosted instance that hasn't set it), variables["_APP_DOMAIN_FUNCTIONS"] is undefined, and calling .split(",") on it immediately throws a TypeError. This is caught by the surrounding try/catch, but the logged message "Error fetching console variables." obscures the actual cause. A null/undefined check before .split would produce a much clearer "_APP_DOMAIN_FUNCTIONS is not configured." error via the existing guard on domains.length === 0.
This PR contains updates to the SDK for version 22.3.0.
What's Changed
initandpushpushcreates a default function proxy rule when an existing function is missing onepushaborts and asks you to re-run when tablesDB deletions change the configlimit,sessionsLimit, andpasswordHistorynow accept null for unlimitedpushapplies service, protocol, auth method, and policy updates concurrentlycode,type, andresponsedetails