rename spaces get-all to get to align with the rest of the cli#192
rename spaces get-all to get to align with the rest of the cli#192umair-ably wants to merge 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThis PR renames all Changes
Review Notes
|
| "$ ably spaces locks get my-space", | ||
| "$ ably spaces locks get my-space --json", | ||
| "$ ably spaces locks get my-space my-lock", | ||
| "$ ably spaces locks get my-space my-lock --json", |
There was a problem hiding this comment.
| "$ ably spaces locks get my-space my-lock --json", | |
| "$ ably spaces locks get my-space my-lock --json", | |
| "$ ably spaces locks get my-space my-lock --pretty-json", |
All other spaces get commands show three examples (plain, --json, --pretty-json):
| static override examples = [ | ||
| "$ ably spaces locks get my-space", | ||
| "$ ably spaces locks get my-space --json", | ||
| "$ ably spaces locks get my-space my-lock", |
There was a problem hiding this comment.
| "$ ably spaces locks get my-space my-lock", | |
| "$ ably spaces locks get my-space lock-id", |
Seems, you can query any lock by it's lock-id instead of just your own lock -> https://ably.com/docs/spaces/locking#query.
Same is applicable for all commands
|
|
||
| try { | ||
| await this.initializeSpace(flags, spaceName, { | ||
| enterSpace: false, |
There was a problem hiding this comment.
| enterSpace: false, | |
| enterSpace: true, |
Existing bug, was trying to fix as a part of #185
- The SDK's
Locksclass stores locks in aMap<lockId, Map<connectionId, Lock>>and it starts empty. - So, it returns empty locks even when locks are set on space
enterSpace: truemakes sure proper syncing happens before accessing map.
Ably capabilities are operation-based, not clientId-based, so client identity is irrelevant for pure read queries. Removed clientIdFlag from spaces members/locations/cursors/locks get and rooms occupancy get. Updated docs and skills to clarify when --client-id should be used.
This PR renames all spaces * get-all subcommands to spaces * get for consistency with the rest of the CLI. For spaces locks, the two separate commands (get and get-all) are merged into a single get command where LOCKID is now optional — omitting it returns all locks, providing it returns a single lock.