@hubspot/cli 5.2.1-beta.5 → 5.2.1-beta.6

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.
package/bin/hs CHANGED
@@ -1,3 +1,3 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node --no-deprecation
2
2
 
3
3
  require('./cli');
@@ -9,12 +9,7 @@ const {
9
9
  } = require('../../lib/commonOpts');
10
10
  const { trackCommandUsage } = require('../../lib/usageTracking');
11
11
  const { loadAndValidateOptions } = require('../../lib/validation');
12
- const { getSandboxName } = require('../../lib/sandboxes');
13
- const {
14
- isSandbox,
15
- isDeveloperTestAccount,
16
- isAppDeveloperAccount,
17
- } = require('../../lib/accountTypes');
12
+ const { isSandbox, isDeveloperTestAccount } = require('../../lib/accountTypes');
18
13
 
19
14
  const { i18n } = require('../../lib/lang');
20
15
  const {
@@ -63,23 +58,17 @@ const getPortalData = mappedPortalData => {
63
58
  p => p.portalId === parseInt(key, 10)
64
59
  )[0];
65
60
  set.forEach(portal => {
66
- let name = portal.name;
61
+ let name = `${portal.name} [${
62
+ HUBSPOT_ACCOUNT_TYPE_STRINGS[portal.accountType]
63
+ }]`;
67
64
  if (isSandbox(portal)) {
68
- name = `${portal.name} ${getSandboxName(portal)}`;
69
65
  if (hasParentPortal && set.length > 1) {
70
66
  name = `↳ ${name}`;
71
67
  }
72
68
  } else if (isDeveloperTestAccount(portal)) {
73
- name = `${portal.name} [${
74
- HUBSPOT_ACCOUNT_TYPE_STRINGS[HUBSPOT_ACCOUNT_TYPES.DEVELOPER_TEST]
75
- }]`;
76
69
  if (hasParentPortal && set.length > 1) {
77
70
  name = `↳ ${name}`;
78
71
  }
79
- } else if (isAppDeveloperAccount(portal)) {
80
- name = `${portal.name} [${
81
- HUBSPOT_ACCOUNT_TYPE_STRINGS[HUBSPOT_ACCOUNT_TYPES.APP_DEVELOPER]
82
- }]`;
83
72
  }
84
73
  portalData.push([name, portal.portalId, portal.authType]);
85
74
  });
package/lang/en.lyaml CHANGED
@@ -962,7 +962,7 @@ en:
962
962
  createNewProjectForLocalDev:
963
963
  projectMustExistExplanation: "The project {{ projectName }} does not exist in the target account {{ accountIdentifier}}. This command requires the project to exist in the target account."
964
964
  publicAppProjectMustExistExplanation: "The project {{ projectName }} does not exist in {{ accountIdentifier}}, the app developer account associated with your target account. This command requires the project to exist in this app developer account."
965
- createProject: "Create new project {{ projectName}} in {{#bold}}[{{ accountIdentifier }}]{{/bold}}?"
965
+ createProject: "Create new project {{ projectName}} in {{ accountIdentifier }}?"
966
966
  choseNotToCreateProject: "Exiting because this command requires the project to exist in the target account."
967
967
  creatingProject: "Creating project {{ projectName }} in {{ accountIdentifier }}"
968
968
  createdProject: "Created project {{ projectName }} in {{ accountIdentifier }}"
package/lib/localDev.js CHANGED
@@ -23,7 +23,6 @@ const {
23
23
  const { confirmPrompt } = require('./prompts/promptUtils');
24
24
  const {
25
25
  validateSandboxUsageLimits,
26
- getSandboxTypeAsString,
27
26
  getAvailableSyncTypes,
28
27
  } = require('./sandboxes');
29
28
  const { buildSandbox } = require('./sandboxCreate');
@@ -70,9 +69,7 @@ const confirmDefaultAccountIsTarget = async accountConfig => {
70
69
  logger.log();
71
70
  const useDefaultAccount = await confirmDefaultAccountPrompt(
72
71
  accountConfig.name,
73
- isDeveloperTestAccount(accountConfig)
74
- ? HUBSPOT_ACCOUNT_TYPE_STRINGS[HUBSPOT_ACCOUNT_TYPES.DEVELOPER_TEST]
75
- : `${getSandboxTypeAsString(accountConfig.accountType)} sandbox`
72
+ HUBSPOT_ACCOUNT_TYPE_STRINGS[accountConfig.accountType]
76
73
  );
77
74
 
78
75
  if (!useDefaultAccount) {
@@ -33,8 +33,8 @@ const installPublicAppPrompt = async (
33
33
  const url =
34
34
  `${websiteOrigin}/oauth/${targetAccountId}/authorize` +
35
35
  `?client_id=${encodeURIComponent(clientId)}` +
36
- `&scope=${encodeURIComponent(scopes)}` +
37
- `&redirect_uri=${encodeURIComponent(redirectUrls)}`;
36
+ `&scope=${encodeURIComponent(scopes.join(' '))}` +
37
+ `&redirect_uri=${encodeURIComponent(redirectUrls[0])}`;
38
38
 
39
39
  open(url);
40
40
  };
package/lib/sandboxes.js CHANGED
@@ -39,9 +39,6 @@ const getSandboxTypeAsString = accountType => {
39
39
  return 'standard';
40
40
  };
41
41
 
42
- const getSandboxName = config =>
43
- `[${getSandboxTypeAsString(config.accountType)} sandbox] `;
44
-
45
42
  function getHasSandboxesByType(parentAccountConfig, type) {
46
43
  const config = getConfig();
47
44
  const parentPortalId = getAccountId(parentAccountConfig.portalId);
@@ -342,7 +339,6 @@ module.exports = {
342
339
  sandboxTypeMap,
343
340
  sandboxApiTypeMap,
344
341
  syncTypes,
345
- getSandboxName,
346
342
  getSandboxTypeAsString,
347
343
  getHasSandboxesByType,
348
344
  getSandboxLimit,
package/lib/ui/index.js CHANGED
@@ -3,17 +3,10 @@ const { getAccountConfig } = require('@hubspot/local-dev-lib/config');
3
3
  const { logger } = require('@hubspot/local-dev-lib/logger');
4
4
  const supportsHyperlinks = require('./supportHyperlinks');
5
5
  const supportsColor = require('./supportsColor');
6
- const {
7
- isSandbox,
8
- isDeveloperTestAccount,
9
- isAppDeveloperAccount,
10
- } = require('../accountTypes');
11
- const { getSandboxName } = require('../sandboxes');
12
6
  const { i18n } = require('../lang');
13
7
 
14
8
  const {
15
9
  HUBSPOT_ACCOUNT_TYPE_STRINGS,
16
- HUBSPOT_ACCOUNT_TYPES,
17
10
  } = require('@hubspot/local-dev-lib/constants/config');
18
11
 
19
12
  const UI_COLORS = {
@@ -84,19 +77,9 @@ const uiLink = (linkText, url) => {
84
77
  */
85
78
  const uiAccountDescription = (accountId, bold = true) => {
86
79
  const account = getAccountConfig(accountId);
87
- let accountTypeString = '';
88
- if (isSandbox(account)) {
89
- accountTypeString = getSandboxName(account);
90
- } else if (isDeveloperTestAccount(account)) {
91
- accountTypeString = `[${
92
- HUBSPOT_ACCOUNT_TYPE_STRINGS[HUBSPOT_ACCOUNT_TYPES.DEVELOPER_TEST]
93
- }] `;
94
- } else if (isAppDeveloperAccount(account)) {
95
- accountTypeString = `[${
96
- HUBSPOT_ACCOUNT_TYPE_STRINGS[HUBSPOT_ACCOUNT_TYPES.APP_DEVELOPER]
97
- }] `;
98
- }
99
- const message = `${account.name} ${accountTypeString}(${account.portalId})`;
80
+ const message = `${account.name} [${
81
+ HUBSPOT_ACCOUNT_TYPE_STRINGS[account.accountType]
82
+ }] (${account.portalId})`;
100
83
  return bold ? chalk.bold(message) : message;
101
84
  };
102
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "5.2.1-beta.5",
3
+ "version": "5.2.1-beta.6",
4
4
  "description": "CLI for working with HubSpot",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,10 +8,10 @@
8
8
  "url": "https://github.com/HubSpot/hubspot-cms-tools"
9
9
  },
10
10
  "dependencies": {
11
- "@hubspot/local-dev-lib": "1.1.0",
12
- "@hubspot/serverless-dev-runtime": "5.2.1-beta.4",
11
+ "@hubspot/local-dev-lib": "1.2.0",
12
+ "@hubspot/serverless-dev-runtime": "5.2.1-beta.6",
13
13
  "@hubspot/theme-preview-dev-server": "0.0.6",
14
- "@hubspot/ui-extensions-dev-server": "0.8.17",
14
+ "@hubspot/ui-extensions-dev-server": "0.8.19",
15
15
  "archiver": "^5.3.0",
16
16
  "chalk": "^4.1.2",
17
17
  "chokidar": "^3.0.1",
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "21195f0f24e2e148f37c0320f0b31c2ebad817ff"
48
+ "gitHead": "399851070db3e2fd91ade022044981bd45c28574"
49
49
  }