@arms/rum-core 0.0.36 → 0.0.37
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/es/model/context.js +6 -0
- package/es/types/client.d.ts +8 -0
- package/es/types/rum-event.d.ts +3 -1
- package/es/types/rum-event.js +1 -0
- package/es/utils/base.js +1 -1
- package/lib/model/context.js +6 -0
- package/lib/types/client.d.ts +8 -0
- package/lib/types/rum-event.d.ts +3 -1
- package/lib/types/rum-event.js +1 -0
- package/lib/utils/base.js +1 -1
- package/package.json +1 -1
package/es/model/context.js
CHANGED
|
@@ -20,6 +20,12 @@ var Context = /*#__PURE__*/function () {
|
|
|
20
20
|
return this.views;
|
|
21
21
|
};
|
|
22
22
|
_proto.addView = function addView(view) {
|
|
23
|
+
var index = this.views.findIndex(function (v) {
|
|
24
|
+
return v.id === view.id;
|
|
25
|
+
});
|
|
26
|
+
if (index >= 0) {
|
|
27
|
+
this.views.splice(index, 1);
|
|
28
|
+
}
|
|
23
29
|
this.views.push(view);
|
|
24
30
|
};
|
|
25
31
|
_proto.removeView = function removeView(viewId) {
|
package/es/types/client.d.ts
CHANGED
package/es/types/rum-event.d.ts
CHANGED
|
@@ -117,7 +117,8 @@ export declare enum AppType {
|
|
|
117
117
|
browser = "browser",
|
|
118
118
|
miniapp = "miniapp",
|
|
119
119
|
minigame = "minigame",
|
|
120
|
-
uniapp = "uniapp"
|
|
120
|
+
uniapp = "uniapp",
|
|
121
|
+
reactnative = "reactnative"
|
|
121
122
|
}
|
|
122
123
|
export interface RumEventBundle {
|
|
123
124
|
app: {
|
|
@@ -170,6 +171,7 @@ export interface RumEventBundle {
|
|
|
170
171
|
net?: {
|
|
171
172
|
model?: string;
|
|
172
173
|
name?: string;
|
|
174
|
+
ip?: string;
|
|
173
175
|
};
|
|
174
176
|
events: Array<RumEvent>;
|
|
175
177
|
properties?: BaseObject;
|
package/es/types/rum-event.js
CHANGED
package/es/utils/base.js
CHANGED
package/lib/model/context.js
CHANGED
|
@@ -24,6 +24,12 @@ var Context = /*#__PURE__*/function () {
|
|
|
24
24
|
return this.views;
|
|
25
25
|
};
|
|
26
26
|
_proto.addView = function addView(view) {
|
|
27
|
+
var index = this.views.findIndex(function (v) {
|
|
28
|
+
return v.id === view.id;
|
|
29
|
+
});
|
|
30
|
+
if (index >= 0) {
|
|
31
|
+
this.views.splice(index, 1);
|
|
32
|
+
}
|
|
27
33
|
this.views.push(view);
|
|
28
34
|
};
|
|
29
35
|
_proto.removeView = function removeView(viewId) {
|
package/lib/types/client.d.ts
CHANGED
package/lib/types/rum-event.d.ts
CHANGED
|
@@ -117,7 +117,8 @@ export declare enum AppType {
|
|
|
117
117
|
browser = "browser",
|
|
118
118
|
miniapp = "miniapp",
|
|
119
119
|
minigame = "minigame",
|
|
120
|
-
uniapp = "uniapp"
|
|
120
|
+
uniapp = "uniapp",
|
|
121
|
+
reactnative = "reactnative"
|
|
121
122
|
}
|
|
122
123
|
export interface RumEventBundle {
|
|
123
124
|
app: {
|
|
@@ -170,6 +171,7 @@ export interface RumEventBundle {
|
|
|
170
171
|
net?: {
|
|
171
172
|
model?: string;
|
|
172
173
|
name?: string;
|
|
174
|
+
ip?: string;
|
|
173
175
|
};
|
|
174
176
|
events: Array<RumEvent>;
|
|
175
177
|
properties?: BaseObject;
|
package/lib/types/rum-event.js
CHANGED
package/lib/utils/base.js
CHANGED