mirror of
https://github.com/morten-olsen/mini-loader.git
synced 2026-02-08 01:36:26 +01:00
feat: switched from worker API to fs based
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Command } from 'commander';
|
||||
import { createClient } from '../../client/client.js';
|
||||
import { step } from '../../utils/step.js';
|
||||
import { Context } from '../../context/context.js';
|
||||
|
||||
const list = new Command('list');
|
||||
|
||||
@@ -8,11 +9,12 @@ list
|
||||
.alias('ls')
|
||||
.description('List loads')
|
||||
.action(async () => {
|
||||
const context = new Context();
|
||||
const client = await step('Connecting to server', async () => {
|
||||
return createClient();
|
||||
return createClient(context);
|
||||
});
|
||||
const loads = step('Getting data', async () => {
|
||||
await client.loads.find.query({});
|
||||
const loads = await step('Getting data', async () => {
|
||||
return await client.loads.find.query({});
|
||||
});
|
||||
console.table(loads);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user