@hubspot/cli 5.1.4-beta.4 → 5.1.4-beta.5

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.
@@ -27,7 +27,6 @@ const {
27
27
  ensureProjectExists,
28
28
  handleProjectUpload,
29
29
  pollProjectBuildAndDeploy,
30
- showPlatformVersionWarning,
31
30
  validateProjectConfig,
32
31
  } = require('../../lib/projects');
33
32
  const { EXIT_CODES } = require('../../lib/enums/exitCodes');
@@ -264,8 +263,6 @@ exports.handler = async options => {
264
263
  }
265
264
 
266
265
  if (shouldCreateProject) {
267
- await showPlatformVersionWarning(accountId, projectConfig);
268
-
269
266
  SpinniesManager.add('createProject', {
270
267
  text: i18n(`${i18nKey}.status.creatingProject`, {
271
268
  accountIdentifier: uiAccountDescription(targetAccountId),
@@ -16,7 +16,6 @@ const {
16
16
  logFeedbackMessage,
17
17
  validateProjectConfig,
18
18
  pollProjectBuildAndDeploy,
19
- showPlatformVersionWarning,
20
19
  } = require('../../lib/projects');
21
20
  const { i18n } = require('../../lib/lang');
22
21
  const { getAccountConfig } = require('@hubspot/local-dev-lib/config');
@@ -47,8 +46,6 @@ exports.handler = async options => {
47
46
 
48
47
  validateProjectConfig(projectConfig, projectDir);
49
48
 
50
- await showPlatformVersionWarning(accountId, projectConfig);
51
-
52
49
  await ensureProjectExists(accountId, projectConfig.name, {
53
50
  forceCreate,
54
51
  uploadCommand: true,
@@ -22,7 +22,6 @@ const {
22
22
  pollDeployStatus,
23
23
  validateProjectConfig,
24
24
  logFeedbackMessage,
25
- showPlatformVersionWarning,
26
25
  } = require('../../lib/projects');
27
26
  const {
28
27
  cancelStagedBuild,
@@ -104,8 +103,6 @@ exports.handler = async options => {
104
103
 
105
104
  validateProjectConfig(projectConfig, projectDir);
106
105
 
107
- await showPlatformVersionWarning(accountId, projectConfig);
108
-
109
106
  await ensureProjectExists(accountId, projectConfig.name);
110
107
 
111
108
  try {
package/lang/en.lyaml CHANGED
@@ -983,10 +983,6 @@ en:
983
983
  logFeedbackMessage:
984
984
  feedbackHeader: "We'd love to hear your feedback!"
985
985
  feedbackMessage: "How are you liking the new projects and developer tools? \n > Run `{{#yellow}}hs feedback{{/yellow}}` to let us know what you think!\n"
986
- showPlatformVersionWarning:
987
- docsLink: "Projects platform versioning (BETA)"
988
- noPlatformVersion: "No platformVersion found in hsproject.json. Falling back to default version. Starting Mar 31, 2024, new project builds without a specified version will no longer be supported. To update your project to the latest version, see {{ docsLink }}."
989
- deprecatedVersion: "Starting Mar 31, 2024, new project builds with platformVersion 2023.1 or unspecified versions will no longer be supported. It's recommended that you update your project to the latest version. For more info, see {{ docsLink }}."
990
986
  ui:
991
987
  betaTag: "{{#bold}}[BETA]{{/bold}}"
992
988
  betaWarning:
@@ -1357,7 +1353,7 @@ en:
1357
1353
  overrideErrors:
1358
1354
  platformVersionErrors:
1359
1355
  header: "Platform version update required"
1360
- unspecifiedPlatformVersion: "Projects with {{#bold}}unspecified platformVersion{{/bold}} are no longer supported."
1356
+ unspecifiedPlatformVersion: "Projects with an {{#bold}}{{platformVersion}}{{/bold}} are no longer supported."
1361
1357
  platformVersionRetired: "Projects with {{#bold}} platformVersion {{ platformVersion }}{{/bold}} are no longer supported."
1362
1358
  nonExistentPlatformVersion: "Projects with {{#bold}} platformVersion {{ platformVersion }}{{/bold}} are not supported."
1363
1359
  updateProject: "Please update your project to the latest version and try again."
@@ -7,13 +7,21 @@ const { uiLine, uiLink } = require('../ui');
7
7
 
8
8
  const i18nKey = 'cli.lib.errorHandlers.overrideErrors';
9
9
 
10
- function createPlatformVersionError(subCategory, errorData) {
11
- const platformVersion = errorData.context.PLATFORM_VERSION[0];
10
+ function createPlatformVersionError(subCategory, errData) {
12
11
  const docsLink = uiLink(
13
12
  i18n(`${i18nKey}.platformVersionErrors.docsLink`),
14
13
  'https://developers.hubspot.com/docs/platform/platform-versioning'
15
14
  );
16
15
 
16
+ const platformVersionKey = {
17
+ [PLATFORM_VERSION_ERROR_TYPES.PLATFORM_VERSION_NOT_SPECIFIED]:
18
+ 'unspecified platformVersion',
19
+ [PLATFORM_VERSION_ERROR_TYPES.PLATFORM_VERSION_RETIRED]:
20
+ errData.context.RETIRED_PLATFORM_VERSION,
21
+ [PLATFORM_VERSION_ERROR_TYPES.PLATFORM_VERSION_SPECIFIED_DOES_NOT_EXIST]:
22
+ errData.context.PLATFORM_VERSION,
23
+ };
24
+
17
25
  const errorTypeToTranslationKey = {
18
26
  [PLATFORM_VERSION_ERROR_TYPES.PLATFORM_VERSION_NOT_SPECIFIED]:
19
27
  'unspecifiedPlatformVersion',
@@ -23,6 +31,7 @@ function createPlatformVersionError(subCategory, errorData) {
23
31
  'nonExistentPlatformVersion',
24
32
  };
25
33
 
34
+ const platformVersion = platformVersionKey[subCategory] || '';
26
35
  const translationKey = errorTypeToTranslationKey[subCategory];
27
36
 
28
37
  uiLine();
package/lib/projects.js CHANGED
@@ -871,32 +871,6 @@ const createProjectComponent = async (
871
871
  );
872
872
  };
873
873
 
874
- const showPlatformVersionWarning = async (accountId, projectConfig) => {
875
- const platformVersion = projectConfig.platformVersion;
876
- const docsLink = uiLink(
877
- i18n(`${i18nKey}.showPlatformVersionWarning.docsLink`),
878
- 'https://developers.hubspot.com/docs/platform/platform-versioning'
879
- );
880
-
881
- if (!platformVersion) {
882
- logger.log('');
883
- logger.warn(
884
- i18n(`${i18nKey}.showPlatformVersionWarning.noPlatformVersion`, {
885
- docsLink,
886
- })
887
- );
888
- logger.log('');
889
- } else if (platformVersion === '2023.1') {
890
- logger.log('');
891
- logger.warn(
892
- i18n(`${i18nKey}.showPlatformVersionWarning.deprecatedVersion`, {
893
- docsLink,
894
- })
895
- );
896
- logger.log('');
897
- }
898
- };
899
-
900
874
  module.exports = {
901
875
  writeProjectConfig,
902
876
  getProjectConfig,
@@ -913,5 +887,4 @@ module.exports = {
913
887
  ensureProjectExists,
914
888
  logFeedbackMessage,
915
889
  createProjectComponent,
916
- showPlatformVersionWarning,
917
890
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "5.1.4-beta.4",
3
+ "version": "5.1.4-beta.5",
4
4
  "description": "CLI for working with HubSpot",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "ae2685fbfe44d8f2570787b9e1f818202c98f70a"
49
+ "gitHead": "dc62da1131e837df474dcac43252f3b1f67139f5"
50
50
  }