@w57124/exs-monitor-sdk 0.1.1 → 0.1.2
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/README.md +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm i @
|
|
8
|
+
npm i @w57124/exs-monitor-sdk
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## 使用
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { MonitorClient } from '@
|
|
14
|
+
import { MonitorClient } from '@w57124/exs-monitor-sdk'
|
|
15
15
|
|
|
16
16
|
const client = new MonitorClient({
|
|
17
17
|
dsn: 'https://your-collector.example.com/ingest',
|
|
@@ -47,7 +47,7 @@ const client = initMonitor({
|
|
|
47
47
|
### 本地存储模式与事件查看器
|
|
48
48
|
|
|
49
49
|
```ts
|
|
50
|
-
import { initMonitor } from '@
|
|
50
|
+
import { initMonitor } from '@w57124/exs-monitor-sdk'
|
|
51
51
|
|
|
52
52
|
const client = initMonitor({
|
|
53
53
|
dsn: '', // 本地模式可为空
|
|
@@ -61,14 +61,14 @@ const client = initMonitor({
|
|
|
61
61
|
client.openEventList()
|
|
62
62
|
|
|
63
63
|
// 如需自定义渲染,也可:
|
|
64
|
-
// import { openEventViewer } from '@
|
|
64
|
+
// import { openEventViewer } from '@w57124/exs-monitor-sdk'
|
|
65
65
|
// openEventViewer(client.getStoredEvents(), () => client.clearStoredEvents())
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
快捷键(手动绑定/解绑):不再默认启用,请按需绑定。
|
|
69
69
|
|
|
70
70
|
```ts
|
|
71
|
-
import { bindViewerHotkeyDefault, unbindViewerHotkeyDefault } from '@
|
|
71
|
+
import { bindViewerHotkeyDefault, unbindViewerHotkeyDefault } from '@w57124/exs-monitor-sdk'
|
|
72
72
|
|
|
73
73
|
// 绑定快捷键(默认 'Ctrl+Shift+M',可传入 'Alt+K' 等自定义)
|
|
74
74
|
bindViewerHotkeyDefault('Alt+K')
|