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

@@ -2,12 +2,14 @@ import { Command } from 'commander';
import inquerer from 'inquirer';
import { Context } from '../../context/context.js';
import { step } from '../../utils/step.js';
import { Config } from '../../config/config.js';
const login = new Command('login');
login.description('Login to your account');
login.action(async () => {
const context = new Context();
const config = new Config();
const context = new Context(config.context);
const { host, token } = await inquerer.prompt([
{
type: 'input',