@hubspot/cli 6.4.0 → 6.4.1-beta.0

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.
@@ -77,7 +77,7 @@ class LocalDevManager {
77
77
  if (!this.activeApp) {
78
78
  return;
79
79
  }
80
- const { data: portalPublicApps } = await fetchPublicAppsForPortal(this.targetProjectAccountId);
80
+ const { data: { results: portalPublicApps }, } = await fetchPublicAppsForPortal(this.targetProjectAccountId);
81
81
  const activePublicAppData = portalPublicApps.find(({ sourceId }) => sourceId === this.activeApp.config.uid);
82
82
  // TODO: Update to account for new API with { data }
83
83
  const { data: { uniquePortalInstallCount }, } = await fetchPublicAppProductionInstallCounts(activePublicAppData.id, this.targetProjectAccountId);
package/lib/commonOpts.js CHANGED
@@ -57,7 +57,6 @@ function addUseEnvironmentOptions(yargs) {
57
57
  return yargs.option('use-env', {
58
58
  describe: (0, lang_1.i18n)(`${i18nKey}.options.useEnv.describe`),
59
59
  type: 'boolean',
60
- default: false,
61
60
  });
62
61
  }
63
62
  function setLogLevel(options) {
@@ -1,3 +1,6 @@
1
1
  export declare function isGloballyInstalled(command: any): Promise<boolean>;
2
- export declare function getLatestCliVersion(): string;
2
+ export declare function getLatestCliVersion(): {
3
+ latest: string;
4
+ next: string;
5
+ };
3
6
  export declare function hasMissingPackages(directory: any): Promise<boolean>;
@@ -38,8 +38,8 @@ async function isGloballyInstalled(command) {
38
38
  async function getLatestCliVersion() {
39
39
  const exec = util.promisify(execAsync);
40
40
  const { stdout } = await exec(`npm info ${pkg.name} dist-tags --json`);
41
- const { latest } = JSON.parse(stdout);
42
- return latest;
41
+ const { latest, next } = JSON.parse(stdout);
42
+ return { latest, next };
43
43
  }
44
44
  async function installPackages({ packages, installLocations }) {
45
45
  const installDirs = installLocations || (await getProjectPackageJsonLocations());
@@ -189,8 +189,11 @@ class Doctor {
189
189
  }
190
190
  async checkCLIVersion() {
191
191
  let latestCLIVersion;
192
+ let nextCliVersion;
192
193
  try {
193
- latestCLIVersion = await (0, dependencyManagement_1.getLatestCliVersion)();
194
+ const { latest, next } = await (0, dependencyManagement_1.getLatestCliVersion)();
195
+ latestCLIVersion = latest;
196
+ nextCliVersion = next;
194
197
  }
195
198
  catch (e) {
196
199
  return this.diagnosis?.addCliSection({
@@ -202,14 +205,15 @@ class Doctor {
202
205
  }),
203
206
  });
204
207
  }
205
- if (latestCLIVersion !== package_json_1.default.version) {
208
+ if (latestCLIVersion !== package_json_1.default.version && nextCliVersion !== package_json_1.default.version) {
209
+ const onNextTag = package_json_1.default.version.includes('beta');
206
210
  this.diagnosis?.addCliSection({
207
211
  type: 'warning',
208
212
  message: i18n(`${i18nKey}.hsChecks.notLatest`, {
209
213
  hsVersion: package_json_1.default.version,
210
214
  }),
211
215
  secondaryMessaging: i18n(`${i18nKey}.hsChecks.notLatestSecondary`, {
212
- hsVersion: package_json_1.default.version,
216
+ hsVersion: onNextTag ? nextCliVersion : latestCLIVersion,
213
217
  command: (0, ui_1.uiCommandReference)(`npm install -g ${package_json_1.default.name}`),
214
218
  }),
215
219
  });
package/lib/localDev.js CHANGED
@@ -71,7 +71,7 @@ const checkIfParentAccountIsAuthed = accountConfig => {
71
71
  // Confirm the default account is a developer account if developing public apps
72
72
  const checkIfAccountFlagIsSupported = (accountConfig, hasPublicApps) => {
73
73
  if (hasPublicApps) {
74
- if (!isDeveloperTestAccount) {
74
+ if (!isDeveloperTestAccount(accountConfig)) {
75
75
  logger.error(i18n(`${i18nKey}.validateAccountOption.invalidPublicAppAccount`, {
76
76
  useCommand: uiCommandReference('hs accounts use'),
77
77
  devCommand: uiCommandReference('hs project dev'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "6.4.0",
3
+ "version": "6.4.1-beta.0",
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",