Skip to content

Conversation

@ChiragAgg5k
Copy link
Member

@ChiragAgg5k ChiragAgg5k commented Nov 21, 2025

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

@coderabbitai
Copy link

coderabbitai bot commented Nov 21, 2025

Warning

Rate limit exceeded

@ChiragAgg5k has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 48 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between cb4348f and 8f59a27.

📒 Files selected for processing (8)
  • CHANGELOG.md (1 hunks)
  • README.md (2 hunks)
  • install.ps1 (1 hunks)
  • install.sh (1 hunks)
  • lib/client.js (1 hunks)
  • lib/parser.js (1 hunks)
  • package.json (1 hunks)
  • scoop/appwrite.config.json (2 hunks)

Walkthrough

This PR updates CLI metadata and docs and introduces several API/CLI changes. CHANGELOG adds a new 12.0.0 entry. Many files bump the CLI/package/install versions to 11.1.2 and update client headers and installer URLs. Template deployments (functions/sites) switch from a single version parameter to type + reference. The migrations CSV export removes the bucketId parameter. Storage bucket operations gain a transformations parameter. Projects CLI scopes options are changed from required to optional. Documentation and examples are updated; a small tables-db help text wording change is applied.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify consistency of versiontype/reference refactor across lib/commands/functions.js and lib/commands/sites.js (payloads, typedefs, CLI options).
  • Confirm migrations CSV export removal of bucketId in lib/commands/migrations.js and corresponding CLI help text/behavior.
  • Check transformations threading through storage functions and CLI in lib/commands/storage.js (request payloads and list queries).
  • Ensure projects scopes option change in lib/commands/projects.js doesn’t break validation or callers.
  • Validate version bumps in package.json, lib/client.js, parser paths, installer scripts, and README are consistent and do not leave mismatched version strings.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
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.
Title check ⚠️ Warning The PR title claims version 12.0.0 update, but the raw_summary and PR objectives clearly indicate this is a version 11.1.2 release with breaking changes documented in CHANGELOG.md as version 12.0.0 features. Align the PR title with the actual changes: either correct to 'feat: Command Line SDK update for version 11.1.2' or clarify the versioning discrepancy between the title and the actual deliverables.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
lib/commands/projects.js (1)

1093-1093: Fix the incorrect documentation.

The description incorrectly states "Maximum of 100 events are allowed" but should say "Maximum of 100 scopes are allowed" to match the parameter name and the create-key documentation at line 2325.

