Skip to content

Commit

Permalink
POC: Remove cli-lib dep in dev servers
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-yeager committed Feb 14, 2024
1 parent 6c4b965 commit 2e0df10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/cli/lib/DevServerManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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) => {
Expand All @@ -75,6 +76,8 @@ class DevServerManager {
debug,
onUploadRequired,
promptUser,
logger,
env,
});
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/cli/lib/LocalDevManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ class LocalDevManager {
components,
debug: this.debug,
onUploadRequired: this.logUploadWarning.bind(this),
accountId: this.targetAccountId,
});
return true;
} catch (e) {
Expand Down

0 comments on commit 2e0df10

Please sign in to comment.