@repobit/dex-data-layer 1.5.0 → 1.5.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.
- package/CHANGELOG.md +8 -0
- package/dist/src/events/page-load-started-event/index.d.ts +0 -8
- package/dist/src/events/page-load-started-event/index.js +3 -24
- package/dist/src/events/page-load-started-event/index.js.map +1 -1
- package/dist/src/events/utils.d.ts +8 -0
- package/dist/src/events/utils.js +23 -0
- package/dist/src/events/utils.js.map +1 -0
- package/dist/src/events/window-load-started-event/index.d.ts +2 -2
- package/dist/src/events/window-load-started-event/index.js +4 -1
- package/dist/src/events/window-load-started-event/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.5.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-data-layer@1.5.0...@repobit/dex-data-layer@1.5.1) (2025-04-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @repobit/dex-data-layer
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.5.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-data-layer@1.4.0...@repobit/dex-data-layer@1.5.0) (2025-04-10)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -5,12 +5,4 @@ export declare class PageLoadStartedEvent {
|
|
|
5
5
|
pageInstanceID: 'dev' | 'stage' | 'prod';
|
|
6
6
|
page: PageLoadStartedCompletePageObject;
|
|
7
7
|
constructor(page: Page, pageInfo: PageLoadStartedInfo, pageAttributes?: PageLoadStartedAttributes);
|
|
8
|
-
/**
|
|
9
|
-
* Returns the current user time in the format HH:MM|HH:00-HH:59|dayOfWeek|timezone
|
|
10
|
-
*/
|
|
11
|
-
private getCurrentTime;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the current GMT date in the format DD/MM/YYYY
|
|
14
|
-
*/
|
|
15
|
-
private getCurrentDate;
|
|
16
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UserAgent } from "@repobit/dex-utils";
|
|
2
|
+
import { getCurrentDate, getCurrentTime } from '../utils.js';
|
|
2
3
|
export class PageLoadStartedEvent {
|
|
3
4
|
event = 'page load started';
|
|
4
5
|
pageInstanceID;
|
|
@@ -26,35 +27,13 @@ export class PageLoadStartedEvent {
|
|
|
26
27
|
promotionID: page.getParamValue('pid') || '',
|
|
27
28
|
internalPromotionID: page.getParamValue('icid') || '',
|
|
28
29
|
trackingID: page.getParamValue('cid') || '',
|
|
29
|
-
time:
|
|
30
|
-
date:
|
|
30
|
+
time: getCurrentTime(),
|
|
31
|
+
date: getCurrentDate(),
|
|
31
32
|
domain: topLevelDomain,
|
|
32
33
|
domainPeriod: window.location.hostname.split('.').length - 1,
|
|
33
34
|
...pageAttributes
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Returns the current user time in the format HH:MM|HH:00-HH:59|dayOfWeek|timezone
|
|
39
|
-
*/
|
|
40
|
-
getCurrentTime() {
|
|
41
|
-
const date = new Date();
|
|
42
|
-
const hours = date.getHours();
|
|
43
|
-
const minutes = date.getMinutes();
|
|
44
|
-
const dayOfWeek = date.getDay();
|
|
45
|
-
const timezone = date.toTimeString().split(' ')[1];
|
|
46
|
-
const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
47
|
-
return `${hours}:${minutes}|${hours}:00-${hours}:59|${weekday[dayOfWeek]}|${timezone}`;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Returns the current GMT date in the format DD/MM/YYYY
|
|
51
|
-
*/
|
|
52
|
-
getCurrentDate() {
|
|
53
|
-
const date = new Date();
|
|
54
|
-
const day = date.getDate();
|
|
55
|
-
const month = date.getMonth() + 1;
|
|
56
|
-
const year = date.getFullYear();
|
|
57
|
-
return `${day}/${month}/${year}`;
|
|
58
|
-
}
|
|
59
38
|
}
|
|
60
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/page-load-started-event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/page-load-started-event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,OAAO,oBAAoB;IACxB,KAAK,GAAY,mBAA4B,CAAC;IAC9C,cAAc,CAA2B;IACzC,IAAI,CAA8C;IAEzD,YAAY,IAAU,EAAE,QAA6B,EAAE,iBAA4C,EAAE;QACnG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC;QAEvC,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,aAAa,GAAG,EAAE,EAAE,gBAAgB,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5G,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;aACpE,IAAI,CAAC,GAAG,CAAC,CAAC;QAEb,IAAI,CAAC,IAAI,GAAG;YACV,IAAI,EAAE;gBACJ,GAAG,QAAQ;gBACX,OAAO;gBACP,UAAU;gBACV,aAAa;gBACb,gBAAgB;gBAChB,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;gBACpC,WAAW,EAAK,MAAM,CAAC,QAAQ,CAAC,MAAM;gBACtC,YAAY,EAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,QAAQ,CAAC,QAAQ;gBACpG,UAAU,EAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ;gBACxC,MAAM,EAAU,SAAS,CAAC,EAAE,IAAI,EAAE;gBAClC,QAAQ,EAAQ,IAAI,CAAC,MAAM;aAC5B;YACD,UAAU,EAAE;gBACV,WAAW,EAAU,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE;gBACpD,mBAAmB,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE;gBACrD,UAAU,EAAW,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE;gBACpD,IAAI,EAAiB,cAAc,EAAE;gBACrC,IAAI,EAAiB,cAAc,EAAE;gBACrC,MAAM,EAAe,cAAc;gBACnC,YAAY,EAAS,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC;gBACnE,GAAG,cAAc;aAClB;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the current user time in the format HH:MM|HH:00-HH:59|dayOfWeek|timezone
|
|
3
|
+
*/
|
|
4
|
+
export declare function getCurrentTime(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Returns the current GMT date in the format DD/MM/YYYY
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCurrentDate(): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the current user time in the format HH:MM|HH:00-HH:59|dayOfWeek|timezone
|
|
3
|
+
*/
|
|
4
|
+
export function getCurrentTime() {
|
|
5
|
+
const date = new Date();
|
|
6
|
+
const hours = date.getHours();
|
|
7
|
+
const minutes = date.getMinutes();
|
|
8
|
+
const dayOfWeek = date.getDay();
|
|
9
|
+
const timezone = date.toTimeString().split(' ')[1];
|
|
10
|
+
const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
11
|
+
return `${hours}:${minutes}|${hours}:00-${hours}:59|${weekday[dayOfWeek]}|${timezone}`;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Returns the current GMT date in the format DD/MM/YYYY
|
|
15
|
+
*/
|
|
16
|
+
export function getCurrentDate() {
|
|
17
|
+
const date = new Date();
|
|
18
|
+
const day = date.getDate();
|
|
19
|
+
const month = date.getMonth() + 1;
|
|
20
|
+
const year = date.getFullYear();
|
|
21
|
+
return `${day}/${month}/${year}`;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/events/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC/F,OAAO,GAAG,KAAK,IAAI,OAAO,IAAI,KAAK,OAAO,KAAK,OAAO,OAAO,CAAC,SAAS,CAAC,IAAI,QAAQ,EAAE,CAAC;AACzF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAChC,OAAO,GAAG,GAAG,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PageLoadStartedAttributes, PageLoadStartedCompletePageObject } from
|
|
2
|
-
import { PageLoadStartedInfo } from
|
|
1
|
+
import { PageLoadStartedAttributes, PageLoadStartedCompletePageObject } from '../page-load-started-event/typeDefinitions.js';
|
|
2
|
+
import { PageLoadStartedInfo } from './typeDefinitions.js';
|
|
3
3
|
export declare class WindowLoadStartedEvent {
|
|
4
4
|
event: "page load started";
|
|
5
5
|
pageInstanceID: 'dev' | 'stage' | 'prod';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getCurrentDate, getCurrentTime } from '../utils.js';
|
|
1
2
|
export class WindowLoadStartedEvent {
|
|
2
3
|
event = 'page load started';
|
|
3
4
|
pageInstanceID;
|
|
@@ -16,7 +17,9 @@ export class WindowLoadStartedEvent {
|
|
|
16
17
|
info,
|
|
17
18
|
attributes: {
|
|
18
19
|
...existingPageLoadedObject.attributes,
|
|
19
|
-
...pageAttributes
|
|
20
|
+
...pageAttributes,
|
|
21
|
+
time: getCurrentTime(),
|
|
22
|
+
date: getCurrentDate()
|
|
20
23
|
}
|
|
21
24
|
};
|
|
22
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/window-load-started-event/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/window-load-started-event/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,OAAO,sBAAsB;IAC1B,KAAK,GAAG,mBAA4B,CAAC;IACrC,cAAc,CAA2B;IACzC,IAAI,CAA8C;IAEzD,YAAY,QAAgI,EAAE,iBAA4C,EAAE;QAC1L,MAAM,uBAAuB,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,mBAAmB,CAAC,KAAK,KAAK,mBAAmB,CAAyB,CAAC;QAC7J,IAAI,CAAC,cAAc,GAAG,uBAAuB,CAAC,cAAc,CAAC;QAE7D,MAAM,wBAAwB,GAAG,uBAAuB,CAAC,IAAI,CAAC;QAC9D,MAAM,IAAI,GAAG,QAAQ,YAAY,QAAQ;YACvC,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,wBAAwB,CAAC,IAAI,EAAE,CAAC;YAChD,CAAC,CAAC;gBACA,GAAG,wBAAwB,CAAC,IAAI;gBAChC,GAAI,QAAgC;aACrC,CAAC;QAEJ,IAAI,CAAC,IAAI,GAAG;YACV,IAAI;YACJ,UAAU,EAAE;gBACV,GAAG,wBAAwB,CAAC,UAAU;gBACtC,GAAG,cAAc;gBACjB,IAAI,EAAE,cAAc,EAAE;gBACtB,IAAI,EAAE,cAAc,EAAE;aACvB;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-data-layer",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Client for Adobe Data Layer",
|
|
5
5
|
"author": "Constantin Ioan Mihai <iconstantin@bitdefender.com>",
|
|
6
6
|
"homepage": "https://github.com/bitdefender/dex-core#readme",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"volta": {
|
|
38
38
|
"node": "22.14.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "862c515280259adf1a7afc80d2872fee3bcf885e"
|
|
41
41
|
}
|