|
1 | | -/* eslint-disable local-rules/disallow-side-effects */ |
| 1 | +/* eslint-disable jsdoc/check-indentation */ |
2 | 2 | /** |
3 | 3 | * TODO: |
4 | 4 | * - [ ] Basic session management |
|
9 | 9 | * - [x] setup bridge client with ipc from webviews (renderer processes) |
10 | 10 | * - [x] use `exposeInMainWorld` to setup the bridge function that will setup the ipc to the main process |
11 | 11 | */ |
12 | | -import type { RawError, PageMayExitEvent, Encoder, InitConfiguration } from '@datadog/browser-core' |
| 12 | +import type { RawError, PageMayExitEvent, Encoder, InitConfiguration, TrackType } from '@datadog/browser-core' |
13 | 13 | import { |
14 | 14 | Observable, |
15 | 15 | DeflateEncoderStreamId, |
16 | 16 | createBatch, |
17 | 17 | createHttpRequest, |
18 | 18 | createFlushController, |
19 | 19 | createIdentityEncoder, |
| 20 | + createEndpointBuilder, |
20 | 21 | } from '@datadog/browser-core' |
21 | 22 | import type { RumConfiguration, RumInitConfiguration } from '@datadog/browser-rum-core' |
22 | | -import { createHooks } from '@datadog/browser-rum-core' |
23 | | -import { validateAndBuildRumConfiguration } from '@datadog/browser-rum-core/cjs/domain/configuration' |
24 | | -import type { TrackType } from '@datadog/browser-core/cjs/domain/configuration' |
25 | | -import { createEndpointBuilder } from '@datadog/browser-core/cjs/domain/configuration' |
| 23 | +import { createHooks, validateAndBuildRumConfiguration } from '@datadog/browser-rum-core' |
26 | 24 | import tracer from '../domain/trace/tracer' |
27 | 25 | import { createIpcMain } from '../domain/main/ipcMain' |
28 | 26 | import type { CollectedRumEvent } from '../domain/rum/events' |
@@ -83,6 +81,7 @@ function makeDatadogElectron() { |
83 | 81 | setupMainBridge(onRumEventObservable) |
84 | 82 | createDdTraceAgent(onTraceObservable, hooks) |
85 | 83 |
|
| 84 | + // eslint-disable-next-line |
86 | 85 | setInterval(() => { |
87 | 86 | pageMayExitObservable.notify({ reason: 'page_hide' }) |
88 | 87 | }, 1000) |
|
0 commit comments