@meltstudio/meltctl 4.26.0 → 4.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,5 +2,6 @@ export declare function auditSubmitCommand(file?: string): Promise<void>;
2
2
  export declare function auditListCommand(options: {
3
3
  type?: string;
4
4
  repository?: string;
5
+ latest?: boolean;
5
6
  limit?: string;
6
7
  }): Promise<void>;
@@ -86,6 +86,8 @@ export async function auditListCommand(options) {
86
86
  params.set('type', options.type);
87
87
  if (options.repository)
88
88
  params.set('repository', options.repository);
89
+ if (options.latest)
90
+ params.set('latest', 'true');
89
91
  if (options.limit)
90
92
  params.set('limit', options.limit);
91
93
  const query = params.toString();
@@ -106,27 +108,50 @@ export async function auditListCommand(options) {
106
108
  console.log(chalk.dim('\n No audits found.\n'));
107
109
  return;
108
110
  }
109
- console.log(chalk.bold(`\n Audits (${body.count}):\n`));
110
- console.log(chalk.dim(` ${'TYPE'.padEnd(12)} ${'REPOSITORY'.padEnd(40)} ${'AUTHOR'.padEnd(30)} DATE`));
111
- console.log();
112
111
  const typeLabels = {
113
112
  audit: 'Tech Audit',
114
113
  'ux-audit': 'UX Audit',
115
114
  };
116
- for (const r of body.audits) {
117
- const date = new Date(r.createdAt).toLocaleDateString('en-US', {
118
- month: 'short',
119
- day: 'numeric',
120
- year: 'numeric',
121
- hour: '2-digit',
122
- minute: '2-digit',
123
- });
124
- const repo = r.repository ?? r.project;
125
- const label = typeLabels[r.type] ?? r.type;
126
- const typeColor = r.type === 'ux-audit' ? chalk.yellow : chalk.magenta;
127
- console.log(` ${typeColor(label.padEnd(12))} ${chalk.white(repo.padEnd(40))} ${chalk.dim(r.author.padEnd(30))} ${chalk.dim(date)}`);
128
- if (r.branch && r.branch !== 'main') {
129
- console.log(` ${' '.padEnd(12)} ${chalk.dim(`branch: ${r.branch} commit: ${r.commit ?? 'N/A'}`)}`);
115
+ if (options.latest) {
116
+ console.log(chalk.bold(`\n Latest Audits (${body.count}):\n`));
117
+ console.log(chalk.dim(` ${'TYPE'.padEnd(12)} ${'REPOSITORY'.padEnd(40)} ${'AGE'.padEnd(10)} ${'AUTHOR'.padEnd(30)} DATE`));
118
+ console.log();
119
+ for (const r of body.audits) {
120
+ const createdAt = new Date(r.created_at ?? r.createdAt);
121
+ const daysAgo = Math.floor((Date.now() - createdAt.getTime()) / (1000 * 60 * 60 * 24));
122
+ const date = createdAt.toLocaleDateString('en-US', {
123
+ month: 'short',
124
+ day: 'numeric',
125
+ year: 'numeric',
126
+ });
127
+ const repo = r.repository ?? r.project;
128
+ const label = typeLabels[r.type] ?? r.type;
129
+ const typeColor = r.type === 'ux-audit' ? chalk.yellow : chalk.magenta;
130
+ const ageText = daysAgo === 0 ? 'today' : `${daysAgo}d ago`;
131
+ const ageColor = daysAgo <= 7 ? chalk.green : daysAgo <= 30 ? chalk.yellow : chalk.red;
132
+ console.log(` ${typeColor(label.padEnd(12))} ${chalk.white(repo.padEnd(40))} ${ageColor(ageText.padEnd(10))} ${chalk.dim(r.author.padEnd(30))} ${chalk.dim(date)}`);
133
+ }
134
+ }
135
+ else {
136
+ console.log(chalk.bold(`\n Audits (${body.count}):\n`));
137
+ const hdr = ` ${'TYPE'.padEnd(12)} ${'REPOSITORY'.padEnd(40)} ${'AUTHOR'.padEnd(30)} DATE`;
138
+ console.log(chalk.dim(hdr));
139
+ console.log();
140
+ for (const r of body.audits) {
141
+ const date = new Date(r.createdAt).toLocaleDateString('en-US', {
142
+ month: 'short',
143
+ day: 'numeric',
144
+ year: 'numeric',
145
+ hour: '2-digit',
146
+ minute: '2-digit',
147
+ });
148
+ const repo = r.repository ?? r.project;
149
+ const label = typeLabels[r.type] ?? r.type;
150
+ const typeColor = r.type === 'ux-audit' ? chalk.yellow : chalk.magenta;
151
+ console.log(` ${typeColor(label.padEnd(12))} ${chalk.white(repo.padEnd(40))} ${chalk.dim(r.author.padEnd(30))} ${chalk.dim(date)}`);
152
+ if (r.branch && r.branch !== 'main') {
153
+ console.log(` ${' '.padEnd(12)} ${chalk.dim(`branch: ${r.branch} commit: ${r.commit ?? 'N/A'}`)}`);
154
+ }
130
155
  }
131
156
  }
132
157
  console.log();
package/dist/index.js CHANGED
@@ -104,6 +104,7 @@ audit
104
104
  .description('list submitted audits (Team Managers only)')
105
105
  .option('--type <type>', 'filter by type (audit, ux-audit)')
106
106
  .option('--repository <repo>', 'filter by repository (owner/repo)')
107
+ .option('--latest', 'show only the latest audit per project and type')
107
108
  .option('--limit <n>', 'max results (default 50, max 200)')
108
109
  .action(async (options) => {
109
110
  await auditListCommand(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.26.0",
3
+ "version": "4.27.0",
4
4
  "description": "AI-first development tools for teams - set up AGENTS.md, Claude Code, Cursor, and OpenCode standards",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",