content-security-toolkit 1.0.1 → 1.0.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 +22 -0
- package/dist/core/mediator/handlers/baseEventHandler.d.ts +65 -0
- package/dist/core/mediator/handlers/baseEventHandler.js +99 -0
- package/dist/core/mediator/handlers/index.d.ts +9 -0
- package/dist/core/mediator/handlers/index.js +34 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/otel.d.ts +24 -0
- package/dist/otel.js +87 -0
- package/dist/strategies/AbstractStrategy.mediator.d.ts +162 -0
- package/dist/strategies/AbstractStrategy.mediator.js +349 -0
- package/dist/strategies/DevToolsStrategy copy.d.ts +85 -0
- package/dist/strategies/DevToolsStrategy copy.js +362 -0
- package/dist/strategies/DevToolsStrategy-detectorManager.d.ts +70 -0
- package/dist/strategies/DevToolsStrategy-detectorManager.js +309 -0
- package/dist/strategies/DevToolsStrategy-simple.d.ts +75 -0
- package/dist/strategies/DevToolsStrategy-simple.js +366 -0
- package/dist/strategies/StrategyRegistry.d.ts +133 -0
- package/dist/strategies/StrategyRegistry.js +379 -0
- package/dist/utils/base/LoggableComponent.d.ts +62 -0
- package/dist/utils/base/LoggableComponent.js +95 -0
- package/dist/utils/debuggerDetector/debuggerDetectionWorker.d.ts +6 -0
- package/dist/utils/debuggerDetector/debuggerDetectionWorker.js +24 -0
- package/dist/utils/debuggerDetector/debuggerDetector.d.ts +55 -0
- package/dist/utils/debuggerDetector/debuggerDetector.js +158 -0
- package/dist/utils/debuggerDetector/firefoxDetector.d.ts +8 -0
- package/dist/utils/debuggerDetector/firefoxDetector.js +64 -0
- package/dist/utils/detection.d.ts +29 -0
- package/dist/utils/detection.js +267 -0
- package/dist/utils/detectors/debuggerDetectionWorker.d.ts +6 -0
- package/dist/utils/detectors/debuggerDetectionWorker.js +24 -0
- package/dist/utils/detectors/firefoxDetector.d.ts +8 -0
- package/dist/utils/detectors/firefoxDetector.js +64 -0
- package/dist/utils/logging/LogLevel.d.ts +21 -0
- package/dist/utils/logging/LogLevel.js +46 -0
- package/dist/utils/logging/LoggingConfig.d.ts +68 -0
- package/dist/utils/logging/LoggingConfig.js +64 -0
- package/dist/utils/logging/LoggingFactory.d.ts +22 -0
- package/dist/utils/logging/LoggingFactory.js +61 -0
- package/dist/utils/logging/LoggingService.d.ts +235 -0
- package/dist/utils/logging/LoggingService.js +385 -0
- package/dist/utils/logging/SimpleLoggingService.d.ts +39 -0
- package/dist/utils/logging/SimpleLoggingService.js +58 -0
- package/dist/utils/logging/advanced/LogLevel.d.ts +21 -0
- package/dist/utils/logging/advanced/LogLevel.js +46 -0
- package/dist/utils/logging/advanced/LoggingConfig.d.ts +68 -0
- package/dist/utils/logging/advanced/LoggingConfig.js +64 -0
- package/dist/utils/logging/advanced/LoggingFactory.d.ts +22 -0
- package/dist/utils/logging/advanced/LoggingFactory.js +61 -0
- package/dist/utils/logging/advanced/LoggingService.d.ts +235 -0
- package/dist/utils/logging/advanced/LoggingService.js +385 -0
- package/dist/utils/protectedContentManager-simple.d.ts +86 -0
- package/dist/utils/protectedContentManager-simple.js +180 -0
- package/dist/utils/securityOverlayManager-observer-pause.d.ts +283 -0
- package/dist/utils/securityOverlayManager-observer-pause.js +878 -0
- package/dist/utils/securityOverlayManager-simple.d.ts +197 -0
- package/dist/utils/securityOverlayManager-simple.js +552 -0
- package/package.json +1 -1
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { isBrowser } from "../utils/detection";
|
|
2
|
+
import { ProtectedContentManager } from "../utils/protectedContentManager";
|
|
3
|
+
import { SecurityOverlayManager } from "../utils/securityOverlayManager";
|
|
4
|
+
import { intervalManager } from "../utils/intervalManager";
|
|
5
|
+
import { AbstractStrategy, StrategyErrorType } from "./AbstractStrategy";
|
|
6
|
+
import { DevToolsDetectorManager } from "../utils/detectors/devToolsDetectorManager";
|
|
7
|
+
/**
|
|
8
|
+
* Strategy for detecting and responding to DevTools usage
|
|
9
|
+
*/
|
|
10
|
+
export class DevToolsStrategy extends AbstractStrategy {
|
|
11
|
+
/**
|
|
12
|
+
* Create a new DevToolsStrategy
|
|
13
|
+
* @param options Options for customizing the DevTools protection
|
|
14
|
+
* @param targetElement Element containing sensitive content
|
|
15
|
+
* @param customHandler Optional custom handler for DevTools detection
|
|
16
|
+
* @param debugMode Enable debug mode for troubleshooting
|
|
17
|
+
*/
|
|
18
|
+
constructor(options, targetElement = null, customHandler, debugMode = false) {
|
|
19
|
+
super("DevToolsStrategy", debugMode);
|
|
20
|
+
this.taskId = null;
|
|
21
|
+
this.isDevToolsOpen = false;
|
|
22
|
+
this.targetElement = null;
|
|
23
|
+
this.contentManager = null;
|
|
24
|
+
// DevTools detection manager
|
|
25
|
+
this.detectorManager = null;
|
|
26
|
+
this.options = {
|
|
27
|
+
overlayOptions: {
|
|
28
|
+
title: "Developer Tools Detected",
|
|
29
|
+
message: "For security reasons, this content is not available while developer tools are open.",
|
|
30
|
+
secondaryMessage: "Please close developer tools to continue viewing this content.",
|
|
31
|
+
textColor: "white",
|
|
32
|
+
backgroundColor: "rgba(255, 0, 0, 0.7)",
|
|
33
|
+
},
|
|
34
|
+
showOverlay: true,
|
|
35
|
+
checkFrequency: 1000,
|
|
36
|
+
hideContent: false,
|
|
37
|
+
detectorTypes: [], // Empty array means use default detectors for the browser
|
|
38
|
+
...options,
|
|
39
|
+
};
|
|
40
|
+
this.targetElement = targetElement;
|
|
41
|
+
this.customHandler = customHandler;
|
|
42
|
+
// Initialize content manager if target element is provided
|
|
43
|
+
if (targetElement) {
|
|
44
|
+
this.contentManager = new ProtectedContentManager(targetElement, debugMode);
|
|
45
|
+
}
|
|
46
|
+
// Initialize overlay manager
|
|
47
|
+
this.overlayManager = new SecurityOverlayManager(debugMode);
|
|
48
|
+
this.log("Initialized with checkFrequency:", this.options.checkFrequency);
|
|
49
|
+
// Initialize the detector manager
|
|
50
|
+
this.initDetectorManager();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Initialize the detector manager
|
|
54
|
+
*/
|
|
55
|
+
initDetectorManager() {
|
|
56
|
+
return this.safeExecute("initDetectorManager", StrategyErrorType.INITIALIZATION, () => {
|
|
57
|
+
if (!isBrowser())
|
|
58
|
+
return;
|
|
59
|
+
try {
|
|
60
|
+
this.detectorManager = new DevToolsDetectorManager({
|
|
61
|
+
debuggerTimeoutDuration: 80, // 80ms timeout for debugger detection
|
|
62
|
+
onDevToolsChange: (isOpen) => {
|
|
63
|
+
this.handleDevToolsStateChange(isOpen);
|
|
64
|
+
},
|
|
65
|
+
debugMode: this.debugMode,
|
|
66
|
+
enabledDetectors: this.options.detectorTypes,
|
|
67
|
+
checkInterval: this.options.checkFrequency,
|
|
68
|
+
});
|
|
69
|
+
this.log("Detector manager initialized");
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
this.handleError(StrategyErrorType.INITIALIZATION, "Failed to initialize detector manager", error);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Handle DevTools state changes from any detection method
|
|
78
|
+
*/
|
|
79
|
+
handleDevToolsStateChange(isOpen) {
|
|
80
|
+
return this.safeExecute("handleDevToolsStateChange", StrategyErrorType.APPLICATION, () => {
|
|
81
|
+
// Only take action if state has changed
|
|
82
|
+
if (isOpen !== this.isDevToolsOpen) {
|
|
83
|
+
this.isDevToolsOpen = isOpen;
|
|
84
|
+
this.log(`DevTools state changed: ${isOpen ? "open" : "closed"}`);
|
|
85
|
+
if (isOpen) {
|
|
86
|
+
this.applyDevToolsProtection();
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this.removeDevToolsProtection();
|
|
90
|
+
}
|
|
91
|
+
// Call custom handler if provided
|
|
92
|
+
if (this.customHandler) {
|
|
93
|
+
this.customHandler(isOpen);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Start monitoring for DevTools usage
|
|
100
|
+
*/
|
|
101
|
+
startMonitoring() {
|
|
102
|
+
return this.safeExecute("startMonitoring", StrategyErrorType.APPLICATION, () => {
|
|
103
|
+
if (typeof window === "undefined")
|
|
104
|
+
return;
|
|
105
|
+
this.log("Starting DevTools monitoring");
|
|
106
|
+
// Register with IntervalManager for periodic checks
|
|
107
|
+
this.taskId = intervalManager.registerTask("devtools-detection", () => this.safeExecute("intervalTask", StrategyErrorType.APPLICATION, () => {
|
|
108
|
+
// Use detector manager for detection
|
|
109
|
+
if (this.detectorManager) {
|
|
110
|
+
this.detectorManager.checkDevTools();
|
|
111
|
+
}
|
|
112
|
+
// Always check overlay state if DevTools are open
|
|
113
|
+
if (this.isDevToolsOpen) {
|
|
114
|
+
this.overlayManager.checkAndRestoreOverlay();
|
|
115
|
+
}
|
|
116
|
+
}), this.options.checkFrequency);
|
|
117
|
+
// Force initial check
|
|
118
|
+
if (this.detectorManager) {
|
|
119
|
+
this.detectorManager.checkDevTools();
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Apply DevTools protection by creating overlay and event blocker
|
|
125
|
+
*/
|
|
126
|
+
applyDevToolsProtection() {
|
|
127
|
+
return this.safeExecute("applyDevToolsProtection", StrategyErrorType.APPLICATION, () => {
|
|
128
|
+
if (!isBrowser())
|
|
129
|
+
return;
|
|
130
|
+
if (this.options.hideContent) {
|
|
131
|
+
// Hide sensitive content
|
|
132
|
+
this.hideSensitiveContent();
|
|
133
|
+
}
|
|
134
|
+
if (this.options.showOverlay) {
|
|
135
|
+
// Create overlay using the overlay manager
|
|
136
|
+
this.overlayManager.showOverlay({
|
|
137
|
+
...this.options.overlayOptions,
|
|
138
|
+
blockEvents: true, // Block all events
|
|
139
|
+
autoRestore: true, // Restore overlay if removed from DOM
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
this.log("DevTools protection applied");
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Hide sensitive content when DevTools is open
|
|
147
|
+
*/
|
|
148
|
+
hideSensitiveContent() {
|
|
149
|
+
return this.safeExecute("hideSensitiveContent", StrategyErrorType.APPLICATION, () => {
|
|
150
|
+
if (!this.targetElement || !this.contentManager)
|
|
151
|
+
return;
|
|
152
|
+
this.contentManager.hideContent({
|
|
153
|
+
title: this.options.overlayOptions?.title,
|
|
154
|
+
message: this.options.overlayOptions?.message,
|
|
155
|
+
secondaryMessage: this.options.overlayOptions?.secondaryMessage,
|
|
156
|
+
textColor: "black",
|
|
157
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
158
|
+
});
|
|
159
|
+
this.log("Sensitive content hidden");
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Restore sensitive content when DevTools is closed
|
|
164
|
+
*/
|
|
165
|
+
restoreSensitiveContent() {
|
|
166
|
+
return this.safeExecute("restoreSensitiveContent", StrategyErrorType.REMOVAL, () => {
|
|
167
|
+
if (!this.contentManager)
|
|
168
|
+
return;
|
|
169
|
+
this.contentManager.restoreContent();
|
|
170
|
+
this.log("Sensitive content restored");
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Remove DevTools protection
|
|
175
|
+
*/
|
|
176
|
+
removeDevToolsProtection() {
|
|
177
|
+
return this.safeExecute("removeDevToolsProtection", StrategyErrorType.REMOVAL, () => {
|
|
178
|
+
if (typeof document === "undefined")
|
|
179
|
+
return;
|
|
180
|
+
if (this.options.hideContent) {
|
|
181
|
+
// Restore sensitive content
|
|
182
|
+
this.restoreSensitiveContent();
|
|
183
|
+
}
|
|
184
|
+
if (this.options.showOverlay) {
|
|
185
|
+
// Remove overlay using the overlay manager
|
|
186
|
+
this.overlayManager.removeOverlay();
|
|
187
|
+
}
|
|
188
|
+
this.log("DevTools protection removed");
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Apply the protection strategy
|
|
193
|
+
*/
|
|
194
|
+
apply() {
|
|
195
|
+
return this.safeExecute("apply", StrategyErrorType.APPLICATION, () => {
|
|
196
|
+
if (this.isAppliedFlag) {
|
|
197
|
+
this.log("Protection already applied");
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
this.startMonitoring();
|
|
201
|
+
this.isAppliedFlag = true;
|
|
202
|
+
this.log("Protection applied");
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Remove the protection strategy
|
|
207
|
+
* Override the base implementation to handle additional cleanup
|
|
208
|
+
*/
|
|
209
|
+
remove() {
|
|
210
|
+
return this.safeExecute("remove", StrategyErrorType.REMOVAL, () => {
|
|
211
|
+
if (!this.isAppliedFlag) {
|
|
212
|
+
this.log("Protection not applied");
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
// Clean up the detector manager
|
|
216
|
+
if (this.detectorManager) {
|
|
217
|
+
this.detectorManager.dispose();
|
|
218
|
+
this.detectorManager = null;
|
|
219
|
+
}
|
|
220
|
+
// Clear interval via IntervalManager
|
|
221
|
+
if (this.taskId !== null) {
|
|
222
|
+
intervalManager.unregisterTask(this.taskId);
|
|
223
|
+
this.taskId = null;
|
|
224
|
+
this.log("Interval task unregistered");
|
|
225
|
+
}
|
|
226
|
+
// Call the parent class remove method to handle event cleanup
|
|
227
|
+
super.remove();
|
|
228
|
+
// Remove protections
|
|
229
|
+
this.removeDevToolsProtection();
|
|
230
|
+
this.isAppliedFlag = false;
|
|
231
|
+
this.isDevToolsOpen = false;
|
|
232
|
+
this.log("Protection removed");
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Update DevTools protection options
|
|
237
|
+
* @param options New options
|
|
238
|
+
*/
|
|
239
|
+
updateOptions(options) {
|
|
240
|
+
return this.safeExecute("updateOptions", StrategyErrorType.OPTION_UPDATE, () => {
|
|
241
|
+
const typedOptions = options;
|
|
242
|
+
this.log("Updating options", typedOptions);
|
|
243
|
+
// Store previous options for comparison
|
|
244
|
+
const previousOptions = { ...this.options };
|
|
245
|
+
this.options = {
|
|
246
|
+
...this.options,
|
|
247
|
+
...typedOptions,
|
|
248
|
+
};
|
|
249
|
+
// If protection is already applied, update the overlay if needed
|
|
250
|
+
if (this.isAppliedFlag && this.isDevToolsOpen) {
|
|
251
|
+
// Check if any visual options changed
|
|
252
|
+
const visualOptionsChanged = previousOptions.overlayOptions?.title !== this.options.overlayOptions?.title ||
|
|
253
|
+
previousOptions.overlayOptions?.message !== this.options.overlayOptions?.message ||
|
|
254
|
+
previousOptions.overlayOptions?.secondaryMessage !== this.options.overlayOptions?.secondaryMessage ||
|
|
255
|
+
previousOptions.overlayOptions?.backgroundColor !== this.options.overlayOptions?.backgroundColor ||
|
|
256
|
+
previousOptions.overlayOptions?.textColor !== this.options.overlayOptions?.textColor;
|
|
257
|
+
if (visualOptionsChanged) {
|
|
258
|
+
this.removeDevToolsProtection();
|
|
259
|
+
this.applyDevToolsProtection();
|
|
260
|
+
this.log("Reapplied protection with updated visual options");
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
// Update check frequency if it changed
|
|
264
|
+
if (typedOptions.checkFrequency &&
|
|
265
|
+
this.taskId !== null &&
|
|
266
|
+
previousOptions.checkFrequency !== typedOptions.checkFrequency) {
|
|
267
|
+
// Unregister and re-register with new frequency
|
|
268
|
+
intervalManager.unregisterTask(this.taskId);
|
|
269
|
+
this.taskId = intervalManager.registerTask("devtools-detection", () => this.safeExecute("intervalTask", StrategyErrorType.APPLICATION, () => {
|
|
270
|
+
// Use detector manager
|
|
271
|
+
if (this.detectorManager) {
|
|
272
|
+
this.detectorManager.checkDevTools();
|
|
273
|
+
}
|
|
274
|
+
if (this.isDevToolsOpen) {
|
|
275
|
+
this.overlayManager.checkAndRestoreOverlay();
|
|
276
|
+
}
|
|
277
|
+
}), this.options.checkFrequency);
|
|
278
|
+
this.log(`Check frequency updated to ${this.options.checkFrequency}ms`);
|
|
279
|
+
}
|
|
280
|
+
// If detector types changed, reinitialize the detector manager
|
|
281
|
+
if (typedOptions.detectorTypes &&
|
|
282
|
+
JSON.stringify(previousOptions.detectorTypes) !== JSON.stringify(typedOptions.detectorTypes)) {
|
|
283
|
+
if (this.detectorManager) {
|
|
284
|
+
this.detectorManager.dispose();
|
|
285
|
+
}
|
|
286
|
+
this.initDetectorManager();
|
|
287
|
+
this.log("Reinitialized detector manager with new detector types");
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Set debug mode
|
|
293
|
+
* @param enabled Whether debug mode should be enabled
|
|
294
|
+
*/
|
|
295
|
+
setDebugMode(enabled) {
|
|
296
|
+
return this.safeExecute("setDebugMode", StrategyErrorType.OPTION_UPDATE, () => {
|
|
297
|
+
super.setDebugMode(enabled);
|
|
298
|
+
// Update debug mode for the detector manager
|
|
299
|
+
if (this.detectorManager) {
|
|
300
|
+
this.detectorManager.setDebugMode(enabled);
|
|
301
|
+
}
|
|
302
|
+
// Also update debug mode for managers
|
|
303
|
+
if (this.contentManager && this.targetElement) {
|
|
304
|
+
this.contentManager = new ProtectedContentManager(this.targetElement, enabled);
|
|
305
|
+
}
|
|
306
|
+
this.overlayManager = new SecurityOverlayManager(enabled);
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { CustomEventHandlers, DevToolsOptions } from "../types";
|
|
2
|
+
import { AbstractStrategy } from "./AbstractStrategy";
|
|
3
|
+
/**
|
|
4
|
+
* Strategy for detecting and responding to DevTools usage
|
|
5
|
+
*/
|
|
6
|
+
export declare class DevToolsStrategy extends AbstractStrategy {
|
|
7
|
+
private intervalId;
|
|
8
|
+
private taskId;
|
|
9
|
+
private customHandler?;
|
|
10
|
+
private isDevToolsOpen;
|
|
11
|
+
private targetElement;
|
|
12
|
+
private options;
|
|
13
|
+
private contentManager;
|
|
14
|
+
private overlayManager;
|
|
15
|
+
private browserInfo;
|
|
16
|
+
private debuggerDetector;
|
|
17
|
+
private timingDetector;
|
|
18
|
+
private dateToStringDetector;
|
|
19
|
+
private activeDetector;
|
|
20
|
+
/**
|
|
21
|
+
* Create a new DevToolsStrategy
|
|
22
|
+
* @param options Options for customizing the DevTools protection
|
|
23
|
+
* @param targetElement Element containing sensitive content
|
|
24
|
+
* @param customHandler Optional custom handler for DevTools detection
|
|
25
|
+
* @param debugMode Enable debug mode for troubleshooting
|
|
26
|
+
*/
|
|
27
|
+
constructor(options?: DevToolsOptions, targetElement?: HTMLElement | null, customHandler?: CustomEventHandlers["onDevToolsOpen"], debugMode?: boolean);
|
|
28
|
+
/**
|
|
29
|
+
* Initialize the appropriate detector based on browser
|
|
30
|
+
*/
|
|
31
|
+
private initDetectors;
|
|
32
|
+
/**
|
|
33
|
+
* Handle DevTools state changes from any detection method
|
|
34
|
+
*/
|
|
35
|
+
private handleDevToolsStateChange;
|
|
36
|
+
/**
|
|
37
|
+
* Start monitoring for DevTools usage
|
|
38
|
+
*/
|
|
39
|
+
private startMonitoring;
|
|
40
|
+
/**
|
|
41
|
+
* Apply DevTools protection by creating overlay and event blocker
|
|
42
|
+
*/
|
|
43
|
+
private applyDevToolsProtection;
|
|
44
|
+
/**
|
|
45
|
+
* Hide sensitive content when DevTools is open
|
|
46
|
+
*/
|
|
47
|
+
private hideSensitiveContent;
|
|
48
|
+
/**
|
|
49
|
+
* Restore sensitive content when DevTools is closed
|
|
50
|
+
*/
|
|
51
|
+
private restoreSensitiveContent;
|
|
52
|
+
/**
|
|
53
|
+
* Remove DevTools protection
|
|
54
|
+
*/
|
|
55
|
+
private removeDevToolsProtection;
|
|
56
|
+
/**
|
|
57
|
+
* Apply the protection strategy
|
|
58
|
+
*/
|
|
59
|
+
apply(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Remove the protection strategy
|
|
62
|
+
* Override the base implementation to handle additional cleanup
|
|
63
|
+
*/
|
|
64
|
+
remove(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Update DevTools protection options
|
|
67
|
+
* @param options New options
|
|
68
|
+
*/
|
|
69
|
+
updateOptions(options: Record<string, unknown>): void;
|
|
70
|
+
/**
|
|
71
|
+
* Set debug mode
|
|
72
|
+
* @param enabled Whether debug mode should be enabled
|
|
73
|
+
*/
|
|
74
|
+
setDebugMode(enabled: boolean): void;
|
|
75
|
+
}
|