mirror of
https://github.com/morten-olsen/mini-loader.git
synced 2026-02-08 01:36:26 +01:00
init
This commit is contained in:
21
packages/cli/src/commands/runs/runs.list.ts
Normal file
21
packages/cli/src/commands/runs/runs.list.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Command } from 'commander';
|
||||
import { createClient } from '../../client/client.js';
|
||||
import { step } from '../../utils/step.js';
|
||||
|
||||
const list = new Command('create');
|
||||
|
||||
list
|
||||
.alias('ls')
|
||||
.description('Find a run')
|
||||
.argument('[load-id]', 'Load ID')
|
||||
.action(async (loadId) => {
|
||||
const client = await step('Connecting to server', async () => {
|
||||
return createClient();
|
||||
});
|
||||
const runs = await step('Getting runs', async () => {
|
||||
return await client.runs.find.query({ loadId });
|
||||
});
|
||||
console.table(runs);
|
||||
});
|
||||
|
||||
export { list };
|
||||
Reference in New Issue
Block a user