feat: support multiple contexts

This commit is contained in:
Morten Olsen
2024-01-12 15:31:44 +01:00
parent 5154fbb4a5
commit b5d8cf3a51
20 changed files with 143 additions and 18 deletions

View File

@@ -3,6 +3,7 @@ import { createClient } from '../../client/client.js';
import { step } from '../../utils/step.js';
import { Context } from '../../context/context.js';
import inquirer from 'inquirer';
import { Config } from '../../config/config.js';
const remove = new Command('remove');
@@ -24,7 +25,8 @@ remove
.option('-s, --sort <order>', 'Sort', 'desc')
.action(async () => {
const { runId, loadId, severities, offset, limit, order } = remove.opts();
const context = new Context();
const config = new Config();
const context = new Context(config.context);
const client = await step('Connecting to server', async () => {
return createClient(context);
});