@wu529778790/open-im 1.11.2-beta.2 → 1.11.2-beta.4
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/dist/index.js +3 -10
- package/dist/logger.d.ts +0 -3
- package/dist/logger.js +5 -36
- package/dist/shared/ai-task.js +3 -49
- package/dist/shared/task-cleanup.js +1 -11
- package/package.json +1 -1
- package/web/dist/assets/{index-B1c1xlbx.css → index-3rbPJRxR.css} +1 -1
- package/web/dist/assets/index-CrzDYo2W.js +57 -0
- package/web/dist/index.html +2 -2
- package/dist/telemetry/hash-user.d.ts +0 -2
- package/dist/telemetry/hash-user.js +0 -5
- package/dist/telemetry/telemetry-sanitize.d.ts +0 -2
- package/dist/telemetry/telemetry-sanitize.js +0 -30
- package/web/dist/assets/index-Dng7B2mE.js +0 -57
package/web/dist/index.html
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
|
10
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
10
|
+
<script type="module" crossorigin src="./assets/index-CrzDYo2W.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="./assets/index-3rbPJRxR.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="root"></div>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { sanitize } from '../sanitize.js';
|
|
2
|
-
const MAX_STRING = 512;
|
|
3
|
-
function sanitizeValue(v) {
|
|
4
|
-
if (v === null || typeof v === 'boolean' || typeof v === 'number')
|
|
5
|
-
return v;
|
|
6
|
-
if (typeof v === 'string') {
|
|
7
|
-
const s = sanitize(v.length > MAX_STRING ? `${v.slice(0, MAX_STRING)}…` : v);
|
|
8
|
-
return s;
|
|
9
|
-
}
|
|
10
|
-
if (Array.isArray(v))
|
|
11
|
-
return v.slice(0, 32).map((x) => sanitizeValue(x));
|
|
12
|
-
if (typeof v === 'object') {
|
|
13
|
-
const o = v;
|
|
14
|
-
const out = {};
|
|
15
|
-
let i = 0;
|
|
16
|
-
for (const [k, val] of Object.entries(o)) {
|
|
17
|
-
if (i++ >= 32)
|
|
18
|
-
break;
|
|
19
|
-
out[k] = sanitizeValue(val);
|
|
20
|
-
}
|
|
21
|
-
return out;
|
|
22
|
-
}
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
/** 结构化遥测 data 字段:截断长串、走 sanitize。 */
|
|
26
|
-
export function sanitizeTelemetryData(data) {
|
|
27
|
-
if (!data)
|
|
28
|
-
return {};
|
|
29
|
-
return sanitizeValue(data);
|
|
30
|
-
}
|