-
Notifications
You must be signed in to change notification settings - Fork 40
feat: Command Line SDK update for version 12.0.0 #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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 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. 📒 Files selected for processing (8)
WalkthroughThis 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 Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
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. Comment |
There was a problem hiding this 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} overrideForCliprojects .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
📒 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 commitand--reference <REFERENCE>is consistent with the actual command definitions in bothlib/commands/functions.js(lines 1572-1573) andlib/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--versionparameter 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
--typeand--referenceflags instead of the previous--versionflag, consistent with the implementation changes inlib/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
bucketIdparameter aligns with the API change where exports now go to a secure internal bucket. The static analysis warning about shadowing the globalescapeproperty can be safely ignored—in this CSV context,escapeis 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-idoption 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
versionparameter to separatetypeandreferenceparameters, providing more flexibility and clarity for template deployment references.
833-833: LGTM! Function signature properly updated.The function signature correctly replaces
versionwithtypeandreferenceparameters, consistent with the typedef changes.
847-852: LGTM! Payload construction correctly implements the new reference model.The payload properly includes
typeandreferencefields when defined, replacing the previousversionfield.
1572-1573: LGTM! CLI options correctly updated.The CLI command now requires
--typeand--referenceflags 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
transformationsto 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
transformationsboolean 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
versionparameter to separatetypeandreferenceparameters, consistent with the same change inlib/commands/functions.js.
827-827: LGTM! Function signature properly updated.The function signature correctly replaces
versionwithtypeandreferenceparameters, 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
typeandreferencefields when defined, replacing the previousversionfield and maintaining consistency with the functions module.
1508-1509: LGTM! CLI options correctly updated.The CLI command now requires
--typeand--referenceflags with clear descriptions, properly reflecting the API changes and matching the pattern used in functions.js.
There was a problem hiding this 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
📒 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:deloymentshould bedeployment.The CHANGELOG entry for 12.0.0 contains a spelling error on line 5. The command name is misspelled as
create-deloyment-templatebut should becreate-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
versionparameter to separatetypeandreferenceparameters is well-documented. The typedef correctly specifiesTemplateReferenceTypefor type safety.
833-833: Function signature correctly updated.The signature properly replaces
versionwithtypeandreferenceparameters, maintaining consistency with the typedef.
847-852: Payload construction correctly implemented.Both
typeandreferenceparameters 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
VCSReferenceTypeinstead 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
versionparameter has been completely replaced with--typeand--referencethroughout 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 specifyingVCSReferenceTypeimproves type safety and clarity.
This PR contains updates to the Command Line SDK for version 12.0.0.