@hubspot/cli 7.5.3-beta.0 → 7.5.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,7 +141,7 @@ class AppDevModeInterface {
141
141
  }
142
142
  async checkTestAccountAppInstallation() {
143
143
  if (!this.appNode || !this.appData) {
144
- return;
144
+ return {};
145
145
  }
146
146
  const { data: { isInstalledWithScopeGroups, previouslyAuthorizedScopeGroups }, } = await (0, localDevAuth_1.fetchAppInstallationData)(this.localDevState.targetTestingAccountId, this.localDevState.projectId, this.appNode.uid, this.appNode.config.auth.requiredScopes, this.appNode.config.auth.optionalScopes);
147
147
  const isReinstall = previouslyAuthorizedScopeGroups.length > 0;
@@ -157,9 +157,7 @@ class AppDevModeInterface {
157
157
  installationState: constants_1.APP_INSTALLATION_STATES.INSTALLED_WITH_OUTDATED_SCOPES,
158
158
  };
159
159
  }
160
- if (!isInstalledWithScopeGroups) {
161
- await this.installAppOrOpenInstallUrl(isReinstall);
162
- }
160
+ return { needsInstall: !isInstalledWithScopeGroups, isReinstall };
163
161
  }
164
162
  setUpLocalDevServerMessageListeners() {
165
163
  this.localDevState.addListener('devServerMessage', message => {
@@ -179,7 +177,10 @@ class AppDevModeInterface {
179
177
  if (this.appNode.config.distribution === constants_1.APP_DISTRIBUTION_TYPES.MARKETPLACE) {
180
178
  await this.checkMarketplaceAppInstalls();
181
179
  }
182
- await this.checkTestAccountAppInstallation();
180
+ const { needsInstall, isReinstall } = await this.checkTestAccountAppInstallation();
181
+ if (needsInstall) {
182
+ await this.installAppOrOpenInstallUrl(isReinstall || false);
183
+ }
183
184
  }
184
185
  catch (e) {
185
186
  (0, index_1.logError)(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "7.5.3-beta.0",
3
+ "version": "7.5.3-beta.1",
4
4
  "description": "The official CLI for developing on HubSpot",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "https://github.com/HubSpot/hubspot-cli",