@hubspot/cli 4.1.0 → 4.1.2

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.
@@ -100,6 +100,24 @@ exports.handler = async options => {
100
100
  }
101
101
 
102
102
  const displayResults = checks => {
103
+ const displayFileInfo = (file, line) => {
104
+ if (file) {
105
+ logger.log(
106
+ i18n(`${i18nKey}.results.warnings.file`, {
107
+ file,
108
+ })
109
+ );
110
+ }
111
+ if (line) {
112
+ logger.log(
113
+ i18n(`${i18nKey}.results.warnings.lineNumber`, {
114
+ line,
115
+ })
116
+ );
117
+ }
118
+ return null;
119
+ };
120
+
103
121
  if (checks) {
104
122
  const { status, results } = checks;
105
123
 
@@ -107,13 +125,30 @@ exports.handler = async options => {
107
125
  const failedValidations = results.filter(
108
126
  test => test.status === 'FAIL'
109
127
  );
128
+ const warningValidations = results.filter(
129
+ test => test.status === 'WARN'
130
+ );
131
+
110
132
  failedValidations.forEach(val => {
111
133
  logger.error(`${val.message}`);
134
+ displayFileInfo(val.file, val.line);
135
+ });
136
+
137
+ warningValidations.forEach(val => {
138
+ logger.warn(`${val.message}`);
139
+ displayFileInfo(val.file, val.line);
112
140
  });
113
141
  }
114
142
 
115
143
  if (status === 'PASS') {
116
144
  logger.success(i18n(`${i18nKey}.results.noErrors`));
145
+
146
+ results.forEach(test => {
147
+ if (test.status === 'WARN') {
148
+ logger.warn(`${test.message}`);
149
+ displayFileInfo(test.file, test.line);
150
+ }
151
+ });
117
152
  }
118
153
  }
119
154
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "4.1.0",
3
+ "version": "4.1.2",
4
4
  "description": "CLI for working with HubSpot",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,8 +8,8 @@
8
8
  "url": "https://github.com/HubSpot/hubspot-cms-tools"
9
9
  },
10
10
  "dependencies": {
11
- "@hubspot/cli-lib": "4.1.0",
12
- "@hubspot/serverless-dev-runtime": "4.1.0",
11
+ "@hubspot/cli-lib": "4.1.2",
12
+ "@hubspot/serverless-dev-runtime": "4.1.2",
13
13
  "archiver": "^5.3.0",
14
14
  "chalk": "^4.1.2",
15
15
  "express": "^4.17.1",
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "642e8486f6dad6d91b1e5854fc427239ca4d11bb"
40
+ "gitHead": "0b6dc63dca8bd9d5da6e5a86f954f988b9ec5587"
41
41
  }