@zintrust/trace 1.8.0 → 2.0.0

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.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@zintrust/trace",
3
- "version": "1.8.0",
4
- "buildDate": "2026-05-04T17:54:07.561Z",
3
+ "version": "2.0.0",
4
+ "buildDate": "2026-05-20T20:04:23.602Z",
5
5
  "buildEnvironment": {
6
6
  "node": "v20.20.2",
7
7
  "platform": "linux",
8
8
  "arch": "x64"
9
9
  },
10
10
  "git": {
11
- "commit": "b1d6ed34",
11
+ "commit": "be96835b",
12
12
  "branch": "master"
13
13
  },
14
14
  "package": {
@@ -74,8 +74,8 @@
74
74
  "sha256": "4862b41e0477f01afa0dbb446d4553b65c22ed774cd1e2db3489059ced392f94"
75
75
  },
76
76
  "dashboard/ui.js": {
77
- "size": 84221,
78
- "sha256": "b260cd17012cd5bf5f24f24eb8958d0cf79bed1d976412def3706f960b3aefa6"
77
+ "size": 84736,
78
+ "sha256": "6a19ca4b079944cf0070633a0694de28d034f78ff2d1f02af00707cd2434751f"
79
79
  },
80
80
  "index.d.ts": {
81
81
  "size": 2693,
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "index.js": {
85
85
  "size": 3421,
86
- "sha256": "8526d3f32dbc6d1ef4862bd40ac50fee39d181e521b3f2482a82e5433591f3d4"
86
+ "sha256": "09fa209693e5195efa6a58f18d869af4fef501a25462bc910ed7cec5c975a6bf"
87
87
  },
88
88
  "ingest/TraceIngestGateway.d.ts": {
89
89
  "size": 786,
@@ -221,6 +221,11 @@ const DASHBOARD_DOCUMENT = String.raw `<!DOCTYPE html>
221
221
  .replace(/'/g, '&#39;');
222
222
 
223
223
  const looksLikeHtml = (value) => new RegExp('</?(?:html|body|div|table)\\b|<!doctype\\b', 'i').test(String(value || ''));
224
+ const looksLikeFlattenedHtml = (value) => {
225
+ const source = String(value || '');
226
+ if (source.trim() === '' || looksLikeHtml(source)) return false;
227
+ return /(\n|^)\s*(?:body|table|td|div)\s*\{|(\n|^)\s*\.[a-z][\w-]*\s*\{|(\n|^)\s*@media\b/i.test(source);
228
+ };
224
229
 
225
230
  const api = async (path, opts) => {
226
231
  const response = await fetch(API + path, opts);
@@ -503,7 +508,9 @@ const DASHBOARD_DOCUMENT = String.raw `<!DOCTYPE html>
503
508
  if (typeof value === 'string') {
504
509
  return looksLikeHtml(value)
505
510
  ? renderHtmlPreview(label, value, { collapseSource: true })
506
- : renderTextCard(label, value);
511
+ : ((/html/i.test(label) && looksLikeFlattenedHtml(value))
512
+ ? '<p class="trace-note">HTML preview unavailable. The captured payload is plain text, so markup was stripped before trace capture.</p>'
513
+ : '') + renderTextCard(label, value);
507
514
  }
508
515
  return detailJson(value, label);
509
516
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/trace",
3
- "version": "1.8.0",
3
+ "version": "2.0.0",
4
4
  "description": "Trace assistant for ZinTrust: logs requests, queries, exceptions, jobs, and more.",
5
5
  "private": false,
6
6
  "type": "module",