Apply this diff to fix the documentation:

 /**
  * @typedef {Object} ProjectsUpdateKeyRequestParams
  * @property {string} projectId Project unique ID.
  * @property {string} keyId Key unique ID.
  * @property {string} name Key name. Max length: 128 chars.
- * @property {string[]} scopes Key scopes list. Maximum of 100 events are allowed.
+ * @property {string[]} scopes Key scopes list. Maximum of 100 scopes are allowed.
  * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
  * @property {boolean} overrideForCli
 projects
     .command(`update-key`)
     .description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. `)
     .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
     .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
     .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
-    .option(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
+    .option(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
     .option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
     .action(actionRunner(projectsUpdateKey))

Also applies to: 2343-2343

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20a6015 and 9209036.

📒 Files selected for processing (17)
  • CHANGELOG.md (1 hunks)
  • README.md (2 hunks)
  • docs/examples/functions/create-template-deployment.md (1 hunks)
  • docs/examples/migrations/create-csv-export.md (0 hunks)
  • docs/examples/sites/create-template-deployment.md (1 hunks)
  • install.ps1 (1 hunks)
  • install.sh (1 hunks)
  • lib/client.js (1 hunks)
  • lib/commands/functions.js (4 hunks)
  • lib/commands/migrations.js (2 hunks)
  • lib/commands/projects.js (2 hunks)
  • lib/commands/sites.js (4 hunks)
  • lib/commands/storage.js (10 hunks)
  • lib/commands/tables-db.js (2 hunks)
  • lib/parser.js (1 hunks)
  • package.json (1 hunks)
  • scoop/appwrite.config.json (2 hunks)
💤 Files with no reviewable changes (1)
  • docs/examples/migrations/create-csv-export.md
🧰 Additional context used
🧬 Code graph analysis (3)
lib/commands/tables-db.js (1)
lib/parser.js (1)
  • parseBool (176-180)
lib/commands/storage.js (1)
lib/parser.js (1)
  • parseBool (176-180)
lib/client.js (2)
lib/parser.js (1)
  • os (6-6)
lib/config.js (1)
  • os (1-1)
🪛 Biome (2.1.2)
lib/commands/migrations.js

[error] 191-191: Do not shadow the global "escape" property.

Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.

(lint/suspicious/noShadowRestrictedNames)

🔇 Additional comments (24)
install.sh (1)

100-100: LGTM! Version bump applied correctly.

The version string has been updated consistently for the 11.1.2 release.

README.md (1)

32-32: LGTM! Documentation examples updated correctly.

The version output examples have been updated to reflect the 11.1.2 release.

Also applies to: 63-63

lib/parser.js (1)

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

The CLI version string in error reporting has been updated to match the 11.1.2 release.

package.json (1)

5-5: LGTM! Package version bumped correctly.

The npm package version has been updated to 11.1.2.

install.ps1 (1)

16-17: LGTM! Windows installer URLs updated correctly.

Both x64 and arm64 download URLs have been updated to the 11.1.2 release.

scoop/appwrite.config.json (1)

3-3: LGTM! Scoop configuration updated correctly.

The Scoop package version and download URLs for both x64 and arm64 builds have been updated to 11.1.2.

Also applies to: 9-9, 18-18

docs/examples/functions/create-template-deployment.md (1)

6-7: Documentation matches implementation—no breaking changes found.

The documentation snippet showing --type commit and --reference <REFERENCE> is consistent with the actual command definitions in both lib/commands/functions.js (lines 1572-1573) and lib/commands/sites.js (lines 1508-1509). Both files define these as required options with identical descriptions, and the handler functions properly use both parameters. There is no --version parameter in the implementation, so there is no breaking change to verify.

Likely an incorrect or invalid review comment.

docs/examples/sites/create-template-deployment.md (1)

1-7: LGTM! Documentation correctly reflects the API changes.

The example has been properly updated to show the new --type and --reference flags instead of the previous --version flag, consistent with the implementation changes in lib/commands/sites.js.

lib/client.js (1)

19-20: LGTM! Version headers updated correctly.

The SDK version and user-agent headers have been properly bumped from 11.1.1 to 11.1.2, consistent with this release.

lib/commands/migrations.js (2)

191-191: Function signature correctly updated; static analysis warning is a false positive.

The removal of the bucketId parameter aligns with the API change where exports now go to a secure internal bucket. The static analysis warning about shadowing the global escape property can be safely ignored—in this CSV context, escape is the appropriate parameter name for the escape character configuration.


709-721: LGTM! CLI command properly updated for the new behavior.

The command description clearly explains that exports now go to a secure internal bucket with email notification, and the --bucket-id option has been correctly removed. This simplifies the user experience.

lib/commands/functions.js (4)

817-828: LGTM! Typedef correctly updated for the new reference model.

The typedef properly reflects the change from a single version parameter to separate type and reference parameters, providing more flexibility and clarity for template deployment references.


833-833: LGTM! Function signature properly updated.

The function signature correctly replaces version with type and reference parameters, consistent with the typedef changes.


847-852: LGTM! Payload construction correctly implements the new reference model.

The payload properly includes type and reference fields when defined, replacing the previous version field.


1572-1573: LGTM! CLI options correctly updated.

The CLI command now requires --type and --reference flags with clear descriptions, properly reflecting the API changes.

lib/commands/storage.js (5)

44-44: LGTM! Query documentation updated to include transformations.

The queries description correctly adds transformations to the list of filterable attributes for bucket listing.


98-98: LGTM! Transformations parameter properly added to bucket creation.

The typedef and function signature correctly include the new transformations boolean parameter with clear documentation.

Also applies to: 107-107


144-146: LGTM! Payload construction correctly handles transformations parameter.

The transformations field is properly added to the payload when defined, following the established pattern for optional parameters.


206-206: LGTM! Update bucket operations properly include transformations.

The typedef, function signature, and payload construction for bucket updates correctly include the transformations parameter, maintaining consistency with the create operation.

Also applies to: 215-215, 249-251


832-832: LGTM! CLI commands properly expose transformations option.

All relevant CLI commands (list-buckets, create-bucket, update-bucket) correctly include transformations with appropriate help text and boolean parsing.

Also applies to: 851-851, 874-874

lib/commands/sites.js (4)

810-822: LGTM! Typedef correctly updated for the new reference model.

The typedef properly reflects the change from a single version parameter to separate type and reference parameters, consistent with the same change in lib/commands/functions.js.


827-827: LGTM! Function signature properly updated.

The function signature correctly replaces version with type and reference parameters, maintaining consistency with the typedef and the parallel implementation in functions.js.


841-846: LGTM! Payload construction correctly implements the new reference model.

The payload properly includes type and reference fields when defined, replacing the previous version field and maintaining consistency with the functions module.


1508-1509: LGTM! CLI options correctly updated.

The CLI command now requires --type and --reference flags with clear descriptions, properly reflecting the API changes and matching the pattern used in functions.js.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
CHANGELOG.md (1)

5-8: Mark API breaking changes explicitly for user awareness.

The first two bullet points on lines 5–6 represent breaking API changes (parameter replacement and removal). Consider prefixing them with "Breaking:" to match the convention used in other major version entries (e.g., line 57 for 10.0.0), making it immediately clear to users that migration is required.

-* Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0`
-* Remove `bucket-id` parameter from `create-csv-export` command
+* **Breaking:** Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0`
+* **Breaking:** Remove `bucket-id` parameter from `create-csv-export` command
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9209036 and cb4348f.

📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • lib/commands/functions.js (5 hunks)
  • lib/commands/sites.js (5 hunks)
🔇 Additional comments (11)
CHANGELOG.md (1)

3-8: Fix typo on line 5: deloyment should be deployment.

The CHANGELOG entry for 12.0.0 contains a spelling error on line 5. The command name is misspelled as create-deloyment-template but should be create-deployment-template (consistent with the correct spelling shown in the usage example on the same line).

Regarding the version discrepancy claim in the original review: the CHANGELOG clearly documents version 12.0.0 with preceding versions 11.1.1 and 11.1.0. No evidence of version 11.1.2 exists in the codebase, so the premise of the version mismatch concern cannot be verified.

Likely an incorrect or invalid review comment.

lib/commands/functions.js (5)

817-828: LGTM! Typedef updated correctly for the new reference model.

The migration from a single version parameter to separate type and reference parameters is well-documented. The typedef correctly specifies TemplateReferenceType for type safety.


833-833: Function signature correctly updated.

The signature properly replaces version with type and reference parameters, maintaining consistency with the typedef.


847-852: Payload construction correctly implemented.

Both type and reference parameters are conditionally added to the payload following the established pattern in the codebase.


873-873: Good clarification of VCS reference type.

The typedef now explicitly specifies VCSReferenceType instead of a generic type, improving type safety and making the distinction from template reference types (which also support tags) more clear.


1572-1573: No breaking changes remain in the codebase.

Verification confirms that the old version parameter has been completely replaced with --type and --reference throughout the codebase. The breaking change is properly documented in CHANGELOG.md (version 12.0.0), and all documentation examples have been updated to reflect the new CLI interface.

lib/commands/sites.js (5)

811-822: LGTM! Consistent typedef update across sites commands.

The typedef changes mirror those in functions.js, maintaining consistency across the codebase. The documentation clearly explains the purpose of the new parameters.


827-827: Function signature correctly updated.

The signature change is consistent with the typedef and mirrors the pattern established in functions.js.


841-846: Payload construction correctly implemented.

Both parameters are properly added to the payload using the conditional assignment pattern consistent throughout the codebase.


1508-1509: CLI options correctly configured.

The options are properly defined as required and descriptions match the typedef. This change is consistent with the parallel changes in functions.js.


867-867: Good clarification of VCS reference type.

Consistent with the improvement made in functions.js, explicitly specifying VCSReferenceType improves type safety and clarity.

@ChiragAgg5k ChiragAgg5k changed the title feat: Command Line SDK update for version 11.1.2 feat: Command Line SDK update for version 12.0.0 Nov 21, 2025
@abnegate abnegate merged commit 03a1e15 into master Nov 21, 2025
1 check 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