contensis-cli 1.0.12-beta.7 → 1.0.12-beta.8

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.
@@ -237,24 +237,26 @@ export class Logger {
237
237
  logMethod: Function = console.info
238
238
  ) => {
239
239
  if (consoleWidth) {
240
- content
241
- .split('\n')
242
- .slice(0, consoleWidth ? displayLength : undefined)
243
- .map((line: string) =>
244
- logMethod(
245
- line
246
- .split('~n')
247
- .map(l =>
248
- consoleWidth && strlen(l) > consoleWidth
249
- ? first(l, consoleWidth)
250
- : l
251
- )
252
- .join('\n')
253
- )
254
- )
255
- .join('\n');
240
+ const contentArray = content.endsWith('\n')
241
+ ? content.split('\n').slice(0, -1)
242
+ : content.split('\n');
243
+ const contentLines = contentArray.slice(
244
+ 0,
245
+ consoleWidth ? displayLength : undefined
246
+ );
247
+ for (const line of contentLines)
248
+ logMethod(
249
+ line
250
+ .split('~n')
251
+ .map(l =>
252
+ consoleWidth && strlen(l) > consoleWidth
253
+ ? first(l, consoleWidth)
254
+ : l
255
+ )
256
+ .join('\n')
257
+ );
256
258
  } else {
257
- logMethod(content.replace(ansiEscapeCodes, ''));
259
+ logMethod(content.replace(ansiEscapeCodes, '').replaceAll('~n', '\n'));
258
260
  }
259
261
 
260
262
  const tableArray = content.split('\n');
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "1.0.12-beta.7";
1
+ export const LIB_VERSION = "1.0.12-beta.8";