@launchdarkly/react-native-client-sdk 10.7.0 → 10.8.1-beta.1

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/package.json +2 -3
  3. package/dist/src/MobileDataManager.d.ts +4 -4
  4. package/dist/src/MobileDataManager.d.ts.map +1 -1
  5. package/dist/src/MobileDataManager.js +18 -16
  6. package/dist/src/MobileDataManager.js.map +1 -1
  7. package/dist/src/RNStateDetector.js +6 -6
  8. package/dist/src/RNStateDetector.js.map +1 -1
  9. package/dist/src/ReactNativeLDClient.d.ts +1 -1
  10. package/dist/src/ReactNativeLDClient.d.ts.map +1 -1
  11. package/dist/src/ReactNativeLDClient.js +11 -3
  12. package/dist/src/ReactNativeLDClient.js.map +1 -1
  13. package/dist/src/fromExternal/react-native-sse/EventSource.d.ts +21 -21
  14. package/dist/src/fromExternal/react-native-sse/EventSource.d.ts.map +1 -1
  15. package/dist/src/fromExternal/react-native-sse/EventSource.js +104 -104
  16. package/dist/src/fromExternal/react-native-sse/EventSource.js.map +1 -1
  17. package/dist/src/platform/ConnectionManager.js +41 -41
  18. package/dist/src/platform/ConnectionManager.js.map +1 -1
  19. package/dist/src/platform/PlatformInfo.d.ts +2 -2
  20. package/dist/src/platform/PlatformInfo.d.ts.map +1 -1
  21. package/dist/src/platform/PlatformInfo.js +4 -4
  22. package/dist/src/platform/PlatformInfo.js.map +1 -1
  23. package/dist/src/platform/PlatformRequests.d.ts +2 -2
  24. package/dist/src/platform/PlatformRequests.d.ts.map +1 -1
  25. package/dist/src/platform/PlatformRequests.js +3 -3
  26. package/dist/src/platform/PlatformRequests.js.map +1 -1
  27. package/dist/src/platform/PlatformStorage.d.ts +2 -2
  28. package/dist/src/platform/PlatformStorage.d.ts.map +1 -1
  29. package/dist/src/platform/PlatformStorage.js +4 -4
  30. package/dist/src/platform/PlatformStorage.js.map +1 -1
  31. package/dist/src/platform/crypto/PlatformHasher.d.ts +1 -1
  32. package/dist/src/platform/crypto/PlatformHasher.d.ts.map +1 -1
  33. package/dist/src/platform/crypto/PlatformHasher.js +4 -4
  34. package/dist/src/platform/crypto/PlatformHasher.js.map +1 -1
  35. package/dist/src/polyfills/btoa.d.ts.map +1 -1
  36. package/dist/src/polyfills/btoa.js +3 -8
  37. package/dist/src/polyfills/btoa.js.map +1 -1
  38. package/dist/src/polyfills/toUtf8Array.d.ts +2 -0
  39. package/dist/src/polyfills/toUtf8Array.d.ts.map +1 -0
  40. package/dist/src/polyfills/toUtf8Array.js +48 -0
  41. package/dist/src/polyfills/toUtf8Array.js.map +1 -0
  42. package/package.json +2 -3
