You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR is a large SDK update for v18.0.0 that adds webhook push/pull support, real-time deployment log streaming (--no-logs flag), protocol settings (REST/GraphQL/WebSocket), migrates key/platform commands from projects to a new project service, and fixes the build-command prompt for static sites.
P1: pushResources (the interactive appwrite push menu) is missing webhooks: pushWebhook in its actions map — selecting "Webhooks" silently does nothing. The direct appwrite push webhook command works correctly, and the pull side (pullResources) correctly wires up webhooks: pullWebhook.
Confidence Score: 4/5
Safe to merge after fixing the missing webhooks handler in the interactive push menu — direct push/pull commands are unaffected.
One P1 defect: selecting "Webhooks" from the interactive appwrite push resource picker silently does nothing because pushWebhook is not registered in the actions map. All other changes look correct and consistent with existing patterns.
lib/commands/push.ts — the pushResources actions map around line 2429.
Important Files Changed
Filename
Overview
lib/commands/push.ts
Large refactor adding webhook push support, deployment log streaming, and protocol settings; interactive push menu is missing the webhooks handler, causing silent no-op when selected.
lib/commands/pull.ts
Adds pullWebhooks following the existing pullTeams pattern; pullResources correctly wires webhooks: pullWebhook into its actions map.
lib/commands/utils/deployment.ts
New file extracting deployment log streaming via WebSocket realtime, packaging utilities, and the existing pushDeployment helper; well-structured with proper cleanup paths.
lib/commands/services/project.ts
Adds 20+ new project-scoped commands (keys, platforms, protocol/service status, variables) migrated from projects.ts, using cached getProjectClient() backed by sdkForProject().
lib/commands/services/projects.ts
Removes list-keys, create-key, get-key, update-key, delete-key, list-platforms, update-platform, update-api-status, and update-api-status-all commands, now covered by the new project.ts.
lib/commands/services/webhooks.ts
Renames --security to --tls, --http-user/--http-pass to --auth-username/--auth-password, adds --secret, and renames update-signature to update-secret; all in line with the v18 API.
lib/commands/config.ts
Adds WebhookSchema (id, name, url, events, enabled, tls — no sensitive fields) and protocols block to SettingsSchema; schema is strict and appropriate.
lib/spinner.ts
Adds stringWidth-aware fitMiddle that truncates long resource names to fit the terminal; padEnd in the short-string branch counts code units rather than visual columns (flagged in previous review).
lib/utils.ts
Extracts isCloudHostname helper, improves getConsoleBaseUrl to strip search/hash from cloud URLs, and adds siteRequiresBuildCommand to skip build-command prompt for static other framework sites.
lib/config.ts
Adds getWebhooks, getWebhook, addWebhook methods to the Local config class and exports KeysWebhooks.
lib/questions.ts
Adds questionsPushWebhooks, questionsGetBuildCommand, and adds "Webhooks" to both push/pull resource lists.
lib/services.ts
Adds getProjectService (using sdkForProject) and getWebhooksService (using sdkForProject) exports; consistent with existing service factory pattern.
questionsPushResources now includes Webhooks (Project) with value "webhooks", but the actions map in the else branch of pushResources does not include a webhooks entry. When a user runs appwrite push (without --all) and selects "Webhooks" from the interactive menu, actions["webhooks"] is undefined and the code silently does nothing — pushWebhook is never called.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains updates to the Command Line SDK for version 18.0.0.