@crystaldesign/diva-utils 24.14.0-beta.32 → 24.14.0-beta.34
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/build/cjs/index.js
CHANGED
|
@@ -104,7 +104,7 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
104
104
|
*/
|
|
105
105
|
}, {
|
|
106
106
|
key: "init",
|
|
107
|
-
value: function init(production, env, version, url, jwt, personalData, plattform, os, deviceName, browser, width, height, osVersion) {
|
|
107
|
+
value: function init(production, env, version, url, jwt, personalData, plattform, os, deviceName, browser, width, height, osVersion, applicationEnvironment) {
|
|
108
108
|
var _this$user, _this$user2, _this$user3;
|
|
109
109
|
this.initEvent = {
|
|
110
110
|
agent: {
|
|
@@ -112,7 +112,8 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
112
112
|
version: version
|
|
113
113
|
},
|
|
114
114
|
client: {
|
|
115
|
-
domain: window.location.hostname
|
|
115
|
+
domain: window.location.hostname,
|
|
116
|
+
applicationEnvironment: applicationEnvironment ? 'WEB' : 'APP'
|
|
116
117
|
},
|
|
117
118
|
user_agent: {
|
|
118
119
|
browser: browser,
|
|
@@ -266,6 +267,11 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
266
267
|
event.labels = labels;
|
|
267
268
|
event.labels.configuratorSessionId = this.configuratorSessionId;
|
|
268
269
|
}
|
|
270
|
+
if (!labels && this.configuratorSessionId) {
|
|
271
|
+
event.labels = {
|
|
272
|
+
configuratorSessionId: this.configuratorSessionId
|
|
273
|
+
};
|
|
274
|
+
}
|
|
269
275
|
traceId = this.getCurrentTraceId();
|
|
270
276
|
if (traceId) {
|
|
271
277
|
event.trace = {
|
|
@@ -275,7 +281,7 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
275
281
|
|
|
276
282
|
//there are events, before the initialization happens - they are gequeud...
|
|
277
283
|
if (!(this.url && this.jwt && this.sessionId)) {
|
|
278
|
-
_context3.next =
|
|
284
|
+
_context3.next = 17;
|
|
279
285
|
break;
|
|
280
286
|
}
|
|
281
287
|
if (applyInitilization) {
|
|
@@ -286,14 +292,14 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
286
292
|
e.url = this.url;
|
|
287
293
|
promiseQueue = this.sendQueuedLogs();
|
|
288
294
|
promiseCurrent = this.log(e);
|
|
289
|
-
_context3.next =
|
|
295
|
+
_context3.next = 15;
|
|
290
296
|
return Promise.all([promiseQueue, promiseCurrent]);
|
|
291
|
-
case
|
|
292
|
-
_context3.next =
|
|
297
|
+
case 15:
|
|
298
|
+
_context3.next = 18;
|
|
293
299
|
break;
|
|
294
|
-
case 16:
|
|
295
|
-
this.queue.push(event);
|
|
296
300
|
case 17:
|
|
301
|
+
this.queue.push(event);
|
|
302
|
+
case 18:
|
|
297
303
|
case "end":
|
|
298
304
|
return _context3.stop();
|
|
299
305
|
}
|
package/build/esm/index.js
CHANGED
|
@@ -86,7 +86,7 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
86
86
|
*/
|
|
87
87
|
}, {
|
|
88
88
|
key: "init",
|
|
89
|
-
value: function init(production, env, version, url, jwt, personalData, plattform, os, deviceName, browser, width, height, osVersion) {
|
|
89
|
+
value: function init(production, env, version, url, jwt, personalData, plattform, os, deviceName, browser, width, height, osVersion, applicationEnvironment) {
|
|
90
90
|
var _this$user, _this$user2, _this$user3;
|
|
91
91
|
this.initEvent = {
|
|
92
92
|
agent: {
|
|
@@ -94,7 +94,8 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
94
94
|
version: version
|
|
95
95
|
},
|
|
96
96
|
client: {
|
|
97
|
-
domain: window.location.hostname
|
|
97
|
+
domain: window.location.hostname,
|
|
98
|
+
applicationEnvironment: applicationEnvironment ? 'WEB' : 'APP'
|
|
98
99
|
},
|
|
99
100
|
user_agent: {
|
|
100
101
|
browser: browser,
|
|
@@ -248,6 +249,11 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
248
249
|
event.labels = labels;
|
|
249
250
|
event.labels.configuratorSessionId = this.configuratorSessionId;
|
|
250
251
|
}
|
|
252
|
+
if (!labels && this.configuratorSessionId) {
|
|
253
|
+
event.labels = {
|
|
254
|
+
configuratorSessionId: this.configuratorSessionId
|
|
255
|
+
};
|
|
256
|
+
}
|
|
251
257
|
traceId = this.getCurrentTraceId();
|
|
252
258
|
if (traceId) {
|
|
253
259
|
event.trace = {
|
|
@@ -257,7 +263,7 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
257
263
|
|
|
258
264
|
//there are events, before the initialization happens - they are gequeud...
|
|
259
265
|
if (!(this.url && this.jwt && this.sessionId)) {
|
|
260
|
-
_context3.next =
|
|
266
|
+
_context3.next = 17;
|
|
261
267
|
break;
|
|
262
268
|
}
|
|
263
269
|
if (applyInitilization) {
|
|
@@ -268,14 +274,14 @@ var BusinessMetricsUtils = /*#__PURE__*/function () {
|
|
|
268
274
|
e.url = this.url;
|
|
269
275
|
promiseQueue = this.sendQueuedLogs();
|
|
270
276
|
promiseCurrent = this.log(e);
|
|
271
|
-
_context3.next =
|
|
277
|
+
_context3.next = 15;
|
|
272
278
|
return Promise.all([promiseQueue, promiseCurrent]);
|
|
273
|
-
case
|
|
274
|
-
_context3.next =
|
|
279
|
+
case 15:
|
|
280
|
+
_context3.next = 18;
|
|
275
281
|
break;
|
|
276
|
-
case 16:
|
|
277
|
-
this.queue.push(event);
|
|
278
282
|
case 17:
|
|
283
|
+
this.queue.push(event);
|
|
284
|
+
case 18:
|
|
279
285
|
case "end":
|
|
280
286
|
return _context3.stop();
|
|
281
287
|
}
|
|
@@ -28,7 +28,7 @@ export declare class BusinessMetricsUtils {
|
|
|
28
28
|
set sessionId(sessionId: string);
|
|
29
29
|
set jwtSetter(jwt: string);
|
|
30
30
|
get urlGetter(): string | undefined;
|
|
31
|
-
init(production: boolean, env: string, version: string, url?: string, jwt?: string, personalData?: boolean, plattform?: string, os?: string, deviceName?: string, browser?: string, width?: number, height?: number, osVersion?: string): void;
|
|
31
|
+
init(production: boolean, env: string, version: string, url?: string, jwt?: string, personalData?: boolean, plattform?: string, os?: string, deviceName?: string, browser?: string, width?: number, height?: number, osVersion?: string, applicationEnvironment?: string): void;
|
|
32
32
|
setOrganizations(organization: Organization, parents: Organization[]): void;
|
|
33
33
|
setUser(id: string, email: string, name?: string): void;
|
|
34
34
|
private checkInit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BusinessMetricsUtils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/BusinessMetricsUtils.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,EAAE,GAAG,EAAE,CAAC;KAClB;CACF;
|
|
1
|
+
{"version":3,"file":"BusinessMetricsUtils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/BusinessMetricsUtils.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,EAAE,GAAG,EAAE,CAAC;KAClB;CACF;AAsDD,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,SAAS,GACT,SAAS,GACT,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,QAAQ,GACR,cAAc,GACd,WAAW,GACX,UAAU,GACV,UAAU,CAAC;AAIf,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,cAAc,GACd,oBAAoB,GACpB,wBAAwB,GACxB,SAAS,GACT,WAAW,GACX,gBAAgB,GAChB,mBAAmB,GACnB,gBAAgB,GAChB,oBAAoB,GAGpB,0BAA0B,GAC1B,mBAAmB,GACnB,gBAAgB,GAChB,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,gBAAgB,GAChB,eA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1C,wBAAwB;YAIjB,KAAK;YAuDL,cAAc;YAYd,GAAG;CAkBlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-utils",
|
|
3
|
-
"version": "24.14.0-beta.
|
|
3
|
+
"version": "24.14.0-beta.34",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"module": "build/esm/index.js",
|
|
25
25
|
"types": "./build/types/utils/src/index.d.ts",
|
|
26
26
|
"main": "build/cjs/index.js",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "48aa0463f070676c2b6560050603088e0a470cb8"
|
|
28
28
|
}
|