feat: Command Line SDK update for version 21.0.0#310
Conversation
Greptile SummaryThis PR updates the Appwrite Command Line SDK to version 21.0.0, bumping the package version, upgrading the
Confidence Score: 4/5The change is a well-structured SDK version bump; the two noted issues are self-consistent with pre-existing patterns in the repo and do not affect core functionality. Most of the diff is mechanical SDK-generated code that follows existing patterns. The
Important Files Changed
Reviews (1): Last reviewed commit: "chore: update Command Line SDK to 21.0.0" | Re-trigger Greptile |
| .option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger) | ||
| .option(`--offset <offset>`, `Number of results to skip.`, parseInteger) | ||
| .option(`--cursor-after <id>`, `Return results after this cursor ID.`) | ||
| .option(`--cursor-before <id>`, `Return results before this cursor ID.`) | ||
| .action( | ||
| actionRunner( | ||
| async ({ installationId, providerRepositoryId }) => | ||
| parse(await (await getVcsClient()).listRepositoryBranches(installationId, providerRepositoryId)), | ||
| async ({ installationId, providerRepositoryId, search, queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => | ||
| parse(await (await getVcsClient()).listRepositoryBranches(installationId, providerRepositoryId, search, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }))), |
There was a problem hiding this comment.
Unsupported query flags exposed to users
The --where, --sort-asc, and --sort-desc options are added to list-repository-branches, but both the --queries option description and the command description explicitly state only limit, offset, cursorAfter, and cursorBefore are supported by this endpoint. A user who runs appwrite vcs list-repository-branches --where "name=main" will see these flags in --help output and use them expecting them to work, but the generated query strings will be forwarded to an API that rejects them. Consider removing the unsupported options or adding a note in their help text that they are ignored.
| .command(`update-big-int-attribute`) | ||
| .description(`Update a bigint attribute. Changing the \`default\` value will not update already existing documents. | ||
| `) | ||
| .requiredOption(`--database-id <database-id>`, `Database ID.`) | ||
| .requiredOption(`--collection-id <collection-id>`, `Collection ID.`) | ||
| .requiredOption(`--key <key>`, `Attribute Key.`) | ||
| .requiredOption(`--required <required>`, `Is attribute required?`, parseBool) | ||
| .requiredOption(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`, parseInteger) | ||
| .option(`--min <min>`, `Minimum value`, parseInteger) | ||
| .option(`--max <max>`, `Maximum value`, parseInteger) | ||
| .option(`--new-key <new-key>`, `New Attribute Key.`) | ||
| .action( | ||
| actionRunner( | ||
| async ({ databaseId, collectionId, key, required, xdefault, min, max, newKey }) => | ||
| parse(await (await getDatabasesClient()).updateBigIntAttribute(databaseId, collectionId, key, required, xdefault, min, max, newKey)), |
There was a problem hiding this comment.
--xdefault is required but may be invalid when --required true
update-big-int-attribute marks --xdefault as a requiredOption, yet its description says "Cannot be set when attribute is required." A user who passes --required true --xdefault 0 will be forced to supply the value at the CLI layer but the API will then reject the combination. When --required true is the intent, the user has no valid way to satisfy both constraints. This same pattern exists in other pre-existing update attribute commands (updateBoolean, updateDatetime, etc.) and the same issue is present in tablesDBUpdateBigIntColumnCommand in tables-db.ts.
|
Closing — was generated from cloud-local 1.9.x spec which is ahead of the published appwrite/specs:main. Re-pushing against the public spec to keep CI consistent. |
This PR contains updates to the SDK for version 21.0.0.
What's Changed
project update-canonical-emails,update-disposable-emails, andupdate-free-emailstoupdate-deny-canonical-email-policy,update-deny-disposable-email-policy, andupdate-deny-free-email-policyproxy update-rule-verificationtoproxy update-rule-status--providerto--provider-idonproject get-o-auth-2-provider--variable-idrequired onfunctions create-variableandsites create-variablebigintcreate/update commands for legacy Databases attributesbigintcreate/update commands forTablesDBcolumns--on-duplicateflag ontablesdb upsert-row,create-rows, andupsert-rows--limitflag onvcs list-repository-branchesappwrite-cli-win-x64.exeandappwrite-cli-win-arm64.exe) via SignPathkey,resourceType,resourceId, andsecret--durationonproject create-ephemeral-keyfrom1to600seconds