Skip to content

feat: Command Line SDK update for version 18.0.0#296

Merged
ChiragAgg5k merged 3 commits intomasterfrom
dev
Apr 14, 2026
Merged

feat: Command Line SDK update for version 18.0.0#296
ChiragAgg5k merged 3 commits intomasterfrom
dev

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

This PR contains updates to the Command Line SDK for version 18.0.0.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 14, 2026

Greptile Summary

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.

Comments Outside Diff (1)

  1. lib/commands/push.ts, line 2429-2450 (link)

    P1 Missing webhooks in interactive push actions map

    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.

Reviews (2): Last reviewed commit: "fix: regenerate bun.lock for updated con..." | Re-trigger Greptile

Comment thread lib/commands/push.ts
Comment thread lib/spinner.ts
Comment thread .github/workflows/publish.yml
@ChiragAgg5k ChiragAgg5k merged commit 75e2be3 into master Apr 14, 2026
1 of 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.

3 participants