@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.
@@ -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-Dng7B2mE.js"></script>
11
- <link rel="stylesheet" crossorigin href="./assets/index-B1c1xlbx.css">
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,2 +0,0 @@
1
- /** 展示用哈希:同一 userId 稳定、不可逆还原原文。 */
2
- export declare function hashUserId(userId: string): string;
@@ -1,5 +0,0 @@
1
- import { createHash } from 'node:crypto';
2
- /** 展示用哈希:同一 userId 稳定、不可逆还原原文。 */
3
- export function hashUserId(userId) {
4
- return createHash('sha256').update(`open-im\0${userId}`, 'utf8').digest('hex').slice(0, 24);
5
- }
@@ -1,2 +0,0 @@
1
- /** 结构化遥测 data 字段:截断长串、走 sanitize。 */
2
- export declare function sanitizeTelemetryData(data: Record<string, unknown> | undefined): Record<string, unknown>;
@@ -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
- }