docs: Update CLI docs for --token flag in account register
Updated cli-config.md to document the new --token option for account registration command. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,7 +102,7 @@ Uses **Commander.js** for command parsing.
|
||||
### Accounts (`cw account`)
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `add [--provider] [--email]` | Auto-discover or manually register account |
|
||||
| `add [--provider] [--email] [--token]` | Auto-discover, manually register, or register with setup token |
|
||||
| `list` | Show accounts with exhaustion status |
|
||||
| `remove <id>` | Remove account |
|
||||
| `refresh` | Clear expired exhaustion markers |
|
||||
|
||||
@@ -103,7 +103,7 @@ function extractProcedureName(mutationKey: unknown): MutationName | null {
|
||||
* Creates a MutationCache with a global onSuccess handler that automatically
|
||||
* invalidates the relevant queries for each tRPC mutation.
|
||||
*/
|
||||
export function createMutationCache(queryClient: QueryClient): MutationCache {
|
||||
export function createMutationCache(getQueryClient: () => QueryClient): MutationCache {
|
||||
return new MutationCache({
|
||||
onSuccess: (_data, _variables, _context, mutation) => {
|
||||
const name = extractProcedureName(mutation.options.mutationKey);
|
||||
@@ -112,6 +112,7 @@ export function createMutationCache(queryClient: QueryClient): MutationCache {
|
||||
const queriesToInvalidate = INVALIDATION_MAP[name];
|
||||
if (!queriesToInvalidate) return;
|
||||
|
||||
const queryClient = getQueryClient();
|
||||
for (const queryName of queriesToInvalidate) {
|
||||
void queryClient.invalidateQueries({
|
||||
queryKey: [[queryName]],
|
||||
|
||||
Reference in New Issue
Block a user