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

@@ -4,6 +4,7 @@ import { step } from '../../utils/step.js';
import { Context } from '../../context/context.js';
import { dirname, resolve } from 'path';
import { mkdir, writeFile } from 'fs/promises';
import { Config } from '../../config/config.js';
const pull = new Command('pull');
@@ -12,7 +13,8 @@ pull
.argument('<artifact-id>', 'Artifact ID')
.argument('<file>', 'File to save')
.action(async (id, file) => {
const context = new Context();
const config = new Config();
const context = new Context(config.context);
const target = resolve(file);
const client = await step('Connecting to server', async () => {
return createClient(context);