@applitools/dom-snapshot 4.13.11 → 4.14.0
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 +24 -0
- package/dist/browser/cssom/createAstFromCssom.d.ts +2 -1
- package/dist/browser/cssom/processInlineCss.d.ts +2 -1
- package/dist/browser/cssom/styleSheetToCssText.d.ts +2 -1
- package/dist/browser/domNodesToCdt.d.ts +2 -1
- package/dist/browser/logger.d.ts +8 -0
- package/dist/browser/processPage.d.ts +1 -0
- package/dist/pollResult.js +1 -1
- package/dist/pollResultCjs.js +1 -1
- package/dist/pollResultEs.js +1 -1
- package/dist/processPage.js +3 -3
- package/dist/processPage.js.map +1 -1
- package/dist/processPagePoll.js +3 -3
- package/dist/processPagePoll.js.map +1 -1
- package/dist/processPagePollCjs.js +3 -3
- package/dist/processPagePollCjs.js.map +1 -1
- package/dist/processPagePollEs.js +3 -3
- package/dist/processPagePollEs.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,30 @@
|
|
|
9
9
|
- fix style programmatic generated fallback
|
|
10
10
|
- performance boost
|
|
11
11
|
|
|
12
|
+
## [4.14.0](https://github.com/Applitools-Dev/sdk/compare/js/dom-snapshot@4.13.12...js/dom-snapshot@4.14.0) (2025-11-03)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* logging errors from dom snapshot to the backend | AD-11641 ([#3291](https://github.com/Applitools-Dev/sdk/issues/3291)) ([7f5b487](https://github.com/Applitools-Dev/sdk/commit/7f5b48701ff93bf980924c9346a8241ed87f5a56))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* sandbox prototype pollution | FLD-3738 ([#3310](https://github.com/Applitools-Dev/sdk/issues/3310)) ([3185558](https://github.com/Applitools-Dev/sdk/commit/31855586851d5372169aae7bf0268cec139abc59))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Code Refactoring
|
|
26
|
+
|
|
27
|
+
* blob generation error handling ([#2501](https://github.com/Applitools-Dev/sdk/issues/2501)) ([94bc14f](https://github.com/Applitools-Dev/sdk/commit/94bc14faf3de0fd9a8ca24af4870f839756a8aad))
|
|
28
|
+
|
|
29
|
+
## [4.13.12](https://github.com/Applitools-Dev/sdk/compare/js/dom-snapshot@4.13.11...js/dom-snapshot@4.13.12) (2025-10-22)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* upgrade from @applitools/css-tree fork to official css-tree v3.1.0 | AD-11642 ([#3286](https://github.com/Applitools-Dev/sdk/issues/3286)) ([187ac4b](https://github.com/Applitools-Dev/sdk/commit/187ac4bbca0921ed692b2a676200c6a967c0fb33))
|
|
35
|
+
|
|
12
36
|
## [4.13.11](https://github.com/Applitools-Dev/sdk/compare/js/dom-snapshot@4.13.10...js/dom-snapshot@4.13.11) (2025-10-21)
|
|
13
37
|
|
|
14
38
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { DomNodesToCdtResult } from '../types';
|
|
2
|
-
|
|
2
|
+
import type { Logger } from './logger';
|
|
3
|
+
declare function domNodesToCdt(docNode: Document | DocumentFragment, baseUrl: string, logger: Logger): DomNodesToCdtResult;
|
|
3
4
|
export default domNodesToCdt;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface Logger {
|
|
2
|
+
log(message?: any, ...optionalParams: any[]): void;
|
|
3
|
+
warn(message?: any, ...optionalParams: any[]): void;
|
|
4
|
+
error(message?: any, ...optionalParams: any[]): void;
|
|
5
|
+
getWarnings(): string[];
|
|
6
|
+
getErrors(): string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function makeLogger(showLogs: boolean, referenceTime?: number): Logger;
|
|
@@ -23,6 +23,7 @@ export interface ProcessPageResult {
|
|
|
23
23
|
selector?: string;
|
|
24
24
|
baseUri?: string;
|
|
25
25
|
warnings?: string[];
|
|
26
|
+
errors?: string[];
|
|
26
27
|
scriptVersion?: string;
|
|
27
28
|
}
|
|
28
29
|
declare function processPage({ doc, showLogs, useSessionCache, dontFetchResources, fetchTimeout, skipResources, compressResources, serializeResources, removeReverseProxyURLPrefixes, elements, }?: ProcessPageOptions): Promise<ProcessPageResult>;
|
package/dist/pollResult.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @applitools/dom-snapshot@4.
|
|
1
|
+
/* @applitools/dom-snapshot@4.14.0 */
|
|
2
2
|
function __pollResult() {
|
|
3
3
|
var pollResult=function(){"use strict";return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t){return function(){var t={};function e(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var n=function(t,n){const r=[];let o=0;for(let c=0;c<t.length;++c){const u=e(t,c);let a=0;u>0&&(a=u<128?1:u<2048?2:u<65536?3:u<2097152?4:u<67108864?5:6),o+a>n?(r.push(c),o=a):o+=a}return r};const r=function(t){return t&&t.__esModule?t:{default:t}}(n),o="WIP",c="SUCCESS",u="SUCCESS_CHUNKED",a="ERROR";var s=function(t,e,n={}){const s=function(t,{chunkByteLength:e=0}={}){if(t){if(t.value){if(e){if(!t.chunks)try{const n=JSON.stringify(t.value);t.chunks=(0,r.default)(n,e),t.chunks.length>0&&(t.from=0,t.value=n)}catch(t){return{status:a,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:c,value:t.value}}return t.error?{status:a,error:t.error}:{status:o}}return{status:a,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[e],n);return(s.status===c||s.status===a||s.status===u&&s.done)&&delete t[e],s};const i=s;var l=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=p=t.poll=t.pollify=t.chunkify=void 0;const f=l(n);t.chunkify=f.default;const d=l((function(t,e,n){return r=>function(...o){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...o))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),i(e,n,r)}}));t.pollify=d.default;const h=l(s);var p=t.poll=h.default;const m=l((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const r=new URL(t,e).href;return n?r:decodeURI(r)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=m.default;const v=l((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=v.default;const y=l((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));return t.isAccessibleFrame=y.default,function(t){try{return JSON.stringify(p(window.__EYES__APPLITOOLS__,"domSnapshotResult",t))}catch(t){return JSON.stringify({status:"ERROR",error:t.message})}}}()},r=!0;try{var o=window.__applitools_sandbox;o||((o=document.createElement("iframe")).setAttribute("data-applitools-sandbox",""),o.setAttribute("data-applitools-skip",""),document.head.appendChild(o),window.__applitools_sandbox=o);var c=window.crypto.getRandomValues(new Uint32Array(1))[0],u=o.contentDocument.createElement("script");u.textContent="window['ctor-".concat(c,"'] = ").concat(n.toString(),";"),o.contentDocument.head.appendChild(u);var a=o.contentWindow["ctor-".concat(c)];if("function"!=typeof a)throw new Error("Sandbox failed to extract function");return r=!1,a(document).apply(void 0,t)}catch(e){try{return n(document).apply(void 0,t)}catch(t){throw r?t:e}}}}();
|
|
4
4
|
//# sourceMappingURL=pollResult.js.map
|
package/dist/pollResultCjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @applitools/dom-snapshot@4.
|
|
1
|
+
/* @applitools/dom-snapshot@4.14.0 */
|
|
2
2
|
"use strict";module.exports=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t){return function(){var t={};function e(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var n=function(t,n){const r=[];let o=0;for(let c=0;c<t.length;++c){const u=e(t,c);let a=0;u>0&&(a=u<128?1:u<2048?2:u<65536?3:u<2097152?4:u<67108864?5:6),o+a>n?(r.push(c),o=a):o+=a}return r};const r=function(t){return t&&t.__esModule?t:{default:t}}(n),o="WIP",c="SUCCESS",u="SUCCESS_CHUNKED",a="ERROR";var s=function(t,e,n={}){const s=function(t,{chunkByteLength:e=0}={}){if(t){if(t.value){if(e){if(!t.chunks)try{const n=JSON.stringify(t.value);t.chunks=(0,r.default)(n,e),t.chunks.length>0&&(t.from=0,t.value=n)}catch(t){return{status:a,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:c,value:t.value}}return t.error?{status:a,error:t.error}:{status:o}}return{status:a,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[e],n);return(s.status===c||s.status===a||s.status===u&&s.done)&&delete t[e],s};const i=s;var l=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=p=t.poll=t.pollify=t.chunkify=void 0;const f=l(n);t.chunkify=f.default;const d=l((function(t,e,n){return r=>function(...o){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...o))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),i(e,n,r)}}));t.pollify=d.default;const h=l(s);var p=t.poll=h.default;const m=l((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const r=new URL(t,e).href;return n?r:decodeURI(r)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=m.default;const v=l((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=v.default;const y=l((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));return t.isAccessibleFrame=y.default,function(t){try{return JSON.stringify(p(window.__EYES__APPLITOOLS__,"domSnapshotResult",t))}catch(t){return JSON.stringify({status:"ERROR",error:t.message})}}}()},r=!0;try{var o=window.__applitools_sandbox;o||((o=document.createElement("iframe")).setAttribute("data-applitools-sandbox",""),o.setAttribute("data-applitools-skip",""),document.head.appendChild(o),window.__applitools_sandbox=o);var c=window.crypto.getRandomValues(new Uint32Array(1))[0],u=o.contentDocument.createElement("script");u.textContent="window['ctor-".concat(c,"'] = ").concat(n.toString(),";"),o.contentDocument.head.appendChild(u);var a=o.contentWindow["ctor-".concat(c)];if("function"!=typeof a)throw new Error("Sandbox failed to extract function");return r=!1,a(document).apply(void 0,t)}catch(e){try{return n(document).apply(void 0,t)}catch(t){throw r?t:e}}};
|
|
3
3
|
//# sourceMappingURL=pollResultCjs.js.map
|
package/dist/pollResultEs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @applitools/dom-snapshot@4.
|
|
1
|
+
/* @applitools/dom-snapshot@4.14.0 */
|
|
2
2
|
function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t){return function(){var t={};function e(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var n=function(t,n){const r=[];let o=0;for(let c=0;c<t.length;++c){const u=e(t,c);let a=0;u>0&&(a=u<128?1:u<2048?2:u<65536?3:u<2097152?4:u<67108864?5:6),o+a>n?(r.push(c),o=a):o+=a}return r};const r=function(t){return t&&t.__esModule?t:{default:t}}(n),o="WIP",c="SUCCESS",u="SUCCESS_CHUNKED",a="ERROR";var s=function(t,e,n={}){const s=function(t,{chunkByteLength:e=0}={}){if(t){if(t.value){if(e){if(!t.chunks)try{const n=JSON.stringify(t.value);t.chunks=(0,r.default)(n,e),t.chunks.length>0&&(t.from=0,t.value=n)}catch(t){return{status:a,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:c,value:t.value}}return t.error?{status:a,error:t.error}:{status:o}}return{status:a,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[e],n);return(s.status===c||s.status===a||s.status===u&&s.done)&&delete t[e],s};const i=s;var l=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=p=t.poll=t.pollify=t.chunkify=void 0;const f=l(n);t.chunkify=f.default;const d=l((function(t,e,n){return r=>function(...o){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...o))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),i(e,n,r)}}));t.pollify=d.default;const h=l(s);var p=t.poll=h.default;const m=l((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const r=new URL(t,e).href;return n?r:decodeURI(r)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=m.default;const v=l((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=v.default;const y=l((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));return t.isAccessibleFrame=y.default,function(t){try{return JSON.stringify(p(window.__EYES__APPLITOOLS__,"domSnapshotResult",t))}catch(t){return JSON.stringify({status:"ERROR",error:t.message})}}}()},r=!0;try{var o=window.__applitools_sandbox;o||((o=document.createElement("iframe")).setAttribute("data-applitools-sandbox",""),o.setAttribute("data-applitools-skip",""),document.head.appendChild(o),window.__applitools_sandbox=o);var c=window.crypto.getRandomValues(new Uint32Array(1))[0],u=o.contentDocument.createElement("script");u.textContent="window['ctor-".concat(c,"'] = ").concat(n.toString(),";"),o.contentDocument.head.appendChild(u);var a=o.contentWindow["ctor-".concat(c)];if("function"!=typeof a)throw new Error("Sandbox failed to extract function");return r=!1,a(document).apply(void 0,t)}catch(e){try{return n(document).apply(void 0,t)}catch(t){throw r?t:e}}}export{t as default};
|
|
3
3
|
//# sourceMappingURL=pollResultEs.js.map
|