@google-psat/common 0.14.1 → 1.2.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/dist/attributionReporting.types.js +1 -2
- package/dist/cookies.types.js +6 -9
- package/dist/cookies.types.js.map +1 -1
- package/dist/data/cookieExclusionAndWarningReasons/cookieBlockedReason.js +1 -3
- package/dist/data/cookieExclusionAndWarningReasons/cookieBlockedReason.js.map +1 -1
- package/dist/data/cookieExclusionAndWarningReasons/cookieExclusionReason.js +20 -45
- package/dist/data/cookieExclusionAndWarningReasons/cookieExclusionReason.js.map +1 -1
- package/dist/data/cookieExclusionAndWarningReasons/cookieExclusionReasonHTMLContent.js +16 -19
- package/dist/data/cookieExclusionAndWarningReasons/cookieExclusionReasonHTMLContent.js.map +1 -1
- package/dist/data/cookieExclusionAndWarningReasons/cookieWarningReason.js +32 -57
- package/dist/data/cookieExclusionAndWarningReasons/cookieWarningReason.js.map +1 -1
- package/dist/data/cookieExclusionAndWarningReasons/cookieWarningReasonHTMLContent.js +29 -32
- package/dist/data/cookieExclusionAndWarningReasons/cookieWarningReasonHTMLContent.js.map +1 -1
- package/dist/data/cookieExclusionAndWarningReasons/index.js +7 -12
- package/dist/data/cookieExclusionAndWarningReasons/index.js.map +1 -1
- package/dist/data/cookieExemptionReason/exemptionReasons.js +10 -12
- package/dist/data/cookieExemptionReason/exemptionReasons.js.map +1 -1
- package/dist/data/cookieExemptionReason/index.js +1 -8
- package/dist/data/cookieExemptionReason/index.js.map +1 -1
- package/dist/data/index.js +3 -11
- package/dist/data/index.js.map +1 -1
- package/dist/index.js +40 -88
- package/dist/index.js.map +1 -1
- package/dist/mdl.types.js +2 -0
- package/dist/mdl.types.js.map +1 -0
- package/dist/prebid.types.js +2 -0
- package/dist/prebid.types.js.map +1 -0
- package/dist/prebidGlobal.types.js +2 -0
- package/dist/prebidGlobal.types.js.map +1 -0
- package/dist/protectedAudience.types.js +1 -2
- package/dist/prtToken.types.js +2 -0
- package/dist/prtToken.types.js.map +1 -0
- package/dist/test-utils/data.mock.js +4 -12
- package/dist/test-utils/data.mock.js.map +1 -1
- package/dist/utils/addUTMParams.js +5 -8
- package/dist/utils/addUTMParams.js.map +1 -1
- package/dist/utils/auctions/bidderCreator.js +117 -0
- package/dist/utils/auctions/bidderCreator.js.map +1 -0
- package/dist/utils/auctions/findMaximumBidderDuration.js +10 -0
- package/dist/utils/auctions/findMaximumBidderDuration.js.map +1 -0
- package/dist/{worker/enums.js → utils/auctions/formatDuration.js} +8 -9
- package/dist/utils/auctions/formatDuration.js.map +1 -0
- package/dist/utils/auctions/formatTimestamp.js +26 -0
- package/dist/utils/auctions/formatTimestamp.js.map +1 -0
- package/dist/utils/auctions/index.js +21 -0
- package/dist/utils/auctions/index.js.map +1 -0
- package/dist/utils/auctions/prepareTimelineData.js +176 -0
- package/dist/utils/auctions/prepareTimelineData.js.map +1 -0
- package/dist/utils/auctions/types.js +23 -0
- package/dist/utils/auctions/types.js.map +1 -0
- package/dist/utils/calculateEffectiveExpiryDate.js +3 -6
- package/dist/utils/calculateEffectiveExpiryDate.js.map +1 -1
- package/dist/utils/contextSelector/createContext.js +3 -5
- package/dist/utils/contextSelector/createContext.js.map +1 -1
- package/dist/utils/contextSelector/index.js +2 -10
- package/dist/utils/contextSelector/index.js.map +1 -1
- package/dist/utils/contextSelector/shallowEqual.js +3 -7
- package/dist/utils/contextSelector/shallowEqual.js.map +1 -1
- package/dist/utils/contextSelector/useContextSelector.js +7 -9
- package/dist/utils/contextSelector/useContextSelector.js.map +1 -1
- package/dist/utils/delay.js +1 -3
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/deriveBlockingStatus.js +11 -14
- package/dist/utils/deriveBlockingStatus.js.map +1 -1
- package/dist/utils/extractCookies.js +10 -8
- package/dist/utils/extractCookies.js.map +1 -1
- package/dist/utils/extractReportData.js +14 -20
- package/dist/utils/extractReportData.js.map +1 -1
- package/dist/utils/extractUrl.js +3 -6
- package/dist/utils/extractUrl.js.map +1 -1
- package/dist/utils/fetchLocalData.js +5 -16
- package/dist/utils/fetchLocalData.js.map +1 -1
- package/dist/utils/filterCookiesByFrame.js +3 -7
- package/dist/utils/filterCookiesByFrame.js.map +1 -1
- package/dist/utils/filterFramesWithCookies.js +3 -8
- package/dist/utils/filterFramesWithCookies.js.map +1 -1
- package/dist/utils/findAnalyticsMatch.js +4 -8
- package/dist/utils/findAnalyticsMatch.js.map +1 -1
- package/dist/utils/generateErrorLogs.js +4 -9
- package/dist/utils/generateErrorLogs.js.map +1 -1
- package/dist/utils/generateReports/generateAllCookiesCSV.js +22 -28
- package/dist/utils/generateReports/generateAllCookiesCSV.js.map +1 -1
- package/dist/utils/generateReports/generateCLICookieTableCSV.js +29 -35
- package/dist/utils/generateReports/generateCLICookieTableCSV.js.map +1 -1
- package/dist/utils/generateReports/generateCookiesWithIssuesCSV.js +33 -40
- package/dist/utils/generateReports/generateCookiesWithIssuesCSV.js.map +1 -1
- package/dist/utils/generateReports/generateExtensionCookietableCSV.js +34 -40
- package/dist/utils/generateReports/generateExtensionCookietableCSV.js.map +1 -1
- package/dist/utils/generateReports/generateRootSummaryDataCSV.js +12 -20
- package/dist/utils/generateReports/generateRootSummaryDataCSV.js.map +1 -1
- package/dist/utils/generateReports/generateSummaryDataCSV.js +14 -16
- package/dist/utils/generateReports/generateSummaryDataCSV.js.map +1 -1
- package/dist/utils/generateReports/index.js +6 -18
- package/dist/utils/generateReports/index.js.map +1 -1
- package/dist/utils/getCookieKey.js +4 -6
- package/dist/utils/getCookieKey.js.map +1 -1
- package/dist/utils/getCurrentDateAndTime.js +1 -3
- package/dist/utils/getCurrentDateAndTime.js.map +1 -1
- package/dist/utils/getDomainFromUrl.js +3 -6
- package/dist/utils/getDomainFromUrl.js.map +1 -1
- package/dist/utils/getLegendDescription.js +4 -6
- package/dist/utils/getLegendDescription.js.map +1 -1
- package/dist/utils/getValueByKey.js +2 -4
- package/dist/utils/getValueByKey.js.map +1 -1
- package/dist/utils/isFirstParty.js +5 -7
- package/dist/utils/isFirstParty.js.map +1 -1
- package/dist/{worker/devToolWorker.js → utils/isValidURL.js} +12 -10
- package/dist/utils/isValidURL.js.map +1 -0
- package/dist/utils/mergeDeep.js +1 -3
- package/dist/utils/mergeDeep.js.map +1 -1
- package/dist/utils/noop.js +1 -3
- package/dist/utils/noop.js.map +1 -1
- package/dist/utils/parseRequestWillBeSentExtraInfo.js +22 -33
- package/dist/utils/parseRequestWillBeSentExtraInfo.js.map +1 -1
- package/dist/utils/parseResponseReceivedExtraInfo.js +35 -38
- package/dist/utils/parseResponseReceivedExtraInfo.js.map +1 -1
- package/dist/utils/parseUrl.js +1 -5
- package/dist/utils/parseUrl.js.map +1 -1
- package/dist/utils/removeAndAddNewSpinnerText.js +1 -4
- package/dist/utils/removeAndAddNewSpinnerText.js.map +1 -1
- package/dist/utils/reshapeCookies.js +51 -50
- package/dist/utils/reshapeCookies.js.map +1 -1
- package/dist/utils/resolveWithTimeout.js +1 -4
- package/dist/utils/resolveWithTimeout.js.map +1 -1
- package/dist/utils/sanitizeCsvRecord.js +1 -3
- package/dist/utils/sanitizeCsvRecord.js.map +1 -1
- package/dist/utils/sessionStorage.js +6 -20
- package/dist/utils/sessionStorage.js.map +1 -1
- package/dist-types/cookies.types.d.ts +0 -4
- package/dist-types/index.d.ts +7 -4
- package/dist-types/mdl.types.d.ts +7 -0
- package/dist-types/prebid.types.d.ts +29 -0
- package/dist-types/prebidGlobal.types.d.ts +674 -0
- package/dist-types/protectedAudience.types.d.ts +32 -1
- package/dist-types/prtToken.types.d.ts +33 -0
- package/dist-types/utils/auctions/bidderCreator.d.ts +39 -0
- package/dist-types/utils/auctions/findMaximumBidderDuration.d.ts +5 -0
- package/dist-types/utils/auctions/formatDuration.d.ts +1 -0
- package/dist-types/utils/auctions/formatTimestamp.d.ts +1 -0
- package/dist-types/utils/auctions/index.d.ts +5 -0
- package/dist-types/utils/auctions/prepareTimelineData.d.ts +6 -0
- package/dist-types/utils/auctions/types.d.ts +24 -0
- package/dist-types/utils/extractReportData.d.ts +0 -4
- package/dist-types/utils/isValidURL.d.ts +7 -0
- package/package.json +5 -3
- package/tsconfig.json +3 -3
- package/dist/libraryDetection.types.js +0 -3
- package/dist/libraryDetection.types.js.map +0 -1
- package/dist/worker/devToolWorker.js.map +0 -1
- package/dist/worker/enums.js.map +0 -1
- package/dist/worker/executeTaskInDevToolWorker.js +0 -43
- package/dist/worker/executeTaskInDevToolWorker.js.map +0 -1
- package/dist-types/libraryDetection.types.d.ts +0 -50
- package/dist-types/worker/devToolWorker.d.ts +0 -6
- package/dist-types/worker/enums.d.ts +0 -3
- package/dist-types/worker/executeTaskInDevToolWorker.d.ts +0 -11
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright 2023 Google LLC
|
|
4
3
|
*
|
|
@@ -14,13 +13,12 @@
|
|
|
14
13
|
* See the License for the specific language governing permissions and
|
|
15
14
|
* limitations under the License.
|
|
16
15
|
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
16
|
/**
|
|
19
17
|
* External dependencies
|
|
20
18
|
*/
|
|
21
|
-
|
|
19
|
+
import { createContext as createContextOrig } from 'use-context-selector';
|
|
22
20
|
const createContext = (defaultValue) => {
|
|
23
|
-
return (
|
|
21
|
+
return createContextOrig(defaultValue);
|
|
24
22
|
};
|
|
25
|
-
|
|
23
|
+
export default createContext;
|
|
26
24
|
//# sourceMappingURL=createContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createContext.js","sourceRoot":"","sources":["../../../src/utils/contextSelector/createContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createContext.js","sourceRoot":"","sources":["../../../src/utils/contextSelector/createContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,MAAM,aAAa,GAAG,CAAI,YAAe,EAAE,EAAE;IAC3C,OAAO,iBAAiB,CAAC,YAAY,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright 2023 Google LLC
|
|
4
3
|
*
|
|
@@ -14,13 +13,6 @@
|
|
|
14
13
|
* See the License for the specific language governing permissions and
|
|
15
14
|
* limitations under the License.
|
|
16
15
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.createContext = exports.useContextSelector = void 0;
|
|
22
|
-
var useContextSelector_1 = require("./useContextSelector");
|
|
23
|
-
Object.defineProperty(exports, "useContextSelector", { enumerable: true, get: function () { return __importDefault(useContextSelector_1).default; } });
|
|
24
|
-
var createContext_1 = require("./createContext");
|
|
25
|
-
Object.defineProperty(exports, "createContext", { enumerable: true, get: function () { return __importDefault(createContext_1).default; } });
|
|
16
|
+
export { default as useContextSelector } from './useContextSelector';
|
|
17
|
+
export { default as createContext } from './createContext';
|
|
26
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/contextSelector/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/contextSelector/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shallowEqual = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright 2023 Google LLC
|
|
6
3
|
*
|
|
@@ -19,9 +16,8 @@ exports.shallowEqual = void 0;
|
|
|
19
16
|
/**
|
|
20
17
|
* External dependencies
|
|
21
18
|
*/
|
|
22
|
-
|
|
23
|
-
const shallowEqual = (a, b) => {
|
|
24
|
-
return
|
|
19
|
+
import { isEqual } from 'lodash-es';
|
|
20
|
+
export const shallowEqual = (a, b) => {
|
|
21
|
+
return isEqual(a, b);
|
|
25
22
|
};
|
|
26
|
-
exports.shallowEqual = shallowEqual;
|
|
27
23
|
//# sourceMappingURL=shallowEqual.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shallowEqual.js","sourceRoot":"","sources":["../../../src/utils/contextSelector/shallowEqual.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shallowEqual.js","sourceRoot":"","sources":["../../../src/utils/contextSelector/shallowEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAU,EAAE,CAAU,EAAW,EAAE;IAC9D,OAAO,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright 2023 Google LLC
|
|
4
3
|
*
|
|
@@ -14,16 +13,15 @@
|
|
|
14
13
|
* See the License for the specific language governing permissions and
|
|
15
14
|
* limitations under the License.
|
|
16
15
|
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
16
|
/**
|
|
19
17
|
* External dependencies
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
import { useContextSelector as useContextSelectorOrig, } from 'use-context-selector';
|
|
20
|
+
import { useRef } from 'react';
|
|
23
21
|
/**
|
|
24
22
|
* Internal dependencies
|
|
25
23
|
*/
|
|
26
|
-
|
|
24
|
+
import { shallowEqual } from './shallowEqual';
|
|
27
25
|
/**
|
|
28
26
|
* This hook returns a part of the context value by selector.
|
|
29
27
|
* It will trigger a re-render only if the selected value has changed.
|
|
@@ -38,8 +36,8 @@ const shallowEqual_1 = require("./shallowEqual");
|
|
|
38
36
|
* will not be triggered. This is {shallowEqual} by default.
|
|
39
37
|
* @returns The selected context value fragment.
|
|
40
38
|
*/
|
|
41
|
-
function useContextSelector(context, selector, equalityFn =
|
|
42
|
-
const ref =
|
|
39
|
+
function useContextSelector(context, selector, equalityFn = shallowEqual) {
|
|
40
|
+
const ref = useRef();
|
|
43
41
|
const equalityFnCallback = (state) => {
|
|
44
42
|
const selected = selector(state);
|
|
45
43
|
if (ref.current && equalityFn(ref.current, selected)) {
|
|
@@ -49,7 +47,7 @@ function useContextSelector(context, selector, equalityFn = shallowEqual_1.shall
|
|
|
49
47
|
return selected;
|
|
50
48
|
};
|
|
51
49
|
// Update the selector fn to memoize the selected value by [equalityFn].
|
|
52
|
-
return (
|
|
50
|
+
return useContextSelectorOrig(context, equalityFnCallback);
|
|
53
51
|
}
|
|
54
|
-
|
|
52
|
+
export default useContextSelector;
|
|
55
53
|
//# sourceMappingURL=useContextSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContextSelector.js","sourceRoot":"","sources":["../../../src/utils/contextSelector/useContextSelector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useContextSelector.js","sourceRoot":"","sources":["../../../src/utils/contextSelector/useContextSelector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,OAAO,EACL,kBAAkB,IAAI,sBAAsB,GAE7C,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAyB,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM9C;;;;;;;;;;;;;GAaG;AACH,SAAS,kBAAkB,CACzB,OAAmB,EACnB,QAAyB,EACzB,aAAyB,YAAY;IAErC,MAAM,GAAG,GAAoC,MAAM,EAAE,CAAC;IAEtD,MAAM,kBAAkB,GAAG,CAAC,KAAQ,EAAE,EAAE;QACtC,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,GAAG,CAAC,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;YACrD,OAAO,GAAG,CAAC,OAAO,CAAC;QACrB,CAAC;QACD,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC;QACvB,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;IAEF,wEAAwE;IACxE,OAAO,sBAAsB,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AAC7D,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
package/dist/utils/delay.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright 2023 Google LLC
|
|
4
3
|
*
|
|
@@ -14,7 +13,6 @@
|
|
|
14
13
|
* See the License for the specific language governing permissions and
|
|
15
14
|
* limitations under the License.
|
|
16
15
|
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
16
|
/**
|
|
19
17
|
* Delay by using setTimeout.
|
|
20
18
|
* @param ms delay in miliseconds
|
|
@@ -23,5 +21,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
21
|
function delay(ms) {
|
|
24
22
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
25
23
|
}
|
|
26
|
-
|
|
24
|
+
export default delay;
|
|
27
25
|
//# sourceMappingURL=delay.js.map
|
package/dist/utils/delay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../src/utils/delay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../src/utils/delay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AACH,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = deriveBlockingStatus;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright 2023 Google LLC
|
|
6
3
|
*
|
|
@@ -19,7 +16,7 @@ exports.default = deriveBlockingStatus;
|
|
|
19
16
|
/**
|
|
20
17
|
* Internal dependencies.
|
|
21
18
|
*/
|
|
22
|
-
|
|
19
|
+
import { BLOCK_STATUS, } from '../cookies.types';
|
|
23
20
|
/**
|
|
24
21
|
* Derives if a cookie was blocked in response header.
|
|
25
22
|
* @param respEvents Response event array
|
|
@@ -32,7 +29,7 @@ function deriveInboundBlocking(respEvents) {
|
|
|
32
29
|
// if there are not response events the cookie must be stored in a previous visit
|
|
33
30
|
// Or there is a javascript not used in the request header.
|
|
34
31
|
if (respEvents.length === 0) {
|
|
35
|
-
return
|
|
32
|
+
return BLOCK_STATUS.NOT_BLOCKED;
|
|
36
33
|
}
|
|
37
34
|
// Number of responses in which the cookie was blocked.
|
|
38
35
|
const numBlocked = respEvents.reduce((acc, event) => {
|
|
@@ -44,13 +41,13 @@ function deriveInboundBlocking(respEvents) {
|
|
|
44
41
|
}
|
|
45
42
|
}, 0);
|
|
46
43
|
if (numBlocked === 0) {
|
|
47
|
-
return
|
|
44
|
+
return BLOCK_STATUS.NOT_BLOCKED;
|
|
48
45
|
}
|
|
49
46
|
else if (0 < numBlocked && numBlocked < respEvents.length) {
|
|
50
|
-
return
|
|
47
|
+
return BLOCK_STATUS.BLOCKED_IN_SOME_EVENTS;
|
|
51
48
|
}
|
|
52
49
|
else {
|
|
53
|
-
return
|
|
50
|
+
return BLOCK_STATUS.BLOCKED_IN_ALL_EVENTS;
|
|
54
51
|
}
|
|
55
52
|
}
|
|
56
53
|
/**
|
|
@@ -70,24 +67,24 @@ function deriveOutboundBlocking(reqEvents) {
|
|
|
70
67
|
}
|
|
71
68
|
}, 0);
|
|
72
69
|
if (numBlocked === 0) {
|
|
73
|
-
return
|
|
70
|
+
return BLOCK_STATUS.NOT_BLOCKED;
|
|
74
71
|
}
|
|
75
72
|
else if (0 < numBlocked && numBlocked < reqEvents.length) {
|
|
76
|
-
return
|
|
73
|
+
return BLOCK_STATUS.BLOCKED_IN_SOME_EVENTS;
|
|
77
74
|
}
|
|
78
75
|
else {
|
|
79
|
-
return
|
|
76
|
+
return BLOCK_STATUS.BLOCKED_IN_ALL_EVENTS;
|
|
80
77
|
}
|
|
81
78
|
}
|
|
82
79
|
/**
|
|
83
80
|
* @param networkEvents Cookie network events
|
|
84
81
|
* @returns blocking status object
|
|
85
82
|
*/
|
|
86
|
-
function deriveBlockingStatus(networkEvents) {
|
|
83
|
+
export default function deriveBlockingStatus(networkEvents) {
|
|
87
84
|
if (!networkEvents) {
|
|
88
85
|
return {
|
|
89
|
-
inboundBlock:
|
|
90
|
-
outboundBlock:
|
|
86
|
+
inboundBlock: BLOCK_STATUS.UNKNOWN,
|
|
87
|
+
outboundBlock: BLOCK_STATUS.UNKNOWN,
|
|
91
88
|
};
|
|
92
89
|
}
|
|
93
90
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deriveBlockingStatus.js","sourceRoot":"","sources":["../../src/utils/deriveBlockingStatus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deriveBlockingStatus.js","sourceRoot":"","sources":["../../src/utils/deriveBlockingStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH;;GAEG;AACH,OAAO,EACL,YAAY,GAIb,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;GAOG;AACH,SAAS,qBAAqB,CAAC,UAA2B;IACxD,iFAAiF;IACjF,2DAA2D;IAC3D,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAC,WAAW,CAAC;IAClC,CAAC;IAED,uDAAuD;IACvD,MAAM,UAAU,GAAW,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QAC1D,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,YAAY,CAAC,WAAW,CAAC;IAClC,CAAC;SAAM,IAAI,CAAC,GAAG,UAAU,IAAI,UAAU,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;QAC5D,OAAO,YAAY,CAAC,sBAAsB,CAAC;IAC7C,CAAC;SAAM,CAAC;QACN,OAAO,YAAY,CAAC,qBAAqB,CAAC;IAC5C,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,sBAAsB,CAAC,SAAyB;IACvD,MAAM,UAAU,GAAW,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACzD,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,YAAY,CAAC,WAAW,CAAC;IAClC,CAAC;SAAM,IAAI,CAAC,GAAG,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;QAC3D,OAAO,YAAY,CAAC,sBAAsB,CAAC;IAC7C,CAAC;SAAM,CAAC;QACN,OAAO,YAAY,CAAC,qBAAqB,CAAC;IAC5C,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,aAA0C;IAE1C,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO;YACL,YAAY,EAAE,YAAY,CAAC,OAAO;YAClC,aAAa,EAAE,YAAY,CAAC,OAAO;SACpC,CAAC;IACJ,CAAC;IACD,OAAO;QACL,YAAY,EAAE,qBAAqB,CAAC,aAAa,CAAC,cAAc,CAAC;QACjE,aAAa,EAAE,sBAAsB,CAAC,aAAa,CAAC,aAAa,CAAC;KACnE,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright 2023 Google LLC
|
|
4
3
|
*
|
|
@@ -14,19 +13,22 @@
|
|
|
14
13
|
* See the License for the specific language governing permissions and
|
|
15
14
|
* limitations under the License.
|
|
16
15
|
*/
|
|
17
|
-
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
const calculateEffectiveExpiryDate_1 = __importDefault(require("./calculateEffectiveExpiryDate"));
|
|
16
|
+
import calculateEffectiveExpiryDate from './calculateEffectiveExpiryDate';
|
|
22
17
|
const extractCookies = (cookieData, pageUrl, shouldAddUrlToKey = false) => {
|
|
23
18
|
return Object.entries(cookieData).reduce((acc, [frame, _data]) => {
|
|
24
19
|
acc[frame] = Object.fromEntries(Object.entries(_data.frameCookies).map(([key, cookie]) => [
|
|
25
20
|
key + (shouldAddUrlToKey ? '' : pageUrl),
|
|
26
|
-
|
|
21
|
+
{
|
|
22
|
+
...cookie,
|
|
23
|
+
pageUrl,
|
|
24
|
+
parsedCookie: {
|
|
25
|
+
...cookie.parsedCookie,
|
|
26
|
+
expires: calculateEffectiveExpiryDate(cookie.parsedCookie.expires),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
27
29
|
]));
|
|
28
30
|
return acc;
|
|
29
31
|
}, {});
|
|
30
32
|
};
|
|
31
|
-
|
|
33
|
+
export default extractCookies;
|
|
32
34
|
//# sourceMappingURL=extractCookies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractCookies.js","sourceRoot":"","sources":["../../src/utils/extractCookies.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractCookies.js","sourceRoot":"","sources":["../../src/utils/extractCookies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAE1E,MAAM,cAAc,GAAG,CACrB,UAAsC,EACtC,OAAe,EACf,iBAAiB,GAAG,KAAK,EACzB,EAAE;IACF,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,CACtC,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE;QACtB,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,WAAW,CAC7B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;YACxD,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;YACxC;gBACE,GAAG,MAAM;gBACT,OAAO;gBACP,YAAY,EAAE;oBACZ,GAAG,MAAM,CAAC,YAAY;oBACtB,OAAO,EAAE,4BAA4B,CACnC,MAAM,CAAC,YAAY,CAAC,OAAO,CAC5B;iBACF;aACF;SACF,CAAC,CACH,CAAC;QAEF,OAAO,GAAG,CAAC;IACb,CAAC,EACD,EAAE,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const extractCookies_1 = __importDefault(require("./extractCookies"));
|
|
1
|
+
import extractCookies from './extractCookies';
|
|
7
2
|
const extractReportData = (data) => {
|
|
8
3
|
const landingPageCookies = {};
|
|
9
|
-
const consolidatedLibraryMatches = {};
|
|
10
4
|
const erroredOutUrlsData = [];
|
|
11
|
-
data.forEach(({ cookieData, pageUrl,
|
|
12
|
-
erroredOutUrlsData.push(...(erroredOutUrls
|
|
5
|
+
data.forEach(({ cookieData, pageUrl, erroredOutUrls }) => {
|
|
6
|
+
erroredOutUrlsData.push(...(erroredOutUrls ?? []));
|
|
13
7
|
if (erroredOutUrls &&
|
|
14
8
|
erroredOutUrls.filter(({ url }) => url === pageUrl).length > 0) {
|
|
15
9
|
return;
|
|
16
10
|
}
|
|
17
|
-
formatCookieData((
|
|
18
|
-
consolidatedLibraryMatches[pageUrl] = libraryMatches;
|
|
11
|
+
formatCookieData(extractCookies(cookieData, pageUrl, true), landingPageCookies);
|
|
19
12
|
});
|
|
20
|
-
data.forEach(({ cookieData, pageUrl
|
|
21
|
-
formatCookieData((
|
|
22
|
-
consolidatedLibraryMatches[pageUrl] = libraryMatches;
|
|
13
|
+
data.forEach(({ cookieData, pageUrl }) => {
|
|
14
|
+
formatCookieData(extractCookies(cookieData, pageUrl, true), landingPageCookies);
|
|
23
15
|
});
|
|
24
16
|
return {
|
|
25
17
|
landingPageCookies,
|
|
26
|
-
consolidatedLibraryMatches,
|
|
27
18
|
erroredOutUrlsData,
|
|
28
19
|
};
|
|
29
20
|
};
|
|
@@ -33,15 +24,18 @@ const formatCookieData = (cookieData, store) => {
|
|
|
33
24
|
store[frame] = {};
|
|
34
25
|
}
|
|
35
26
|
Object.entries(_cData).forEach(([key, cookie]) => {
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
store[frame][key] = {
|
|
28
|
+
...cookie,
|
|
29
|
+
isBlocked: store[frame][key]?.isBlocked || cookie.isBlocked,
|
|
30
|
+
blockedReasons: [
|
|
38
31
|
...new Set([
|
|
39
|
-
...(
|
|
32
|
+
...(store[frame][key]?.blockedReasons || []),
|
|
40
33
|
...(cookie.blockedReasons || []),
|
|
41
34
|
]),
|
|
42
|
-
]
|
|
35
|
+
],
|
|
36
|
+
};
|
|
43
37
|
});
|
|
44
38
|
});
|
|
45
39
|
};
|
|
46
|
-
|
|
40
|
+
export default extractReportData;
|
|
47
41
|
//# sourceMappingURL=extractReportData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractReportData.js","sourceRoot":"","sources":["../../src/utils/extractReportData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractReportData.js","sourceRoot":"","sources":["../../src/utils/extractReportData.ts"],"names":[],"mappings":"AAuBA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,iBAAiB,GAAG,CAAC,IAAoB,EAAE,EAAE;IACjD,MAAM,kBAAkB,GAAG,EAAE,CAAC;IAC9B,MAAM,kBAAkB,GAAyB,EAAE,CAAC;IAEpD,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE;QACvD,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,CAAC;QAEnD,IACE,cAAc;YACd,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAC9D,CAAC;YACD,OAAO;QACT,CAAC;QAED,gBAAgB,CACd,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,EACzC,kBAAkB,CACnB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QACvC,gBAAgB,CACd,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,EACzC,kBAAkB,CACnB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,kBAAkB;QAClB,kBAAkB;KACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,UAAkC,EAClC,KAA0B,EAC1B,EAAE;IACF,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE;QACrD,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YAClB,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;QACpB,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE;YAC/C,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG;gBAClB,GAAG,MAAM;gBACT,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,SAAS,IAAI,MAAM,CAAC,SAAS;gBAC3D,cAAc,EAAE;oBACd,GAAG,IAAI,GAAG,CAAC;wBACT,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,cAAc,IAAI,EAAE,CAAC;wBAC5C,GAAG,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC;qBACjC,CAAC;iBACH;aACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/dist/utils/extractUrl.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = extractUrl;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright 2023 Google LLC
|
|
6
3
|
*
|
|
@@ -19,14 +16,14 @@ exports.default = extractUrl;
|
|
|
19
16
|
/**
|
|
20
17
|
* External dependencies.
|
|
21
18
|
*/
|
|
22
|
-
|
|
19
|
+
import { parse } from 'tldts';
|
|
23
20
|
/**
|
|
24
21
|
* Extracts the URL from the given string.
|
|
25
22
|
* @param url - The string containing the URL.
|
|
26
23
|
* @returns The extracted URL or an empty string if the URL cannot be parsed.
|
|
27
24
|
*/
|
|
28
|
-
function extractUrl(url) {
|
|
29
|
-
const parsedUrl =
|
|
25
|
+
export default function extractUrl(url) {
|
|
26
|
+
const parsedUrl = parse(url);
|
|
30
27
|
return parsedUrl || '';
|
|
31
28
|
}
|
|
32
29
|
//# sourceMappingURL=extractUrl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractUrl.js","sourceRoot":"","sources":["../../src/utils/extractUrl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractUrl.js","sourceRoot":"","sources":["../../src/utils/extractUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH;;GAEG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,GAAW;IAC5C,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,SAAS,IAAI,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
1
|
/*
|
|
13
2
|
* Copyright 2023 Google LLC
|
|
14
3
|
*
|
|
@@ -24,21 +13,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
24
13
|
* See the License for the specific language governing permissions and
|
|
25
14
|
* limitations under the License.
|
|
26
15
|
*/
|
|
27
|
-
const fetchLocalData = (path) =>
|
|
16
|
+
const fetchLocalData = async (path) => {
|
|
28
17
|
try {
|
|
29
18
|
const url = chrome.runtime.getURL(path);
|
|
30
|
-
const response =
|
|
19
|
+
const response = await fetch(url);
|
|
31
20
|
if (!response.ok) {
|
|
32
21
|
// eslint-disable-next-line no-console
|
|
33
22
|
console.warn(`HTTP error! Status: ${response.status}`);
|
|
34
23
|
}
|
|
35
|
-
return
|
|
24
|
+
return await response.json();
|
|
36
25
|
}
|
|
37
26
|
catch (error) {
|
|
38
27
|
// eslint-disable-next-line no-console
|
|
39
28
|
console.log(`Failed to fetch local data from path: ${path}. Error:`, error);
|
|
40
29
|
return [];
|
|
41
30
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
31
|
+
};
|
|
32
|
+
export default fetchLocalData;
|
|
44
33
|
//# sourceMappingURL=fetchLocalData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchLocalData.js","sourceRoot":"","sources":["../../src/utils/fetchLocalData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetchLocalData.js","sourceRoot":"","sources":["../../src/utils/fetchLocalData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,cAAc,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE;IAC5C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAElC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,sCAAsC;YACtC,OAAO,CAAC,IAAI,CAAC,uBAAuB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,yCAAyC,IAAI,UAAU,EAAE,KAAK,CAAC,CAAC;QAE5E,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
const filterCookiesByFrame = (cookies, tabFrames, frameUrl) => {
|
|
4
2
|
const frameFilteredCookies = {};
|
|
5
3
|
if (!cookies || !frameUrl || !tabFrames || !tabFrames[frameUrl]) {
|
|
6
4
|
return Object.values(frameFilteredCookies);
|
|
7
5
|
}
|
|
8
6
|
Object.entries(cookies).forEach(([key, cookie]) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _a;
|
|
12
|
-
if (frameId && ((_a = cookie.frameIdList) === null || _a === void 0 ? void 0 : _a.includes(frameId))) {
|
|
7
|
+
tabFrames[frameUrl].frameIds?.forEach((frameId) => {
|
|
8
|
+
if (frameId && cookie.frameIdList?.includes(frameId)) {
|
|
13
9
|
frameFilteredCookies[key] = cookie;
|
|
14
10
|
}
|
|
15
11
|
});
|
|
16
12
|
});
|
|
17
13
|
return Object.values(frameFilteredCookies);
|
|
18
14
|
};
|
|
19
|
-
|
|
15
|
+
export default filterCookiesByFrame;
|
|
20
16
|
//# sourceMappingURL=filterCookiesByFrame.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterCookiesByFrame.js","sourceRoot":"","sources":["../../src/utils/filterCookiesByFrame.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filterCookiesByFrame.js","sourceRoot":"","sources":["../../src/utils/filterCookiesByFrame.ts"],"names":[],"mappings":"AAuBA,MAAM,oBAAoB,GAAG,CAC3B,OAA0B,EAC1B,SAA2B,EAC3B,QAAuB,EACvB,EAAE;IACF,MAAM,oBAAoB,GAAe,EAAE,CAAC;IAC5C,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChE,OAAO,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE;QAChD,SAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAChD,IAAI,OAAO,IAAI,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACrD,oBAAoB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const filterCookiesByFrame_1 = __importDefault(require("./filterCookiesByFrame"));
|
|
1
|
+
import filterCookiesByFrame from './filterCookiesByFrame';
|
|
7
2
|
const filterFramesWithCookies = (tabCookies, tabFrames) => {
|
|
8
3
|
const framesWithCookies = {};
|
|
9
4
|
if (!tabCookies || !tabFrames) {
|
|
10
5
|
return framesWithCookies;
|
|
11
6
|
}
|
|
12
7
|
Object.keys(tabFrames).forEach((frameUrl) => {
|
|
13
|
-
const cookies = (
|
|
8
|
+
const cookies = filterCookiesByFrame(tabCookies, tabFrames, frameUrl);
|
|
14
9
|
if (cookies.length) {
|
|
15
10
|
framesWithCookies[frameUrl] = tabFrames[frameUrl];
|
|
16
11
|
}
|
|
17
12
|
});
|
|
18
13
|
return framesWithCookies;
|
|
19
14
|
};
|
|
20
|
-
|
|
15
|
+
export default filterFramesWithCookies;
|
|
21
16
|
//# sourceMappingURL=filterFramesWithCookies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterFramesWithCookies.js","sourceRoot":"","sources":["../../src/utils/filterFramesWithCookies.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filterFramesWithCookies.js","sourceRoot":"","sources":["../../src/utils/filterFramesWithCookies.ts"],"names":[],"mappings":"AAmBA,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,MAAM,uBAAuB,GAAG,CAC9B,UAA6B,EAC7B,SAA2B,EACR,EAAE;IACrB,MAAM,iBAAiB,GAAsB,EAAE,CAAC;IAEhD,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;QAC9B,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC1C,MAAM,OAAO,GAAG,oBAAoB,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEtE,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,iBAAiB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;QACpD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyAnalytics = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Matches wildcard string to a provided string. For eg Foo_* matches Foo_123.
|
|
6
3
|
* @param {string} wildcard Wildcard cookie name.
|
|
@@ -12,7 +9,7 @@ const wildTest = (wildcard, str) => {
|
|
|
12
9
|
const result = new RegExp(`^${regExp.replace(/\*/g, '.*').replace(/\?/g, '.')}$`, 'i');
|
|
13
10
|
return result.test(str); // remove last 'i' above to have case sensitive
|
|
14
11
|
};
|
|
15
|
-
|
|
12
|
+
export const emptyAnalytics = {
|
|
16
13
|
platform: 'Unknown',
|
|
17
14
|
category: 'Uncategorized',
|
|
18
15
|
name: '',
|
|
@@ -31,8 +28,7 @@ const STATIC_CATEGORIES = ['Functional', 'Marketing', 'Analytics'];
|
|
|
31
28
|
* @returns {boolean} Flag for match
|
|
32
29
|
*/
|
|
33
30
|
const findAnalyticsMatch = (key, dictionary) => {
|
|
34
|
-
|
|
35
|
-
let analytics = Object.assign({}, exports.emptyAnalytics);
|
|
31
|
+
let analytics = { ...emptyAnalytics };
|
|
36
32
|
Object.keys(dictionary).every((dictionaryKey) => {
|
|
37
33
|
if (key === dictionaryKey) {
|
|
38
34
|
analytics = dictionary[dictionaryKey][0];
|
|
@@ -46,10 +42,10 @@ const findAnalyticsMatch = (key, dictionary) => {
|
|
|
46
42
|
return true;
|
|
47
43
|
}
|
|
48
44
|
});
|
|
49
|
-
analytics.category = STATIC_CATEGORIES.includes(
|
|
45
|
+
analytics.category = STATIC_CATEGORIES.includes(analytics.category ?? '')
|
|
50
46
|
? analytics.category
|
|
51
47
|
: 'Uncategorized';
|
|
52
48
|
return analytics;
|
|
53
49
|
};
|
|
54
|
-
|
|
50
|
+
export default findAnalyticsMatch;
|
|
55
51
|
//# sourceMappingURL=findAnalyticsMatch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findAnalyticsMatch.js","sourceRoot":"","sources":["../../src/utils/findAnalyticsMatch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"findAnalyticsMatch.js","sourceRoot":"","sources":["../../src/utils/findAnalyticsMatch.ts"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAE,GAAW,EAAW,EAAE;IAC1D,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC,CAAC,gBAAgB;IAC9E,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,EACtD,GAAG,CACJ,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,+CAA+C;AAC1E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,eAAe;IACzB,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,EAAE;IACV,WAAW,EAAE,EAAE;IACf,SAAS,EAAE,EAAE;IACb,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,EAAE;CACb,CAAC;AACF,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;AACnE;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CACzB,GAAW,EACX,UAA0B,EACT,EAAE;IACnB,IAAI,SAAS,GAAoB,EAAE,GAAG,cAAc,EAAE,CAAC;IAEvD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE,EAAE;QAC9C,IAAI,GAAG,KAAK,aAAa,EAAE,CAAC;YAC1B,SAAS,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;YACzC,OAAO,KAAK,CAAC;QACf,CAAC;aAAM,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,aAAa,EAAE,GAAG,CAAC,EAAE,CAAC;YACvE,SAAS,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;YAEzC,OAAO,KAAK,CAAC;QACf,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,QAAQ,GAAG,iBAAiB,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC;QACvE,CAAC,CAAC,SAAS,CAAC,QAAQ;QACpB,CAAC,CAAC,eAAe,CAAC;IAEpB,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateErrorLogFile = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* This function generates error logs file for a sitemap analysis.
|
|
6
3
|
* @param JSONReport The JSON report for which error logs file has to be generated
|
|
7
4
|
* @returns string of error logs.
|
|
8
5
|
*/
|
|
9
|
-
const generateErrorLogFile = (JSONReport) => {
|
|
6
|
+
export const generateErrorLogFile = (JSONReport) => {
|
|
10
7
|
let erroredOutTextFileData = '';
|
|
11
8
|
JSONReport.forEach(({ erroredOutUrls }) => {
|
|
12
9
|
if (!erroredOutUrls) {
|
|
13
10
|
return;
|
|
14
11
|
}
|
|
15
12
|
erroredOutUrls.forEach((error) => {
|
|
16
|
-
var _a, _b;
|
|
17
13
|
const temporaryFormedData = `
|
|
18
14
|
URL: ${error.url}
|
|
19
|
-
Error Code: ${
|
|
15
|
+
Error Code: ${error.errorCode ?? 'N/A'}
|
|
20
16
|
Error Message: ${error.errorMessage}
|
|
21
17
|
ErrorStack:
|
|
22
|
-
${
|
|
18
|
+
${error.stackTrace ?? 'N/A'}
|
|
23
19
|
`;
|
|
24
20
|
erroredOutTextFileData += temporaryFormedData + '\n';
|
|
25
21
|
});
|
|
26
22
|
});
|
|
27
23
|
return erroredOutTextFileData;
|
|
28
24
|
};
|
|
29
|
-
|
|
30
|
-
exports.default = exports.generateErrorLogFile;
|
|
25
|
+
export default generateErrorLogFile;
|
|
31
26
|
//# sourceMappingURL=generateErrorLogs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateErrorLogs.js","sourceRoot":"","sources":["../../src/utils/generateErrorLogs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateErrorLogs.js","sourceRoot":"","sources":["../../src/utils/generateErrorLogs.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,UAA0B,EAAE,EAAE;IACjE,IAAI,sBAAsB,GAAG,EAAE,CAAC;IAEhC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE;QACxC,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;QAED,cAAc,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YAC/B,MAAM,mBAAmB,GAAG;eACnB,KAAK,CAAC,GAAG;sBACF,KAAK,CAAC,SAAS,IAAI,KAAK;yBACrB,KAAK,CAAC,YAAY;;UAEjC,KAAK,CAAC,UAAU,IAAI,KAAK;SAC1B,CAAC;YAEJ,sBAAsB,IAAI,mBAAmB,GAAG,IAAI,CAAC;QACvD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,sBAAsB,CAAC;AAChC,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|