Skip to content

Commit 55fb5b8

Browse files
author
niuweili
committed
Merge branch main of github.com:flashcatcloud/browser-sdk
1 parent 90ad4a0 commit 55fb5b8

76 files changed

Lines changed: 1091 additions & 15 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414

1515
<!-- By submitting this test, you confirm the following: -->
1616

17+
<<<<<<< HEAD
1718
- [ ] Tested locally
1819
- [ ] Tested on staging
1920
- [ ] Added unit tests for this change.
2021
- [ ] Added e2e/integration tests for this change.
2122

2223
<!-- Also, please read the contribution guidelines: https://github.com/DataDog/browser-sdk/blob/main/CONTRIBUTING.md -->
24+
=======
25+
I have gone over the [contributing](https://github.com/flashcatcloud/browser-sdk/blob/main/CONTRIBUTING.md) documentation.
26+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@ package.tgz
2323
/blob-report/
2424
/playwright/.cache/
2525
.VSCodeCounter
26+
<<<<<<< HEAD
2627
.env
2728
.vscode
29+
=======
30+
.env
31+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935

developer-extension/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@
2121
"@flashcatcloud/browser-core": "workspace:*",
2222
"@flashcatcloud/browser-logs": "workspace:*",
2323
"@flashcatcloud/browser-rum": "workspace:*",
24+
<<<<<<< HEAD
2425
"@mantine/core": "8.0.1",
2526
"@mantine/hooks": "8.0.1",
2627
"@tabler/icons-react": "3.33.0",
28+
=======
29+
"@mantine/core": "7.17.1",
30+
"@mantine/hooks": "7.17.1",
31+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
2732
"clsx": "2.1.1",
2833
"react": "19.1.0",
2934
"react-dom": "19.1.0"

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
"devDependencies": {
4040
"@alicloud/cdn20180510": "5.0.0",
4141
"@alicloud/openapi-client": "0.4.13",
42+
<<<<<<< HEAD
4243
"@eslint/js": "9.27.0",
44+
=======
45+
"@eslint/js": "9.21.0",
46+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
4347
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
4448
"@playwright/test": "1.52.0",
4549
"@swc/core": "1.11.24",

packages/logs/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
"replace-build-env": "node ../../scripts/build/replace-build-env.js"
1515
},
1616
"dependencies": {
17+
<<<<<<< HEAD
1718
"@flashcatcloud/browser-core": "0.0.2"
19+
=======
20+
"@flashcatcloud/browser-core": "workspace:*"
21+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
1822
},
1923
"peerDependencies": {
2024
"@flashcatcloud/browser-rum": "0.0.2"

packages/logs/src/boot/startLogs.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import {
2020
registerCleanupTask,
2121
mockClock,
2222
expireCookie,
23+
<<<<<<< HEAD
2324
DEFAULT_FETCH_MOCK,
25+
=======
26+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
2427
} from '@flashcatcloud/browser-core/test'
2528

2629
import type { LogsConfiguration } from '../domain/configuration'

packages/logs/src/domain/assembly.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
import type { Context, RelativeTime, TimeStamp } from '@flashcatcloud/browser-core'
2+
<<<<<<< HEAD
23
import { Observable, ErrorSource, ONE_MINUTE, getTimeStamp, noop } from '@flashcatcloud/browser-core'
4+
=======
5+
import {
6+
Observable,
7+
ErrorSource,
8+
ONE_MINUTE,
9+
getTimeStamp,
10+
noop,
11+
createCustomerDataTracker,
12+
} from '@flashcatcloud/browser-core'
13+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
314
import type { Clock } from '@flashcatcloud/browser-core/test'
415
import { mockClock } from '@flashcatcloud/browser-core/test'
516
import type { LogsEvent } from '../logsEvent.types'
@@ -72,10 +83,15 @@ describe('startLogsAssembly', () => {
7283
beforeSend: (x: LogsEvent) => beforeSend(x),
7384
}
7485
beforeSend = noop
86+
<<<<<<< HEAD
7587
mainLogger = new Logger(() => noop)
7688
const hooks = createHooks()
7789
startRUMInternalContext(hooks)
7890
startLogsAssembly(sessionManager, configuration, lifeCycle, hooks, () => COMMON_CONTEXT, noop)
91+
=======
92+
mainLogger = new Logger(() => noop, createCustomerDataTracker(noop))
93+
startLogsAssembly(sessionManager, configuration, lifeCycle, () => COMMON_CONTEXT, noop)
94+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
7995
window.FC_RUM = {
8096
getInternalContext: noop,
8197
}

packages/logs/src/domain/assembly.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { EventRateLimiter, RawError } from '@flashcatcloud/browser-core'
2+
<<<<<<< HEAD
23
import {
34
ErrorSource,
45
HookNames,
@@ -7,6 +8,9 @@ import {
78
getRelativeTime,
89
isEmptyObject,
910
} from '@flashcatcloud/browser-core'
11+
=======
12+
import { ErrorSource, combine, createEventRateLimiter, getRelativeTime, isEmptyObject } from '@flashcatcloud/browser-core'
13+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
1014
import type { CommonContext } from '../rawLogsEvent.types'
1115
import type { LogsConfiguration } from './configuration'
1216
import type { LifeCycle } from './lifeCycle'

packages/logs/src/domain/contexts/rumInternalContext.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
<<<<<<< HEAD
12
import type { Context, RelativeTime, TelemetryEvent } from '@flashcatcloud/browser-core'
23
import { HookNames, startTelemetry, TelemetryService } from '@flashcatcloud/browser-core'
4+
=======
5+
import type { TelemetryEvent } from '@flashcatcloud/browser-core'
6+
import { startTelemetry, TelemetryService } from '@flashcatcloud/browser-core'
7+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
38
import { mockSyntheticsWorkerValues } from '@flashcatcloud/browser-core/test'
49
import { validateAndBuildLogsConfiguration } from '../configuration'
510
import type { Hooks } from '../hooks'
@@ -34,10 +39,14 @@ describe('startRUMInternalContext', () => {
3439

3540
it('returns undefined if the global variable does not have a `getInternalContext` method', () => {
3641
window.FC_RUM = {} as any
42+
<<<<<<< HEAD
3743
const defaultLogsEventAttributes = hooks.triggerHook(HookNames.Assemble, {
3844
startTime: 0 as RelativeTime,
3945
})
4046
expect(defaultLogsEventAttributes).toBeUndefined()
47+
=======
48+
expect(getRUMInternalContext()).toBeUndefined()
49+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
4150
})
4251

4352
it('returns the internal context from the `getInternalContext` method', () => {

packages/logs/src/domain/contexts/rumInternalContext.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1+
<<<<<<< HEAD
12
import type { Context, RelativeTime } from '@flashcatcloud/browser-core'
3+
=======
4+
import type { RelativeTime, Context } from '@flashcatcloud/browser-core'
5+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
26
import {
37
willSyntheticsInjectRum,
48
addTelemetryDebug,
59
getSyntheticsTestId,
610
getSyntheticsResultId,
11+
<<<<<<< HEAD
712
HookNames,
813
SKIPPED,
914
} from '@flashcatcloud/browser-core'
1015
import type { Hooks } from '../hooks'
16+
=======
17+
} from '@flashcatcloud/browser-core'
18+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
1119

1220
interface Rum {
1321
getInternalContext?: (startTime?: RelativeTime) => Context | undefined
@@ -49,7 +57,13 @@ export function startRUMInternalContext(hooks: Hooks) {
4957
}
5058
}
5159

60+
<<<<<<< HEAD
5261
function getInternalContextFromRumGlobal(startTime?: RelativeTime, rumGlobal?: Rum): Context | undefined {
62+
=======
63+
return getInternalContextFromRumGlobal(browserWindow.FC_RUM)
64+
65+
function getInternalContextFromRumGlobal(rumGlobal?: Rum): Context | undefined {
66+
>>>>>>> b8d6611df7aa9a0b069bd04ee12b3cc1cc8a9935
5367
if (rumGlobal && rumGlobal.getInternalContext) {
5468
return rumGlobal.getInternalContext(startTime)
5569
}

0 commit comments

Comments
 (0)