@google-psat/common 0.9.0-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/.eslintrc.json +6 -0
- package/README.md +4 -0
- package/dist/cookies.types.js +22 -0
- package/dist/cookies.types.js.map +1 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieBlockedReason.js +48 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieBlockedReason.js.map +1 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieExclusionReason.js +138 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieExclusionReason.js.map +1 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieExclusionReasonHTMLContent.js +106 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieExclusionReasonHTMLContent.js.map +1 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieWarningReason.js +177 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieWarningReason.js.map +1 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieWarningReasonHTMLContent.js +185 -0
- package/dist/data/cookieExclusionAndWarningReasons/cookieWarningReasonHTMLContent.js.map +1 -0
- package/dist/data/cookieExclusionAndWarningReasons/index.js +30 -0
- package/dist/data/cookieExclusionAndWarningReasons/index.js.map +1 -0
- package/dist/data/cookieExemptionReason/exemptionReasons.js +31 -0
- package/dist/data/cookieExemptionReason/exemptionReasons.js.map +1 -0
- package/dist/data/cookieExemptionReason/index.js +24 -0
- package/dist/data/cookieExemptionReason/index.js.map +1 -0
- package/dist/data/index.js +37 -0
- package/dist/data/index.js.map +1 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/libraryDetection.types.js +3 -0
- package/dist/libraryDetection.types.js.map +1 -0
- package/dist/utils/addUTMParams.js +38 -0
- package/dist/utils/addUTMParams.js.map +1 -0
- package/dist/utils/calculateEffectiveExpiryDate.js +44 -0
- package/dist/utils/calculateEffectiveExpiryDate.js.map +1 -0
- package/dist/utils/contextSelector/createContext.js +26 -0
- package/dist/utils/contextSelector/createContext.js.map +1 -0
- package/dist/utils/contextSelector/index.js +26 -0
- package/dist/utils/contextSelector/index.js.map +1 -0
- package/dist/utils/contextSelector/shallowEqual.js +41 -0
- package/dist/utils/contextSelector/shallowEqual.js.map +1 -0
- package/dist/utils/contextSelector/useContextSelector.js +55 -0
- package/dist/utils/contextSelector/useContextSelector.js.map +1 -0
- package/dist/utils/delay.js +27 -0
- package/dist/utils/delay.js.map +1 -0
- package/dist/utils/deriveBlockingStatus.js +98 -0
- package/dist/utils/deriveBlockingStatus.js.map +1 -0
- package/dist/utils/extractUrl.js +32 -0
- package/dist/utils/extractUrl.js.map +1 -0
- package/dist/utils/fetchLocalData.js +44 -0
- package/dist/utils/fetchLocalData.js.map +1 -0
- package/dist/utils/filterCookiesByFrame.js +20 -0
- package/dist/utils/filterCookiesByFrame.js.map +1 -0
- package/dist/utils/filterFramesWithCookies.js +21 -0
- package/dist/utils/filterFramesWithCookies.js.map +1 -0
- package/dist/utils/findAnalyticsMatch.js +51 -0
- package/dist/utils/findAnalyticsMatch.js.map +1 -0
- package/dist/utils/generateReports/generateAllCookiesCSV.js +86 -0
- package/dist/utils/generateReports/generateAllCookiesCSV.js.map +1 -0
- package/dist/utils/generateReports/generateCookiesWithIssuesCSV.js +86 -0
- package/dist/utils/generateReports/generateCookiesWithIssuesCSV.js.map +1 -0
- package/dist/utils/generateReports/generateSummaryDataCSV.js +99 -0
- package/dist/utils/generateReports/generateSummaryDataCSV.js.map +1 -0
- package/dist/utils/generateReports/generateTechnologyCSV.js +56 -0
- package/dist/utils/generateReports/generateTechnologyCSV.js.map +1 -0
- package/dist/utils/generateReports/index.js +30 -0
- package/dist/utils/generateReports/index.js.map +1 -0
- package/dist/utils/getCookieKey.js +16 -0
- package/dist/utils/getCookieKey.js.map +1 -0
- package/dist/utils/getDomainFromUrl.js +35 -0
- package/dist/utils/getDomainFromUrl.js.map +1 -0
- package/dist/utils/getLegendDescription.js +30 -0
- package/dist/utils/getLegendDescription.js.map +1 -0
- package/dist/utils/getValueByKey.js +28 -0
- package/dist/utils/getValueByKey.js.map +1 -0
- package/dist/utils/isFirstParty.js +39 -0
- package/dist/utils/isFirstParty.js.map +1 -0
- package/dist/utils/mergeDeep.js +38 -0
- package/dist/utils/mergeDeep.js.map +1 -0
- package/dist/utils/noop.js +21 -0
- package/dist/utils/noop.js.map +1 -0
- package/dist/utils/parseRequestWillBeSentExtraInfo.js +72 -0
- package/dist/utils/parseRequestWillBeSentExtraInfo.js.map +1 -0
- package/dist/utils/parseResponseReceivedExtraInfo.js +120 -0
- package/dist/utils/parseResponseReceivedExtraInfo.js.map +1 -0
- package/dist/utils/parseUrl.js +34 -0
- package/dist/utils/parseUrl.js.map +1 -0
- package/dist/utils/resolveWithTimeout.js +38 -0
- package/dist/utils/resolveWithTimeout.js.map +1 -0
- package/dist/utils/sanitizeCsvRecord.js +39 -0
- package/dist/utils/sanitizeCsvRecord.js.map +1 -0
- package/dist/worker/devToolWorker.js +28 -0
- package/dist/worker/devToolWorker.js.map +1 -0
- package/dist/worker/enums.js +23 -0
- package/dist/worker/enums.js.map +1 -0
- package/dist/worker/executeTaskInDevToolWorker.js +43 -0
- package/dist/worker/executeTaskInDevToolWorker.js.map +1 -0
- package/dist-types/cookies.types.d.ts +229 -0
- package/dist-types/data/cookieExclusionAndWarningReasons/cookieBlockedReason.d.ts +27 -0
- package/dist-types/data/cookieExclusionAndWarningReasons/cookieExclusionReason.d.ts +12 -0
- package/dist-types/data/cookieExclusionAndWarningReasons/cookieExclusionReasonHTMLContent.d.ts +16 -0
- package/dist-types/data/cookieExclusionAndWarningReasons/cookieWarningReason.d.ts +15 -0
- package/dist-types/data/cookieExclusionAndWarningReasons/cookieWarningReasonHTMLContent.d.ts +29 -0
- package/dist-types/data/cookieExclusionAndWarningReasons/index.d.ts +54 -0
- package/dist-types/data/cookieExemptionReason/exemptionReasons.d.ts +11 -0
- package/dist-types/data/cookieExemptionReason/index.d.ts +1 -0
- package/dist-types/data/index.d.ts +13 -0
- package/dist-types/index.d.ts +29 -0
- package/dist-types/libraryDetection.types.d.ts +51 -0
- package/dist-types/utils/addUTMParams.d.ts +3 -0
- package/dist-types/utils/calculateEffectiveExpiryDate.d.ts +8 -0
- package/dist-types/utils/contextSelector/createContext.d.ts +2 -0
- package/dist-types/utils/contextSelector/index.d.ts +2 -0
- package/dist-types/utils/contextSelector/shallowEqual.d.ts +1 -0
- package/dist-types/utils/contextSelector/useContextSelector.d.ts +23 -0
- package/dist-types/utils/delay.d.ts +7 -0
- package/dist-types/utils/deriveBlockingStatus.d.ts +9 -0
- package/dist-types/utils/extractUrl.d.ts +6 -0
- package/dist-types/utils/fetchLocalData.d.ts +2 -0
- package/dist-types/utils/filterCookiesByFrame.d.ts +11 -0
- package/dist-types/utils/filterFramesWithCookies.d.ts +6 -0
- package/dist-types/utils/findAnalyticsMatch.d.ts +23 -0
- package/dist-types/utils/generateReports/generateAllCookiesCSV.d.ts +7 -0
- package/dist-types/utils/generateReports/generateCookiesWithIssuesCSV.d.ts +7 -0
- package/dist-types/utils/generateReports/generateSummaryDataCSV.d.ts +6 -0
- package/dist-types/utils/generateReports/generateTechnologyCSV.d.ts +3 -0
- package/dist-types/utils/generateReports/index.d.ts +4 -0
- package/dist-types/utils/getCookieKey.d.ts +6 -0
- package/dist-types/utils/getDomainFromUrl.d.ts +6 -0
- package/dist-types/utils/getLegendDescription.d.ts +2 -0
- package/dist-types/utils/getValueByKey.d.ts +2 -0
- package/dist-types/utils/isFirstParty.d.ts +8 -0
- package/dist-types/utils/mergeDeep.d.ts +2 -0
- package/dist-types/utils/noop.d.ts +2 -0
- package/dist-types/utils/parseRequestWillBeSentExtraInfo.d.ts +19 -0
- package/dist-types/utils/parseResponseReceivedExtraInfo.d.ts +16 -0
- package/dist-types/utils/parseUrl.d.ts +7 -0
- package/dist-types/utils/resolveWithTimeout.d.ts +8 -0
- package/dist-types/utils/sanitizeCsvRecord.d.ts +8 -0
- package/dist-types/worker/devToolWorker.d.ts +6 -0
- package/dist-types/worker/enums.d.ts +3 -0
- package/dist-types/worker/executeTaskInDevToolWorker.d.ts +11 -0
- package/package.json +45 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseResponseReceivedExtraInfo.js","sourceRoot":"","sources":["../../src/utils/parseResponseReceivedExtraInfo.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseUrl = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright 2023 Google LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Parses a URL string and returns a new URL object.
|
|
21
|
+
* If the URL is invalid, it returns null.
|
|
22
|
+
* @param {string} url - The URL string to parse.
|
|
23
|
+
* @returns {URL | null} - The parsed URL object or null if the URL is invalid.
|
|
24
|
+
*/
|
|
25
|
+
const parseUrl = (url) => {
|
|
26
|
+
try {
|
|
27
|
+
return new URL(url);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.parseUrl = parseUrl;
|
|
34
|
+
//# sourceMappingURL=parseUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseUrl.js","sourceRoot":"","sources":["../../src/utils/parseUrl.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH;;;;;GAKG;AACI,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAc,EAAE;IAClD,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
/**
|
|
19
|
+
* Time a promise.
|
|
20
|
+
* @param {Promise<T>} promise - A promise that need to be timed.
|
|
21
|
+
* @param resolveInto
|
|
22
|
+
* @param {number} timeout - Time for the timeout in milliseconds.
|
|
23
|
+
* @returns {Promose<T|string>} - The parsed URL object or null if the URL is invalid.
|
|
24
|
+
*/
|
|
25
|
+
function resolveWithTimeout(promise, resolveInto, timeout) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
// Create a timeout promise that resolves after the specified time
|
|
28
|
+
const timeoutPromise = new Promise((resolveTimeout) => {
|
|
29
|
+
setTimeout(() => {
|
|
30
|
+
resolveTimeout(resolveInto);
|
|
31
|
+
}, timeout);
|
|
32
|
+
});
|
|
33
|
+
// Use Promise.race to resolve with the first promise that completes
|
|
34
|
+
Promise.race([promise, timeoutPromise]).then(resolve).catch(reject);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
exports.default = resolveWithTimeout;
|
|
38
|
+
//# sourceMappingURL=resolveWithTimeout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveWithTimeout.js","sourceRoot":"","sources":["../../src/utils/resolveWithTimeout.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH;;;;;;GAMG;AACH,SAAwB,kBAAkB,CACxC,OAAmB,EACnB,WAAc,EACd,OAAe;IAEf,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,kEAAkE;QAClE,MAAM,cAAc,GAAG,IAAI,OAAO,CAAI,CAAC,cAAc,EAAE,EAAE;YACvD,UAAU,CAAC,GAAG,EAAE;gBACd,cAAc,CAAC,WAAW,CAAC,CAAC;YAC9B,CAAC,EAAE,OAAO,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,oEAAoE;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,qCAgBC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2023 Google LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Converts a string value to a valid CSV record.
|
|
20
|
+
* @see https://datatracker.ietf.org/doc/html/rfc4180
|
|
21
|
+
* @param {string} record - a string value that need to be converted into a CSV record.
|
|
22
|
+
* @returns {URL | null} - The parsed URL object or null if the URL is invalid.
|
|
23
|
+
*/
|
|
24
|
+
const sanitizeCsvRecord = (record) => {
|
|
25
|
+
let recordCopy;
|
|
26
|
+
if (record instanceof Date) {
|
|
27
|
+
recordCopy = record.toISOString();
|
|
28
|
+
}
|
|
29
|
+
else if (typeof record === 'string') {
|
|
30
|
+
recordCopy = record;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return '';
|
|
34
|
+
}
|
|
35
|
+
recordCopy = recordCopy.replace(/"/g, '""');
|
|
36
|
+
return recordCopy.includes(',') ? '"' + recordCopy + '"' : recordCopy;
|
|
37
|
+
};
|
|
38
|
+
exports.default = sanitizeCsvRecord;
|
|
39
|
+
//# sourceMappingURL=sanitizeCsvRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizeCsvRecord.js","sourceRoot":"","sources":["../../src/utils/sanitizeCsvRecord.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;GAcG;AACH;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,MAAe,EAAU,EAAE;IACpD,IAAI,UAAyB,CAAC;IAE9B,IAAI,MAAM,YAAY,IAAI,EAAE,CAAC;QAC3B,UAAU,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACpC,CAAC;SAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACtC,UAAU,GAAG,MAAM,CAAC;IACtB,CAAC;SAAM,CAAC;QACN,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC;AACxE,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2023 Google LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
let devToolWorker = null;
|
|
19
|
+
/**
|
|
20
|
+
* Get the devTool worker instance. If it doesn't exist, it creates a new one.
|
|
21
|
+
* @returns {Worker} The DevTool worker instance.
|
|
22
|
+
*/
|
|
23
|
+
const getDevToolWorker = () => {
|
|
24
|
+
devToolWorker = devToolWorker || new Worker('worker.js');
|
|
25
|
+
return devToolWorker;
|
|
26
|
+
};
|
|
27
|
+
exports.default = getDevToolWorker;
|
|
28
|
+
//# sourceMappingURL=devToolWorker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devToolWorker.js","sourceRoot":"","sources":["../../src/worker/devToolWorker.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAI,aAAa,GAAkB,IAAI,CAAC;AAExC;;;GAGG;AACH,MAAM,gBAAgB,GAAG,GAAW,EAAE;IACpC,aAAa,GAAG,aAAa,IAAI,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;IAEzD,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LIBRARY_DETECTION_WORKER_TASK = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright 2023 Google LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
var LIBRARY_DETECTION_WORKER_TASK;
|
|
20
|
+
(function (LIBRARY_DETECTION_WORKER_TASK) {
|
|
21
|
+
LIBRARY_DETECTION_WORKER_TASK["DETECT_SIGNATURE_MATCHING"] = "DetectSignatureMatching";
|
|
22
|
+
})(LIBRARY_DETECTION_WORKER_TASK || (exports.LIBRARY_DETECTION_WORKER_TASK = LIBRARY_DETECTION_WORKER_TASK = {}));
|
|
23
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/worker/enums.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,6BAEX;AAFD,WAAY,6BAA6B;IACvC,sFAAqD,CAAA;AACvD,CAAC,EAFW,6BAA6B,6CAA7B,6BAA6B,QAExC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
/*
|
|
7
|
+
* Copyright 2023 Google LLC
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Internal dependencies.
|
|
23
|
+
*/
|
|
24
|
+
const devToolWorker_1 = __importDefault(require("./devToolWorker"));
|
|
25
|
+
/**
|
|
26
|
+
* Execute a task using a web worker.
|
|
27
|
+
* This is a highlevel abstraction over webworker.
|
|
28
|
+
* @param {string} task - The predefined task to be executed by the worker.
|
|
29
|
+
* @param {unknown} payload - The payload or data required for the task.
|
|
30
|
+
* @param {Function} onMessage callback.
|
|
31
|
+
*/
|
|
32
|
+
const executeTaskInDevToolWorker = (task, payload, onMessage) => {
|
|
33
|
+
const worker = (0, devToolWorker_1.default)();
|
|
34
|
+
worker.postMessage({
|
|
35
|
+
task,
|
|
36
|
+
payload,
|
|
37
|
+
});
|
|
38
|
+
worker.onmessage = (resultEvent) => {
|
|
39
|
+
onMessage(resultEvent.data);
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
exports.default = executeTaskInDevToolWorker;
|
|
43
|
+
//# sourceMappingURL=executeTaskInDevToolWorker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executeTaskInDevToolWorker.js","sourceRoot":"","sources":["../../src/worker/executeTaskInDevToolWorker.ts"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH;;GAEG;AACH,oEAA+C;AAI/C;;;;;;GAMG;AACH,MAAM,0BAA0B,GAAG,CACjC,IAAmC,EACnC,OAAgB,EAChB,SAAgD,EAChD,EAAE;IACF,MAAM,MAAM,GAAG,IAAA,uBAAgB,GAAE,CAAC;IAElC,MAAM,CAAC,WAAW,CAAC;QACjB,IAAI;QACJ,OAAO;KACR,CAAC,CAAC;IAEH,MAAM,CAAC,SAAS,GAAG,CAAC,WAAyB,EAAE,EAAE;QAC/C,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies.
|
|
3
|
+
*/
|
|
4
|
+
import { type Cookie as ParsedCookie } from 'simple-cookie';
|
|
5
|
+
import type { Protocol } from 'devtools-protocol';
|
|
6
|
+
import { LibraryData } from './libraryDetection.types';
|
|
7
|
+
export type CookiesCount = {
|
|
8
|
+
total: number;
|
|
9
|
+
firstParty: {
|
|
10
|
+
total: number;
|
|
11
|
+
functional: number;
|
|
12
|
+
marketing: number;
|
|
13
|
+
analytics: number;
|
|
14
|
+
uncategorized: number;
|
|
15
|
+
};
|
|
16
|
+
thirdParty: {
|
|
17
|
+
total: number;
|
|
18
|
+
functional: number;
|
|
19
|
+
marketing: number;
|
|
20
|
+
analytics: number;
|
|
21
|
+
uncategorized: number;
|
|
22
|
+
};
|
|
23
|
+
blockedCookies: {
|
|
24
|
+
total: number;
|
|
25
|
+
[key: string]: number;
|
|
26
|
+
};
|
|
27
|
+
exemptedCookies: {
|
|
28
|
+
total: number;
|
|
29
|
+
[key: string]: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type CookieAnalytics = {
|
|
33
|
+
platform?: string;
|
|
34
|
+
category?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
domain?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
retention?: string;
|
|
39
|
+
dataController?: string;
|
|
40
|
+
gdprUrl?: string;
|
|
41
|
+
wildcard?: string;
|
|
42
|
+
};
|
|
43
|
+
export type CookieDatabase = {
|
|
44
|
+
[name: string]: Array<CookieAnalytics>;
|
|
45
|
+
};
|
|
46
|
+
export type BlockedReason = Protocol.Network.SetCookieBlockedReason | Protocol.Network.CookieBlockedReason;
|
|
47
|
+
export declare enum RESPONSE_EVENT {
|
|
48
|
+
CHROME_WEBREQUEST_ON_RESPONSE_STARTED = "CHROME_WEBREQUEST_ON_RESPONSE_STARTED",
|
|
49
|
+
CDP_RESPONSE_RECEIVED = "CDP_RESPONSE_RECEIVED",
|
|
50
|
+
CDP_RESPONSE_RECEIVED_EXTRA_INFO = "CDP_RESPONSE_RECEIVED_EXTRA_INFO"
|
|
51
|
+
}
|
|
52
|
+
export declare enum REQUEST_EVENT {
|
|
53
|
+
CHROME_WEBREQUEST_ON_BEFORE_SEND_HEADERS = "CHROME_WEBREQUEST_ON_BEFORE_SEND_HEADERS",
|
|
54
|
+
CDP_REQUEST_WILL_BE_SENT_EXTRA_INFO = "CDP_REQUEST_WILL_BE_SENT_EXTRA_INFO"
|
|
55
|
+
}
|
|
56
|
+
export declare enum BLOCK_STATUS {
|
|
57
|
+
UNKNOWN = "UNKNOWN",
|
|
58
|
+
BLOCKED_IN_ALL_EVENTS = "BLOCKED_IN_ALL_EVENTS",
|
|
59
|
+
BLOCKED_IN_SOME_EVENTS = "BLOCKED_IN_SOME_EVENTS",
|
|
60
|
+
NOT_BLOCKED = "NOT_BLOCKED"
|
|
61
|
+
}
|
|
62
|
+
export type requestEvent = {
|
|
63
|
+
type: REQUEST_EVENT;
|
|
64
|
+
requestId: string;
|
|
65
|
+
url: string;
|
|
66
|
+
blocked: boolean;
|
|
67
|
+
timeStamp: number;
|
|
68
|
+
};
|
|
69
|
+
export type responseEvent = {
|
|
70
|
+
type: RESPONSE_EVENT;
|
|
71
|
+
requestId: string;
|
|
72
|
+
url: string;
|
|
73
|
+
blocked: boolean;
|
|
74
|
+
timeStamp: number;
|
|
75
|
+
};
|
|
76
|
+
export type CookieData = {
|
|
77
|
+
parsedCookie: ParsedCookie & {
|
|
78
|
+
partitionKey?: string;
|
|
79
|
+
priority?: 'Low' | 'Medium' | 'High';
|
|
80
|
+
size?: number;
|
|
81
|
+
};
|
|
82
|
+
networkEvents?: {
|
|
83
|
+
requestEvents: requestEvent[];
|
|
84
|
+
responseEvents: responseEvent[];
|
|
85
|
+
};
|
|
86
|
+
analytics?: CookieAnalytics | null;
|
|
87
|
+
url?: string;
|
|
88
|
+
headerType?: 'response' | 'request' | 'javascript';
|
|
89
|
+
isFirstParty?: boolean | null;
|
|
90
|
+
frameIdList?: Array<number | string>;
|
|
91
|
+
blockedReasons?: BlockedReason[];
|
|
92
|
+
warningReasons?: Protocol.Audits.CookieWarningReason[];
|
|
93
|
+
isBlocked?: boolean | null;
|
|
94
|
+
blockingStatus?: {
|
|
95
|
+
inboundBlock: BLOCK_STATUS;
|
|
96
|
+
outboundBlock: BLOCK_STATUS;
|
|
97
|
+
};
|
|
98
|
+
exemptionReason?: Protocol.Network.CookieExemptionReason;
|
|
99
|
+
};
|
|
100
|
+
export type CookieTableData = CookieData & {
|
|
101
|
+
frameUrls?: string | string[];
|
|
102
|
+
isDomainInAllowList?: boolean;
|
|
103
|
+
};
|
|
104
|
+
export type TechnologyData = {
|
|
105
|
+
slug: string;
|
|
106
|
+
name: string;
|
|
107
|
+
description: string;
|
|
108
|
+
confidence: number;
|
|
109
|
+
version: string | null;
|
|
110
|
+
icon: string;
|
|
111
|
+
website: string;
|
|
112
|
+
cpe: string;
|
|
113
|
+
categories: {
|
|
114
|
+
id: number;
|
|
115
|
+
name: string;
|
|
116
|
+
slug: string;
|
|
117
|
+
}[];
|
|
118
|
+
rootPath?: boolean;
|
|
119
|
+
pageUrl?: string;
|
|
120
|
+
};
|
|
121
|
+
export interface TabCookies {
|
|
122
|
+
[key: string]: CookieTableData;
|
|
123
|
+
}
|
|
124
|
+
export interface TabFrames {
|
|
125
|
+
[key: string]: {
|
|
126
|
+
frameIds: string[];
|
|
127
|
+
frameType?: 'outermost_frame' | 'fenced_frame' | 'sub_frame';
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export interface Legend {
|
|
131
|
+
label: string;
|
|
132
|
+
descriptionKey?: string;
|
|
133
|
+
count: number;
|
|
134
|
+
color: string;
|
|
135
|
+
countClassName: string;
|
|
136
|
+
onClick?: (title: string) => void;
|
|
137
|
+
}
|
|
138
|
+
export interface CookieStatsComponents {
|
|
139
|
+
legend: Legend[];
|
|
140
|
+
blockedCookiesLegend: Legend[];
|
|
141
|
+
exemptedCookiesLegend: Legend[];
|
|
142
|
+
firstParty: {
|
|
143
|
+
count: number;
|
|
144
|
+
color: string;
|
|
145
|
+
}[];
|
|
146
|
+
thirdParty: {
|
|
147
|
+
count: number;
|
|
148
|
+
color: string;
|
|
149
|
+
}[];
|
|
150
|
+
blocked: {
|
|
151
|
+
count: number;
|
|
152
|
+
color: string;
|
|
153
|
+
}[];
|
|
154
|
+
exempted: {
|
|
155
|
+
count: number;
|
|
156
|
+
color: string;
|
|
157
|
+
}[];
|
|
158
|
+
}
|
|
159
|
+
export interface FramesWithCookies {
|
|
160
|
+
[key: string]: {
|
|
161
|
+
frameIds: number[] | string[];
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
export type CookieJsonDataType = {
|
|
165
|
+
parsedCookie: {
|
|
166
|
+
name: string;
|
|
167
|
+
value: string;
|
|
168
|
+
domain: string;
|
|
169
|
+
partitionKey?: string;
|
|
170
|
+
path: string;
|
|
171
|
+
expires: string;
|
|
172
|
+
httpOnly: boolean;
|
|
173
|
+
secure: boolean;
|
|
174
|
+
sameSite: string;
|
|
175
|
+
};
|
|
176
|
+
analytics: {
|
|
177
|
+
platform: string;
|
|
178
|
+
category: string;
|
|
179
|
+
description: string;
|
|
180
|
+
GDPR?: string;
|
|
181
|
+
};
|
|
182
|
+
isFirstParty: boolean;
|
|
183
|
+
url: string;
|
|
184
|
+
pageUrl?: string;
|
|
185
|
+
requestUrls?: {
|
|
186
|
+
[id: string]: string;
|
|
187
|
+
};
|
|
188
|
+
frameUrls?: {
|
|
189
|
+
[id: string]: string;
|
|
190
|
+
};
|
|
191
|
+
isBlocked: boolean;
|
|
192
|
+
blockingStatus?: {
|
|
193
|
+
inboundBlock: BLOCK_STATUS;
|
|
194
|
+
outboundBlock: BLOCK_STATUS;
|
|
195
|
+
};
|
|
196
|
+
blockedReasons?: BlockedReason[];
|
|
197
|
+
};
|
|
198
|
+
export type CookieFrameStorageType = {
|
|
199
|
+
[frame: string]: {
|
|
200
|
+
[cookieKey: string]: CookieJsonDataType;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
export type CompleteJson = {
|
|
204
|
+
pageUrl: string;
|
|
205
|
+
cookieData: {
|
|
206
|
+
[frame: string]: {
|
|
207
|
+
frameCookies: {
|
|
208
|
+
[cookieKey: string]: CookieJsonDataType;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
libraryMatches: {
|
|
213
|
+
[key: string]: LibraryData;
|
|
214
|
+
};
|
|
215
|
+
technologyData: TechnologyData[];
|
|
216
|
+
};
|
|
217
|
+
export interface DataMapping {
|
|
218
|
+
title: string;
|
|
219
|
+
count: number;
|
|
220
|
+
data: {
|
|
221
|
+
count: number;
|
|
222
|
+
color: string;
|
|
223
|
+
}[];
|
|
224
|
+
onClick?: (() => void) | null;
|
|
225
|
+
}
|
|
226
|
+
export type FrameStateCreator = {
|
|
227
|
+
dataMapping: DataMapping[];
|
|
228
|
+
legend: Legend[];
|
|
229
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const CookieBlockedReason: {
|
|
2
|
+
SecureOnly: string[];
|
|
3
|
+
NotOnPath: string[];
|
|
4
|
+
DomainMismatch: string[];
|
|
5
|
+
SameSiteStrict: string[];
|
|
6
|
+
SameSiteUnspecifiedTreatedAsLax: string[];
|
|
7
|
+
SameSiteNoneInsecure: string[];
|
|
8
|
+
UserPreferences: string[];
|
|
9
|
+
ThirdPartyPhaseout: string[];
|
|
10
|
+
ThirdPartyBlockedInFirstPartySet: string[];
|
|
11
|
+
UnknownError: string[];
|
|
12
|
+
SchemefulSameSiteStrict: string[];
|
|
13
|
+
SchemefulSameSiteLax: string[];
|
|
14
|
+
SchemefulSameSiteUnspecifiedTreatedAsLax: string[];
|
|
15
|
+
SamePartyFromCrossPartyContext: string[];
|
|
16
|
+
NameValuePairExceedsMaxSize: string[];
|
|
17
|
+
InvalidDomain: string[];
|
|
18
|
+
SameSiteLax: string;
|
|
19
|
+
SyntaxError: string;
|
|
20
|
+
SchemeNotSupported: string;
|
|
21
|
+
OverwriteSecure: string;
|
|
22
|
+
InvalidPrefix: string;
|
|
23
|
+
SamePartyConflictsWithOtherAttributes: string;
|
|
24
|
+
DisallowedCharacter: string;
|
|
25
|
+
NoCookieContent: string;
|
|
26
|
+
};
|
|
27
|
+
export default CookieBlockedReason;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const CookieExclusionReason: {
|
|
2
|
+
ExcludeSameSiteUnspecifiedTreatedAsLax: (warningReasons?: string[], operation?: string, cookieUrl?: string) => string;
|
|
3
|
+
ExcludeSameSiteNoneInsecure: (operation?: string) => string;
|
|
4
|
+
ExcludeSameSiteLax: (warningReasons?: string[], operation?: string, cookieUrl?: string) => string;
|
|
5
|
+
ExcludeSameSiteStrict: (warningReasons?: string[], operation?: string, cookieUrl?: string) => string;
|
|
6
|
+
ExcludeInvalidSameParty: () => string;
|
|
7
|
+
ExcludeSamePartyCrossPartyContext: () => string;
|
|
8
|
+
ExcludeDomainNonASCII: () => string;
|
|
9
|
+
ExcludeThirdPartyCookieBlockedInFirstPartySet: () => string;
|
|
10
|
+
ExcludeThirdPartyPhaseout: (operation?: string) => string;
|
|
11
|
+
};
|
|
12
|
+
export default CookieExclusionReason;
|
package/dist-types/data/cookieExclusionAndWarningReasons/cookieExclusionReasonHTMLContent.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const sameSiteExcludeNavigationContextDowngradeSecure: string[];
|
|
2
|
+
export declare const sameSiteExcludeNavigationContextDowngradeInsecure: string[];
|
|
3
|
+
export declare const sameSiteExcludeContextDowngradeSetCookieSecure: string[];
|
|
4
|
+
export declare const sameSiteExcludeContextDowngradeSetCookieInsecure: string[];
|
|
5
|
+
export declare const sameSiteExcludeContextDowngradeReadCookieSecure: string[];
|
|
6
|
+
export declare const sameSiteExcludeContextDowngradeReadCookieInsecure: string[];
|
|
7
|
+
export declare const ExcludeSameSiteUnspecifiedTreatedAsLax: string[];
|
|
8
|
+
export declare const cookieCrossSiteRedirectDowngrade: string[];
|
|
9
|
+
export declare const ExcludeSameSiteNoneInsecureSetCookie: string[];
|
|
10
|
+
export declare const ExcludeSameSiteNoneInsecureReadCookie: string[];
|
|
11
|
+
export declare const ExcludeInvalidSameParty: string[];
|
|
12
|
+
export declare const ExcludeSamePartyCrossPartyContext: string[];
|
|
13
|
+
export declare const ExcludeDomainNonASCII: string[];
|
|
14
|
+
export declare const ExcludeThirdPartyCookieBlockedInFirstPartySet: string[];
|
|
15
|
+
export declare const ExcludeThirdPartyPhaseoutReadCookie: string[];
|
|
16
|
+
export declare const ExcludeThirdPartyPhaseoutSetCookie: string[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const CookieWarningReason: {
|
|
2
|
+
WarnSameSiteUnspecifiedCrossSiteContext: (operation: string) => string;
|
|
3
|
+
WarnSameSiteNoneInsecure: (operation: string) => string;
|
|
4
|
+
WarnSameSiteUnspecifiedLaxAllowUnsafe: (operation: string) => string;
|
|
5
|
+
WarnSameSiteStrictLaxDowngradeStrict: (cookieURL: string) => string;
|
|
6
|
+
WarnSameSiteStrictCrossDowngradeStrict: (operation: string, cookieURL: string) => string;
|
|
7
|
+
WarnSameSiteStrictCrossDowngradeLax: (operation: string, cookieURL: string) => string;
|
|
8
|
+
WarnSameSiteLaxCrossDowngradeStrict: (operation: string, cookieURL: string) => string;
|
|
9
|
+
WarnSameSiteLaxCrossDowngradeLax: (operation: string, cookieURL: string) => string;
|
|
10
|
+
WarnAttributeValueExceedsMaxSize: () => string;
|
|
11
|
+
WarnDomainNonASCII: () => string;
|
|
12
|
+
WarnThirdPartyPhaseout: (operation: string) => string;
|
|
13
|
+
WarnCrossSiteRedirectDowngradeChangesInclusion: () => string;
|
|
14
|
+
};
|
|
15
|
+
export default CookieWarningReason;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const WarnSameSiteUnspecifiedCrossSiteContextReadCookie: string[];
|
|
2
|
+
export declare const WarnSameSiteUnspecifiedCrossSiteContextSetCookie: string[];
|
|
3
|
+
export declare const WarnSameSiteNoneInsecureReadCookie: string[];
|
|
4
|
+
export declare const WarnSameSiteNoneInsecureSetCookie: string[];
|
|
5
|
+
export declare const WarnSameSiteUnspecifiedLaxAllowUnsafeReadCookie: string[];
|
|
6
|
+
export declare const WarnSameSiteUnspecifiedLaxAllowUnsafeSetCookie: string[];
|
|
7
|
+
export declare const WarnSameSiteStrictLaxDowngradeStrictSecure: string[];
|
|
8
|
+
export declare const WarnSameSiteStrictLaxDowngradeStrictInsecure: string[];
|
|
9
|
+
export declare const WarnSameSiteStrictCrossDowngradeStrictReadCookieSecure: string[];
|
|
10
|
+
export declare const WarnSameSiteStrictCrossDowngradeStrictReadCookieInsecure: string[];
|
|
11
|
+
export declare const WarnSameSiteStrictCrossDowngradeStrictSetCookieSecure: string[];
|
|
12
|
+
export declare const WarnSameSiteStrictCrossDowngradeStrictSetCookieInsecure: string[];
|
|
13
|
+
export declare const WarnSameSiteStrictCrossDowngradeLaxReadCookieSecure: string[];
|
|
14
|
+
export declare const WarnSameSiteStrictCrossDowngradeLaxReadCookieInsecure: string[];
|
|
15
|
+
export declare const WarnSameSiteStrictCrossDowngradeLaxSetCookieSecure: string[];
|
|
16
|
+
export declare const WarnSameSiteStrictCrossDowngradeLaxSetCookieInsecure: string[];
|
|
17
|
+
export declare const WarnSameSiteLaxCrossDowngradeStrictReadCookieSecure: string[];
|
|
18
|
+
export declare const WarnSameSiteLaxCrossDowngradeStrictReadCookieInsecure: string[];
|
|
19
|
+
export declare const WarnSameSiteLaxCrossDowngradeStrictSetCookieSecure: string[];
|
|
20
|
+
export declare const WarnSameSiteLaxCrossDowngradeStrictSetCookieInsecure: string[];
|
|
21
|
+
export declare const WarnSameSiteLaxCrossDowngradeLaxReadCookieSecure: string[];
|
|
22
|
+
export declare const WarnSameSiteLaxCrossDowngradeLaxReadCookieInsecure: string[];
|
|
23
|
+
export declare const WarnSameSiteLaxCrossDowngradeLaxSetCookieSecure: string[];
|
|
24
|
+
export declare const WarnSameSiteLaxCrossDowngradeLaxSetCookieInsecure: string[];
|
|
25
|
+
export declare const WarnAttributeValueExceedsMaxSize: string[];
|
|
26
|
+
export declare const WarnDomainNonASCII: string[];
|
|
27
|
+
export declare const WarnThirdPartyPhaseoutReadCookie: string[];
|
|
28
|
+
export declare const WarnThirdPartyPhaseoutSetCookie: string[];
|
|
29
|
+
export declare const WarnCrossSiteRedirectDowngradeChangesInclusion: string[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare const cookieIssueDetails: {
|
|
2
|
+
CookieWarningReason: {
|
|
3
|
+
WarnSameSiteUnspecifiedCrossSiteContext: (operation: string) => string;
|
|
4
|
+
WarnSameSiteNoneInsecure: (operation: string) => string;
|
|
5
|
+
WarnSameSiteUnspecifiedLaxAllowUnsafe: (operation: string) => string;
|
|
6
|
+
WarnSameSiteStrictLaxDowngradeStrict: (cookieURL: string) => string;
|
|
7
|
+
WarnSameSiteStrictCrossDowngradeStrict: (operation: string, cookieURL: string) => string;
|
|
8
|
+
WarnSameSiteStrictCrossDowngradeLax: (operation: string, cookieURL: string) => string;
|
|
9
|
+
WarnSameSiteLaxCrossDowngradeStrict: (operation: string, cookieURL: string) => string;
|
|
10
|
+
WarnSameSiteLaxCrossDowngradeLax: (operation: string, cookieURL: string) => string;
|
|
11
|
+
WarnAttributeValueExceedsMaxSize: () => string;
|
|
12
|
+
WarnDomainNonASCII: () => string;
|
|
13
|
+
WarnThirdPartyPhaseout: (operation: string) => string;
|
|
14
|
+
WarnCrossSiteRedirectDowngradeChangesInclusion: () => string;
|
|
15
|
+
};
|
|
16
|
+
CookieExclusionReason: {
|
|
17
|
+
ExcludeSameSiteUnspecifiedTreatedAsLax: (warningReasons?: string[] | undefined, operation?: string | undefined, cookieUrl?: string | undefined) => string;
|
|
18
|
+
ExcludeSameSiteNoneInsecure: (operation?: string | undefined) => string;
|
|
19
|
+
ExcludeSameSiteLax: (warningReasons?: string[] | undefined, operation?: string | undefined, cookieUrl?: string | undefined) => string;
|
|
20
|
+
ExcludeSameSiteStrict: (warningReasons?: string[] | undefined, operation?: string | undefined, cookieUrl?: string | undefined) => string;
|
|
21
|
+
ExcludeInvalidSameParty: () => string;
|
|
22
|
+
ExcludeSamePartyCrossPartyContext: () => string;
|
|
23
|
+
ExcludeDomainNonASCII: () => string;
|
|
24
|
+
ExcludeThirdPartyCookieBlockedInFirstPartySet: () => string;
|
|
25
|
+
ExcludeThirdPartyPhaseout: (operation?: string | undefined) => string;
|
|
26
|
+
};
|
|
27
|
+
CookieBlockedReason: {
|
|
28
|
+
SecureOnly: string[];
|
|
29
|
+
NotOnPath: string[];
|
|
30
|
+
DomainMismatch: string[];
|
|
31
|
+
SameSiteStrict: string[];
|
|
32
|
+
SameSiteUnspecifiedTreatedAsLax: string[];
|
|
33
|
+
SameSiteNoneInsecure: string[];
|
|
34
|
+
UserPreferences: string[];
|
|
35
|
+
ThirdPartyPhaseout: string[];
|
|
36
|
+
ThirdPartyBlockedInFirstPartySet: string[];
|
|
37
|
+
UnknownError: string[];
|
|
38
|
+
SchemefulSameSiteStrict: string[];
|
|
39
|
+
SchemefulSameSiteLax: string[];
|
|
40
|
+
SchemefulSameSiteUnspecifiedTreatedAsLax: string[];
|
|
41
|
+
SamePartyFromCrossPartyContext: string[];
|
|
42
|
+
NameValuePairExceedsMaxSize: string[];
|
|
43
|
+
InvalidDomain: string[];
|
|
44
|
+
SameSiteLax: string;
|
|
45
|
+
SyntaxError: string;
|
|
46
|
+
SchemeNotSupported: string;
|
|
47
|
+
OverwriteSecure: string;
|
|
48
|
+
InvalidPrefix: string;
|
|
49
|
+
SamePartyConflictsWithOtherAttributes: string;
|
|
50
|
+
DisallowedCharacter: string;
|
|
51
|
+
NoCookieContent: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export default cookieIssueDetails;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const CookieExemptionReason: {
|
|
2
|
+
UserSetting: () => string;
|
|
3
|
+
TPCDMetadata: () => string;
|
|
4
|
+
TPCDDeprecationTrial: () => string;
|
|
5
|
+
TPCDHeuristics: () => string;
|
|
6
|
+
EnterprisePolicy: () => string;
|
|
7
|
+
StorageAccessAPI: () => string;
|
|
8
|
+
TopLevelStorageAccessAPI: () => string;
|
|
9
|
+
CorsOptIn: () => string;
|
|
10
|
+
};
|
|
11
|
+
export default CookieExemptionReason;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as cookieExemptionReason } from './exemptionReasons';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as cookieIssueDetails } from './cookieExclusionAndWarningReasons';
|
|
2
|
+
export { cookieExemptionReason } from './cookieExemptionReason';
|
|
3
|
+
export declare const auditsToNetworkMap: {
|
|
4
|
+
ExcludeSameSiteUnspecifiedTreatedAsLax: string;
|
|
5
|
+
ExcludeSameSiteNoneInsecure: string;
|
|
6
|
+
ExcludeSameSiteLax: string;
|
|
7
|
+
ExcludeSameSiteStrict: string;
|
|
8
|
+
ExcludeInvalidSameParty: string;
|
|
9
|
+
ExcludeSamePartyCrossPartyContext: string;
|
|
10
|
+
ExcludeDomainNonASCII: string;
|
|
11
|
+
ExcludeThirdPartyCookieBlockedInFirstPartySet: string;
|
|
12
|
+
ExcludeThirdPartyPhaseout: string;
|
|
13
|
+
};
|