@cloudcare/browser-core 2.0.7 → 2.0.9
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.
|
@@ -76,7 +76,7 @@ function afterSend(observable, responsePromise, startContext) {
|
|
|
76
76
|
context.error = response;
|
|
77
77
|
} else if ('status' in response) {
|
|
78
78
|
context.response = response;
|
|
79
|
-
context.responseType = response
|
|
79
|
+
context.responseType = response.constructor === Response && response.type || ''; // issue The Response type getter can only be used on instances of Response
|
|
80
80
|
|
|
81
81
|
context.status = response.status;
|
|
82
82
|
context.isAborted = false;
|
package/cjs/transport/batch.js
CHANGED
|
@@ -114,7 +114,7 @@ var processedMessageByDataMap = function processedMessageByDataMap(message) {
|
|
|
114
114
|
if (message.type === _enums.RumEventType.LOGGER) {
|
|
115
115
|
// 这里处理日志类型数据自定义字段
|
|
116
116
|
(0, _tools.each)(message, function (value, key) {
|
|
117
|
-
if (filterFileds.indexOf(key) === -1 && ((0, _tools.isNumber)(value) ||
|
|
117
|
+
if (filterFileds.indexOf(key) === -1 && ((0, _tools.isNumber)(value) || value)) {
|
|
118
118
|
rowData.fields[key] = value; // 这里不需要转译
|
|
119
119
|
|
|
120
120
|
fieldsStr.push((0, _rowData.escapeRowData)(key) + '=' + (0, _rowData.escapeRowField)(value));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { instrumentMethod } from '../helper/instrumentMethod';
|
|
2
2
|
import { Observable } from '../helper/observable';
|
|
3
|
-
import {
|
|
3
|
+
import { clocksNow } from '../helper/tools';
|
|
4
4
|
import { normalizeUrl } from '../helper/urlPolyfill';
|
|
5
5
|
var fetchObservable;
|
|
6
6
|
export function initFetchObservable() {
|
|
@@ -64,7 +64,7 @@ function afterSend(observable, responsePromise, startContext) {
|
|
|
64
64
|
context.error = response;
|
|
65
65
|
} else if ('status' in response) {
|
|
66
66
|
context.response = response;
|
|
67
|
-
context.responseType = response
|
|
67
|
+
context.responseType = response.constructor === Response && response.type || ''; // issue The Response type getter can only be used on instances of Response
|
|
68
68
|
|
|
69
69
|
context.status = response.status;
|
|
70
70
|
context.isAborted = false;
|
package/esm/transport/batch.js
CHANGED
|
@@ -99,7 +99,7 @@ export var processedMessageByDataMap = function processedMessageByDataMap(messag
|
|
|
99
99
|
if (message.type === RumEventType.LOGGER) {
|
|
100
100
|
// 这里处理日志类型数据自定义字段
|
|
101
101
|
each(message, function (value, key) {
|
|
102
|
-
if (filterFileds.indexOf(key) === -1 && (isNumber(value) ||
|
|
102
|
+
if (filterFileds.indexOf(key) === -1 && (isNumber(value) || value)) {
|
|
103
103
|
rowData.fields[key] = value; // 这里不需要转译
|
|
104
104
|
|
|
105
105
|
fieldsStr.push(escapeRowData(key) + '=' + escapeRowField(value));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcare/browser-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"author": "dataflux",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"description": "DataFlux RUM Web 端数据指标监控",
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "ad44c611b98f97c4a115d281f0a91a4c7f260081"
|
|
24
24
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { instrumentMethod } from '../helper/instrumentMethod'
|
|
2
2
|
import { Observable } from '../helper/observable'
|
|
3
|
-
import {
|
|
3
|
+
import { clocksNow } from '../helper/tools'
|
|
4
4
|
import { normalizeUrl } from '../helper/urlPolyfill'
|
|
5
5
|
|
|
6
6
|
var fetchObservable
|
|
@@ -80,7 +80,7 @@ function afterSend(observable, responsePromise, startContext) {
|
|
|
80
80
|
} else if ('status' in response) {
|
|
81
81
|
context.response = response
|
|
82
82
|
context.responseType =
|
|
83
|
-
(response
|
|
83
|
+
(response.constructor === Response && response.type) || '' // issue The Response type getter can only be used on instances of Response
|
|
84
84
|
context.status = response.status
|
|
85
85
|
context.isAborted = false
|
|
86
86
|
}
|
package/src/transport/batch.js
CHANGED
|
@@ -109,10 +109,7 @@ export var processedMessageByDataMap = function (message) {
|
|
|
109
109
|
if (message.type === RumEventType.LOGGER) {
|
|
110
110
|
// 这里处理日志类型数据自定义字段
|
|
111
111
|
each(message, function (value, key) {
|
|
112
|
-
if (
|
|
113
|
-
filterFileds.indexOf(key) === -1 &&
|
|
114
|
-
(isNumber(value) || isString(value) || isBoolean(value))
|
|
115
|
-
) {
|
|
112
|
+
if (filterFileds.indexOf(key) === -1 && (isNumber(value) || value)) {
|
|
116
113
|
rowData.fields[key] = value // 这里不需要转译
|
|
117
114
|
fieldsStr.push(escapeRowData(key) + '=' + escapeRowField(value))
|
|
118
115
|
}
|