Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/commands/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ membersCommand

spinner.stop();
printSuccess(`Found ${members.length} member(s)`);
printTable(members);
printTable(members.map(flattenMember));
} catch (error) {
spinner.stop();
printError(
Expand Down
10 changes: 9 additions & 1 deletion src/commands/plans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,15 @@ plansCommand
});
spinner.stop();
printSuccess("Plans reordered successfully.");
printTable(result.orderPlans);
const rows = (result.orderPlans ?? []).map((plan) => ({
id: plan.id,
name: plan.name,
status: plan.status,
isPaid: plan.isPaid,
memberCount: plan.memberCount,
priority: plan.priority,
}));
printTable(rows);
} catch (error) {
spinner.stop();
printError(
Expand Down
9 changes: 8 additions & 1 deletion src/commands/records.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,14 @@ recordsCommand
variables,
});
spinner.stop();
const records = result.dataRecords.edges.map((e) => e.node);
const records = result.dataRecords.edges.map((e) => ({
id: e.node.id,
createdAt: e.node.createdAt,
updatedAt: e.node.updatedAt,
...Object.fromEntries(
Object.entries(e.node.data).map(([k, v]) => [`data.${k}`, v])
),
}));
printSuccess(`Found ${records.length} record(s)`);
printTable(records);
} catch (error) {
Expand Down
12 changes: 11 additions & 1 deletion src/commands/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ tablesCommand
query: `query { dataTables { ${TABLE_FIELDS} } }`,
});
spinner.stop();
printTable(result.dataTables);
const rows = result.dataTables.map((t) => ({
id: t.id,
key: t.key,
name: t.name,
createdAt: t.createdAt,
createRule: t.createRule,
readRule: t.readRule,
updateRule: t.updateRule,
deleteRule: t.deleteRule,
}));
printTable(rows);
} catch (error) {
spinner.stop();
printError(
Expand Down