@multiplayer-app/session-recorder-browser 1.2.10 → 1.2.12
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/dist/browser/index.js +81 -69
- package/dist/browser/index.js.map +1 -1
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/exporters/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +6 -2
- package/dist/index.js.map +1 -1
- package/dist/patch/configs.d.ts.map +1 -0
- package/dist/patch/fetch.d.ts.map +1 -1
- package/dist/patch/index.d.ts.map +1 -1
- package/dist/patch/xhr.d.ts.map +1 -1
- package/dist/sessionRecorder.d.ts.map +1 -1
- package/dist/types/client-type.enum.d.ts.map +1 -0
- package/dist/types/session.d.ts.map +1 -1
- package/dist/utils/session.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -25216,7 +25216,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25216
25216
|
/* harmony export */ PACKAGE_VERSION_EXPORT: () => (/* binding */ PACKAGE_VERSION_EXPORT),
|
|
25217
25217
|
/* harmony export */ SESSION_ADD_EVENT: () => (/* binding */ SESSION_ADD_EVENT),
|
|
25218
25218
|
/* harmony export */ SESSION_AUTO_CREATED: () => (/* binding */ SESSION_AUTO_CREATED),
|
|
25219
|
-
/* harmony export */ SESSION_CONTINUOUS_DEBUGGING_PROP_NAME: () => (/* binding */ SESSION_CONTINUOUS_DEBUGGING_PROP_NAME),
|
|
25220
25219
|
/* harmony export */ SESSION_ID_PROP_NAME: () => (/* binding */ SESSION_ID_PROP_NAME),
|
|
25221
25220
|
/* harmony export */ SESSION_PROP_NAME: () => (/* binding */ SESSION_PROP_NAME),
|
|
25222
25221
|
/* harmony export */ SESSION_RESPONSE: () => (/* binding */ SESSION_RESPONSE),
|
|
@@ -25231,7 +25230,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25231
25230
|
const OTEL_MP_SAMPLE_TRACE_RATIO = 0.15;
|
|
25232
25231
|
const SESSION_ID_PROP_NAME = 'multiplayer-session-id';
|
|
25233
25232
|
const SESSION_SHORT_ID_PROP_NAME = 'multiplayer-session-short-id';
|
|
25234
|
-
const SESSION_CONTINUOUS_DEBUGGING_PROP_NAME = 'multiplayer-session-continuous-debugging';
|
|
25235
25233
|
const SESSION_STATE_PROP_NAME = 'multiplayer-session-state';
|
|
25236
25234
|
const SESSION_TYPE_PROP_NAME = 'multiplayer-session-type';
|
|
25237
25235
|
const SESSION_PROP_NAME = 'multiplayer-session-data';
|
|
@@ -25245,7 +25243,7 @@ const DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE = 100000;
|
|
|
25245
25243
|
const SESSION_RESPONSE = 'multiplayer-debug-session-response';
|
|
25246
25244
|
const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
|
|
25247
25245
|
const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
|
|
25248
|
-
const PACKAGE_VERSION_EXPORT = "1.2.
|
|
25246
|
+
const PACKAGE_VERSION_EXPORT = "1.2.12" || 0;
|
|
25249
25247
|
// Regex patterns for OpenTelemetry ignore URLs
|
|
25250
25248
|
const OTEL_IGNORE_URLS = [
|
|
25251
25249
|
// Traces endpoint
|
|
@@ -25365,7 +25363,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25365
25363
|
/* harmony export */ PACKAGE_VERSION_EXPORT: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.PACKAGE_VERSION_EXPORT),
|
|
25366
25364
|
/* harmony export */ SESSION_ADD_EVENT: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SESSION_ADD_EVENT),
|
|
25367
25365
|
/* harmony export */ SESSION_AUTO_CREATED: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SESSION_AUTO_CREATED),
|
|
25368
|
-
/* harmony export */ SESSION_CONTINUOUS_DEBUGGING_PROP_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SESSION_CONTINUOUS_DEBUGGING_PROP_NAME),
|
|
25369
25366
|
/* harmony export */ SESSION_ID_PROP_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SESSION_ID_PROP_NAME),
|
|
25370
25367
|
/* harmony export */ SESSION_PROP_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SESSION_PROP_NAME),
|
|
25371
25368
|
/* harmony export */ SESSION_RESPONSE: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SESSION_RESPONSE),
|
|
@@ -25842,7 +25839,7 @@ async function extractResponseBody(response) {
|
|
|
25842
25839
|
catch (error) {
|
|
25843
25840
|
// If cloning fails (body already consumed), return null
|
|
25844
25841
|
// eslint-disable-next-line no-console
|
|
25845
|
-
console.warn('[
|
|
25842
|
+
console.warn('[MULTIPLAYER_SESSION_RECORDER] Failed to extract response body:', error);
|
|
25846
25843
|
return null;
|
|
25847
25844
|
}
|
|
25848
25845
|
}
|
|
@@ -25902,7 +25899,7 @@ class TracerBrowserSDK {
|
|
|
25902
25899
|
this.allowedElements = new Set(['A', 'BUTTON']);
|
|
25903
25900
|
this.sessionId = '';
|
|
25904
25901
|
}
|
|
25905
|
-
setSessionId(sessionId, sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.
|
|
25902
|
+
setSessionId(sessionId, sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.PLAIN) {
|
|
25906
25903
|
this.sessionId = sessionId;
|
|
25907
25904
|
this.idGenerator.setSessionId(sessionId, sessionType);
|
|
25908
25905
|
}
|
|
@@ -25967,7 +25964,7 @@ class TracerBrowserSDK {
|
|
|
25967
25964
|
}
|
|
25968
25965
|
catch (error) {
|
|
25969
25966
|
// eslint-disable-next-line
|
|
25970
|
-
console.error('[
|
|
25967
|
+
console.error('[MULTIPLAYER_SESSION_RECORDER] Failed to capture xml-http payload', error);
|
|
25971
25968
|
}
|
|
25972
25969
|
},
|
|
25973
25970
|
},
|
|
@@ -26019,7 +26016,7 @@ class TracerBrowserSDK {
|
|
|
26019
26016
|
}
|
|
26020
26017
|
catch (error) {
|
|
26021
26018
|
// eslint-disable-next-line
|
|
26022
|
-
console.error('[
|
|
26019
|
+
console.error('[MULTIPLAYER_SESSION_RECORDER] Failed to capture fetch payload', error);
|
|
26023
26020
|
}
|
|
26024
26021
|
},
|
|
26025
26022
|
},
|
|
@@ -26076,37 +26073,53 @@ class TracerBrowserSDK {
|
|
|
26076
26073
|
|
|
26077
26074
|
/***/ }),
|
|
26078
26075
|
|
|
26079
|
-
/***/ "./src/patch/
|
|
26080
|
-
|
|
26081
|
-
!*** ./src/patch/
|
|
26082
|
-
|
|
26076
|
+
/***/ "./src/patch/configs.ts":
|
|
26077
|
+
/*!******************************!*\
|
|
26078
|
+
!*** ./src/patch/configs.ts ***!
|
|
26079
|
+
\******************************/
|
|
26083
26080
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
26084
26081
|
|
|
26085
26082
|
"use strict";
|
|
26086
26083
|
__webpack_require__.r(__webpack_exports__);
|
|
26087
26084
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26085
|
+
/* harmony export */ configs: () => (/* binding */ configs),
|
|
26088
26086
|
/* harmony export */ setMaxCapturingHttpPayloadSize: () => (/* binding */ setMaxCapturingHttpPayloadSize),
|
|
26089
26087
|
/* harmony export */ setShouldRecordHttpData: () => (/* binding */ setShouldRecordHttpData)
|
|
26090
26088
|
/* harmony export */ });
|
|
26091
|
-
/* harmony import */ var
|
|
26092
|
-
/* harmony import */ var _utils_request_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/request-utils */ "./src/utils/request-utils.ts");
|
|
26093
|
-
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config */ "./src/config/index.ts");
|
|
26094
|
-
|
|
26095
|
-
|
|
26089
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config */ "./src/config/index.ts");
|
|
26096
26090
|
|
|
26097
|
-
|
|
26098
|
-
|
|
26099
|
-
|
|
26100
|
-
|
|
26091
|
+
const configs = {
|
|
26092
|
+
recordRequestHeaders: true,
|
|
26093
|
+
recordResponseHeaders: true,
|
|
26094
|
+
shouldRecordBody: true,
|
|
26095
|
+
maxCapturingHttpPayloadSize: _config__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE,
|
|
26096
|
+
};
|
|
26101
26097
|
const setMaxCapturingHttpPayloadSize = (_maxCapturingHttpPayloadSize) => {
|
|
26102
|
-
maxCapturingHttpPayloadSize = _maxCapturingHttpPayloadSize;
|
|
26098
|
+
configs.maxCapturingHttpPayloadSize = _maxCapturingHttpPayloadSize;
|
|
26103
26099
|
};
|
|
26104
26100
|
const setShouldRecordHttpData = (shouldRecordBody, shouldRecordHeaders) => {
|
|
26105
|
-
recordRequestHeaders = shouldRecordHeaders;
|
|
26106
|
-
recordResponseHeaders = shouldRecordHeaders;
|
|
26107
|
-
|
|
26108
|
-
shouldRecordBody = shouldRecordBody;
|
|
26101
|
+
configs.recordRequestHeaders = shouldRecordHeaders;
|
|
26102
|
+
configs.recordResponseHeaders = shouldRecordHeaders;
|
|
26103
|
+
configs.shouldRecordBody = shouldRecordBody;
|
|
26109
26104
|
};
|
|
26105
|
+
|
|
26106
|
+
|
|
26107
|
+
/***/ }),
|
|
26108
|
+
|
|
26109
|
+
/***/ "./src/patch/fetch.ts":
|
|
26110
|
+
/*!****************************!*\
|
|
26111
|
+
!*** ./src/patch/fetch.ts ***!
|
|
26112
|
+
\****************************/
|
|
26113
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
26114
|
+
|
|
26115
|
+
"use strict";
|
|
26116
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26117
|
+
/* harmony import */ var _utils_type_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/type-utils */ "./src/utils/type-utils.ts");
|
|
26118
|
+
/* harmony import */ var _utils_request_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/request-utils */ "./src/utils/request-utils.ts");
|
|
26119
|
+
/* harmony import */ var _configs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./configs */ "./src/patch/configs.ts");
|
|
26120
|
+
|
|
26121
|
+
|
|
26122
|
+
|
|
26110
26123
|
function _tryReadFetchBody({ body, url, }) {
|
|
26111
26124
|
if ((0,_utils_type_utils__WEBPACK_IMPORTED_MODULE_0__.isNullish)(body)) {
|
|
26112
26125
|
return null;
|
|
@@ -26173,20 +26186,22 @@ function _headersToObject(headers) {
|
|
|
26173
26186
|
// Store original fetch
|
|
26174
26187
|
const originalFetch = window.fetch;
|
|
26175
26188
|
// Override fetch
|
|
26176
|
-
window.fetch = async function (input,
|
|
26189
|
+
window.fetch = async function (input,
|
|
26190
|
+
// eslint-disable-next-line
|
|
26191
|
+
init) {
|
|
26177
26192
|
const networkRequest = {};
|
|
26178
26193
|
// Capture request data
|
|
26179
26194
|
const request = new Request(input, init);
|
|
26180
|
-
if (recordRequestHeaders) {
|
|
26195
|
+
if (_configs__WEBPACK_IMPORTED_MODULE_2__.configs.recordRequestHeaders) {
|
|
26181
26196
|
networkRequest.requestHeaders = _headersToObject(request.headers);
|
|
26182
26197
|
}
|
|
26183
|
-
if (shouldRecordBody && request.body) {
|
|
26198
|
+
if (_configs__WEBPACK_IMPORTED_MODULE_2__.configs.shouldRecordBody && request.body) {
|
|
26184
26199
|
const requestBody = _tryReadFetchBody({
|
|
26185
26200
|
body: request.body,
|
|
26186
|
-
url: request.url
|
|
26201
|
+
url: request.url,
|
|
26187
26202
|
});
|
|
26188
26203
|
if ((requestBody === null || requestBody === void 0 ? void 0 : requestBody.length) &&
|
|
26189
|
-
new Blob([requestBody]).size <= maxCapturingHttpPayloadSize) {
|
|
26204
|
+
new Blob([requestBody]).size <= _configs__WEBPACK_IMPORTED_MODULE_2__.configs.maxCapturingHttpPayloadSize) {
|
|
26190
26205
|
networkRequest.requestBody = requestBody;
|
|
26191
26206
|
}
|
|
26192
26207
|
}
|
|
@@ -26194,13 +26209,13 @@ window.fetch = async function (input, init) {
|
|
|
26194
26209
|
// Make the actual fetch request
|
|
26195
26210
|
const response = await originalFetch(input, init);
|
|
26196
26211
|
// Capture response data
|
|
26197
|
-
if (recordResponseHeaders) {
|
|
26212
|
+
if (_configs__WEBPACK_IMPORTED_MODULE_2__.configs.recordResponseHeaders) {
|
|
26198
26213
|
networkRequest.responseHeaders = _headersToObject(response.headers);
|
|
26199
26214
|
}
|
|
26200
|
-
if (shouldRecordBody) {
|
|
26215
|
+
if (_configs__WEBPACK_IMPORTED_MODULE_2__.configs.shouldRecordBody) {
|
|
26201
26216
|
const responseBody = await _tryReadResponseBody(response);
|
|
26202
26217
|
if ((responseBody === null || responseBody === void 0 ? void 0 : responseBody.length) &&
|
|
26203
|
-
new Blob([responseBody]).size <= maxCapturingHttpPayloadSize) {
|
|
26218
|
+
new Blob([responseBody]).size <= _configs__WEBPACK_IMPORTED_MODULE_2__.configs.maxCapturingHttpPayloadSize) {
|
|
26204
26219
|
networkRequest.responseBody = responseBody;
|
|
26205
26220
|
}
|
|
26206
26221
|
}
|
|
@@ -26234,8 +26249,15 @@ Object.defineProperty(window.fetch, 'length', { value: originalFetch.length });
|
|
|
26234
26249
|
|
|
26235
26250
|
"use strict";
|
|
26236
26251
|
__webpack_require__.r(__webpack_exports__);
|
|
26252
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26253
|
+
/* harmony export */ configs: () => (/* reexport safe */ _configs__WEBPACK_IMPORTED_MODULE_2__.configs),
|
|
26254
|
+
/* harmony export */ setMaxCapturingHttpPayloadSize: () => (/* reexport safe */ _configs__WEBPACK_IMPORTED_MODULE_2__.setMaxCapturingHttpPayloadSize),
|
|
26255
|
+
/* harmony export */ setShouldRecordHttpData: () => (/* reexport safe */ _configs__WEBPACK_IMPORTED_MODULE_2__.setShouldRecordHttpData)
|
|
26256
|
+
/* harmony export */ });
|
|
26237
26257
|
/* harmony import */ var _xhr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./xhr */ "./src/patch/xhr.ts");
|
|
26238
26258
|
/* harmony import */ var _fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fetch */ "./src/patch/fetch.ts");
|
|
26259
|
+
/* harmony import */ var _configs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./configs */ "./src/patch/configs.ts");
|
|
26260
|
+
|
|
26239
26261
|
|
|
26240
26262
|
|
|
26241
26263
|
|
|
@@ -26250,29 +26272,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26250
26272
|
|
|
26251
26273
|
"use strict";
|
|
26252
26274
|
__webpack_require__.r(__webpack_exports__);
|
|
26253
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26254
|
-
/* harmony export */ setMaxCapturingHttpPayloadSize: () => (/* binding */ setMaxCapturingHttpPayloadSize),
|
|
26255
|
-
/* harmony export */ setShouldRecordHttpData: () => (/* binding */ setShouldRecordHttpData)
|
|
26256
|
-
/* harmony export */ });
|
|
26257
26275
|
/* harmony import */ var _utils_type_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/type-utils */ "./src/utils/type-utils.ts");
|
|
26258
26276
|
/* harmony import */ var _utils_request_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/request-utils */ "./src/utils/request-utils.ts");
|
|
26259
|
-
/* harmony import */ var
|
|
26277
|
+
/* harmony import */ var _configs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./configs */ "./src/patch/configs.ts");
|
|
26260
26278
|
|
|
26261
26279
|
|
|
26262
26280
|
|
|
26263
|
-
let recordRequestHeaders = true;
|
|
26264
|
-
let recordResponseHeaders = true;
|
|
26265
|
-
const shouldRecordBody = true;
|
|
26266
|
-
let maxCapturingHttpPayloadSize = _config__WEBPACK_IMPORTED_MODULE_2__.DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE;
|
|
26267
|
-
const setMaxCapturingHttpPayloadSize = (_maxCapturingHttpPayloadSize) => {
|
|
26268
|
-
maxCapturingHttpPayloadSize = _maxCapturingHttpPayloadSize;
|
|
26269
|
-
};
|
|
26270
|
-
const setShouldRecordHttpData = (shouldRecordBody, shouldRecordHeaders) => {
|
|
26271
|
-
recordRequestHeaders = shouldRecordHeaders;
|
|
26272
|
-
recordResponseHeaders = shouldRecordHeaders;
|
|
26273
|
-
// eslint-disable-next-line
|
|
26274
|
-
shouldRecordBody = shouldRecordBody;
|
|
26275
|
-
};
|
|
26276
26281
|
function _tryReadXHRBody({ body, url, }) {
|
|
26277
26282
|
if ((0,_utils_type_utils__WEBPACK_IMPORTED_MODULE_0__.isNullish)(body)) {
|
|
26278
26283
|
return null;
|
|
@@ -26308,15 +26313,15 @@ function _tryReadXHRBody({ body, url, }) {
|
|
|
26308
26313
|
requestHeaders[header] = value;
|
|
26309
26314
|
return originalSetRequestHeader(header, value);
|
|
26310
26315
|
};
|
|
26311
|
-
if (recordRequestHeaders) {
|
|
26316
|
+
if (_configs__WEBPACK_IMPORTED_MODULE_2__.configs.recordRequestHeaders) {
|
|
26312
26317
|
networkRequest.requestHeaders = requestHeaders;
|
|
26313
26318
|
}
|
|
26314
26319
|
const originalSend = xhr.send.bind(xhr);
|
|
26315
26320
|
xhr.send = (body) => {
|
|
26316
|
-
if (shouldRecordBody) {
|
|
26321
|
+
if (_configs__WEBPACK_IMPORTED_MODULE_2__.configs.shouldRecordBody) {
|
|
26317
26322
|
const requestBody = _tryReadXHRBody({ body, url });
|
|
26318
26323
|
if ((requestBody === null || requestBody === void 0 ? void 0 : requestBody.length)
|
|
26319
|
-
&& new Blob([requestBody]).size <= maxCapturingHttpPayloadSize) {
|
|
26324
|
+
&& new Blob([requestBody]).size <= _configs__WEBPACK_IMPORTED_MODULE_2__.configs.maxCapturingHttpPayloadSize) {
|
|
26320
26325
|
networkRequest.requestBody = requestBody;
|
|
26321
26326
|
}
|
|
26322
26327
|
}
|
|
@@ -26338,13 +26343,13 @@ function _tryReadXHRBody({ body, url, }) {
|
|
|
26338
26343
|
responseHeaders[header] = value;
|
|
26339
26344
|
}
|
|
26340
26345
|
});
|
|
26341
|
-
if (recordResponseHeaders) {
|
|
26346
|
+
if (_configs__WEBPACK_IMPORTED_MODULE_2__.configs.recordResponseHeaders) {
|
|
26342
26347
|
networkRequest.responseHeaders = responseHeaders;
|
|
26343
26348
|
}
|
|
26344
|
-
if (shouldRecordBody) {
|
|
26349
|
+
if (_configs__WEBPACK_IMPORTED_MODULE_2__.configs.shouldRecordBody) {
|
|
26345
26350
|
const responseBody = _tryReadXHRBody({ body: xhr.response, url });
|
|
26346
26351
|
if ((responseBody === null || responseBody === void 0 ? void 0 : responseBody.length)
|
|
26347
|
-
&& new Blob([responseBody]).size <= maxCapturingHttpPayloadSize) {
|
|
26352
|
+
&& new Blob([responseBody]).size <= _configs__WEBPACK_IMPORTED_MODULE_2__.configs.maxCapturingHttpPayloadSize) {
|
|
26348
26353
|
networkRequest.responseBody = responseBody;
|
|
26349
26354
|
}
|
|
26350
26355
|
}
|
|
@@ -26954,7 +26959,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26954
26959
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
|
|
26955
26960
|
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types */ "./src/types/index.ts");
|
|
26956
26961
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ "./src/config/index.ts");
|
|
26957
|
-
/* harmony import */ var
|
|
26962
|
+
/* harmony import */ var _patch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./patch */ "./src/patch/index.ts");
|
|
26958
26963
|
/* harmony import */ var _eventBus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./eventBus */ "./src/eventBus.ts");
|
|
26959
26964
|
/* harmony import */ var _sessionWidget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sessionWidget */ "./src/sessionWidget/index.ts");
|
|
26960
26965
|
/* harmony import */ var _services_messaging_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./services/messaging.service */ "./src/services/messaging.service.ts");
|
|
@@ -27066,8 +27071,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
27066
27071
|
const sessionIdLocal = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getStoredItem)(_config__WEBPACK_IMPORTED_MODULE_4__.SESSION_ID_PROP_NAME);
|
|
27067
27072
|
const sessionStateLocal = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getStoredItem)(_config__WEBPACK_IMPORTED_MODULE_4__.SESSION_STATE_PROP_NAME);
|
|
27068
27073
|
const sessionTypeLocal = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getStoredItem)(_config__WEBPACK_IMPORTED_MODULE_4__.SESSION_TYPE_PROP_NAME);
|
|
27069
|
-
|
|
27070
|
-
if ((0,_utils__WEBPACK_IMPORTED_MODULE_2__.isSessionActive)(sessionLocal, continuousRecordingLocal)) {
|
|
27074
|
+
if ((0,_utils__WEBPACK_IMPORTED_MODULE_2__.isSessionActive)(sessionLocal, sessionTypeLocal)) {
|
|
27071
27075
|
this.session = sessionLocal;
|
|
27072
27076
|
this.sessionId = sessionIdLocal;
|
|
27073
27077
|
this.sessionType = sessionTypeLocal;
|
|
@@ -27092,8 +27096,8 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
27092
27096
|
this._configs = (0,_config__WEBPACK_IMPORTED_MODULE_4__.getSessionRecorderConfig)({ ...this._configs, ...configs });
|
|
27093
27097
|
this._isInitialized = true;
|
|
27094
27098
|
this._checkOperation('init');
|
|
27095
|
-
(0,
|
|
27096
|
-
(0,
|
|
27099
|
+
(0,_patch__WEBPACK_IMPORTED_MODULE_5__.setMaxCapturingHttpPayloadSize)(this._configs.maxCapturingHttpPayloadSize || _config__WEBPACK_IMPORTED_MODULE_4__.DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE);
|
|
27100
|
+
(0,_patch__WEBPACK_IMPORTED_MODULE_5__.setShouldRecordHttpData)(!this._configs.captureBody, this._configs.captureHeaders);
|
|
27097
27101
|
this._tracer.init(this._configs);
|
|
27098
27102
|
this._apiService.init(this._configs);
|
|
27099
27103
|
this._sessionWidget.init(this._configs);
|
|
@@ -29151,7 +29155,7 @@ const getNavigatorInfo = () => {
|
|
|
29151
29155
|
// System type identifier (previously in system tags)
|
|
29152
29156
|
systemType: 'web',
|
|
29153
29157
|
// Platform identifier (previously in system tags)
|
|
29154
|
-
platform: osInfo
|
|
29158
|
+
platform: osInfo,
|
|
29155
29159
|
};
|
|
29156
29160
|
};
|
|
29157
29161
|
|
|
@@ -29258,17 +29262,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29258
29262
|
/* harmony export */ isConsoleEvent: () => (/* binding */ isConsoleEvent),
|
|
29259
29263
|
/* harmony export */ isSessionActive: () => (/* binding */ isSessionActive)
|
|
29260
29264
|
/* harmony export */ });
|
|
29261
|
-
/* harmony import */ var
|
|
29265
|
+
/* harmony import */ var rrweb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rrweb */ "../../node_modules/rrweb/dist/rrweb.js");
|
|
29262
29266
|
/* harmony import */ var _config_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config/constants */ "./src/config/constants.ts");
|
|
29267
|
+
/* harmony import */ var _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @multiplayer-app/session-recorder-common */ "../session-recorder-common/dist/esm/index-browser.js");
|
|
29268
|
+
|
|
29263
29269
|
|
|
29264
29270
|
|
|
29265
29271
|
/**
|
|
29266
29272
|
* Session-related utility functions
|
|
29267
29273
|
*/
|
|
29268
|
-
const isSessionActive = (session,
|
|
29274
|
+
const isSessionActive = (session, sessionType) => {
|
|
29269
29275
|
if (!session)
|
|
29270
29276
|
return false;
|
|
29271
|
-
if (
|
|
29277
|
+
if (sessionType === _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.CONTINUOUS)
|
|
29272
29278
|
return true;
|
|
29273
29279
|
const startedAt = new Date(session.startedAt);
|
|
29274
29280
|
const now = new Date();
|
|
@@ -29277,7 +29283,7 @@ const isSessionActive = (session, continuousRecording) => {
|
|
|
29277
29283
|
};
|
|
29278
29284
|
const isConsoleEvent = (event) => {
|
|
29279
29285
|
var _a;
|
|
29280
|
-
return event.type ===
|
|
29286
|
+
return event.type === rrweb__WEBPACK_IMPORTED_MODULE_2__.EventType.Plugin && ((_a = event.data) === null || _a === void 0 ? void 0 : _a.plugin) === 'rrweb/console@1';
|
|
29281
29287
|
};
|
|
29282
29288
|
|
|
29283
29289
|
|
|
@@ -29425,7 +29431,8 @@ const isString = function (x) {
|
|
|
29425
29431
|
return toString.call(x) == '[object String]';
|
|
29426
29432
|
};
|
|
29427
29433
|
const isEmptyString = function (x) {
|
|
29428
|
-
|
|
29434
|
+
var _a;
|
|
29435
|
+
return isString(x) && ((_a = x.trim()) === null || _a === void 0 ? void 0 : _a.length) === 0;
|
|
29429
29436
|
};
|
|
29430
29437
|
const isNull = function (x) {
|
|
29431
29438
|
return x === null;
|
|
@@ -29600,6 +29607,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29600
29607
|
/* harmony export */ ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY_ENCODING: () => (/* binding */ ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY_ENCODING),
|
|
29601
29608
|
/* harmony export */ ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS: () => (/* binding */ ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS),
|
|
29602
29609
|
/* harmony export */ ATTR_MULTIPLAYER_INTEGRATION_ID: () => (/* binding */ ATTR_MULTIPLAYER_INTEGRATION_ID),
|
|
29610
|
+
/* harmony export */ ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH: () => (/* binding */ ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH),
|
|
29603
29611
|
/* harmony export */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY: () => (/* binding */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY),
|
|
29604
29612
|
/* harmony export */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING: () => (/* binding */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING),
|
|
29605
29613
|
/* harmony export */ ATTR_MULTIPLAYER_PLATFORM_ID: () => (/* binding */ ATTR_MULTIPLAYER_PLATFORM_ID),
|
|
@@ -29671,6 +29679,7 @@ var ATTR_MULTIPLAYER_GRPC_RESPONSE_MESSAGE = 'multiplayer.rpc.grpc.response.mess
|
|
|
29671
29679
|
var ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY = 'multiplayer.messaging.message.body';
|
|
29672
29680
|
var ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING = 'multiplayer.messaging.message.body.encoding';
|
|
29673
29681
|
var ATTR_MULTIPLAYER_SESSION_RECORDER_VERSION = 'multiplayer.session-recorder.version';
|
|
29682
|
+
var ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH = 'multiplayer.issue.custom-hash';
|
|
29674
29683
|
var MASK_PLACEHOLDER = '***MASKED***';
|
|
29675
29684
|
//# sourceMappingURL=constants.base.js.map
|
|
29676
29685
|
|
|
@@ -29699,6 +29708,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29699
29708
|
/* harmony export */ ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY_ENCODING: () => (/* reexport safe */ _constants_base__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY_ENCODING),
|
|
29700
29709
|
/* harmony export */ ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS: () => (/* reexport safe */ _constants_base__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS),
|
|
29701
29710
|
/* harmony export */ ATTR_MULTIPLAYER_INTEGRATION_ID: () => (/* reexport safe */ _constants_base__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_INTEGRATION_ID),
|
|
29711
|
+
/* harmony export */ ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH: () => (/* reexport safe */ _constants_base__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH),
|
|
29702
29712
|
/* harmony export */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY: () => (/* reexport safe */ _constants_base__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY),
|
|
29703
29713
|
/* harmony export */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING: () => (/* reexport safe */ _constants_base__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING),
|
|
29704
29714
|
/* harmony export */ ATTR_MULTIPLAYER_PLATFORM_ID: () => (/* reexport safe */ _constants_base__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_PLATFORM_ID),
|
|
@@ -29907,6 +29917,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29907
29917
|
/* harmony export */ ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY_ENCODING: () => (/* reexport safe */ _constants_constants_browser__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY_ENCODING),
|
|
29908
29918
|
/* harmony export */ ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS: () => (/* reexport safe */ _constants_constants_browser__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS),
|
|
29909
29919
|
/* harmony export */ ATTR_MULTIPLAYER_INTEGRATION_ID: () => (/* reexport safe */ _constants_constants_browser__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_INTEGRATION_ID),
|
|
29920
|
+
/* harmony export */ ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH: () => (/* reexport safe */ _constants_constants_browser__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH),
|
|
29910
29921
|
/* harmony export */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY: () => (/* reexport safe */ _constants_constants_browser__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY),
|
|
29911
29922
|
/* harmony export */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING: () => (/* reexport safe */ _constants_constants_browser__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING),
|
|
29912
29923
|
/* harmony export */ ATTR_MULTIPLAYER_PLATFORM_ID: () => (/* reexport safe */ _constants_constants_browser__WEBPACK_IMPORTED_MODULE_0__.ATTR_MULTIPLAYER_PLATFORM_ID),
|
|
@@ -48943,6 +48954,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48943
48954
|
/* harmony export */ ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY_ENCODING: () => (/* reexport safe */ _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_4__.ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY_ENCODING),
|
|
48944
48955
|
/* harmony export */ ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS: () => (/* reexport safe */ _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_4__.ATTR_MULTIPLAYER_HTTP_RESPONSE_HEADERS),
|
|
48945
48956
|
/* harmony export */ ATTR_MULTIPLAYER_INTEGRATION_ID: () => (/* reexport safe */ _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_4__.ATTR_MULTIPLAYER_INTEGRATION_ID),
|
|
48957
|
+
/* harmony export */ ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH: () => (/* reexport safe */ _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_4__.ATTR_MULTIPLAYER_ISSUE_CUSTOM_HASH),
|
|
48946
48958
|
/* harmony export */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY: () => (/* reexport safe */ _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_4__.ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY),
|
|
48947
48959
|
/* harmony export */ ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING: () => (/* reexport safe */ _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_4__.ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY_ENCODING),
|
|
48948
48960
|
/* harmony export */ ATTR_MULTIPLAYER_PLATFORM_ID: () => (/* reexport safe */ _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_4__.ATTR_MULTIPLAYER_PLATFORM_ID),
|