Comparing version 1.2.3 to 1.3.0
@@ -26,2 +26,6 @@ #!/usr/bin/env node | ||
const stripHtml = (text) => { | ||
return text.replace('<br>', ' ').replace(/<(?:.|\n)*?>/gm, ''); | ||
} | ||
const reportChanges = (data, type) => { | ||
@@ -119,2 +123,21 @@ var messages = data[type.toLowerCase() + 'FilesAmended'].filter((file) => { | ||
console.log(); | ||
const warnings = res.messages.filter((message) => message.type === 'WARNING').length; | ||
const errors = res.messages.filter((message) => message.type === 'ERROR').length; | ||
console.log(chalk.yellow('⚠') + util.format(' %s warnings', warnings)); | ||
console.log(chalk.red('✖') + util.format(' %s errors\n', errors)); | ||
res.messages.forEach((message) => { | ||
var text = stripHtml(message.messageText); | ||
switch (message.type) { | ||
case 'WARNING': | ||
console.log(chalk.yellow('Warning: ' + text)); | ||
break; | ||
case 'ERROR': | ||
console.log(chalk.red('Error: ' + text)); | ||
break; | ||
} | ||
}); | ||
if (res.themeStatuses.filter((theme) => theme.themeAction !== 'IGNORED').length > 0) { | ||
console.log(); | ||
} | ||
res.themeStatuses.forEach((theme) => { | ||
@@ -121,0 +144,0 @@ if (theme.themeAction !== 'IGNORED') { |
{ | ||
"name": "crex", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"description": "Creative Exchange SDK for Javascript", | ||
@@ -5,0 +5,0 @@ "author": "Mateusz Luczak <mateusz.luczak@outlook.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
181856
4715