Skip to content

feat: SDK update for version 18.2.0#300

Merged
ChiragAgg5k merged 2 commits intomasterfrom
dev
Apr 16, 2026
Merged

feat: SDK update for version 18.2.0#300
ChiragAgg5k merged 2 commits intomasterfrom
dev

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Summary

This PR contains updates to the SDK for version 18.2.0.

What's Changed

  • Added source code and entrypoint validation before local function execution
  • Added macOS code signature verification for standalone binary installs
  • Added webhooks to the list of supported resource types
  • Updated Open Runtimes version from v4 to v5
  • Updated runtime start commands from sh to bash for improved compatibility
  • Updated project init flow with contextual next steps and improved prompts
  • Fixed Docker process error handling to report exit codes and signals
  • Fixed function container startup to detect early exits before port open
  • Fixed stderr output in Docker start to write to stderr instead of stdout

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 16, 2026

Greptile Summary

This PR updates the Appwrite CLI SDK to version 18.2.0 with several quality-of-life improvements: source code and entrypoint validation before local function runs, better Docker error reporting (exit codes and signals), early-exit detection before port open, macOS code signature verification in the install script, Open Runtimes v4→v5 bump, shbash for start commands, webhooks as a supported resource type, and a reworked init project flow with contextual next steps.

Confidence Score: 5/5

Safe to merge; all findings are P2 style/consistency suggestions with no runtime impact.

No P0 or P1 issues found. The three findings are: a redundant dockerStop call (idempotent, harmless), a promise that never settles without a needle (already guarded by a Promise.race timeout), and a missing macOS codesign check in the update path (install.sh has it but update.ts does not). None affect correctness or production reliability today.

lib/emulation/docker.ts (redundant dockerStop + waitForProcessOutput design), lib/commands/update.ts (missing macOS signature check parity with install.sh)

Important Files Changed

Filename Overview
lib/emulation/docker.ts Major refactor: adds assertFunctionSourceCode, waitForProcessOutput, waitForProcessClose, assertDockerSuccess helpers; fixes stderr routing; adds early-exit detection before port open; redundant dockerStop on success path and a never-settling promise design noted.
lib/commands/run.ts Adds pre-run source code validation, lazy "Runtime logs:" header, improved error messages, and visual spacing around Docker start; clean and correct.
lib/commands/init.ts Refactors project init flow: adds extractSelectionId helper, contextual next-steps display, improved success messages, and moves skills installation inline; no correctness issues found.
lib/commands/update.ts No source changes in this PR, but macOS code-signature verification added to install.sh is absent from the updateViaStandaloneBinary path.
install.sh Adds verifyMacOSCodeSignature step using codesign -dv before binary placement; version bumped to 18.2.0; implementation correctly handles non-macOS and missing codesign gracefully.
lib/emulation/utils.ts Bumps openRuntimesVersion from v4 to v5 and updates all runtime startCommands from sh to bash; straightforward and correct.
lib/constants.ts Version bumped to 18.2.0; "webhooks" added to CONFIG_RESOURCE_KEYS; clean change.
install.ps1 Version bumped to 18.2.0 in download URLs; no structural changes.

Comments Outside Diff (1)

  1. lib/commands/update.ts, line 215-231 (link)

    P2 macOS signature verification missing in appwrite update path

    install.sh now calls codesign -dv to reject unsigned binaries before placing them, but updateViaStandaloneBinary downloads and moves the binary into place without any equivalent check. A user running appwrite update on macOS gets an unverified binary, defeating the protection added for fresh installs. Consider adding the same codesign -dv gate after downloadStandaloneBinary returns, at least on process.platform === "darwin".

Reviews (1): Last reviewed commit: "chore: restore Homebrew formula SHA256 h..." | Re-trigger Greptile

Comment thread lib/emulation/docker.ts
Comment thread lib/emulation/docker.ts
@ChiragAgg5k ChiragAgg5k merged commit 8ae5ff9 into master Apr 16, 2026
2 checks passed
@ChiragAgg5k ChiragAgg5k deleted the dev branch April 16, 2026 05:15
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