@spresto/monitordog-rust 1.2.6 → 1.3.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.
- package/index.d.ts +47 -0
- package/index.js +2 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -61,6 +61,20 @@ export declare class MdSystemMonitor {
|
|
|
61
61
|
destroy(): void
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
export declare class MdUsbWatcher {
|
|
65
|
+
constructor()
|
|
66
|
+
/** Start monitoring USB device events with a JavaScript callback */
|
|
67
|
+
startMonitoring(callback: (arg: DeviceEventData) => void): void
|
|
68
|
+
/** Stop monitoring USB device events */
|
|
69
|
+
stopMonitoring(): void
|
|
70
|
+
/** Check if monitoring is currently active */
|
|
71
|
+
isMonitoring(): boolean
|
|
72
|
+
/** Get currently connected USB devices */
|
|
73
|
+
getConnectedDevices(): Array<UsbDeviceInfo>
|
|
74
|
+
/** Cleanup method following existing pattern */
|
|
75
|
+
destroy(): void
|
|
76
|
+
}
|
|
77
|
+
|
|
64
78
|
/** Main screenshot blocker class */
|
|
65
79
|
export declare class ScreenshotBlocker {
|
|
66
80
|
constructor()
|
|
@@ -85,6 +99,20 @@ export declare class ScreenshotBlocker {
|
|
|
85
99
|
/** Global cleanup function */
|
|
86
100
|
export declare function cleanupScreenshotBlocker(): void
|
|
87
101
|
|
|
102
|
+
export interface DeviceEventData {
|
|
103
|
+
eventType: string
|
|
104
|
+
device: UsbDeviceInfo
|
|
105
|
+
timestamp: number
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export declare const enum DeviceType {
|
|
109
|
+
Phone = 'Phone',
|
|
110
|
+
RemovableStorage = 'RemovableStorage',
|
|
111
|
+
OpticalDrive = 'OpticalDrive',
|
|
112
|
+
PortableDevice = 'PortableDevice',
|
|
113
|
+
Unknown = 'Unknown',
|
|
114
|
+
}
|
|
115
|
+
|
|
88
116
|
export interface DiskDeviceInfo {
|
|
89
117
|
deviceName: string
|
|
90
118
|
deviceSerialNumber: string
|
|
@@ -141,9 +169,28 @@ export declare const enum ScreenshotBlockerError {
|
|
|
141
169
|
ConfigError = 5,
|
|
142
170
|
}
|
|
143
171
|
|
|
172
|
+
export interface StorageInfo {
|
|
173
|
+
driveLetter: string
|
|
174
|
+
driveType: number
|
|
175
|
+
size?: number
|
|
176
|
+
freeSpace?: number
|
|
177
|
+
volumeName?: string
|
|
178
|
+
fileSystem?: string
|
|
179
|
+
}
|
|
180
|
+
|
|
144
181
|
/** System information structure */
|
|
145
182
|
export interface SystemInfo {
|
|
146
183
|
threadId: number
|
|
147
184
|
hasPrivileges: boolean
|
|
148
185
|
windowsVersion: string
|
|
149
186
|
}
|
|
187
|
+
|
|
188
|
+
export interface UsbDeviceInfo {
|
|
189
|
+
deviceId: string
|
|
190
|
+
name?: string
|
|
191
|
+
description?: string
|
|
192
|
+
manufacturer?: string
|
|
193
|
+
deviceClass?: string
|
|
194
|
+
deviceType: DeviceType
|
|
195
|
+
storageInfo?: StorageInfo
|
|
196
|
+
}
|
package/index.js
CHANGED
|
@@ -512,6 +512,8 @@ module.exports.MdDeviceInfo = nativeBinding.MdDeviceInfo
|
|
|
512
512
|
module.exports.MdFileHasher = nativeBinding.MdFileHasher
|
|
513
513
|
module.exports.MdPolicyManager = nativeBinding.MdPolicyManager
|
|
514
514
|
module.exports.MdSystemMonitor = nativeBinding.MdSystemMonitor
|
|
515
|
+
module.exports.MdUsbWatcher = nativeBinding.MdUsbWatcher
|
|
515
516
|
module.exports.ScreenshotBlocker = nativeBinding.ScreenshotBlocker
|
|
516
517
|
module.exports.cleanupScreenshotBlocker = nativeBinding.cleanupScreenshotBlocker
|
|
518
|
+
module.exports.DeviceType = nativeBinding.DeviceType
|
|
517
519
|
module.exports.ScreenshotBlockerError = nativeBinding.ScreenshotBlockerError
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spresto/monitordog-rust",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Rust Library for MonitorDog",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -100,6 +100,6 @@
|
|
|
100
100
|
},
|
|
101
101
|
"packageManager": "yarn@4.9.2",
|
|
102
102
|
"optionalDependencies": {
|
|
103
|
-
"@spresto/monitordog-rust-win32-x64-msvc": "1.
|
|
103
|
+
"@spresto/monitordog-rust-win32-x64-msvc": "1.3.0"
|
|
104
104
|
}
|
|
105
105
|
}
|