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 { createClient } from '../../client/client.js';
import { bundle } from '../../bundler/bundler.js';
import { step } from '../../utils/step.js';
import { Context } from '../../context/context.js';
import { Config } from '../../config/config.js';
const push = new Command('push');
@@ -15,7 +16,8 @@ push
.option('-ai, --auto-install', 'Auto install dependencies', false)
.action(async (script) => {
const opts = push.opts();
const context = new Context();
const config = new Config();
const context = new Context(config.context);
const location = resolve(script);
const client = await step('Connecting to server', async () => {
return createClient(context);