Skip to content

Commit fd16fb5

Browse files
authored
[FSSDK-10992] export clientEngine from entrypoint (#1006)
This will help debug issues where incorrect entrypoint is used by a client
1 parent 6114533 commit fd16fb5

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

lib/entrypoint.test-d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ export type Entrypoint = {
9494

9595
// decide options
9696
OptimizelyDecideOption: typeof OptimizelyDecideOption;
97+
98+
// client engine
99+
clientEngine: string;
97100
}
98101

99102

lib/index.browser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Config, Client } from './shared_types';
1717
import sendBeaconEventDispatcher from './event_processor/event_dispatcher/send_beacon_dispatcher.browser';
1818
import { getOptimizelyInstance } from './client_factory';
1919
import { EventDispatcher } from './event_processor/event_dispatcher/event_dispatcher';
20+
import { JAVASCRIPT_CLIENT_ENGINE } from './utils/enums';
2021

2122
/**
2223
* Creates an instance of the Optimizely class
@@ -55,3 +56,5 @@ export { createVuidManager } from './vuid/vuid_manager_factory.browser';
5556
export * from './common_exports';
5657

5758
export * from './export_types';
59+
60+
export const clientEngine: string = JAVASCRIPT_CLIENT_ENGINE;

lib/index.node.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ export { createVuidManager } from './vuid/vuid_manager_factory.node';
4848
export * from './common_exports';
4949

5050
export * from './export_types';
51+
52+
export const clientEngine: string = NODE_CLIENT_ENGINE;

lib/index.react_native.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ export { createVuidManager } from './vuid/vuid_manager_factory.react_native';
5151
export * from './common_exports';
5252

5353
export * from './export_types';
54+
55+
export const clientEngine: string = REACT_NATIVE_JS_CLIENT_ENGINE;

0 commit comments

Comments
 (0)