@@ -24,151 +24,151 @@ export default class EventSource {
24
24
  this.CONNECTING = 0;
25
25
  this.OPEN = 1;
26
26
  this.CLOSED = 2;
27
- this.lastIndexProcessed = 0;
28
- this.status = this.CONNECTING;
29
- this.eventHandlers = {
27
+ this._lastIndexProcessed = 0;
28
+ this._status = this.CONNECTING;
29
+ this._eventHandlers = {
30
30
  open: [],
31
31
  message: [],
32
32
  error: [],
33
33
  close: [],
34
34
  };
35
- this.xhr = new XMLHttpRequest();
36
- this.initialRetryDelayMillis = 1000;
37
- this.retryCount = 0;
35
+ this._xhr = new XMLHttpRequest();
36
+ this._initialRetryDelayMillis = 1000;
37
+ this._retryCount = 0;
38
38
  const opts = Object.assign(Object.assign({}, defaultOptions), options);
39
- this.url = url;
40
- this.method = opts.method;
41
- this.timeout = opts.timeout;
42
- this.withCredentials = opts.withCredentials;
43
- this.headers = opts.headers;
44
- this.body = opts.body;
45
- this.retryAndHandleError = opts.retryAndHandleError;
46
- this.initialRetryDelayMillis = opts.initialRetryDelayMillis;
47
- this.logger = opts.logger;
48
- this.tryConnect(true);
39
+ this._url = url;
40
+ this._method = opts.method;
41
+ this._timeout = opts.timeout;
42
+ this._withCredentials = opts.withCredentials;
43
+ this._headers = opts.headers;
44
+ this._body = opts.body;
45
+ this._retryAndHandleError = opts.retryAndHandleError;
46
+ this._initialRetryDelayMillis = opts.initialRetryDelayMillis;
47
+ this._logger = opts.logger;
48
+ this._tryConnect(true);
49
49
  }
50
- getNextRetryDelay() {
51
- const delay = jitter(backoff(this.initialRetryDelayMillis, this.retryCount));
52
- this.retryCount += 1;
50
+ _getNextRetryDelay() {
51
+ const delay = jitter(backoff(this._initialRetryDelayMillis, this._retryCount));
52
+ this._retryCount += 1;
53
53
  return delay;
54
54
  }
55
- tryConnect(initialConnection = false) {
55
+ _tryConnect(initialConnection = false) {
56
56
  var _a, _b;
57
- let delay = initialConnection ? 0 : this.getNextRetryDelay();
57
+ let delay = initialConnection ? 0 : this._getNextRetryDelay();
58
58
  if (initialConnection) {
59
- (_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`[EventSource] opening new connection.`);
59
+ (_a = this._logger) === null || _a === void 0 ? void 0 : _a.debug(`[EventSource] opening new connection.`);
60
60
  }
61
61
  else {
62
- (_b = this.logger) === null || _b === void 0 ? void 0 : _b.debug(`[EventSource] Will open new connection in ${delay} ms.`);
62
+ (_b = this._logger) === null || _b === void 0 ? void 0 : _b.debug(`[EventSource] Will open new connection in ${delay} ms.`);
63
63
  this.dispatch('retry', { type: 'retry', delayMillis: delay });
64
64
  }
65
- this.connectTimer = setTimeout(() => {
65
+ this._connectTimer = setTimeout(() => {
66
66
  if (!initialConnection) {
67
67
  this.close();
68
68
  }
69
- this.open();
69
+ this._open();
70
70
  }, delay);
71
71
  }
72
- open() {
72
+ _open() {
73
73
  try {
74
- this.lastIndexProcessed = 0;
75
- this.status = this.CONNECTING;
76
- this.xhr.open(this.method, this.url, true);
77
- if (this.withCredentials) {
78
- this.xhr.withCredentials = true;
74
+ this._lastIndexProcessed = 0;
75
+ this._status = this.CONNECTING;
76
+ this._xhr.open(this._method, this._url, true);
77
+ if (this._withCredentials) {
78
+ this._xhr.withCredentials = true;
79
79
  }
80
- this.xhr.setRequestHeader('Accept', 'text/event-stream');
81
- this.xhr.setRequestHeader('Cache-Control', 'no-cache');
82
- this.xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
83
- if (this.headers) {
84
- Object.entries(this.headers).forEach(([key, value]) => {
85
- this.xhr.setRequestHeader(key, value);
80
+ this._xhr.setRequestHeader('Accept', 'text/event-stream');
81
+ this._xhr.setRequestHeader('Cache-Control', 'no-cache');
82
+ this._xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
83
+ if (this._headers) {
84
+ Object.entries(this._headers).forEach(([key, value]) => {
85
+ this._xhr.setRequestHeader(key, value);
86
86
  });
87
87
  }
88
- if (typeof this.lastEventId !== 'undefined') {
89
- this.xhr.setRequestHeader('Last-Event-ID', this.lastEventId);
88
+ if (typeof this._lastEventId !== 'undefined') {
89
+ this._xhr.setRequestHeader('Last-Event-ID', this._lastEventId);
90
90
  }
91
- this.xhr.timeout = this.timeout;
92
- this.xhr.onreadystatechange = () => {
91
+ this._xhr.timeout = this._timeout;
92
+ this._xhr.onreadystatechange = () => {
93
93
  var _a, _b, _c, _d;
94
- if (this.status === this.CLOSED) {
94
+ if (this._status === this.CLOSED) {
95
95
  return;
96
96
  }
97
- (_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`[EventSource][onreadystatechange] ReadyState: ${XMLReadyStateMap[this.xhr.readyState] || 'Unknown'}(${this.xhr.readyState}), status: ${this.xhr.status}`);
98
- if (this.xhr.readyState !== XMLHttpRequest.DONE &&
99
- this.xhr.readyState !== XMLHttpRequest.LOADING) {
97
+ (_a = this._logger) === null || _a === void 0 ? void 0 : _a.debug(`[EventSource][onreadystatechange] ReadyState: ${XMLReadyStateMap[this._xhr.readyState] || 'Unknown'}(${this._xhr.readyState}), status: ${this._xhr.status}`);
98
+ if (this._xhr.readyState !== XMLHttpRequest.DONE &&
99
+ this._xhr.readyState !== XMLHttpRequest.LOADING) {
100
100
  return;
101
101
  }
102
- if (this.xhr.status >= 200 && this.xhr.status < 400) {
103
- if (this.status === this.CONNECTING) {
104
- this.retryCount = 0;
105
- this.status = this.OPEN;
102
+ if (this._xhr.status >= 200 && this._xhr.status < 400) {
103
+ if (this._status === this.CONNECTING) {
104
+ this._retryCount = 0;
105
+ this._status = this.OPEN;
106
106
  this.dispatch('open', { type: 'open' });
107
- (_b = this.logger) === null || _b === void 0 ? void 0 : _b.debug('[EventSource][onreadystatechange][OPEN] Connection opened.');
107
+ (_b = this._logger) === null || _b === void 0 ? void 0 : _b.debug('[EventSource][onreadystatechange][OPEN] Connection opened.');
108
108
  }
109
109
  // retry from server gets set here
110
- this.handleEvent(this.xhr.responseText || '');
111
- if (this.xhr.readyState === XMLHttpRequest.DONE) {
112
- (_c = this.logger) === null || _c === void 0 ? void 0 : _c.debug('[EventSource][onreadystatechange][DONE] Operation done.');
113
- this.tryConnect();
110
+ this._handleEvent(this._xhr.responseText || '');
111
+ if (this._xhr.readyState === XMLHttpRequest.DONE) {
112
+ (_c = this._logger) === null || _c === void 0 ? void 0 : _c.debug('[EventSource][onreadystatechange][DONE] Operation done.');
113
+ this._tryConnect();
114
114
  }
115
115
  }
116
116
  else {
117
- this.status = this.ERROR;
117
+ this._status = this.ERROR;
118
118
  this.dispatch('error', {
119
119
  type: 'error',
120
- message: this.xhr.responseText,
121
- xhrStatus: this.xhr.status,
122
- xhrState: this.xhr.readyState,
120
+ message: this._xhr.responseText,
121
+ xhrStatus: this._xhr.status,
122
+ xhrState: this._xhr.readyState,
123
123
  });
124
- if (this.xhr.readyState === XMLHttpRequest.DONE) {
125
- (_d = this.logger) === null || _d === void 0 ? void 0 : _d.debug('[EventSource][onreadystatechange][ERROR] Response status error.');
126
- if (!this.retryAndHandleError) {
124
+ if (this._xhr.readyState === XMLHttpRequest.DONE) {
125
+ (_d = this._logger) === null || _d === void 0 ? void 0 : _d.debug('[EventSource][onreadystatechange][ERROR] Response status error.');
126
+ if (!this._retryAndHandleError) {
127
127
  // by default just try and reconnect if there's an error.
128
- this.tryConnect();
128
+ this._tryConnect();
129
129
  }
130
130
  else {
131
131
  // custom retry logic taking into account status codes.
132
- const shouldRetry = this.retryAndHandleError({
133
- status: this.xhr.status,
134
- message: this.xhr.responseText,
132
+ const shouldRetry = this._retryAndHandleError({
133
+ status: this._xhr.status,
134
+ message: this._xhr.responseText,
135
135
  });
136
136
  if (shouldRetry) {
137
- this.tryConnect();
137
+ this._tryConnect();
138
138
  }
139
139
  }
140
140
  }
141
141
  }
142
142
  };
143
- this.xhr.onerror = () => {
144
- if (this.status === this.CLOSED) {
143
+ this._xhr.onerror = () => {
144
+ if (this._status === this.CLOSED) {
145
145
  return;
146
146
  }
147
- this.status = this.ERROR;
147
+ this._status = this.ERROR;
148
148
  this.dispatch('error', {
149
149
  type: 'error',
150
- message: this.xhr.responseText,
151
- xhrStatus: this.xhr.status,
152
- xhrState: this.xhr.readyState,
150
+ message: this._xhr.responseText,
151
+ xhrStatus: this._xhr.status,
152
+ xhrState: this._xhr.readyState,
153
153
  });
154
154
  };
155
- if (this.body) {
156
- this.xhr.send(this.body);
155
+ if (this._body) {
156
+ this._xhr.send(this._body);
157
157
  }
158
158
  else {
159
- this.xhr.send();
159
+ this._xhr.send();
160
160
  }
161
- if (this.timeout > 0) {
161
+ if (this._timeout > 0) {
162
162
  setTimeout(() => {
163
- if (this.xhr.readyState === XMLHttpRequest.LOADING) {
163
+ if (this._xhr.readyState === XMLHttpRequest.LOADING) {
164
164
  this.dispatch('error', { type: 'timeout' });
165
165
  this.close();
166
166
  }
167
- }, this.timeout);
167
+ }, this._timeout);
168
168
  }
169
169
  }
170
170
  catch (e) {
171
- this.status = this.ERROR;
171
+ this._status = this.ERROR;
172
172
  this.dispatch('error', {
173
173
  type: 'exception',
174
174
  message: e.message,
@@ -176,11 +176,11 @@ export default class EventSource {
176
176
  });
177
177
  }
178
178
  }
179
- handleEvent(response) {
180
- const parts = response.slice(this.lastIndexProcessed).split('\n');
179
+ _handleEvent(response) {
180
+ const parts = response.slice(this._lastIndexProcessed).split('\n');
181
181
  const indexOfDoubleNewline = response.lastIndexOf('\n\n');
182
182
  if (indexOfDoubleNewline !== -1) {
183
- this.lastIndexProcessed = indexOfDoubleNewline + 2;
183
+ this._lastIndexProcessed = indexOfDoubleNewline + 2;
184
184
  }
185
185
  let data = [];
186
186
  let retry = 0;
@@ -189,7 +189,7 @@ export default class EventSource {
189
189
  for (let i = 0; i < parts.length; i++) {
190
190
  line = parts[i].replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g, '');
191
191
  if (line.indexOf('event') === 0) {
192
- this.eventType = line.replace(/event:?\s*/, '');
192
+ this._eventType = line.replace(/event:?\s*/, '');
193
193
  }
194
194
  else if (line.indexOf('retry') === 0) {
195
195
  retry = parseInt(line.replace(/retry:?\s*/, ''), 10);
@@ -202,55 +202,55 @@ export default class EventSource {
202
202
  data.push(line.replace(/data:?\s*/, ''));
203
203
  }
204
204
  else if (line.indexOf('id:') === 0) {
205
- this.lastEventId = line.replace(/id:?\s*/, '');
205
+ this._lastEventId = line.replace(/id:?\s*/, '');
206
206
  }
207
207
  else if (line.indexOf('id') === 0) {
208
- this.lastEventId = undefined;
208
+ this._lastEventId = undefined;
209
209
  }
210
210
  else if (line === '') {
211
211
  if (data.length > 0) {
212
- const eventType = this.eventType || 'message';
212
+ const eventType = this._eventType || 'message';
213
213
  const event = {
214
214
  type: eventType,
215
215
  data: data.join('\n'),
216
- url: this.url,
217
- lastEventId: this.lastEventId,
216
+ url: this._url,
217
+ lastEventId: this._lastEventId,
218
218
  };
219
219
  this.dispatch(eventType, event);
220
220
  data = [];
221
- this.eventType = undefined;
221
+ this._eventType = undefined;
222
222
  }
223
223
  }
224
224
  }
225
225
  }
226
226
  addEventListener(type, listener) {
227
- if (this.eventHandlers[type] === undefined) {
228
- this.eventHandlers[type] = [];
227
+ if (this._eventHandlers[type] === undefined) {
228
+ this._eventHandlers[type] = [];
229
229
  }
230
- this.eventHandlers[type].push(listener);
230
+ this._eventHandlers[type].push(listener);
231
231
  }
232
232
  removeEventListener(type, listener) {
233
- if (this.eventHandlers[type] !== undefined) {
234
- this.eventHandlers[type] = this.eventHandlers[type].filter((handler) => handler !== listener);
233
+ if (this._eventHandlers[type] !== undefined) {
234
+ this._eventHandlers[type] = this._eventHandlers[type].filter((handler) => handler !== listener);
235
235
  }
236
236
  }
237
237
  removeAllEventListeners(type) {
238
- const availableTypes = Object.keys(this.eventHandlers);
238
+ const availableTypes = Object.keys(this._eventHandlers);
239
239
  if (type === undefined) {
240
240
  availableTypes.forEach((eventType) => {
241
- this.eventHandlers[eventType] = [];
241
+ this._eventHandlers[eventType] = [];
242
242
  });
243
243
  }
244
244
  else {
245
245
  if (!availableTypes.includes(type)) {
246
246
  throw Error(`[EventSource] '${type}' type is not supported event type.`);
247
247
  }
248
- this.eventHandlers[type] = [];
248
+ this._eventHandlers[type] = [];
249
249
  }
250
250
  }
251
251
  dispatch(type, data) {
252
252
  var _a, _b;
253
- (_a = this.eventHandlers[type]) === null || _a === void 0 ? void 0 : _a.forEach((handler) => handler(data));
253
+ (_a = this._eventHandlers[type]) === null || _a === void 0 ? void 0 : _a.forEach((handler) => handler(data));
254
254
  switch (type) {
255
255
  case 'open':
256
256
  this.onopen();
@@ -259,7 +259,7 @@ export default class EventSource {
259
259
  this.onclose();
260
260
  break;
261
261
  case 'error':
262
- (_b = this.logger) === null || _b === void 0 ? void 0 : _b.debug(`[EventSource][dispatch][ERROR]: ${JSON.stringify(data)}`);
262
+ (_b = this._logger) === null || _b === void 0 ? void 0 : _b.debug(`[EventSource][dispatch][ERROR]: ${JSON.stringify(data)}`);
263
263
  this.onerror(data);
264
264
  break;
265
265
  case 'retry':
@@ -270,15 +270,15 @@ export default class EventSource {
270
270
  }
271
271
  }
272
272
  close() {
273
- this.status = this.CLOSED;
274
- clearTimeout(this.connectTimer);
275
- if (this.xhr) {
276
- this.xhr.abort();
273
+ this._status = this.CLOSED;
274
+ clearTimeout(this._connectTimer);
275
+ if (this._xhr) {
276
+ this._xhr.abort();
277
277
  }
278
278
  this.dispatch('close', { type: 'close' });
279
279
  }
280
280
  getStatus() {
281
- return this.status;
281
+ return this._status;
282
282
  }
283
283
  onopen() { }
284
284
  onclose() { }
@@ -1 +1 @@
1
- {"version":3,"file":"EventSource.js","sourceRoot":"","sources":["../../../../src/fromExternal/react-native-sse/EventSource.ts"],"names":[],"mappings":"AAUA,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAErF,MAAM,cAAc,GAAuB;IACzC,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,CAAC;IACV,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,SAAS;IAC9B,uBAAuB,EAAE,IAAI;IAC7B,MAAM,EAAE,SAAS;CAClB,CAAC;AAEF,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,kCAAkC;AACnE,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,+CAA+C;AAExE,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,UAAkB;IACtD,MAAM,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,mBAA2B;IAChD,OAAO,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,WAAW,GAAG,mBAAmB,CAAC,CAAC;AAC7F,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,WAAW;IA8B9B,YAAY,GAAW,EAAE,OAA4B;QA7BrD,UAAK,GAAG,CAAC,CAAC,CAAC;QACX,eAAU,GAAG,CAAC,CAAC;QACf,SAAI,GAAG,CAAC,CAAC;QACT,WAAM,GAAG,CAAC,CAAC;QAGH,uBAAkB,GAAG,CAAC,CAAC;QAEvB,WA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,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;SAClB;QAED,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,MAAM,KAAI,CAAC;IACX,OAAO,KAAI,CAAC;IACZ,OAAO,CAAC,IAAS,IAAG,CAAC;IACrB,UAAU,CAAC,EAAO,IAAG,CAAC;CACvB"}
1
+ {"version":3,"file":"EventSource.js","sourceRoot":"","sources":["../../../../src/fromExternal/react-native-sse/EventSource.ts"],"names":[],"mappings":"AAUA,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAErF,MAAM,cAAc,GAAuB;IACzC,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,CAAC;IACV,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,SAAS;IAC9B,uBAAuB,EAAE,IAAI;IAC7B,MAAM,EAAE,SAAS;CAClB,CAAC;AAEF,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,kCAAkC;AACnE,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,+CAA+C;AAExE,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,UAAkB;IACtD,MAAM,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,mBAA2B;IAChD,OAAO,mBAAmB,GAAG,IAA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AC,OAAO,0CAAE,KAAK,CAAC,mCAAmC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAC/E,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACnB,MAAM;YACR,KAAK,OAAO;gBACV,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBACtB,MAAM;YACR;gBACE,MAAM;SACT;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjC,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;SACnB;QAED,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,MAAM,KAAI,CAAC;IACX,OAAO,KAAI,CAAC;IACZ,OAAO,CAAC,IAAS,IAAG,CAAC;IACrB,UAAU,CAAC,EAAO,IAAG,CAAC;CACvB"}
@@ -26,53 +26,53 @@ export var NetworkState;
26
26
  * @internal
27
27
  */
28
28
  export class ConnectionManager {
29
- constructor(logger, config, destination, detector) {
30
- this.logger = logger;
31
- this.config = config;
32
- this.destination = destination;
33
- this.detector = detector;
34
- this.applicationState = ApplicationState.Foreground;
35
- this.networkState = NetworkState.Available;
36
- this.offline = false;
37
- this.currentConnectionMode = config.initialConnectionMode;
38
- if (config.automaticBackgroundHandling) {
39
- detector.setApplicationStateListener((state) => {
40
- this.applicationState = state;
41
- this.handleState();
29
+ constructor(_logger, _config, _destination, _detector) {
30
+ this._logger = _logger;
31
+ this._config = _config;
32
+ this._destination = _destination;
33
+ this._detector = _detector;
34
+ this._applicationState = ApplicationState.Foreground;
35
+ this._networkState = NetworkState.Available;
36
+ this._offline = false;
37
+ this._currentConnectionMode = _config.initialConnectionMode;
38
+ if (_config.automaticBackgroundHandling) {
39
+ _detector.setApplicationStateListener((state) => {
40
+ this._applicationState = state;
41
+ this._handleState();
42
42
  });
43
43
  }
44
- if (config.automaticNetworkHandling) {
45
- detector.setNetworkStateListener((state) => {
46
- this.networkState = state;
47
- this.handleState();
44
+ if (_config.automaticNetworkHandling) {
45
+ _detector.setNetworkStateListener((state) => {
46
+ this._networkState = state;
47
+ this._handleState();
48
48
  });
49
49
  }
50
50
  }
51
51
  setOffline(offline) {
52
- this.offline = offline;
53
- this.handleState();
52
+ this._offline = offline;
53
+ this._handleState();
54
54
  }
55
55
  setConnectionMode(mode) {
56
- this.currentConnectionMode = mode;
57
- this.handleState();
56
+ this._currentConnectionMode = mode;
57
+ this._handleState();
58
58
  }
59
59
  close() {
60
- this.detector.stopListening();
60
+ this._detector.stopListening();
61
61
  }
62
- handleState() {
63
- this.logger.debug(`Handling state: ${this.applicationState}:${this.networkState}`);
64
- switch (this.networkState) {
62
+ _handleState() {
63
+ this._logger.debug(`Handling state: ${this._applicationState}:${this._networkState}`);
64
+ switch (this._networkState) {
65
65
  case NetworkState.Unavailable:
66
- this.destination.setNetworkAvailability(false);
66
+ this._destination.setNetworkAvailability(false);
67
67
  break;
68
68
  case NetworkState.Available:
69
- this.destination.setNetworkAvailability(true);
70
- switch (this.applicationState) {
69
+ this._destination.setNetworkAvailability(true);
70
+ switch (this._applicationState) {
71
71
  case ApplicationState.Foreground:
72
- this.setForegroundAvailable();
72
+ this._setForegroundAvailable();
73
73
  break;
74
74
  case ApplicationState.Background:
75
- this.setBackgroundAvailable();
75
+ this._setBackgroundAvailable();
76
76
  break;
77
77
  default:
78
78
  break;
@@ -82,29 +82,29 @@ export class ConnectionManager {
82
82
  break;
83
83
  }
84
84
  }
85
- setForegroundAvailable() {
86
- if (this.offline) {
87
- this.destination.setConnectionMode('offline');
85
+ _setForegroundAvailable() {
86
+ if (this._offline) {
87
+ this._destination.setConnectionMode('offline');
88
88
  // Don't attempt to flush. If the user wants to flush when entering offline
89
89
  // mode, then they can do that directly.
90
- this.destination.setEventSendingEnabled(false, false);
90
+ this._destination.setEventSendingEnabled(false, false);
91
91
  return;
92
92
  }
93
93
  // Currently the foreground mode will always be whatever the last active
94
94
  // connection mode was.
95
- this.destination.setConnectionMode(this.currentConnectionMode);
96
- this.destination.setEventSendingEnabled(true, false);
95
+ this._destination.setConnectionMode(this._currentConnectionMode);
96
+ this._destination.setEventSendingEnabled(true, false);
97
97
  }
98
- setBackgroundAvailable() {
99
- if (!this.config.runInBackground) {
100
- this.destination.setConnectionMode('offline');
101
- this.destination.setEventSendingEnabled(false, true);
98
+ _setBackgroundAvailable() {
99
+ if (!this._config.runInBackground) {
100
+ this._destination.setConnectionMode('offline');
101
+ this._destination.setEventSendingEnabled(false, true);
102
102
  return;
103
103
  }
104
104
  // This SDK doesn't currently support automatic background polling.
105
105
  // If connections in the background are allowed, then use the same mode
106
106
  // as is configured for the foreground.
107
- this.setForegroundAvailable();
107
+ this._setForegroundAvailable();
108
108
  }
109
109
  }
110
110
  //# sourceMappingURL=ConnectionManager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionManager.js","sourceRoot":"","sources":["../../../src/platform/ConnectionManager.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,yCAAyC;IACzC,6CAAyB,CAAA;IAEzB,yCAAyC;IACzC,GAAG;IACH,yEAAyE;IACzE,oEAAoE;IACpE,6CAAyB,CAAA;AAC3B,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,qDAAqD;IACrD,2CAA2B,CAAA;IAE3B,uEAAuE;IACvE,sBAAsB;IACtB,uCAAuB,CAAA;AACzB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAgDD;;GAEG;AACH,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EAAuE;QACvE,uCAAuC;QACvC,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;CACF"}
1
+ {"version":3,"file":"ConnectionManager.js","sourceRoot":"","sources":["../../../src/platform/ConnectionManager.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,yCAAyC;IACzC,6CAAyB,CAAA;IAEzB,yCAAyC;IACzC,GAAG;IACH,yEAAyE;IACzE,oEAAoE;IACpE,6CAAyB,CAAA;AAC3B,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,qDAAqD;IACrD,2CAA2B,CAAA;IAE3B,uEAAuE;IACvE,sBAAsB;IACtB,uCAAuB,CAAA;AACzB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAgDD;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAM5B,YACmB,OAAiB,EACjB,OAAgC,EAChC,YAAmC,EACnC,SAAwB;QAHxB,YAAO,GAAP,OAAO,CAAU;QACjB,YAAO,GAAP,OAAO,CAAyB;QAChC,iBAAY,GAAZ,YAAY,CAAuB;QACnC,cAAS,GAAT,SAAS,CAAe;QATnC,sBAAiB,GAAqB,gBAAgB,CAAC,UAAU,CAAC;QAClE,kBAAa,GAAiB,YAAY,CAAC,SAAS,CAAC;QACrD,aAAQ,GAAY,KAAK,CAAC;QAShC,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC;QAC5D,IAAI,OAAO,CAAC,2BAA2B,EAAE;YACvC,SAAS,CAAC,2BAA2B,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC9C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;gBAC/B,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,OAAO,CAAC,wBAAwB,EAAE;Y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B,CAAC,SAAS,CAAC,CAAC;YAC/C,2EAA2E;YAC3E,wCAAwC;YACxC,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACvD,OAAO;SACR;QAED,wEAAwE;QACxE,uBAAuB;QACvB,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACjE,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IAEO,uBAAuB;QAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YACjC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;YAC/C,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACtD,OAAO;SACR;QAED,mEAAmE;QAEnE,uEAAuE;QACvE,uCAAuC;QACvC,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { Info, LDLogger, PlatformData, SdkData } from '@launchdarkly/js-client-sdk-common';
2
2
  export default class PlatformInfo implements Info {
3
- private readonly logger;
4
- constructor(logger: LDLogger);
3
+ private readonly _logger;
4
+ constructor(_logger: LDLogger);
5
5
  platformData(): PlatformData;
6
6
  sdkData(): SdkData;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformInfo.d.ts","sourceRoot":"","sources":["../../../src/platform/PlatformInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAKhG,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,IAAI;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,QAAQ;IAE7C,YAAY,IAAI,YAAY;IAW5B,OAAO,IAAI,OAAO;CAUnB"}
1
+ {"version":3,"file":"PlatformInfo.d.ts","sourceRoot":"","sources":["../../../src/platform/PlatformInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAKhG,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,IAAI;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,QAAQ;IAE9C,YAAY,IAAI,YAAY;IAW5B,OAAO,IAAI,OAAO;CAUnB"}
@@ -1,8 +1,8 @@
1
1
  import { name, version } from '../../package.json';
2
2
  import { ldApplication, ldDevice } from './autoEnv';
3
3
  export default class PlatformInfo {
4
- constructor(logger) {
5
- this.logger = logger;
4
+ constructor(_logger) {
5
+ this._logger = _logger;
6
6
  }
7
7
  platformData() {
8
8
  const data = {
@@ -10,7 +10,7 @@ export default class PlatformInfo {
10
10
  ld_application: ldApplication,
11
11
  ld_device: ldDevice,
12
12
  };
13
- this.logger.debug(`platformData: ${JSON.stringify(data, null, 2)}`);
13
+ this._logger.debug(`platformData: ${JSON.stringify(data, null, 2)}`);
14
14
  return data;
15
15
  }
16
16
  sdkData() {
@@ -19,7 +19,7 @@ export default class PlatformInfo {
19
19
  version,
20
20
  userAgentBase: 'ReactNativeClient',
21
21
  };
22
- this.logger.debug(`sdkData: ${JSON.stringify(data, null, 2)}`);
22
+ this._logger.debug(`sdkData: ${JSON.stringify(data, null, 2)}`);
23
23
  return data;
24
24
  }
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformInfo.js","sourceRoot":"","sources":["../../../src/platform/PlatformInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,YA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AAI,GAAG;YACX,IAAI;YACJ,OAAO;YACP,aAAa,EAAE,mBAAmB;SACnC,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { EventSource, EventSourceCapabilities, EventSourceInitDict, LDLogger, Options, Requests, Response } from '@launchdarkly/js-client-sdk-common';
2
2
  export default class PlatformRequests implements Requests {
3
- private readonly logger;
4
- constructor(logger: LDLogger);
3
+ private readonly _logger;
4
+ constructor(_logger: LDLogger);
5
5
  createEventSource(url: string, eventSourceInitDict: EventSourceInitDict): EventSource;
6
6
  getEventSourceCapabilities(): EventSourceCapabilities;
7
7
  fetch(url: string, options?: Options): Promise<Response>;
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformRequests.d.ts","sourceRoot":"","sources":["../../../src/platform/PlatformRequests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACX,uBAAuB,EACvB,mBAAmB,EACnB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACT,MAAM,oCAAoC,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,QAAQ;IAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,QAAQ;IAE7C,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,GAAG,WAAW;IAUrF,0BAA0B,IAAI,uBAAuB;IAQrD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;CAIzD"}
1
+ {"version":3,"file":"PlatformRequests.d.ts","sourceRoot":"","sources":["../../../src/platform/PlatformRequests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACX,uBAAuB,EACvB,mBAAmB,EACnB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACT,MAAM,oCAAoC,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,QAAQ;IAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,QAAQ;IAE9C,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,GAAG,WAAW;IAUrF,0BAA0B,IAAI,uBAAuB;IAQrD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;CAIzD"}