@statsig/statsig-node-core 0.0.9 → 0.0.10-beta.3

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 CHANGED
@@ -1,212 +1,5 @@
1
- /* auto-generated by NAPI-RS */
2
- /* eslint-disable */
3
- export declare class DynamicConfig {
4
- name: string
5
- value: Record<string, any>
6
- ruleID: string
7
- idType: string
8
- getValue(param_name: string, fallback: boolean | number | string | object | Array<any> | null): any
9
- getRuleId(): string
10
- getIdType(): string
11
- getEvaluationDetails(): EvaluationDetails
12
- getSecondaryExposures(): Array<SecondaryExposure> | null
13
- }
14
-
15
- export declare class Experiment {
16
- name: string
17
- value: Record<string, any>
18
- ruleID: string
19
- idType: string
20
- groupName?: string
21
- getValue(param_name: string, fallback: boolean | number | string | object | Array<any> | null): any
22
- getRuleId(): string
23
- getIdType(): string
24
- getGroupName(): string | null
25
- getEvaluationDetails(): EvaluationDetails
26
- getSecondaryExposures(): Array<SecondaryExposure> | null
27
- }
28
-
29
- export declare class Layer {
30
- name: string
31
- ruleID: string
32
- groupName?: string
33
- allocatedExperimentName?: string
34
- getValue(param_name: string, fallback: boolean | number | string | object | Array<any> | null): any
35
- getRuleId(): string
36
- getGroupName(): string | null
37
- getEvaluationDetails(): EvaluationDetails
38
- getSecondaryExposures(): Array<SecondaryExposure> | null
39
- }
40
-
41
- export declare class Statsig {
42
- constructor(sdkKey: string, options?: StatsigOptions | undefined | null)
43
- initialize(): Promise<StatsigResult>
44
- shutdown(timeoutMs?: number | undefined | null): Promise<StatsigResult>
45
- flushEvents(): Promise<StatsigResult>
46
- logEvent(user: StatsigUser, eventName: string, value?: string | number | null, metadata?: Record<string, string> | undefined | null): void
47
- checkGate(user: StatsigUser, gateName: string, options?: FeatureGateEvaluationOptions | undefined | null): boolean
48
- getFeatureGate(user: StatsigUser, featureName: string, options?: FeatureGateEvaluationOptions | undefined | null): FeatureGate
49
- getFieldsNeededForGate(gateName: string): Array<string>
50
- getDynamicConfig(user: StatsigUser, configName: string, options?: DynamicConfigEvaluationOptions | undefined | null): DynamicConfig
51
- getFieldsNeededForDynamicConfig(configName: string): Array<string>
52
- getExperiment(user: StatsigUser, experimentName: string, options?: ExperimentEvaluationOptions | undefined | null): Experiment
53
- getFieldsNeededForExperiment(experimentName: string): Array<string>
54
- getLayer(user: StatsigUser, layerName: string, options?: LayerEvaluationOptions | undefined | null): Layer
55
- getFieldsNeededForLayer(layerName: string): Array<string>
56
- getClientInitializeResponse(user: StatsigUser, options?: ClientInitResponseOptions | undefined | null): string
57
- manuallyLogFeatureGateExposure(user: StatsigUser, gateName: string): void
58
- manuallyLogDynamicConfigExposure(user: StatsigUser, configName: string): void
59
- manuallyLogExperimentExposure(user: StatsigUser, experimentName: string): void
60
- manuallyLogLayerParamExposure(user: StatsigUser, layerName: string, paramName: string): void
61
- overrideGate(gateName: string, value: boolean, adapter?: OverrideAdapterType | undefined | null): void
62
- overrideDynamicConfig(configName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
63
- overrideExperiment(experimentName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
64
- overrideExperimentByGroupName(experimentName: string, groupName: string, adapter?: OverrideAdapterType | undefined | null): void
65
- overrideLayer(layerName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
66
- }
67
-
68
- export declare class StatsigUser {
69
- constructor(args: ({userID: string} | {customIDs: Record<string, string> }) & StatsigUserArgs)
70
- static withUserID(userId: string): StatsigUser
71
- static withCustomIDs(customIds: Record<string, string>): StatsigUser
72
- get customIDs(): Record<string, string> | null
73
- set customIDs(value: Record<string, string> | null)
74
- get custom(): Record<string, string> | null
75
- set custom(value: Record<string, string | number | boolean | Array<string | number | boolean>> | null)
76
- get privateAttributes(): Record<string, string> | null
77
- set privateAttributes(value: Record<string, string | number | boolean | Array<string | number | boolean>> | null)
78
- get userID(): string | null
79
- set userID(value: any)
80
- get email(): string | null
81
- set email(value: any)
82
- get ip(): string | null
83
- set ip(value: any)
84
- get userAgent(): string | null
85
- set userAgent(value: any)
86
- get country(): string | null
87
- set country(value: any)
88
- get locale(): string | null
89
- set locale(value: any)
90
- get appVersion(): string | null
91
- set appVersion(value: any)
92
- }
93
-
94
- export declare function __internal__testDataStore(store: DataStore, path: string, value: string): Promise<[DataStoreResponse | undefined | null, boolean]>
95
-
96
- export declare function __internal__testObservabilityClient(client: ObservabilityClient, action: string, metricName: string, value: number, tags?: Record<string, string> | undefined | null): Promise<void>
97
-
98
- export interface ClientInitResponseOptions {
99
- hashAlgorithm?: string
100
- clientSdkKey?: string
101
- includeLocalOverrides?: boolean
102
- }
103
-
104
- export interface DataStore {
105
- initialize?: () => Promise<void>
106
- shutdown?: () => Promise<void>
107
- get?: (key: string) => Promise<DataStoreResponse>
108
- set?: (key: string, value: string, time?: number) => Promise<void>
109
- supportPollingUpdatesFor?: (key: string) => Promise<boolean>
110
- }
111
-
112
- export interface DataStoreResponse {
113
- result?: string
114
- time?: number
115
- }
116
-
117
- export interface DynamicConfigEvaluationOptions {
118
- disableExposureLogging?: boolean
119
- }
120
-
121
- export interface EvaluationDetails {
122
- reason: string
123
- lcut?: number
124
- receivedAt?: number
125
- }
126
-
127
- export interface ExperimentEvaluationOptions {
128
- disableExposureLogging?: boolean
129
- }
130
-
131
- export interface FeatureGate {
132
- name: string
133
- value: boolean
134
- ruleID: string
135
- idType: string
136
- }
137
-
138
- export interface FeatureGateEvaluationOptions {
139
- disableExposureLogging?: boolean
140
- }
141
-
142
- export interface LayerEvaluationOptions {
143
- disableExposureLogging?: boolean
144
- }
145
-
146
- export interface ObservabilityClient {
147
- initialize?: () => void
148
- increment?: (metricName: string, value: number, tags: Record<string, string>) => void
149
- gauge?: (metricName: string, value: number, tags: Record<string, string>) => void
150
- dist?: (metricName: string, value: number, tags: Record<string, string>) => void
151
- }
152
-
153
- export interface OverrideAdapterConfig {
154
- adapterType: OverrideAdapterType
155
- }
156
-
157
- export declare const enum OverrideAdapterType {
158
- LocalOverride = 0
159
- }
160
-
161
- export interface SecondaryExposure {
162
- gate: string
163
- gateValue: string
164
- ruleId: string
165
- }
166
-
167
- export interface SpecAdapterConfig {
168
- adapterType: 'data_store' | 'network_grpc_websocket' | 'network_http'
169
- specsUrl?: string
170
- initTimeoutMs: number
171
- }
172
-
173
- export interface StatsigOptions {
174
- dataStore?: DataStore
175
- disableAllLogging?: boolean
176
- enableIdLists?: boolean
177
- enableUserAgentParsing?: boolean
178
- enableCountryLookup?: boolean
179
- environment?: string
180
- eventLoggingFlushIntervalMs?: number
181
- eventLoggingMaxQueueSize?: number
182
- fallbackToStatsigApi?: boolean
183
- idListsSyncIntervalMs?: number
184
- idListsUrl?: string
185
- initTimeoutMs?: number
186
- logEventUrl?: string
187
- observabilityClient?: ObservabilityClient
188
- outputLogLevel?: 'none' | 'debug' | 'info' | 'warn' | 'error'
189
- specAdaptersConfig?: Array<SpecAdapterConfig>
190
- specsUrl?: string
191
- specsSyncIntervalMs?: number
192
- serviceName?: string
193
- overrideAdapterConfig?: Array<OverrideAdapterConfig>
194
- }
195
-
196
- export interface StatsigResult {
197
- isSuccess: boolean
198
- error?: string
199
- }
200
-
201
- export interface StatsigUserArgs {
202
- userID?: string
203
- customIDs?: Record<string, string>
204
- email?: string
205
- ip?: string
206
- userAgent?: string
207
- country?: string
208
- locale?: string
209
- appVersion?: string
210
- custom?: Record<string, string | number | boolean | Array<string | number | boolean>>
211
- privateAttributes?: Record<string, string | number | boolean | Array<string | number | boolean>>
1
+ import { StatsigNapiInternal, StatsigOptions } from './statsig-generated';
2
+ export * from './statsig-generated';
3
+ export declare class Statsig extends StatsigNapiInternal {
4
+ constructor(sdkKey: string, options?: StatsigOptions);
212
5
  }
package/index.js CHANGED
@@ -1,374 +1,58 @@
1
- // prettier-ignore
2
- /* eslint-disable */
3
- // @ts-nocheck
4
- /* auto-generated by NAPI-RS */
5
-
6
- const { createRequire } = require('node:module')
7
- require = createRequire(__filename)
8
-
9
- const { readFileSync } = require('node:fs')
10
- let nativeBinding = null
11
- const loadErrors = []
12
-
13
- const isMusl = () => {
14
- let musl = false
15
- if (process.platform === 'linux') {
16
- musl = isMuslFromFilesystem()
17
- if (musl === null) {
18
- musl = isMuslFromReport()
19
- }
20
- if (musl === null) {
21
- musl = isMuslFromChildProcess()
22
- }
23
- }
24
- return musl
25
- }
26
-
27
- const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
28
-
29
- const isMuslFromFilesystem = () => {
30
- try {
31
- return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
32
- } catch {
33
- return null
34
- }
35
- }
36
-
37
- const isMuslFromReport = () => {
38
- const report = typeof process.report.getReport === 'function' ? process.report.getReport() : null
39
- if (!report) {
40
- return null
41
- }
42
- if (report.header && report.header.glibcVersionRuntime) {
43
- return false
44
- }
45
- if (Array.isArray(report.sharedObjects)) {
46
- if (report.sharedObjects.some(isFileMusl)) {
47
- return true
48
- }
49
- }
50
- return false
51
- }
52
-
53
- const isMuslFromChildProcess = () => {
54
- try {
55
- return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
56
- } catch (e) {
57
- // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
58
- return false
59
- }
60
- }
61
-
62
- function requireNative() {
63
- if (process.platform === 'android') {
64
- if (process.arch === 'arm64') {
65
- try {
66
- return require('./statsig-node-core.android-arm64.node')
67
- } catch (e) {
68
- loadErrors.push(e)
69
- }
70
- try {
71
- return require('@statsig/statsig-node-core-android-arm64')
72
- } catch (e) {
73
- loadErrors.push(e)
74
- }
75
-
76
- } else if (process.arch === 'arm') {
77
- try {
78
- return require('./statsig-node-core.android-arm-eabi.node')
79
- } catch (e) {
80
- loadErrors.push(e)
81
- }
82
- try {
83
- return require('@statsig/statsig-node-core-android-arm-eabi')
84
- } catch (e) {
85
- loadErrors.push(e)
86
- }
87
-
88
- } else {
89
- loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
90
- }
91
- } else if (process.platform === 'win32') {
92
- if (process.arch === 'x64') {
93
- try {
94
- return require('./statsig-node-core.win32-x64-msvc.node')
95
- } catch (e) {
96
- loadErrors.push(e)
97
- }
98
- try {
99
- return require('@statsig/statsig-node-core-win32-x64-msvc')
100
- } catch (e) {
101
- loadErrors.push(e)
102
- }
103
-
104
- } else if (process.arch === 'ia32') {
105
- try {
106
- return require('./statsig-node-core.win32-ia32-msvc.node')
107
- } catch (e) {
108
- loadErrors.push(e)
109
- }
110
- try {
111
- return require('@statsig/statsig-node-core-win32-ia32-msvc')
112
- } catch (e) {
113
- loadErrors.push(e)
114
- }
115
-
116
- } else if (process.arch === 'arm64') {
117
- try {
118
- return require('./statsig-node-core.win32-arm64-msvc.node')
119
- } catch (e) {
120
- loadErrors.push(e)
121
- }
122
- try {
123
- return require('@statsig/statsig-node-core-win32-arm64-msvc')
124
- } catch (e) {
125
- loadErrors.push(e)
126
- }
127
-
128
- } else {
129
- loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
130
- }
131
- } else if (process.platform === 'darwin') {
132
- try {
133
- return require('./statsig-node-core.darwin-universal.node')
134
- } catch (e) {
135
- loadErrors.push(e)
136
- }
137
- try {
138
- return require('@statsig/statsig-node-core-darwin-universal')
139
- } catch (e) {
140
- loadErrors.push(e)
141
- }
142
-
143
- if (process.arch === 'x64') {
144
- try {
145
- return require('./statsig-node-core.darwin-x64.node')
146
- } catch (e) {
147
- loadErrors.push(e)
148
- }
149
- try {
150
- return require('@statsig/statsig-node-core-darwin-x64')
151
- } catch (e) {
152
- loadErrors.push(e)
153
- }
154
-
155
- } else if (process.arch === 'arm64') {
156
- try {
157
- return require('./statsig-node-core.darwin-arm64.node')
158
- } catch (e) {
159
- loadErrors.push(e)
160
- }
161
- try {
162
- return require('@statsig/statsig-node-core-darwin-arm64')
163
- } catch (e) {
164
- loadErrors.push(e)
165
- }
166
-
167
- } else {
168
- loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
169
- }
170
- } else if (process.platform === 'freebsd') {
171
- if (process.arch === 'x64') {
172
- try {
173
- return require('./statsig-node-core.freebsd-x64.node')
174
- } catch (e) {
175
- loadErrors.push(e)
176
- }
177
- try {
178
- return require('@statsig/statsig-node-core-freebsd-x64')
179
- } catch (e) {
180
- loadErrors.push(e)
181
- }
182
-
183
- } else if (process.arch === 'arm64') {
184
- try {
185
- return require('./statsig-node-core.freebsd-arm64.node')
186
- } catch (e) {
187
- loadErrors.push(e)
188
- }
189
- try {
190
- return require('@statsig/statsig-node-core-freebsd-arm64')
191
- } catch (e) {
192
- loadErrors.push(e)
193
- }
194
-
195
- } else {
196
- loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
197
- }
198
- } else if (process.platform === 'linux') {
199
- if (process.arch === 'x64') {
200
- if (isMusl()) {
201
- try {
202
- return require('./statsig-node-core.linux-x64-musl.node')
203
- } catch (e) {
204
- loadErrors.push(e)
205
- }
206
- try {
207
- return require('@statsig/statsig-node-core-linux-x64-musl')
208
- } catch (e) {
209
- loadErrors.push(e)
210
- }
211
-
212
- } else {
213
- try {
214
- return require('./statsig-node-core.linux-x64-gnu.node')
215
- } catch (e) {
216
- loadErrors.push(e)
217
- }
218
- try {
219
- return require('@statsig/statsig-node-core-linux-x64-gnu')
220
- } catch (e) {
221
- loadErrors.push(e)
222
- }
223
-
224
- }
225
- } else if (process.arch === 'arm64') {
226
- if (isMusl()) {
227
- try {
228
- return require('./statsig-node-core.linux-arm64-musl.node')
229
- } catch (e) {
230
- loadErrors.push(e)
231
- }
232
- try {
233
- return require('@statsig/statsig-node-core-linux-arm64-musl')
234
- } catch (e) {
235
- loadErrors.push(e)
236
- }
237
-
238
- } else {
239
- try {
240
- return require('./statsig-node-core.linux-arm64-gnu.node')
241
- } catch (e) {
242
- loadErrors.push(e)
243
- }
244
- try {
245
- return require('@statsig/statsig-node-core-linux-arm64-gnu')
246
- } catch (e) {
247
- loadErrors.push(e)
248
- }
249
-
250
- }
251
- } else if (process.arch === 'arm') {
252
- if (isMusl()) {
253
- try {
254
- return require('./statsig-node-core.linux-arm-musleabihf.node')
255
- } catch (e) {
256
- loadErrors.push(e)
257
- }
258
- try {
259
- return require('@statsig/statsig-node-core-linux-arm-musleabihf')
260
- } catch (e) {
261
- loadErrors.push(e)
262
- }
263
-
264
- } else {
265
- try {
266
- return require('./statsig-node-core.linux-arm-gnueabihf.node')
267
- } catch (e) {
268
- loadErrors.push(e)
269
- }
270
- try {
271
- return require('@statsig/statsig-node-core-linux-arm-gnueabihf')
272
- } catch (e) {
273
- loadErrors.push(e)
274
- }
275
-
276
- }
277
- } else if (process.arch === 'riscv64') {
278
- if (isMusl()) {
279
- try {
280
- return require('./statsig-node-core.linux-riscv64-musl.node')
281
- } catch (e) {
282
- loadErrors.push(e)
283
- }
284
- try {
285
- return require('@statsig/statsig-node-core-linux-riscv64-musl')
286
- } catch (e) {
287
- loadErrors.push(e)
288
- }
289
-
290
- } else {
291
- try {
292
- return require('./statsig-node-core.linux-riscv64-gnu.node')
293
- } catch (e) {
294
- loadErrors.push(e)
295
- }
296
- try {
297
- return require('@statsig/statsig-node-core-linux-riscv64-gnu')
298
- } catch (e) {
299
- loadErrors.push(e)
300
- }
301
-
302
- }
303
- } else if (process.arch === 'ppc64') {
304
- try {
305
- return require('./statsig-node-core.linux-ppc64-gnu.node')
306
- } catch (e) {
307
- loadErrors.push(e)
308
- }
309
- try {
310
- return require('@statsig/statsig-node-core-linux-ppc64-gnu')
311
- } catch (e) {
312
- loadErrors.push(e)
313
- }
314
-
315
- } else if (process.arch === 's390x') {
316
- try {
317
- return require('./statsig-node-core.linux-s390x-gnu.node')
318
- } catch (e) {
319
- loadErrors.push(e)
320
- }
321
- try {
322
- return require('@statsig/statsig-node-core-linux-s390x-gnu')
323
- } catch (e) {
324
- loadErrors.push(e)
325
- }
326
-
327
- } else {
328
- loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
329
- }
330
- } else {
331
- loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
332
- }
333
- }
334
-
335
- nativeBinding = requireNative()
336
-
337
- if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
338
- try {
339
- nativeBinding = require('./statsig-node-core.wasi.cjs')
340
- } catch (err) {
341
- if (process.env.NAPI_RS_FORCE_WASI) {
342
- loadErrors.push(err)
343
- }
344
- }
345
- if (!nativeBinding) {
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Statsig = void 0;
30
+ const node_fetch_1 = __importDefault(require("node-fetch"));
31
+ const statsig_generated_1 = require("./statsig-generated");
32
+ __exportStar(require("./statsig-generated"), exports);
33
+ const FETCH_FUNC = (method, url, headers, body) => __awaiter(void 0, void 0, void 0, function* () {
346
34
  try {
347
- nativeBinding = require('@statsig/statsig-node-core-wasm32-wasi')
348
- } catch (err) {
349
- if (process.env.NAPI_RS_FORCE_WASI) {
350
- loadErrors.push(err)
351
- }
35
+ const res = yield (0, node_fetch_1.default)(url, {
36
+ method,
37
+ headers,
38
+ body: body ? Buffer.from(body) : undefined,
39
+ });
40
+ const data = yield res.arrayBuffer();
41
+ return {
42
+ status: res.status,
43
+ data: Array.from(new Uint8Array(data)),
44
+ };
45
+ }
46
+ catch (err) {
47
+ return {
48
+ status: 0,
49
+ error: 'message' in err ? err.message : 'Unknown Node Fetch Error',
50
+ };
51
+ }
52
+ });
53
+ class Statsig extends statsig_generated_1.StatsigNapiInternal {
54
+ constructor(sdkKey, options) {
55
+ super(FETCH_FUNC, sdkKey, options);
352
56
  }
353
- }
354
- }
355
-
356
- if (!nativeBinding) {
357
- if (loadErrors.length > 0) {
358
- // TODO Link to documentation with potential fixes
359
- // - The package owner could build/publish bindings for this arch
360
- // - The user may need to bundle the correct files
361
- // - The user may need to re-install node_modules to get new packages
362
- throw new Error('Failed to load native binding', { cause: loadErrors })
363
- }
364
- throw new Error(`Failed to load native binding`)
365
57
  }
366
-
367
- module.exports.DynamicConfig = nativeBinding.DynamicConfig
368
- module.exports.Experiment = nativeBinding.Experiment
369
- module.exports.Layer = nativeBinding.Layer
370
- module.exports.Statsig = nativeBinding.Statsig
371
- module.exports.StatsigUser = nativeBinding.StatsigUser
372
- module.exports.__internal__testDataStore = nativeBinding.__internal__testDataStore
373
- module.exports.__internal__testObservabilityClient = nativeBinding.__internal__testObservabilityClient
374
- module.exports.OverrideAdapterType = nativeBinding.OverrideAdapterType
58
+ exports.Statsig = Statsig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/statsig-node-core",
3
- "version": "0.0.9",
3
+ "version": "0.0.10-beta.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "jest --colors",
@@ -10,6 +10,9 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "description": "",
13
+ "dependencies": {
14
+ "node-fetch": "2.7.0"
15
+ },
13
16
  "devDependencies": {
14
17
  "@mongodb-js/zstd": "^2.0.0",
15
18
  "@napi-rs/cli": "^3.0.0-alpha.62",
@@ -17,6 +20,7 @@
17
20
  "@types/express": "^5.0.0",
18
21
  "@types/jest": "^29.5.14",
19
22
  "@types/node": "^22.10.10",
23
+ "@types/node-fetch": "2.6.12",
20
24
  "compression": "^1.7.4",
21
25
  "express": "^4.21.2",
22
26
  "jest": "^29.7.0",
@@ -40,13 +44,13 @@
40
44
  ]
41
45
  },
42
46
  "optionalDependencies": {
43
- "@statsig/statsig-node-core-linux-x64-musl": "0.0.9",
44
- "@statsig/statsig-node-core-linux-x64-gnu": "0.0.9",
45
- "@statsig/statsig-node-core-win32-x64-msvc": "0.0.9",
46
- "@statsig/statsig-node-core-darwin-x64": "0.0.9",
47
- "@statsig/statsig-node-core-win32-ia32-msvc": "0.0.9",
48
- "@statsig/statsig-node-core-linux-arm64-musl": "0.0.9",
49
- "@statsig/statsig-node-core-linux-arm64-gnu": "0.0.9",
50
- "@statsig/statsig-node-core-darwin-arm64": "0.0.9"
47
+ "@statsig/statsig-node-core-linux-x64-musl": "0.0.10-beta.3",
48
+ "@statsig/statsig-node-core-linux-x64-gnu": "0.0.10-beta.3",
49
+ "@statsig/statsig-node-core-win32-x64-msvc": "0.0.10-beta.3",
50
+ "@statsig/statsig-node-core-darwin-x64": "0.0.10-beta.3",
51
+ "@statsig/statsig-node-core-win32-ia32-msvc": "0.0.10-beta.3",
52
+ "@statsig/statsig-node-core-linux-arm64-musl": "0.0.10-beta.3",
53
+ "@statsig/statsig-node-core-linux-arm64-gnu": "0.0.10-beta.3",
54
+ "@statsig/statsig-node-core-darwin-arm64": "0.0.10-beta.3"
51
55
  }
52
56
  }
@@ -0,0 +1,218 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ export declare class DynamicConfig {
4
+ name: string
5
+ value: Record<string, any>
6
+ ruleID: string
7
+ idType: string
8
+ getValue(param_name: string, fallback: boolean | number | string | object | Array<any> | null): any
9
+ getRuleId(): string
10
+ getIdType(): string
11
+ getEvaluationDetails(): EvaluationDetails
12
+ getSecondaryExposures(): Array<SecondaryExposure> | null
13
+ }
14
+
15
+ export declare class Experiment {
16
+ name: string
17
+ value: Record<string, any>
18
+ ruleID: string
19
+ idType: string
20
+ groupName?: string
21
+ getValue(param_name: string, fallback: boolean | number | string | object | Array<any> | null): any
22
+ getRuleId(): string
23
+ getIdType(): string
24
+ getGroupName(): string | null
25
+ getEvaluationDetails(): EvaluationDetails
26
+ getSecondaryExposures(): Array<SecondaryExposure> | null
27
+ }
28
+
29
+ export declare class Layer {
30
+ name: string
31
+ ruleID: string
32
+ groupName?: string
33
+ allocatedExperimentName?: string
34
+ getValue(param_name: string, fallback: boolean | number | string | object | Array<any> | null): any
35
+ getRuleId(): string
36
+ getGroupName(): string | null
37
+ getEvaluationDetails(): EvaluationDetails
38
+ getSecondaryExposures(): Array<SecondaryExposure> | null
39
+ }
40
+
41
+ export declare class StatsigNapiInternal {
42
+ constructor(networkFunc: NapiNetworkFunc, sdkKey: string, options?: StatsigOptions | undefined | null)
43
+ initialize(): Promise<StatsigResult>
44
+ shutdown(timeoutMs?: number | undefined | null): Promise<StatsigResult>
45
+ flushEvents(): Promise<StatsigResult>
46
+ logEvent(user: StatsigUser, eventName: string, value?: string | number | null, metadata?: Record<string, string> | undefined | null): void
47
+ checkGate(user: StatsigUser, gateName: string, options?: FeatureGateEvaluationOptions | undefined | null): boolean
48
+ getFeatureGate(user: StatsigUser, featureName: string, options?: FeatureGateEvaluationOptions | undefined | null): FeatureGate
49
+ getFieldsNeededForGate(gateName: string): Array<string>
50
+ getDynamicConfig(user: StatsigUser, configName: string, options?: DynamicConfigEvaluationOptions | undefined | null): DynamicConfig
51
+ getFieldsNeededForDynamicConfig(configName: string): Array<string>
52
+ getExperiment(user: StatsigUser, experimentName: string, options?: ExperimentEvaluationOptions | undefined | null): Experiment
53
+ getFieldsNeededForExperiment(experimentName: string): Array<string>
54
+ getLayer(user: StatsigUser, layerName: string, options?: LayerEvaluationOptions | undefined | null): Layer
55
+ getFieldsNeededForLayer(layerName: string): Array<string>
56
+ getClientInitializeResponse(user: StatsigUser, options?: ClientInitResponseOptions | undefined | null): string
57
+ manuallyLogFeatureGateExposure(user: StatsigUser, gateName: string): void
58
+ manuallyLogDynamicConfigExposure(user: StatsigUser, configName: string): void
59
+ manuallyLogExperimentExposure(user: StatsigUser, experimentName: string): void
60
+ manuallyLogLayerParamExposure(user: StatsigUser, layerName: string, paramName: string): void
61
+ overrideGate(gateName: string, value: boolean, adapter?: OverrideAdapterType | undefined | null): void
62
+ overrideDynamicConfig(configName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
63
+ overrideExperiment(experimentName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
64
+ overrideExperimentByGroupName(experimentName: string, groupName: string, adapter?: OverrideAdapterType | undefined | null): void
65
+ overrideLayer(layerName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
66
+ }
67
+
68
+ export declare class StatsigUser {
69
+ constructor(args: ({userID: string} | {customIDs: Record<string, string> }) & StatsigUserArgs)
70
+ static withUserID(userId: string): StatsigUser
71
+ static withCustomIDs(customIds: Record<string, string>): StatsigUser
72
+ get customIDs(): Record<string, string> | null
73
+ set customIDs(value: Record<string, string> | null)
74
+ get custom(): Record<string, string> | null
75
+ set custom(value: Record<string, string | number | boolean | Array<string | number | boolean>> | null)
76
+ get privateAttributes(): Record<string, string> | null
77
+ set privateAttributes(value: Record<string, string | number | boolean | Array<string | number | boolean>> | null)
78
+ get userID(): string | null
79
+ set userID(value: any)
80
+ get email(): string | null
81
+ set email(value: any)
82
+ get ip(): string | null
83
+ set ip(value: any)
84
+ get userAgent(): string | null
85
+ set userAgent(value: any)
86
+ get country(): string | null
87
+ set country(value: any)
88
+ get locale(): string | null
89
+ set locale(value: any)
90
+ get appVersion(): string | null
91
+ set appVersion(value: any)
92
+ }
93
+
94
+ export declare function __internal__testDataStore(store: DataStore, path: string, value: string): Promise<[DataStoreResponse | undefined | null, boolean]>
95
+
96
+ export declare function __internal__testObservabilityClient(client: ObservabilityClient, action: string, metricName: string, value: number, tags?: Record<string, string> | undefined | null): Promise<void>
97
+
98
+ export interface ClientInitResponseOptions {
99
+ hashAlgorithm?: string
100
+ clientSdkKey?: string
101
+ includeLocalOverrides?: boolean
102
+ }
103
+
104
+ export interface DataStore {
105
+ initialize?: () => Promise<void>
106
+ shutdown?: () => Promise<void>
107
+ get?: (key: string) => Promise<DataStoreResponse>
108
+ set?: (key: string, value: string, time?: number) => Promise<void>
109
+ supportPollingUpdatesFor?: (key: string) => Promise<boolean>
110
+ }
111
+
112
+ export interface DataStoreResponse {
113
+ result?: string
114
+ time?: number
115
+ }
116
+
117
+ export interface DynamicConfigEvaluationOptions {
118
+ disableExposureLogging?: boolean
119
+ }
120
+
121
+ export interface EvaluationDetails {
122
+ reason: string
123
+ lcut?: number
124
+ receivedAt?: number
125
+ }
126
+
127
+ export interface ExperimentEvaluationOptions {
128
+ disableExposureLogging?: boolean
129
+ }
130
+
131
+ export interface FeatureGate {
132
+ name: string
133
+ value: boolean
134
+ ruleID: string
135
+ idType: string
136
+ }
137
+
138
+ export interface FeatureGateEvaluationOptions {
139
+ disableExposureLogging?: boolean
140
+ }
141
+
142
+ export interface LayerEvaluationOptions {
143
+ disableExposureLogging?: boolean
144
+ }
145
+
146
+ export interface NapiNetworkFuncResult {
147
+ status: number
148
+ data?: Array<number>
149
+ error?: string
150
+ }
151
+
152
+ export interface ObservabilityClient {
153
+ initialize?: () => void
154
+ increment?: (metricName: string, value: number, tags: Record<string, string>) => void
155
+ gauge?: (metricName: string, value: number, tags: Record<string, string>) => void
156
+ dist?: (metricName: string, value: number, tags: Record<string, string>) => void
157
+ }
158
+
159
+ export interface OverrideAdapterConfig {
160
+ adapterType: OverrideAdapterType
161
+ }
162
+
163
+ export declare const enum OverrideAdapterType {
164
+ LocalOverride = 0
165
+ }
166
+
167
+ export interface SecondaryExposure {
168
+ gate: string
169
+ gateValue: string
170
+ ruleId: string
171
+ }
172
+
173
+ export interface SpecAdapterConfig {
174
+ adapterType: 'data_store' | 'network_grpc_websocket' | 'network_http'
175
+ specsUrl?: string
176
+ initTimeoutMs: number
177
+ }
178
+
179
+ export interface StatsigOptions {
180
+ dataStore?: DataStore
181
+ disableAllLogging?: boolean
182
+ enableIdLists?: boolean
183
+ enableUserAgentParsing?: boolean
184
+ enableCountryLookup?: boolean
185
+ environment?: string
186
+ eventLoggingFlushIntervalMs?: number
187
+ eventLoggingMaxQueueSize?: number
188
+ fallbackToStatsigApi?: boolean
189
+ idListsSyncIntervalMs?: number
190
+ idListsUrl?: string
191
+ initTimeoutMs?: number
192
+ logEventUrl?: string
193
+ observabilityClient?: ObservabilityClient
194
+ outputLogLevel?: 'none' | 'debug' | 'info' | 'warn' | 'error'
195
+ specAdaptersConfig?: Array<SpecAdapterConfig>
196
+ specsUrl?: string
197
+ specsSyncIntervalMs?: number
198
+ serviceName?: string
199
+ overrideAdapterConfig?: Array<OverrideAdapterConfig>
200
+ }
201
+
202
+ export interface StatsigResult {
203
+ isSuccess: boolean
204
+ error?: string
205
+ }
206
+
207
+ export interface StatsigUserArgs {
208
+ userID?: string
209
+ customIDs?: Record<string, string>
210
+ email?: string
211
+ ip?: string
212
+ userAgent?: string
213
+ country?: string
214
+ locale?: string
215
+ appVersion?: string
216
+ custom?: Record<string, string | number | boolean | Array<string | number | boolean>>
217
+ privateAttributes?: Record<string, string | number | boolean | Array<string | number | boolean>>
218
+ }
@@ -0,0 +1,374 @@
1
+ // prettier-ignore
2
+ /* eslint-disable */
3
+ // @ts-nocheck
4
+ /* auto-generated by NAPI-RS */
5
+
6
+ const { createRequire } = require('node:module')
7
+ require = createRequire(__filename)
8
+
9
+ const { readFileSync } = require('node:fs')
10
+ let nativeBinding = null
11
+ const loadErrors = []
12
+
13
+ const isMusl = () => {
14
+ let musl = false
15
+ if (process.platform === 'linux') {
16
+ musl = isMuslFromFilesystem()
17
+ if (musl === null) {
18
+ musl = isMuslFromReport()
19
+ }
20
+ if (musl === null) {
21
+ musl = isMuslFromChildProcess()
22
+ }
23
+ }
24
+ return musl
25
+ }
26
+
27
+ const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
28
+
29
+ const isMuslFromFilesystem = () => {
30
+ try {
31
+ return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
32
+ } catch {
33
+ return null
34
+ }
35
+ }
36
+
37
+ const isMuslFromReport = () => {
38
+ const report = typeof process.report.getReport === 'function' ? process.report.getReport() : null
39
+ if (!report) {
40
+ return null
41
+ }
42
+ if (report.header && report.header.glibcVersionRuntime) {
43
+ return false
44
+ }
45
+ if (Array.isArray(report.sharedObjects)) {
46
+ if (report.sharedObjects.some(isFileMusl)) {
47
+ return true
48
+ }
49
+ }
50
+ return false
51
+ }
52
+
53
+ const isMuslFromChildProcess = () => {
54
+ try {
55
+ return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
56
+ } catch (e) {
57
+ // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
58
+ return false
59
+ }
60
+ }
61
+
62
+ function requireNative() {
63
+ if (process.platform === 'android') {
64
+ if (process.arch === 'arm64') {
65
+ try {
66
+ return require('./statsig-node-core.android-arm64.node')
67
+ } catch (e) {
68
+ loadErrors.push(e)
69
+ }
70
+ try {
71
+ return require('@statsig/statsig-node-core-android-arm64')
72
+ } catch (e) {
73
+ loadErrors.push(e)
74
+ }
75
+
76
+ } else if (process.arch === 'arm') {
77
+ try {
78
+ return require('./statsig-node-core.android-arm-eabi.node')
79
+ } catch (e) {
80
+ loadErrors.push(e)
81
+ }
82
+ try {
83
+ return require('@statsig/statsig-node-core-android-arm-eabi')
84
+ } catch (e) {
85
+ loadErrors.push(e)
86
+ }
87
+
88
+ } else {
89
+ loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
90
+ }
91
+ } else if (process.platform === 'win32') {
92
+ if (process.arch === 'x64') {
93
+ try {
94
+ return require('./statsig-node-core.win32-x64-msvc.node')
95
+ } catch (e) {
96
+ loadErrors.push(e)
97
+ }
98
+ try {
99
+ return require('@statsig/statsig-node-core-win32-x64-msvc')
100
+ } catch (e) {
101
+ loadErrors.push(e)
102
+ }
103
+
104
+ } else if (process.arch === 'ia32') {
105
+ try {
106
+ return require('./statsig-node-core.win32-ia32-msvc.node')
107
+ } catch (e) {
108
+ loadErrors.push(e)
109
+ }
110
+ try {
111
+ return require('@statsig/statsig-node-core-win32-ia32-msvc')
112
+ } catch (e) {
113
+ loadErrors.push(e)
114
+ }
115
+
116
+ } else if (process.arch === 'arm64') {
117
+ try {
118
+ return require('./statsig-node-core.win32-arm64-msvc.node')
119
+ } catch (e) {
120
+ loadErrors.push(e)
121
+ }
122
+ try {
123
+ return require('@statsig/statsig-node-core-win32-arm64-msvc')
124
+ } catch (e) {
125
+ loadErrors.push(e)
126
+ }
127
+
128
+ } else {
129
+ loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
130
+ }
131
+ } else if (process.platform === 'darwin') {
132
+ try {
133
+ return require('./statsig-node-core.darwin-universal.node')
134
+ } catch (e) {
135
+ loadErrors.push(e)
136
+ }
137
+ try {
138
+ return require('@statsig/statsig-node-core-darwin-universal')
139
+ } catch (e) {
140
+ loadErrors.push(e)
141
+ }
142
+
143
+ if (process.arch === 'x64') {
144
+ try {
145
+ return require('./statsig-node-core.darwin-x64.node')
146
+ } catch (e) {
147
+ loadErrors.push(e)
148
+ }
149
+ try {
150
+ return require('@statsig/statsig-node-core-darwin-x64')
151
+ } catch (e) {
152
+ loadErrors.push(e)
153
+ }
154
+
155
+ } else if (process.arch === 'arm64') {
156
+ try {
157
+ return require('./statsig-node-core.darwin-arm64.node')
158
+ } catch (e) {
159
+ loadErrors.push(e)
160
+ }
161
+ try {
162
+ return require('@statsig/statsig-node-core-darwin-arm64')
163
+ } catch (e) {
164
+ loadErrors.push(e)
165
+ }
166
+
167
+ } else {
168
+ loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
169
+ }
170
+ } else if (process.platform === 'freebsd') {
171
+ if (process.arch === 'x64') {
172
+ try {
173
+ return require('./statsig-node-core.freebsd-x64.node')
174
+ } catch (e) {
175
+ loadErrors.push(e)
176
+ }
177
+ try {
178
+ return require('@statsig/statsig-node-core-freebsd-x64')
179
+ } catch (e) {
180
+ loadErrors.push(e)
181
+ }
182
+
183
+ } else if (process.arch === 'arm64') {
184
+ try {
185
+ return require('./statsig-node-core.freebsd-arm64.node')
186
+ } catch (e) {
187
+ loadErrors.push(e)
188
+ }
189
+ try {
190
+ return require('@statsig/statsig-node-core-freebsd-arm64')
191
+ } catch (e) {
192
+ loadErrors.push(e)
193
+ }
194
+
195
+ } else {
196
+ loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
197
+ }
198
+ } else if (process.platform === 'linux') {
199
+ if (process.arch === 'x64') {
200
+ if (isMusl()) {
201
+ try {
202
+ return require('./statsig-node-core.linux-x64-musl.node')
203
+ } catch (e) {
204
+ loadErrors.push(e)
205
+ }
206
+ try {
207
+ return require('@statsig/statsig-node-core-linux-x64-musl')
208
+ } catch (e) {
209
+ loadErrors.push(e)
210
+ }
211
+
212
+ } else {
213
+ try {
214
+ return require('./statsig-node-core.linux-x64-gnu.node')
215
+ } catch (e) {
216
+ loadErrors.push(e)
217
+ }
218
+ try {
219
+ return require('@statsig/statsig-node-core-linux-x64-gnu')
220
+ } catch (e) {
221
+ loadErrors.push(e)
222
+ }
223
+
224
+ }
225
+ } else if (process.arch === 'arm64') {
226
+ if (isMusl()) {
227
+ try {
228
+ return require('./statsig-node-core.linux-arm64-musl.node')
229
+ } catch (e) {
230
+ loadErrors.push(e)
231
+ }
232
+ try {
233
+ return require('@statsig/statsig-node-core-linux-arm64-musl')
234
+ } catch (e) {
235
+ loadErrors.push(e)
236
+ }
237
+
238
+ } else {
239
+ try {
240
+ return require('./statsig-node-core.linux-arm64-gnu.node')
241
+ } catch (e) {
242
+ loadErrors.push(e)
243
+ }
244
+ try {
245
+ return require('@statsig/statsig-node-core-linux-arm64-gnu')
246
+ } catch (e) {
247
+ loadErrors.push(e)
248
+ }
249
+
250
+ }
251
+ } else if (process.arch === 'arm') {
252
+ if (isMusl()) {
253
+ try {
254
+ return require('./statsig-node-core.linux-arm-musleabihf.node')
255
+ } catch (e) {
256
+ loadErrors.push(e)
257
+ }
258
+ try {
259
+ return require('@statsig/statsig-node-core-linux-arm-musleabihf')
260
+ } catch (e) {
261
+ loadErrors.push(e)
262
+ }
263
+
264
+ } else {
265
+ try {
266
+ return require('./statsig-node-core.linux-arm-gnueabihf.node')
267
+ } catch (e) {
268
+ loadErrors.push(e)
269
+ }
270
+ try {
271
+ return require('@statsig/statsig-node-core-linux-arm-gnueabihf')
272
+ } catch (e) {
273
+ loadErrors.push(e)
274
+ }
275
+
276
+ }
277
+ } else if (process.arch === 'riscv64') {
278
+ if (isMusl()) {
279
+ try {
280
+ return require('./statsig-node-core.linux-riscv64-musl.node')
281
+ } catch (e) {
282
+ loadErrors.push(e)
283
+ }
284
+ try {
285
+ return require('@statsig/statsig-node-core-linux-riscv64-musl')
286
+ } catch (e) {
287
+ loadErrors.push(e)
288
+ }
289
+
290
+ } else {
291
+ try {
292
+ return require('./statsig-node-core.linux-riscv64-gnu.node')
293
+ } catch (e) {
294
+ loadErrors.push(e)
295
+ }
296
+ try {
297
+ return require('@statsig/statsig-node-core-linux-riscv64-gnu')
298
+ } catch (e) {
299
+ loadErrors.push(e)
300
+ }
301
+
302
+ }
303
+ } else if (process.arch === 'ppc64') {
304
+ try {
305
+ return require('./statsig-node-core.linux-ppc64-gnu.node')
306
+ } catch (e) {
307
+ loadErrors.push(e)
308
+ }
309
+ try {
310
+ return require('@statsig/statsig-node-core-linux-ppc64-gnu')
311
+ } catch (e) {
312
+ loadErrors.push(e)
313
+ }
314
+
315
+ } else if (process.arch === 's390x') {
316
+ try {
317
+ return require('./statsig-node-core.linux-s390x-gnu.node')
318
+ } catch (e) {
319
+ loadErrors.push(e)
320
+ }
321
+ try {
322
+ return require('@statsig/statsig-node-core-linux-s390x-gnu')
323
+ } catch (e) {
324
+ loadErrors.push(e)
325
+ }
326
+
327
+ } else {
328
+ loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
329
+ }
330
+ } else {
331
+ loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
332
+ }
333
+ }
334
+
335
+ nativeBinding = requireNative()
336
+
337
+ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
338
+ try {
339
+ nativeBinding = require('./statsig-node-core.wasi.cjs')
340
+ } catch (err) {
341
+ if (process.env.NAPI_RS_FORCE_WASI) {
342
+ loadErrors.push(err)
343
+ }
344
+ }
345
+ if (!nativeBinding) {
346
+ try {
347
+ nativeBinding = require('@statsig/statsig-node-core-wasm32-wasi')
348
+ } catch (err) {
349
+ if (process.env.NAPI_RS_FORCE_WASI) {
350
+ loadErrors.push(err)
351
+ }
352
+ }
353
+ }
354
+ }
355
+
356
+ if (!nativeBinding) {
357
+ if (loadErrors.length > 0) {
358
+ // TODO Link to documentation with potential fixes
359
+ // - The package owner could build/publish bindings for this arch
360
+ // - The user may need to bundle the correct files
361
+ // - The user may need to re-install node_modules to get new packages
362
+ throw new Error('Failed to load native binding', { cause: loadErrors })
363
+ }
364
+ throw new Error(`Failed to load native binding`)
365
+ }
366
+
367
+ module.exports.DynamicConfig = nativeBinding.DynamicConfig
368
+ module.exports.Experiment = nativeBinding.Experiment
369
+ module.exports.Layer = nativeBinding.Layer
370
+ module.exports.StatsigNapiInternal = nativeBinding.StatsigNapiInternal
371
+ module.exports.StatsigUser = nativeBinding.StatsigUser
372
+ module.exports.__internal__testDataStore = nativeBinding.__internal__testDataStore
373
+ module.exports.__internal__testObservabilityClient = nativeBinding.__internal__testObservabilityClient
374
+ module.exports.OverrideAdapterType = nativeBinding.OverrideAdapterType