Skip to content

Conversation

@ChiragAgg5k
Copy link
Member

@ChiragAgg5k ChiragAgg5k commented Oct 24, 2025

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

Summary by CodeRabbit

  • New Features

    • Added table creation workflow with new init table command for managing database tables.
  • Bug Fixes

    • Fixed init tables command not working.
    • Improved tables DB resource syncing during push operations.
  • Chores

    • Version bumped to 10.2.3.

@coderabbitai
Copy link

coderabbitai bot commented Oct 24, 2025

Walkthrough

This PR updates Appwrite CLI from version 10.2.2 to 10.2.3. It includes version bumps across configuration files, installer scripts, and package manifests. Additionally, it introduces table initialization functionality by adding a new question set for table creation, implementing an initTable command, and enhancing the push command's tables database change handling with improved action metadata and display formatting. The changes also update the document security prompt in the collection creation flow.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Reasoning: The PR comprises primarily repetitive version bumps across 8 files (CHANGELOG.md, README.md, install.ps1, install.sh, lib/client.js, lib/parser.js, package.json, scoop/appwrite.config.json), which are low-effort and homogeneous. However, the new table initialization logic in lib/commands/init.js and lib/questions.js introduces distinct functionality that mirrors existing resource creation patterns but requires verification of correctness. The lib/commands/push.js changes are localized display improvements (formatting, action metadata, spacing) that are straightforward but benefit from careful review. The additions to lib/questions.js (questionsCreateTable export, documentSecurity updates) are well-scoped. Overall moderate complexity due to the mix of trivial version updates and contained new feature logic spanning a moderate file count.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: Command Line SDK update for version 10.2.3" is partially related to the changeset. It accurately refers to a real aspect of the changes—the version bump from 10.2.2 to 10.2.3 reflected throughout the codebase. However, the title is overly broad and does not capture the primary improvements highlighted in the changelog: fixing the init tables command and improving tables DB resource syncing during the push command. While the version update is genuine and relevant, a more specific title would better communicate what was actually improved in this release.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07e94c7 and 66ab7d3.

📒 Files selected for processing (11)
  • CHANGELOG.md (1 hunks)
  • README.md (2 hunks)
  • install.ps1 (1 hunks)
  • install.sh (1 hunks)
  • lib/client.js (1 hunks)
  • lib/commands/init.js (4 hunks)
  • lib/commands/push.js (7 hunks)
  • lib/parser.js (1 hunks)
  • lib/questions.js (2 hunks)
  • package.json (1 hunks)
  • scoop/appwrite.config.json (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
lib/commands/push.js (1)
lib/parser.js (3)
  • chalk (1-1)
  • log (182-184)
  • drawTable (49-106)
lib/client.js (2)
lib/parser.js (1)
  • os (6-6)
lib/config.js (1)
  • os (1-1)
lib/commands/init.js (2)
lib/questions.js (1)
  • questionsCreateTable (504-568)
lib/parser.js (3)
  • success (194-196)
  • log (182-184)
  • actionRunner (158-166)
lib/questions.js (2)
lib/commands/pull.js (2)
  • database (322-325)
  • database (376-379)
lib/commands/init.js (9)
  • answers (45-45)
  • answers (71-71)
  • answers (141-141)
  • answers (154-154)
  • answers (166-166)
  • answers (200-200)
  • answers (233-233)
  • answers (249-249)
  • answers (375-375)
🔇 Additional comments (18)
README.md (1)

32-32: LGTM! Version references updated correctly.

The version numbers in the installation verification examples have been updated consistently to reflect the 10.2.3 release.

Also applies to: 63-63

install.ps1 (1)

16-17: LGTM! Download URLs updated correctly.

Both x64 and arm64 Windows binary URLs have been updated consistently to point to the 10.2.3 release artifacts.

package.json (1)

5-5: LGTM! Package version bumped correctly.

The package version has been updated to 10.2.3, consistent with the release version across all other files.

CHANGELOG.md (1)

3-7: LGTM! Changelog updated correctly.

The 10.2.3 section has been added with clear descriptions of the bug fix and improvement included in this release. The formatting is consistent with the existing changelog structure.

lib/client.js (1)

19-20: LGTM! SDK headers updated correctly.

The SDK version header and user-agent string have been updated to reflect version 10.2.3, ensuring proper client identification in API requests.

install.sh (1)

100-100: LGTM! Installation script version updated correctly.

The version constant has been updated to 10.2.3, which will ensure the installation script downloads the correct release binary for Linux and macOS users.

scoop/appwrite.config.json (1)

3-3: LGTM! Scoop configuration updated correctly.

The Scoop package configuration has been updated consistently with version 10.2.3 and the download URLs for both x64 and arm64 Windows builds point to the correct release artifacts.

Also applies to: 9-9, 18-18

lib/parser.js (1)

125-125: LGTM! Error reporting version updated correctly.

The CLI version string used in error reporting has been updated to 10.2.3, ensuring that bug reports and error diagnostics reference the correct version.

lib/commands/init.js (4)

22-22: LGTM!

The import follows the established pattern and is correctly placed.


36-42: LGTM!

The addition of the table action and reordering of the actions map improves logical grouping of database-related resources.


165-197: LGTM! Excellent pattern consistency.

The initTable function follows the same well-established pattern as initCollection, appropriately adapting for tables by using tablesDB methods, rowSecurity, and columns. The implementation correctly handles both new and existing database scenarios with proper ID generation.


596-600: LGTM!

The CLI command registration follows the established pattern with appropriate description and alias.

lib/commands/push.js (3)

1728-1795: Enhanced action metadata display improves readability.

The refactoring moves color highlighting from the data values to the action column, making it immediately clear whether a change is a deletion (red), creation (green), or update (yellow). The warning message width adjustment better accommodates the message text.


840-849: LGTM! Improved warning visibility.

The additional spacing after warning messages enhances visual separation and makes critical warnings more prominent.


1853-1855: LGTM! Conditional spacing improves output consistency.

The logic correctly adds spacing after apply operations when no deletions were performed, ensuring consistent formatting regardless of the operation types executed.

lib/questions.js (3)

499-502: LGTM! Improved prompt clarity.

The updated message is more descriptive, and the explicit choices array makes the options clear to users. This change aligns well with the new table question format.


504-568: LGTM! Excellent parallel implementation.

The questionsCreateTable question set mirrors the collection creation flow with appropriate adaptations:

  • Uses getTablesDBs() for database selection
  • References "rows" instead of "documents" for security settings
  • Maintains consistent structure and user experience

The implementation is well-structured and follows established patterns.


1070-1070: LGTM!

The export is correctly placed and properly exposes the new question set.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@loks0n loks0n merged commit 1ea90ef into master Oct 24, 2025
2 checks passed
@ChiragAgg5k ChiragAgg5k deleted the dev branch October 24, 2025 08:42
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