From 2e0df10c2fed908588153246ed1cf689e85704e7 Mon Sep 17 00:00:00 2001 From: Joe Yeager Date: Wed, 14 Feb 2024 11:07:33 -0800 Subject: [PATCH] POC: Remove cli-lib dep in dev servers --- packages/cli/lib/DevServerManager.js | 7 +++++-- packages/cli/lib/LocalDevManager.js | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/cli/lib/DevServerManager.js b/packages/cli/lib/DevServerManager.js index 3bd029f35..ea2652087 100644 --- a/packages/cli/lib/DevServerManager.js +++ b/packages/cli/lib/DevServerManager.js @@ -9,6 +9,7 @@ const { stopPortManagerServer, requestPorts, } = require('@hubspot/local-dev-lib/portManager'); +const { getAccountConfig } = require('@hubspot/local-dev-lib/config'); const i18nKey = 'cli.lib.DevServerManager'; @@ -62,10 +63,10 @@ class DevServerManager { }, {}); } - async setup({ components, debug, onUploadRequired }) { + async setup({ components, debug, onUploadRequired, accountId }) { this.debug = debug; this.componentsByType = this.arrangeComponentsByType(components); - + const { env } = getAccountConfig(accountId); await startPortManagerServer(); await this.iterateDevServers( async (serverInterface, compatibleComponents) => { @@ -75,6 +76,8 @@ class DevServerManager { debug, onUploadRequired, promptUser, + logger, + env, }); } } diff --git a/packages/cli/lib/LocalDevManager.js b/packages/cli/lib/LocalDevManager.js index 3c8ea144f..09d38fb6e 100644 --- a/packages/cli/lib/LocalDevManager.js +++ b/packages/cli/lib/LocalDevManager.js @@ -324,6 +324,7 @@ class LocalDevManager { components, debug: this.debug, onUploadRequired: this.logUploadWarning.bind(this), + accountId: this.targetAccountId, }); return true; } catch (e) {