feat: Command Line SDK update for version 21.0.0#307
feat: Command Line SDK update for version 21.0.0#307ArnabChatterjee20k wants to merge 13 commits into
Conversation
Greptile SummaryThis PR bumps the CLI to version 21.0.0 with several breaking renames, new BigInt attribute/column commands, extended query/pagination flags across multiple services, and Windows code-signing in the publish workflow.
Confidence Score: 3/5Two confirmed documentation defects make this risky to merge as-is: CHANGELOG attributes --on-duplicate to the wrong service, and --search was silently dropped from proxy list-rules with no migration note. The CHANGELOG entry for --on-duplicate names tablesdb commands that never received the flag; it was actually added to migrations commands. Separately, --search was removed from proxy list-rules without any CHANGELOG entry, leaving users with no documented migration path. CHANGELOG.md (wrong commands named for --on-duplicate) and lib/commands/services/proxy.ts (undocumented removal of --search from list-rules). Important Files Changed
|
| ```bash | ||
| appwrite databases update-big-int-attribute \ | ||
| --database-id <DATABASE_ID> \ | ||
| --collection-id <COLLECTION_ID> \ | ||
| --key '' \ | ||
| --required false \ | ||
| --default null | ||
| ``` |
There was a problem hiding this comment.
Option name mismatch in documentation example
The example uses --default null, but the actual CLI option defined in lib/commands/services/databases.ts is --xdefault. Running this example as written will produce an unknown option error. The flag should be --xdefault null — though even that won't work as written because parseInteger is used as the parser for --xdefault, so "null" would be coerced to NaN, not a JSON null. The same mismatch is present in docs/examples/tablesdb/update-big-int-column.md.
| .option(`--min <min>`, `Minimum value`, parseInteger) | ||
| .option(`--max <max>`, `Maximum value`, parseInteger) | ||
| .option(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`, parseInteger) |
There was a problem hiding this comment.
parseInteger loses precision for large BigInt values
parseInt() returns a JavaScript number (IEEE 754 double), which can only safely represent integers up to Number.MAX_SAFE_INTEGER (2^53 − 1 ≈ 9 × 10^15). Database BIGINT columns are 64-bit and accept values up to ~9.2 × 10^18. Passing a value like 9223372036854775807 through parseInteger silently serialises as 9223372036854776000 — a different number — without any error. The --min, --max, and --xdefault options all share this flaw on both the create-big-int-attribute and update-big-int-attribute commands. The same problem exists in the parallel tables-db.ts commands. A parseBigInt helper that validates as a BigInt string and passes the value as a string (or BigInt) to the SDK would fix this.
|
Superseding with a fresh PR built from current master to remove iteration noise on the dev branch. |
| .option(`--cursor-before <id>`, `Return results before this cursor ID.`) | ||
| .action( | ||
| actionRunner( | ||
| async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => | ||
| parse(await (await getProxyClient()).listRules(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total)), | ||
| async ({ queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => | ||
| parse(await (await getProxyClient()).listRules(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total)), | ||
| ), | ||
| ); |
There was a problem hiding this comment.
--search silently removed from proxy list-rules without a CHANGELOG entry
The base version exposed --search <search> on proxy list-rules, and this PR removes it along with its use in the listRules call. Any script or automation that passes --search will now receive an "unknown option" error. The 21.0.0 CHANGELOG has no mention of this removal, so there is no documented migration path for affected users.
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