@jacebenson/jsn 4.3.13-dev.98.1 → 4.3.13-dev.99.1
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/package.json +1 -1
- package/src/output.js +2 -2
package/package.json
CHANGED
package/src/output.js
CHANGED
|
@@ -289,7 +289,7 @@ export class OutputWriter {
|
|
|
289
289
|
writeStyled(data, opts) {
|
|
290
290
|
// ── The `_formatted` interface ──────────────────────────────────────
|
|
291
291
|
// Commands may ship a pre-rendered styled view as `data._formatted`
|
|
292
|
-
// (a plain string). The writer
|
|
292
|
+
// (a plain string). The writer ensures a trailing newline and suppresses both
|
|
293
293
|
// opts.summary and the records table / field-dump renderers — the
|
|
294
294
|
// curated visual IS the output. JSON/quiet/markdown/csv formats ignore
|
|
295
295
|
// `_formatted` entirely and serialize the full envelope as usual, so
|
|
@@ -316,7 +316,7 @@ export class OutputWriter {
|
|
|
316
316
|
}
|
|
317
317
|
} else if (data && typeof data === 'object') {
|
|
318
318
|
if (data._formatted) {
|
|
319
|
-
this.writer.write(data._formatted);
|
|
319
|
+
this.writer.write(data._formatted.endsWith('\n') ? data._formatted : data._formatted + '\n');
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
const { isRecord, tableName } = detectRecord(data);
|