@checkly/playwright-reporter 0.1.2 → 0.1.3

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.
@@ -1 +1 @@
1
- const a0_0x2cc579=a0_0xf64e;(function(_0x35812c,_0x5989d3){const _0xecf01a=a0_0xf64e,_0x5ca1be=_0x35812c();while(!![]){try{const _0x29c7d4=-parseInt(_0xecf01a(0x191))/0x1*(parseInt(_0xecf01a(0x1ad))/0x2)+parseInt(_0xecf01a(0x1a3))/0x3*(parseInt(_0xecf01a(0x1ac))/0x4)+parseInt(_0xecf01a(0x18f))/0x5*(-parseInt(_0xecf01a(0x1a5))/0x6)+-parseInt(_0xecf01a(0x180))/0x7*(-parseInt(_0xecf01a(0x198))/0x8)+parseInt(_0xecf01a(0x1b8))/0x9*(parseInt(_0xecf01a(0x19c))/0xa)+parseInt(_0xecf01a(0x19d))/0xb+-parseInt(_0xecf01a(0x1a7))/0xc*(parseInt(_0xecf01a(0x19f))/0xd);if(_0x29c7d4===_0x5989d3)break;else _0x5ca1be['push'](_0x5ca1be['shift']());}catch(_0x4df96b){_0x5ca1be['push'](_0x5ca1be['shift']());}}}(a0_0x4f49,0x19b70));import*as a0_0x3b396d from'fs';import*as a0_0x259516 from'path';function a0_0xf64e(_0x28ba58,_0x313d24){const _0x4f4920=a0_0x4f49();return a0_0xf64e=function(_0xf64ec5,_0x1b57fc){_0xf64ec5=_0xf64ec5-0x17f;let _0x4f641e=_0x4f4920[_0xf64ec5];return _0x4f641e;},a0_0xf64e(_0x28ba58,_0x313d24);}function a0_0x4f49(){const _0x231179=['collectAssetsRecursive','other','application/zip','join','name','readdirSync','video/webm','.zip','.webm','split','243SziKnV','isFile','7AZPfEH','shouldSkipFile','createAsset','attachment','image/gif','image/jpeg','resolve','.htm','video','includes','screenshot','image/png','getVideoContentType','.html','push','204945VhSLQm','getImageContentType','432NBdJHo','existsSync','.svg','extname','add','.gif','sep','920072njQEqq','video/mp4','.txt','relative','62530zKEQdR','2216181lXZysf','.jpeg','117JluXFJ','.jpg','testResultsDir','application/json','54fWPSKg','.png','6bazRCW','determineAssetType','391656LfLmCd','image/svg+xml','some','image/bmp','.json','7416IdudRD','364wKYThS'];a0_0x4f49=function(){return _0x231179;};return a0_0x4f49();}export class AssetCollector{['testResultsDir'];constructor(_0x4fd2ef){const _0x37a590=a0_0xf64e;this[_0x37a590(0x1a1)]=_0x4fd2ef;}async['collectAssets'](_0x31b279){const _0x4d43a2=a0_0xf64e,_0x2c4006=[],_0x1b5358=new Set();if(!a0_0x3b396d[_0x4d43a2(0x192)](this[_0x4d43a2(0x1a1)]))return _0x2c4006;return await this[_0x4d43a2(0x1ae)](this['testResultsDir'],'',_0x2c4006,_0x1b5358),_0x2c4006;}async['collectAssetsRecursive'](_0x1006bd,_0x2e1198,_0x5d468b,_0x1f16f9){const _0x208055=a0_0xf64e;let _0x384684;try{_0x384684=a0_0x3b396d[_0x208055(0x1b3)](_0x1006bd,{'withFileTypes':!![]});}catch{return;}const _0x91c87b=a0_0x259516['basename'](a0_0x259516[_0x208055(0x186)](this[_0x208055(0x1a1)]));for(const _0x472f2a of _0x384684){const _0x4be759=a0_0x259516[_0x208055(0x1b1)](_0x1006bd,_0x472f2a[_0x208055(0x1b2)]),_0x478c3a=a0_0x259516[_0x208055(0x19b)](this[_0x208055(0x1a1)],_0x4be759),_0xc9daf8=a0_0x259516[_0x208055(0x1b1)](_0x91c87b,_0x478c3a);if(this[_0x208055(0x181)](_0x472f2a[_0x208055(0x1b2)]))continue;if(_0x472f2a['isDirectory']())await this[_0x208055(0x1ae)](_0x4be759,_0xc9daf8,_0x5d468b,_0x1f16f9);else{if(_0x472f2a[_0x208055(0x17f)]()){if(!_0x1f16f9['has'](_0x4be759)){const _0x4ecb8d=this[_0x208055(0x182)](_0x4be759,_0xc9daf8);_0x5d468b[_0x208055(0x18e)](_0x4ecb8d),_0x1f16f9[_0x208055(0x195)](_0x4be759);}}}}}[a0_0x2cc579(0x181)](_0x11d8fe){const _0x395774=a0_0x2cc579,_0x42f130=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x42f130[_0x395774(0x1a9)](_0x3c8f01=>_0x3c8f01['test'](_0x11d8fe));}[a0_0x2cc579(0x182)](_0x49d15f,_0x58e4c4){const _0x2eaf83=a0_0x2cc579,_0x19f432=a0_0x259516[_0x2eaf83(0x194)](_0x49d15f)['toLowerCase'](),{type:_0x15b54f,contentType:_0xc78d39}=this[_0x2eaf83(0x1a6)](_0x19f432),_0x1d9004=_0x58e4c4[_0x2eaf83(0x1b7)](a0_0x259516[_0x2eaf83(0x197)])[_0x2eaf83(0x1b1)]('/');return{'sourcePath':_0x49d15f,'archivePath':_0x1d9004,'type':_0x15b54f,'contentType':_0xc78d39};}[a0_0x2cc579(0x1a6)](_0x14ed01){const _0x2afefc=a0_0x2cc579;if([_0x2afefc(0x1a4),_0x2afefc(0x1a0),_0x2afefc(0x19e),_0x2afefc(0x196),'.bmp',_0x2afefc(0x193)][_0x2afefc(0x189)](_0x14ed01))return{'type':_0x2afefc(0x18a),'contentType':this[_0x2afefc(0x190)](_0x14ed01)};if([_0x2afefc(0x1b6),'.mp4','.avi','.mov'][_0x2afefc(0x189)](_0x14ed01))return{'type':_0x2afefc(0x188),'contentType':this[_0x2afefc(0x18c)](_0x14ed01)};if(_0x14ed01===_0x2afefc(0x1b5))return{'type':'trace','contentType':_0x2afefc(0x1b0)};if(_0x14ed01===_0x2afefc(0x18d)||_0x14ed01===_0x2afefc(0x187))return{'type':_0x2afefc(0x183),'contentType':'text/html'};if(_0x14ed01===_0x2afefc(0x1ab))return{'type':_0x2afefc(0x183),'contentType':_0x2afefc(0x1a2)};if(_0x14ed01===_0x2afefc(0x19a)||_0x14ed01==='.log')return{'type':_0x2afefc(0x183),'contentType':'text/plain'};return{'type':_0x2afefc(0x1af),'contentType':'application/octet-stream'};}[a0_0x2cc579(0x190)](_0x3e216a){const _0x3ba5fb=a0_0x2cc579,_0x4ed2cb={'.png':'image/png','.jpg':'image/jpeg','.jpeg':_0x3ba5fb(0x185),'.gif':_0x3ba5fb(0x184),'.bmp':_0x3ba5fb(0x1aa),'.svg':_0x3ba5fb(0x1a8)};return _0x4ed2cb[_0x3e216a]||_0x3ba5fb(0x18b);}['getVideoContentType'](_0x48292f){const _0x44fc7a=a0_0x2cc579,_0x274c22={'.webm':_0x44fc7a(0x1b4),'.mp4':_0x44fc7a(0x199),'.avi':'video/x-msvideo','.mov':'video/quicktime'};return _0x274c22[_0x48292f]||_0x44fc7a(0x1b4);}}
1
+ function a0_0x18f7(_0x111790,_0x7de82e){const _0x15291d=a0_0x1529();return a0_0x18f7=function(_0x18f719,_0x5dd8b0){_0x18f719=_0x18f719-0x16c;let _0x43a109=_0x15291d[_0x18f719];return _0x43a109;},a0_0x18f7(_0x111790,_0x7de82e);}const a0_0x141850=a0_0x18f7;(function(_0x3a0232,_0x16530e){const _0xd13a36=a0_0x18f7,_0x137039=_0x3a0232();while(!![]){try{const _0x3a95d5=-parseInt(_0xd13a36(0x189))/0x1+parseInt(_0xd13a36(0x185))/0x2+parseInt(_0xd13a36(0x188))/0x3+-parseInt(_0xd13a36(0x181))/0x4+-parseInt(_0xd13a36(0x19d))/0x5*(-parseInt(_0xd13a36(0x17e))/0x6)+-parseInt(_0xd13a36(0x19a))/0x7*(-parseInt(_0xd13a36(0x183))/0x8)+parseInt(_0xd13a36(0x16e))/0x9*(-parseInt(_0xd13a36(0x170))/0xa);if(_0x3a95d5===_0x16530e)break;else _0x137039['push'](_0x137039['shift']());}catch(_0x4de894){_0x137039['push'](_0x137039['shift']());}}}(a0_0x1529,0x49706));import*as a0_0x28a475 from'fs';function a0_0x1529(){const _0x43367a=['image/png','video/quicktime','toLowerCase','21DISTqo','other','collectAssetsRecursive','88970HfeKKA','getVideoContentType','testResultsDir','.svg','split','text/plain','getImageContentType','isFile','.txt','application/octet-stream','.mov','basename','includes','9MnKmYi','shouldSkipFile','2846330sdfOBd','application/json','readdirSync','resolve','.jpeg','name','image/jpeg','relative','.bmp','createAsset','add','.json','image/bmp','isDirectory','18URCwTw','application/zip','determineAssetType','888904AnHgct','.mp4','536288fBfinp','existsSync','617250AnUmYw','attachment','video/mp4','1676571hpNfmb','314307FvcEPk','video/x-msvideo','sep','join','.log','some','screenshot','video','test','.jpg','text/html','.webm','.html','image/svg+xml'];a0_0x1529=function(){return _0x43367a;};return a0_0x1529();}import*as a0_0x35e13e from'path';export class AssetCollector{[a0_0x141850(0x19f)];constructor(_0x35417f){const _0x280278=a0_0x141850;this[_0x280278(0x19f)]=_0x35417f;}async['collectAssets'](_0x166af2){const _0x5a15fb=a0_0x141850,_0x44c464=[],_0x4ea973=new Set();if(!a0_0x28a475[_0x5a15fb(0x184)](this[_0x5a15fb(0x19f)]))return _0x44c464;return await this[_0x5a15fb(0x19c)](this[_0x5a15fb(0x19f)],'',_0x44c464,_0x4ea973),_0x44c464;}async[a0_0x141850(0x19c)](_0x57a4e2,_0x333b74,_0x2a0944,_0x3b0d4b){const _0x3b9f91=a0_0x141850;let _0x518616;try{_0x518616=a0_0x28a475[_0x3b9f91(0x172)](_0x57a4e2,{'withFileTypes':!![]});}catch{return;}const _0x3d45c1=a0_0x35e13e[_0x3b9f91(0x16c)](a0_0x35e13e[_0x3b9f91(0x173)](this['testResultsDir']));for(const _0x1f8b2b of _0x518616){const _0x5cbea8=a0_0x35e13e[_0x3b9f91(0x18c)](_0x57a4e2,_0x1f8b2b[_0x3b9f91(0x175)]),_0x18123d=a0_0x35e13e[_0x3b9f91(0x177)](this['testResultsDir'],_0x5cbea8),_0x4a6282=a0_0x35e13e[_0x3b9f91(0x18c)](_0x3d45c1,_0x18123d);if(this[_0x3b9f91(0x16f)](_0x1f8b2b[_0x3b9f91(0x175)]))continue;if(_0x1f8b2b[_0x3b9f91(0x17d)]())await this[_0x3b9f91(0x19c)](_0x5cbea8,_0x4a6282,_0x2a0944,_0x3b0d4b);else{if(_0x1f8b2b[_0x3b9f91(0x1a4)]()){if(!_0x3b0d4b['has'](_0x5cbea8)){const _0x27efef=this[_0x3b9f91(0x179)](_0x5cbea8,_0x4a6282);_0x2a0944['push'](_0x27efef),_0x3b0d4b[_0x3b9f91(0x17a)](_0x5cbea8);}}}}}['shouldSkipFile'](_0x5354f8){const _0x43952a=a0_0x141850,_0x184925=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x184925[_0x43952a(0x18e)](_0x4ba32f=>_0x4ba32f[_0x43952a(0x191)](_0x5354f8));}[a0_0x141850(0x179)](_0x5a5fa4,_0x1987f4){const _0x2cdfbd=a0_0x141850,_0x59ccbf=a0_0x35e13e['extname'](_0x5a5fa4)[_0x2cdfbd(0x199)](),{type:_0x5778d9,contentType:_0x228591}=this[_0x2cdfbd(0x180)](_0x59ccbf),_0x191149=_0x1987f4[_0x2cdfbd(0x1a1)](a0_0x35e13e[_0x2cdfbd(0x18b)])[_0x2cdfbd(0x18c)]('/');return{'sourcePath':_0x5a5fa4,'archivePath':_0x191149,'type':_0x5778d9,'contentType':_0x228591};}[a0_0x141850(0x180)](_0x434d65){const _0x505988=a0_0x141850;if(['.png',_0x505988(0x192),_0x505988(0x174),'.gif',_0x505988(0x178),_0x505988(0x1a0)][_0x505988(0x16d)](_0x434d65))return{'type':_0x505988(0x18f),'contentType':this[_0x505988(0x1a3)](_0x434d65)};if([_0x505988(0x194),_0x505988(0x182),'.avi',_0x505988(0x1a7)][_0x505988(0x16d)](_0x434d65))return{'type':_0x505988(0x190),'contentType':this['getVideoContentType'](_0x434d65)};if(_0x434d65==='.zip')return{'type':'trace','contentType':_0x505988(0x17f)};if(_0x434d65===_0x505988(0x195)||_0x434d65==='.htm')return{'type':_0x505988(0x186),'contentType':_0x505988(0x193)};if(_0x434d65===_0x505988(0x17b))return{'type':_0x505988(0x186),'contentType':_0x505988(0x171)};if(_0x434d65===_0x505988(0x1a5)||_0x434d65===_0x505988(0x18d))return{'type':_0x505988(0x186),'contentType':_0x505988(0x1a2)};return{'type':_0x505988(0x19b),'contentType':_0x505988(0x1a6)};}[a0_0x141850(0x1a3)](_0x38223d){const _0x31f2cb=a0_0x141850,_0x5249a8={'.png':_0x31f2cb(0x197),'.jpg':'image/jpeg','.jpeg':_0x31f2cb(0x176),'.gif':'image/gif','.bmp':_0x31f2cb(0x17c),'.svg':_0x31f2cb(0x196)};return _0x5249a8[_0x38223d]||_0x31f2cb(0x197);}[a0_0x141850(0x19e)](_0x144660){const _0x3a985e=a0_0x141850,_0x168cbc={'.webm':'video/webm','.mp4':_0x3a985e(0x187),'.avi':_0x3a985e(0x18a),'.mov':_0x3a985e(0x198)};return _0x168cbc[_0x144660]||'video/webm';}}
@@ -1 +1 @@
1
- var a1_0x3b35d7=a1_0x27ba;(function(_0xbcbd43,_0x538295){var _0x1360ac=a1_0x27ba,_0xaaf1b6=_0xbcbd43();while(!![]){try{var _0x5a99a7=-parseInt(_0x1360ac(0x124))/0x1*(parseInt(_0x1360ac(0x11a))/0x2)+parseInt(_0x1360ac(0x120))/0x3+parseInt(_0x1360ac(0x118))/0x4+-parseInt(_0x1360ac(0x125))/0x5*(-parseInt(_0x1360ac(0x126))/0x6)+parseInt(_0x1360ac(0x11c))/0x7+parseInt(_0x1360ac(0x12a))/0x8*(parseInt(_0x1360ac(0x128))/0x9)+-parseInt(_0x1360ac(0x12d))/0xa;if(_0x5a99a7===_0x538295)break;else _0xaaf1b6['push'](_0xaaf1b6['shift']());}catch(_0x2eec3e){_0xaaf1b6['push'](_0xaaf1b6['shift']());}}}(a1_0x22b3,0xb164f));import a1_0x162146 from'axios';import{handleErrorResponse}from'./errors.js';function getVersion(){var _0xac9ea2=a1_0x27ba;return _0xac9ea2(0x11e);}export function createRequestInterceptor(_0xbef8b6,_0x1732be){return _0x353ee4=>{var _0x10ce6c=a1_0x27ba;return _0x353ee4[_0x10ce6c(0x12b)]&&(_0x353ee4[_0x10ce6c(0x12b)][_0x10ce6c(0x129)]='Bearer\x20'+_0xbef8b6,_0x353ee4[_0x10ce6c(0x12b)][_0x10ce6c(0x127)]=_0x1732be,_0x353ee4[_0x10ce6c(0x12b)][_0x10ce6c(0x119)]='@checkly/playwright-reporter/'+getVersion()),_0x353ee4;};}function a1_0x27ba(_0x3b9a77,_0x2c354c){var _0x22b3c0=a1_0x22b3();return a1_0x27ba=function(_0x27ba38,_0x39123f){_0x27ba38=_0x27ba38-0x118;var _0x147b31=_0x22b3c0[_0x27ba38];return _0x147b31;},a1_0x27ba(_0x3b9a77,_0x2c354c);}export function createResponseErrorInterceptor(){return _0x3bf31c=>{handleErrorResponse(_0x3bf31c);};}export default class ChecklyClient{[a1_0x3b35d7(0x122)];['baseUrl'];[a1_0x3b35d7(0x11f)];[a1_0x3b35d7(0x11b)];constructor(_0x24c6bd){var _0x3d4940=a1_0x3b35d7;this[_0x3d4940(0x11f)]=_0x24c6bd['accountId'],this['apiKey']=_0x24c6bd[_0x3d4940(0x122)],this[_0x3d4940(0x12c)]=_0x24c6bd[_0x3d4940(0x12c)],this['api']=a1_0x162146['create']({'baseURL':this['baseUrl'],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0x3d4940(0x11b)][_0x3d4940(0x121)]['request']['use'](createRequestInterceptor(this[_0x3d4940(0x122)],this[_0x3d4940(0x11f)])),this[_0x3d4940(0x11b)][_0x3d4940(0x121)][_0x3d4940(0x123)]['use'](_0x34ffd9=>_0x34ffd9,createResponseErrorInterceptor());}[a1_0x3b35d7(0x11d)](){return this['api'];}}function a1_0x22b3(){var _0x5c9c0=['User-Agent','18692gZdYkc','api','8162784pezBgK','getAxiosInstance','0.1.0','accountId','1190259mvwfAr','interceptors','apiKey','response','73KbXYsT','5turKQj','5135538WgqBEk','x-checkly-account','9zcqDDF','Authorization','4080072MkirIG','headers','baseUrl','26291970TFufSD','4437060bHKapr'];a1_0x22b3=function(){return _0x5c9c0;};return a1_0x22b3();}
1
+ var a1_0x56b0e6=a1_0x4ec8;(function(_0x4dc10e,_0x383664){var _0x254fba=a1_0x4ec8,_0x4ac099=_0x4dc10e();while(!![]){try{var _0xfb8a80=parseInt(_0x254fba(0x1ed))/0x1*(-parseInt(_0x254fba(0x1ef))/0x2)+-parseInt(_0x254fba(0x1e0))/0x3+parseInt(_0x254fba(0x1e3))/0x4+parseInt(_0x254fba(0x1ec))/0x5+-parseInt(_0x254fba(0x1e1))/0x6+-parseInt(_0x254fba(0x1f2))/0x7*(-parseInt(_0x254fba(0x1f4))/0x8)+-parseInt(_0x254fba(0x1e4))/0x9;if(_0xfb8a80===_0x383664)break;else _0x4ac099['push'](_0x4ac099['shift']());}catch(_0x3cf2f3){_0x4ac099['push'](_0x4ac099['shift']());}}}(a1_0xc2c9,0x8c274));import a1_0x5b6806 from'axios';function a1_0x4ec8(_0x5ea127,_0x10f902){var _0xc2c908=a1_0xc2c9();return a1_0x4ec8=function(_0x4ec877,_0x3bdf39){_0x4ec877=_0x4ec877-0x1dd;var _0x79e21a=_0xc2c908[_0x4ec877];return _0x79e21a;},a1_0x4ec8(_0x5ea127,_0x10f902);}import{handleErrorResponse}from'./errors.js';function a1_0xc2c9(){var _0x24d710=['headers','3672590lyZnqT','1MjBvcr','create','1139734jxvGeR','0.1.0','@checkly/playwright-reporter/','5798807KLXDdC','use','8LgeDAZ','request','interceptors','Authorization','apiKey','User-Agent','1234749mkxrvs','1831260awmiIS','getAxiosInstance','4179968OTtUFd','6724647rcrOpH','accountId','Bearer\x20','response','baseUrl','api','x-checkly-account'];a1_0xc2c9=function(){return _0x24d710;};return a1_0xc2c9();}function getVersion(){var _0x3994c7=a1_0x4ec8;return _0x3994c7(0x1f0);}export function createRequestInterceptor(_0x516ca0,_0x5dac05){return _0x2fc58a=>{var _0xbff315=a1_0x4ec8;return _0x2fc58a['headers']&&(_0x2fc58a[_0xbff315(0x1eb)][_0xbff315(0x1dd)]=_0xbff315(0x1e6)+_0x516ca0,_0x2fc58a[_0xbff315(0x1eb)][_0xbff315(0x1ea)]=_0x5dac05,_0x2fc58a[_0xbff315(0x1eb)][_0xbff315(0x1df)]=_0xbff315(0x1f1)+getVersion()),_0x2fc58a;};}export function createResponseErrorInterceptor(){return _0x11ebe8=>{handleErrorResponse(_0x11ebe8);};}export default class ChecklyClient{[a1_0x56b0e6(0x1de)];[a1_0x56b0e6(0x1e8)];['accountId'];[a1_0x56b0e6(0x1e9)];constructor(_0x1d8246){var _0x35715f=a1_0x56b0e6;this[_0x35715f(0x1e5)]=_0x1d8246['accountId'],this[_0x35715f(0x1de)]=_0x1d8246[_0x35715f(0x1de)],this[_0x35715f(0x1e8)]=_0x1d8246['baseUrl'],this[_0x35715f(0x1e9)]=a1_0x5b6806[_0x35715f(0x1ee)]({'baseURL':this[_0x35715f(0x1e8)],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0x35715f(0x1e9)]['interceptors'][_0x35715f(0x1f5)]['use'](createRequestInterceptor(this[_0x35715f(0x1de)],this['accountId'])),this['api'][_0x35715f(0x1f6)][_0x35715f(0x1e7)][_0x35715f(0x1f3)](_0x249792=>_0x249792,createResponseErrorInterceptor());}[a1_0x56b0e6(0x1e2)](){var _0x334530=a1_0x56b0e6;return this[_0x334530(0x1e9)];}}
@@ -1 +1 @@
1
- const a2_0x92ec9d=a2_0x1d3c;(function(_0x4deebc,_0x1fc191){const _0x29753f=a2_0x1d3c,_0x33fde8=_0x4deebc();while(!![]){try{const _0x23024c=-parseInt(_0x29753f(0x1b9))/0x1*(parseInt(_0x29753f(0x1b2))/0x2)+parseInt(_0x29753f(0x1b1))/0x3+parseInt(_0x29753f(0x1b5))/0x4*(parseInt(_0x29753f(0x1ba))/0x5)+parseInt(_0x29753f(0x1be))/0x6*(parseInt(_0x29753f(0x1bc))/0x7)+-parseInt(_0x29753f(0x1a8))/0x8*(parseInt(_0x29753f(0x1ae))/0x9)+-parseInt(_0x29753f(0x1a7))/0xa*(parseInt(_0x29753f(0x1b4))/0xb)+parseInt(_0x29753f(0x1aa))/0xc;if(_0x23024c===_0x1fc191)break;else _0x33fde8['push'](_0x33fde8['shift']());}catch(_0x1c3ec2){_0x33fde8['push'](_0x33fde8['shift']());}}}(a2_0x1121,0x7166b));export class ApiError extends Error{[a2_0x92ec9d(0x1ab)];constructor(_0x382556,_0x166c3e){const _0x5a4064=a2_0x92ec9d;super(_0x382556[_0x5a4064(0x1b8)],_0x166c3e),this[_0x5a4064(0x1bb)]=this['constructor'][_0x5a4064(0x1bb)],this[_0x5a4064(0x1ab)]=_0x382556;}}export class ValidationError extends ApiError{constructor(_0x309499,_0x182bc6){super(_0x309499,_0x182bc6);}}export class UnauthorizedError extends ApiError{constructor(_0x206703,_0x388cb7){super(_0x206703,_0x388cb7);}}export class ForbiddenError extends ApiError{constructor(_0xc20d81,_0x18ecd2){super(_0xc20d81,_0x18ecd2);}}export class NotFoundError extends ApiError{constructor(_0x3ffd19,_0x27a961){super(_0x3ffd19,_0x27a961);}}export class RequestTimeoutError extends ApiError{constructor(_0x4ca67f,_0x1fb65e){super(_0x4ca67f,_0x1fb65e);}}export class ConflictError extends ApiError{constructor(_0x4abe28,_0x423f4a){super(_0x4abe28,_0x423f4a);}}export class ServerError extends ApiError{constructor(_0x4df550,_0x45ec46){super(_0x4df550,_0x45ec46);}}export class MiscellaneousError extends ApiError{constructor(_0x53d136,_0x283cc8){super(_0x53d136,_0x283cc8);}}function a2_0x1d3c(_0xda9256,_0x3b8721){const _0x112100=a2_0x1121();return a2_0x1d3c=function(_0x1d3cf7,_0x11eab6){_0x1d3cf7=_0x1d3cf7-0x1a7;let _0x61602b=_0x112100[_0x1d3cf7];return _0x61602b;},a2_0x1d3c(_0xda9256,_0x3b8721);}export class MissingResponseError extends Error{constructor(_0x4c5490,_0x45df65){const _0x126331=a2_0x92ec9d;super(_0x4c5490,_0x45df65),this[_0x126331(0x1bb)]=_0x126331(0x1b7);}}export function parseErrorData(_0xc53bd6,_0x5303d5){const _0x22b805=a2_0x92ec9d;if(!_0xc53bd6)return undefined;if(typeof _0xc53bd6==='object'&&_0xc53bd6['statusCode']&&_0xc53bd6[_0x22b805(0x1b0)]&&_0xc53bd6['message'])return{'statusCode':_0xc53bd6[_0x22b805(0x1bd)],'error':_0xc53bd6['error'],'message':_0xc53bd6['message'],'errorCode':_0xc53bd6[_0x22b805(0x1ad)]};if(typeof _0xc53bd6===_0x22b805(0x1af)&&_0xc53bd6[_0x22b805(0x1b0)]&&!_0xc53bd6[_0x22b805(0x1b8)])return{'statusCode':_0x5303d5[_0x22b805(0x1bd)],'error':_0xc53bd6[_0x22b805(0x1b0)],'message':_0xc53bd6[_0x22b805(0x1b0)]};if(typeof _0xc53bd6==='object'&&_0xc53bd6[_0x22b805(0x1b0)]&&_0xc53bd6['message'])return{'statusCode':_0x5303d5[_0x22b805(0x1bd)],'error':_0xc53bd6[_0x22b805(0x1b0)],'message':_0xc53bd6[_0x22b805(0x1b8)],'errorCode':_0xc53bd6[_0x22b805(0x1ad)]};if(typeof _0xc53bd6===_0x22b805(0x1af)&&_0xc53bd6[_0x22b805(0x1b8)])return{'statusCode':_0x5303d5[_0x22b805(0x1bd)],'error':_0xc53bd6[_0x22b805(0x1b8)],'message':_0xc53bd6[_0x22b805(0x1b8)],'errorCode':_0xc53bd6[_0x22b805(0x1ad)]};if(typeof _0xc53bd6==='string')return{'statusCode':_0x5303d5[_0x22b805(0x1bd)],'error':_0xc53bd6,'message':_0xc53bd6};return undefined;}export function handleErrorResponse(_0x36fc71){const _0x4e23d3=a2_0x92ec9d;if(!_0x36fc71[_0x4e23d3(0x1ac)])throw new MissingResponseError(_0x36fc71[_0x4e23d3(0x1b8)]||_0x4e23d3(0x1a9));const {status:_0x11ebc6,data:_0x22bfd8}=_0x36fc71['response'],_0x2a6e58=parseErrorData(_0x22bfd8,{'statusCode':_0x11ebc6});if(!_0x2a6e58)throw new MiscellaneousError({'statusCode':_0x11ebc6,'error':_0x4e23d3(0x1b6),'message':_0x36fc71[_0x4e23d3(0x1b8)]||_0x4e23d3(0x1b3)});switch(_0x11ebc6){case 0x190:throw new ValidationError(_0x2a6e58);case 0x191:throw new UnauthorizedError(_0x2a6e58);case 0x193:throw new ForbiddenError(_0x2a6e58);case 0x194:throw new NotFoundError(_0x2a6e58);case 0x198:throw new RequestTimeoutError(_0x2a6e58);case 0x199:throw new ConflictError(_0x2a6e58);default:if(_0x11ebc6>=0x1f4)throw new ServerError(_0x2a6e58);throw new MiscellaneousError(_0x2a6e58);}}function a2_0x1121(){const _0x3b68ec=['Unknown\x20error','MissingResponseError','message','8969IlbLRs','5izkMOw','name','651LKotiP','statusCode','33900LDYgJt','140YBtwbC','1936VWBLDj','Network\x20error','2539128SJqilN','data','response','errorCode','34227oStQdx','object','error','2613612doEETP','28betTgc','An\x20error\x20occurred','418198gCdoBO','1737548BrNJzb'];a2_0x1121=function(){return _0x3b68ec;};return a2_0x1121();}
1
+ const a2_0x473a3c=a2_0x1ab5;(function(_0x598992,_0x3b28e5){const _0x499dbc=a2_0x1ab5,_0x14e5a4=_0x598992();while(!![]){try{const _0x13840e=parseInt(_0x499dbc(0xb3))/0x1+parseInt(_0x499dbc(0xa7))/0x2+parseInt(_0x499dbc(0xa3))/0x3+parseInt(_0x499dbc(0x9c))/0x4*(parseInt(_0x499dbc(0xa2))/0x5)+-parseInt(_0x499dbc(0xad))/0x6*(-parseInt(_0x499dbc(0xac))/0x7)+parseInt(_0x499dbc(0xa1))/0x8+-parseInt(_0x499dbc(0xa8))/0x9*(parseInt(_0x499dbc(0xa5))/0xa);if(_0x13840e===_0x3b28e5)break;else _0x14e5a4['push'](_0x14e5a4['shift']());}catch(_0x2d5752){_0x14e5a4['push'](_0x14e5a4['shift']());}}}(a2_0xcf4c,0xe468c));export class ApiError extends Error{[a2_0x473a3c(0xaa)];constructor(_0x31874b,_0x177a38){const _0x5b55c1=a2_0x473a3c;super(_0x31874b[_0x5b55c1(0xae)],_0x177a38),this['name']=this[_0x5b55c1(0xa9)][_0x5b55c1(0x9e)],this['data']=_0x31874b;}}export class ValidationError extends ApiError{constructor(_0x508c97,_0x1199bc){super(_0x508c97,_0x1199bc);}}export class UnauthorizedError extends ApiError{constructor(_0x41974f,_0x4d309c){super(_0x41974f,_0x4d309c);}}function a2_0xcf4c(){const _0x492b4e=['3107638ivdSlz','63DSnyXP','constructor','data','string','3122427bWDwDs','6dtczFt','message','An\x20error\x20occurred','error','response','statusCode','945231ekhXKM','8wwBtCd','errorCode','name','object','MissingResponseError','7289840QiTyvD','516745KSRrUr','5198778DtegzU','Network\x20error','6943430zjQLpD','Unknown\x20error'];a2_0xcf4c=function(){return _0x492b4e;};return a2_0xcf4c();}export class ForbiddenError extends ApiError{constructor(_0x5e3fa8,_0x310159){super(_0x5e3fa8,_0x310159);}}export class NotFoundError extends ApiError{constructor(_0x23704e,_0x2f516d){super(_0x23704e,_0x2f516d);}}export class RequestTimeoutError extends ApiError{constructor(_0x174ac5,_0x1e0dbe){super(_0x174ac5,_0x1e0dbe);}}export class ConflictError extends ApiError{constructor(_0x377a6d,_0x3dd3c9){super(_0x377a6d,_0x3dd3c9);}}export class ServerError extends ApiError{constructor(_0x24265e,_0x5c6c88){super(_0x24265e,_0x5c6c88);}}export class MiscellaneousError extends ApiError{constructor(_0x4e506e,_0x541330){super(_0x4e506e,_0x541330);}}export class MissingResponseError extends Error{constructor(_0x4f34a3,_0x1bfe4e){const _0x4f3cbd=a2_0x473a3c;super(_0x4f34a3,_0x1bfe4e),this[_0x4f3cbd(0x9e)]=_0x4f3cbd(0xa0);}}function a2_0x1ab5(_0x330472,_0x46a8fe){const _0xcf4cac=a2_0xcf4c();return a2_0x1ab5=function(_0x1ab581,_0x5c992e){_0x1ab581=_0x1ab581-0x9c;let _0x29250c=_0xcf4cac[_0x1ab581];return _0x29250c;},a2_0x1ab5(_0x330472,_0x46a8fe);}export function parseErrorData(_0x376c01,_0x3c1bbc){const _0x4210fc=a2_0x473a3c;if(!_0x376c01)return undefined;if(typeof _0x376c01===_0x4210fc(0x9f)&&_0x376c01[_0x4210fc(0xb2)]&&_0x376c01[_0x4210fc(0xb0)]&&_0x376c01['message'])return{'statusCode':_0x376c01[_0x4210fc(0xb2)],'error':_0x376c01[_0x4210fc(0xb0)],'message':_0x376c01['message'],'errorCode':_0x376c01[_0x4210fc(0x9d)]};if(typeof _0x376c01===_0x4210fc(0x9f)&&_0x376c01[_0x4210fc(0xb0)]&&!_0x376c01[_0x4210fc(0xae)])return{'statusCode':_0x3c1bbc[_0x4210fc(0xb2)],'error':_0x376c01['error'],'message':_0x376c01[_0x4210fc(0xb0)]};if(typeof _0x376c01==='object'&&_0x376c01[_0x4210fc(0xb0)]&&_0x376c01['message'])return{'statusCode':_0x3c1bbc['statusCode'],'error':_0x376c01[_0x4210fc(0xb0)],'message':_0x376c01[_0x4210fc(0xae)],'errorCode':_0x376c01[_0x4210fc(0x9d)]};if(typeof _0x376c01===_0x4210fc(0x9f)&&_0x376c01[_0x4210fc(0xae)])return{'statusCode':_0x3c1bbc[_0x4210fc(0xb2)],'error':_0x376c01[_0x4210fc(0xae)],'message':_0x376c01[_0x4210fc(0xae)],'errorCode':_0x376c01[_0x4210fc(0x9d)]};if(typeof _0x376c01===_0x4210fc(0xab))return{'statusCode':_0x3c1bbc['statusCode'],'error':_0x376c01,'message':_0x376c01};return undefined;}export function handleErrorResponse(_0x5e12bb){const _0x24823c=a2_0x473a3c;if(!_0x5e12bb[_0x24823c(0xb1)])throw new MissingResponseError(_0x5e12bb[_0x24823c(0xae)]||_0x24823c(0xa4));const {status:_0x57f9b5,data:_0x468fab}=_0x5e12bb[_0x24823c(0xb1)],_0x311165=parseErrorData(_0x468fab,{'statusCode':_0x57f9b5});if(!_0x311165)throw new MiscellaneousError({'statusCode':_0x57f9b5,'error':_0x24823c(0xa6),'message':_0x5e12bb[_0x24823c(0xae)]||_0x24823c(0xaf)});switch(_0x57f9b5){case 0x190:throw new ValidationError(_0x311165);case 0x191:throw new UnauthorizedError(_0x311165);case 0x193:throw new ForbiddenError(_0x311165);case 0x194:throw new NotFoundError(_0x311165);case 0x198:throw new RequestTimeoutError(_0x311165);case 0x199:throw new ConflictError(_0x311165);default:if(_0x57f9b5>=0x1f4)throw new ServerError(_0x311165);throw new MiscellaneousError(_0x311165);}}
@@ -1 +1 @@
1
- (function(_0x1979ee,_0x3a2bb1){var _0x344ae4=a3_0x3c64,_0x210a68=_0x1979ee();while(!![]){try{var _0x38e890=-parseInt(_0x344ae4(0x83))/0x1*(parseInt(_0x344ae4(0x82))/0x2)+parseInt(_0x344ae4(0x8a))/0x3*(-parseInt(_0x344ae4(0x85))/0x4)+-parseInt(_0x344ae4(0x89))/0x5+parseInt(_0x344ae4(0x80))/0x6*(-parseInt(_0x344ae4(0x86))/0x7)+parseInt(_0x344ae4(0x8b))/0x8*(-parseInt(_0x344ae4(0x84))/0x9)+-parseInt(_0x344ae4(0x81))/0xa+parseInt(_0x344ae4(0x87))/0xb*(parseInt(_0x344ae4(0x88))/0xc);if(_0x38e890===_0x3a2bb1)break;else _0x210a68['push'](_0x210a68['shift']());}catch(_0x45221e){_0x210a68['push'](_0x210a68['shift']());}}}(a3_0x1188,0x5e1aa));function a3_0x1188(){var _0x4f9e7c=['408SJbPrJ','988280UWfZPv','1943382wKDxdT','2098710VntRYN','10490dwEcUi','125qfoTYR','45XvuoCD','19752kPjAHl','14DPHDXg','11JBlygt','41370804crzcHk','1297920eYjBQB'];a3_0x1188=function(){return _0x4f9e7c;};return a3_0x1188();}export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';export*from'./types.js';function a3_0x3c64(_0x1133ea,_0x4657aa){var _0x11889c=a3_0x1188();return a3_0x3c64=function(_0x3c64cb,_0x346f92){_0x3c64cb=_0x3c64cb-0x80;var _0x3ac0c8=_0x11889c[_0x3c64cb];return _0x3ac0c8;},a3_0x3c64(_0x1133ea,_0x4657aa);}export*from'./errors.js';
1
+ (function(_0x5b0291,_0x2467e7){var _0x13ca24=a3_0x1b0b,_0x12d2d9=_0x5b0291();while(!![]){try{var _0x3ee832=-parseInt(_0x13ca24(0x1dd))/0x1+parseInt(_0x13ca24(0x1d6))/0x2+-parseInt(_0x13ca24(0x1df))/0x3+parseInt(_0x13ca24(0x1da))/0x4*(-parseInt(_0x13ca24(0x1d8))/0x5)+parseInt(_0x13ca24(0x1de))/0x6*(parseInt(_0x13ca24(0x1db))/0x7)+-parseInt(_0x13ca24(0x1d7))/0x8+parseInt(_0x13ca24(0x1dc))/0x9*(parseInt(_0x13ca24(0x1d9))/0xa);if(_0x3ee832===_0x2467e7)break;else _0x12d2d9['push'](_0x12d2d9['shift']());}catch(_0x3c6413){_0x12d2d9['push'](_0x12d2d9['shift']());}}}(a3_0x567e,0x4ebe1));export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';function a3_0x1b0b(_0x4cc72b,_0x42b0ad){var _0x567e90=a3_0x567e();return a3_0x1b0b=function(_0x1b0bb4,_0xcdc2bf){_0x1b0bb4=_0x1b0bb4-0x1d6;var _0x33162c=_0x567e90[_0x1b0bb4];return _0x33162c;},a3_0x1b0b(_0x4cc72b,_0x42b0ad);}export*from'./types.js';export*from'./errors.js';function a3_0x567e(){var _0x27554b=['45izuMvK','303336dqXFku','4794MIFSzR','63663YMFaMQ','1002346lUMOvu','1249376CFOGcX','20DZScXR','347320ujWzXH','62536arKMzZ','1673KQbJLQ'];a3_0x567e=function(){return _0x27554b;};return a3_0x567e();}
@@ -1 +1 @@
1
- const a4_0x550c7f=a4_0x4818;(function(_0x1f8974,_0x38a933){const _0xc66613=a4_0x4818,_0x9e0bb2=_0x1f8974();while(!![]){try{const _0x4208c6=-parseInt(_0xc66613(0x17c))/0x1*(parseInt(_0xc66613(0x175))/0x2)+-parseInt(_0xc66613(0x17d))/0x3*(-parseInt(_0xc66613(0x169))/0x4)+-parseInt(_0xc66613(0x179))/0x5*(parseInt(_0xc66613(0x17e))/0x6)+-parseInt(_0xc66613(0x17b))/0x7*(parseInt(_0xc66613(0x171))/0x8)+-parseInt(_0xc66613(0x16e))/0x9+-parseInt(_0xc66613(0x167))/0xa+parseInt(_0xc66613(0x172))/0xb*(parseInt(_0xc66613(0x17a))/0xc);if(_0x4208c6===_0x38a933)break;else _0x9e0bb2['push'](_0x9e0bb2['shift']());}catch(_0x1487c2){_0x9e0bb2['push'](_0x9e0bb2['shift']());}}}(a4_0x5eaf,0x919cd));import a4_0x103103 from'form-data';function a4_0x4818(_0x536db6,_0x5a0da4){const _0x5eaf3a=a4_0x5eaf();return a4_0x4818=function(_0x4818fb,_0x2ddc5b){_0x4818fb=_0x4818fb-0x167;let _0x1ed335=_0x5eaf3a[_0x4818fb];return _0x1ed335;},a4_0x4818(_0x536db6,_0x5a0da4);}export class TestResults{[a4_0x550c7f(0x16f)];constructor(_0x2455ac){const _0x3330f5=a4_0x550c7f;this[_0x3330f5(0x16f)]=_0x2455ac;}async[a4_0x550c7f(0x173)](_0x4d180c){const _0xae34eb=a4_0x550c7f,_0x550bc9=await this[_0xae34eb(0x16f)]['post'](_0xae34eb(0x177),_0x4d180c);return _0x550bc9[_0xae34eb(0x170)];}async['uploadTestResultAsset'](_0x59a6ef,_0x1ebc26,_0x1a844c){const _0x469896=a4_0x550c7f,_0x5c7b20=new a4_0x103103();_0x5c7b20[_0x469896(0x174)]('assets',_0x1a844c,{'filename':_0x469896(0x16a),'contentType':_0x469896(0x176)});const _0x1beb9a=await this[_0x469896(0x16f)][_0x469896(0x16b)](_0x469896(0x16d)+_0x59a6ef+'/results/'+_0x1ebc26+_0x469896(0x16c),_0x5c7b20,{'headers':{..._0x5c7b20[_0x469896(0x168)]()}});return _0x1beb9a['data'];}async['updateTestResult'](_0x2ca77f,_0x339245,_0x1e4177){const _0x53bea1=a4_0x550c7f,_0x47d226=await this['api'][_0x53bea1(0x16b)](_0x53bea1(0x16d)+_0x2ca77f+_0x53bea1(0x178)+_0x339245,_0x1e4177);return _0x47d226[_0x53bea1(0x170)];}}function a4_0x5eaf(){const _0x2ea39d=['assets.zip','post','/assets','/next/test-sessions/','3323511MGDJgk','api','data','8FTvInP','16555187zXtuAg','createTestSession','append','532516llvHKy','application/zip','/next/test-sessions/create','/results/','65KEVLPY','24bKYbGB','190799bTIgiD','2hGaLQy','19938vpIkRa','529668PqpkwH','4100450DcvtBf','getHeaders','44IHTDrC'];a4_0x5eaf=function(){return _0x2ea39d;};return a4_0x5eaf();}
1
+ const a4_0x99f962=a4_0x2eb5;function a4_0x2eb5(_0x22e184,_0x155324){const _0x127e89=a4_0x127e();return a4_0x2eb5=function(_0x2eb569,_0x35910e){_0x2eb569=_0x2eb569-0x11d;let _0x47fcdd=_0x127e89[_0x2eb569];return _0x47fcdd;},a4_0x2eb5(_0x22e184,_0x155324);}(function(_0x5dc7d5,_0x24caaa){const _0x197a8d=a4_0x2eb5,_0xb3fe46=_0x5dc7d5();while(!![]){try{const _0x4a6fce=parseInt(_0x197a8d(0x120))/0x1+parseInt(_0x197a8d(0x12e))/0x2*(parseInt(_0x197a8d(0x123))/0x3)+-parseInt(_0x197a8d(0x122))/0x4*(-parseInt(_0x197a8d(0x12d))/0x5)+-parseInt(_0x197a8d(0x121))/0x6+-parseInt(_0x197a8d(0x129))/0x7*(parseInt(_0x197a8d(0x12f))/0x8)+-parseInt(_0x197a8d(0x127))/0x9*(-parseInt(_0x197a8d(0x132))/0xa)+-parseInt(_0x197a8d(0x11e))/0xb;if(_0x4a6fce===_0x24caaa)break;else _0xb3fe46['push'](_0xb3fe46['shift']());}catch(_0x137a4f){_0xb3fe46['push'](_0xb3fe46['shift']());}}}(a4_0x127e,0xdddf3));import a4_0x5a7428 from'form-data';function a4_0x127e(){const _0x443f1f=['application/zip','15563690mtbVbT','/next/test-sessions/','assets','assets.zip','3798553tvzDbd','/next/test-sessions/create','1194390wmdtlS','10230768pFwLVr','2356sdeEdE','185121nJRSjj','/assets','append','post','9qtihfu','api','2618YQFgxb','data','updateTestResult','uploadTestResultAsset','4415QxVqfS','44OlzKmg','35704fVmHck','/results/'];a4_0x127e=function(){return _0x443f1f;};return a4_0x127e();}export class TestResults{[a4_0x99f962(0x128)];constructor(_0xd732bb){this['api']=_0xd732bb;}async['createTestSession'](_0x51b1c7){const _0x3a0524=a4_0x99f962,_0x8170f1=await this['api'][_0x3a0524(0x126)](_0x3a0524(0x11f),_0x51b1c7);return _0x8170f1['data'];}async[a4_0x99f962(0x12c)](_0x31655e,_0x5b0bad,_0x3d6ae3){const _0x741c21=a4_0x99f962,_0x54d193=new a4_0x5a7428();_0x54d193[_0x741c21(0x125)](_0x741c21(0x134),_0x3d6ae3,{'filename':_0x741c21(0x11d),'contentType':_0x741c21(0x131)});const _0x333694=await this[_0x741c21(0x128)][_0x741c21(0x126)](_0x741c21(0x133)+_0x31655e+_0x741c21(0x130)+_0x5b0bad+_0x741c21(0x124),_0x54d193,{'headers':{..._0x54d193['getHeaders']()}});return _0x333694[_0x741c21(0x12a)];}async[a4_0x99f962(0x12b)](_0x3c91fa,_0x59b587,_0x5cbb87){const _0x2138f1=a4_0x99f962,_0x5d648b=await this['api'][_0x2138f1(0x126)](_0x2138f1(0x133)+_0x3c91fa+_0x2138f1(0x130)+_0x59b587,_0x5cbb87);return _0x5d648b[_0x2138f1(0x12a)];}}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x41c7b4,_0x405170){var _0x3fe97c=a6_0x5343,_0x30d52f=_0x41c7b4();while(!![]){try{var _0x3d8a04=-parseInt(_0x3fe97c(0x123))/0x1+-parseInt(_0x3fe97c(0x121))/0x2+-parseInt(_0x3fe97c(0x125))/0x3+-parseInt(_0x3fe97c(0x11f))/0x4+parseInt(_0x3fe97c(0x124))/0x5*(-parseInt(_0x3fe97c(0x122))/0x6)+parseInt(_0x3fe97c(0x11e))/0x7+parseInt(_0x3fe97c(0x120))/0x8;if(_0x3d8a04===_0x405170)break;else _0x30d52f['push'](_0x30d52f['shift']());}catch(_0x3f2c0b){_0x30d52f['push'](_0x30d52f['shift']());}}}(a6_0x5c9b,0xb8204));export{ChecklyReporter}from'./reporter.js';function a6_0x5343(_0x4293d3,_0x3418b7){var _0x5c9bd1=a6_0x5c9b();return a6_0x5343=function(_0x5343a3,_0x375ba4){_0x5343a3=_0x5343a3-0x11e;var _0x11769d=_0x5c9bd1[_0x5343a3];return _0x11769d;},a6_0x5343(_0x4293d3,_0x3418b7);}export{AssetCollector}from'./asset-collector.js';export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';function a6_0x5c9b(){var _0x21b3fb=['8247806Yeafru','142480ccJMiq','28250744DlkuhL','1485774epkipQ','42AJAZCQ','1153894wygeaZ','830565npIoLP','2580687XVGTEC'];a6_0x5c9b=function(){return _0x21b3fb;};return a6_0x5c9b();}
1
+ (function(_0x589137,_0x543658){var _0x4a3201=a6_0x42a0,_0x80e43c=_0x589137();while(!![]){try{var _0x152952=-parseInt(_0x4a3201(0x187))/0x1*(-parseInt(_0x4a3201(0x183))/0x2)+parseInt(_0x4a3201(0x186))/0x3*(-parseInt(_0x4a3201(0x17e))/0x4)+-parseInt(_0x4a3201(0x181))/0x5*(-parseInt(_0x4a3201(0x182))/0x6)+parseInt(_0x4a3201(0x185))/0x7+parseInt(_0x4a3201(0x180))/0x8+parseInt(_0x4a3201(0x17f))/0x9+-parseInt(_0x4a3201(0x184))/0xa;if(_0x152952===_0x543658)break;else _0x80e43c['push'](_0x80e43c['shift']());}catch(_0x3fb05b){_0x80e43c['push'](_0x80e43c['shift']());}}}(a6_0x57dd,0x3a1ff));function a6_0x42a0(_0x49fcc3,_0xb3068b){var _0x57dd52=a6_0x57dd();return a6_0x42a0=function(_0x42a035,_0x368640){_0x42a035=_0x42a035-0x17e;var _0x194d51=_0x57dd52[_0x42a035];return _0x194d51;},a6_0x42a0(_0x49fcc3,_0xb3068b);}function a6_0x57dd(){var _0x3737b5=['649103gSTLvL','5097bPNGll','15MUNbzk','788axEpoJ','3548196CkHVcr','2721560AGPlmV','4075FhnAbe','1914tRwGBI','6626iscoFB','5640660lEhBhQ'];a6_0x57dd=function(){return _0x3737b5;};return a6_0x57dd();}export{ChecklyReporter}from'./reporter.js';export{AssetCollector}from'./asset-collector.js';export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';
package/dist/reporter.js CHANGED
@@ -1 +1 @@
1
- const a7_0x244810=a7_0xaf7b;(function(_0x3a4fdd,_0x136404){const _0x4fbca8=a7_0xaf7b,_0x4d7aa5=_0x3a4fdd();while(!![]){try{const _0x457235=-parseInt(_0x4fbca8(0x7f))/0x1*(parseInt(_0x4fbca8(0xcc))/0x2)+parseInt(_0x4fbca8(0x79))/0x3*(-parseInt(_0x4fbca8(0x9b))/0x4)+-parseInt(_0x4fbca8(0xc7))/0x5*(-parseInt(_0x4fbca8(0x89))/0x6)+-parseInt(_0x4fbca8(0xbc))/0x7+-parseInt(_0x4fbca8(0xc0))/0x8+parseInt(_0x4fbca8(0xb3))/0x9+parseInt(_0x4fbca8(0x71))/0xa*(parseInt(_0x4fbca8(0xbf))/0xb);if(_0x457235===_0x136404)break;else _0x4d7aa5['push'](_0x4d7aa5['shift']());}catch(_0x8b8bff){_0x4d7aa5['push'](_0x4d7aa5['shift']());}}}(a7_0x5baf,0x1fff8));import*as a7_0x197052 from'fs';function a7_0xaf7b(_0x23951b,_0x309cf3){const _0x5baf19=a7_0x5baf();return a7_0xaf7b=function(_0xaf7bdb,_0x4505b6){_0xaf7bdb=_0xaf7bdb-0x66;let _0x50c481=_0x5baf19[_0xaf7bdb];return _0x50c481;},a7_0xaf7b(_0x23951b,_0x309cf3);}import*as a7_0x5ad403 from'path';import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0x392266 from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';function a7_0x5baf(){const _0xb47bea=['outputPath','https://api.checklyhq.com','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','onTestEnd','GITHUB_SHA','[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:','testResultsDir','getAxiosInstance','playwright-tests','accountId','PluralRules','CHECKLY_ACCOUNT_ID','testResultId','\x22,\x20using\x20\x22production\x22','includes','replace','Projects','warn','📔\x20','checkly-report.zip','875466XsvHXI','\x0a======================================================','jsonReportPath','GITHUB_ACTOR','assetCollector','log','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','\x0a======================================================\x0a','link','134953ZFSPeF','createTestSession','entries','11jQiZUP','660112RTPvud','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','test-results/playwright-test-report.json','status','env','existsSync','\x20\x20reporter:\x20[\x0a','85UkiUoP','config','onError','PW_REPORTER','getTime','270rFvsnj','unlinkSync','readFileSync','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','zipper','[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:','uploadTestResultAsset','\x0a🔗\x20View\x20test\x20session:\x20','updateTestResult','join','retries','environment','CHECKLY_ENV','passed','FAILED','CHECKLY_API_KEY','then','createReadStream','testSessionId','url','error','package.json','🔗\x20Test\x20session\x20URL:\x20','retry','testSession','🦝\x20Checkly\x20reporter:\x20','1190960HqGqRL','https://api-test.checklyhq.com','production','utf-8','testResults','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','\x20\x20]','🎭\x20Playwright:\x20','1719cSSOZf','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','startTime','GITHUB_REPOSITORY','basename','promises','1361GRPgpP','onBegin','message','http://127.0.0.1:3000','stat','printSummary','GITHUB_EVENT_NAME','toISOString','version','PASSED','92508lBNFPm','parse','[Checkly\x20Reporter]\x20Global\x20error:','options','testCounts','en-US','failed','max','flaky','dryRun','size','Project','development','apiKey','outcome','length','staging','zipPath','432NFzpqc','projects','uploadResults','cwd'];a7_0x5baf=function(){return _0xb47bea;};return a7_0x5baf();}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';const __filename=fileURLToPath(import.meta[a7_0x244810(0x6a)]),__dirname=dirname(__filename),packageJson=JSON[a7_0x244810(0x8a)](readFileSync(join(__dirname,'..',a7_0x244810(0x6c)),a7_0x244810(0x74))),pkgVersion=packageJson[a7_0x244810(0x87)],pluralRules=new Intl[(a7_0x244810(0xa9))](a7_0x244810(0x8e)),projectForms={'zero':a7_0x244810(0x94),'one':'Project','two':a7_0x244810(0xaf),'few':a7_0x244810(0xaf),'many':'Projects','other':'Projects'};function getApiUrl(_0x3d1e1d){const _0x160d58=a7_0x244810,_0x1b823b={'local':_0x160d58(0x82),'development':'https://api-dev.checklyhq.com','staging':_0x160d58(0x72),'production':_0x160d58(0xa0)};return _0x1b823b[_0x3d1e1d];}function getEnvironment(_0x197994){const _0x4295e1=a7_0x244810,_0x526b1a=_0x197994?.[_0x4295e1(0xd7)],_0x5f4355=process[_0x4295e1(0xc4)][_0x4295e1(0xd8)],_0x3cc055=_0x526b1a||_0x5f4355||_0x4295e1(0x73),_0x324f71=['local',_0x4295e1(0x95),_0x4295e1(0x99),_0x4295e1(0x73)];if(!_0x324f71[_0x4295e1(0xad)](_0x3cc055))return console['warn'](_0x4295e1(0xa1)+_0x3cc055+_0x4295e1(0xac)),_0x4295e1(0x73);return _0x3cc055;}function getDirectoryName(){const _0x2bc3e4=a7_0x244810,_0x4f2d40=process[_0x2bc3e4(0x9e)]();let _0x132d73=a7_0x5ad403[_0x2bc3e4(0x7d)](_0x4f2d40);return(!_0x132d73||_0x132d73==='/'||_0x132d73==='.')&&(_0x132d73=_0x2bc3e4(0xa7)),_0x132d73=_0x132d73[_0x2bc3e4(0xae)](/[<>:"|?*]/g,'-'),_0x132d73[_0x2bc3e4(0x98)]>0xff&&(_0x132d73=_0x132d73['substring'](0x0,0xff)),_0x132d73;}export class ChecklyReporter{['options'];['assetCollector'];['zipper'];[a7_0x244810(0x75)];['testSession'];[a7_0x244810(0x7b)];[a7_0x244810(0x8d)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x5b471c={}){const _0x2b6e2f=a7_0x244810,_0x445e9e=getEnvironment(_0x5b471c),_0x4a49bc=getApiUrl(_0x445e9e),_0xd37938=process['env'][_0x2b6e2f(0x66)]||_0x5b471c['apiKey'],_0x2eaa68=process[_0x2b6e2f(0xc4)][_0x2b6e2f(0xaa)]||_0x5b471c['accountId'];this[_0x2b6e2f(0x8c)]={'accountId':_0x2eaa68,'apiKey':_0xd37938,'outputPath':_0x5b471c[_0x2b6e2f(0x9f)]??_0x2b6e2f(0xb2),'jsonReportPath':_0x5b471c[_0x2b6e2f(0xb5)]??_0x2b6e2f(0xc2),'testResultsDir':_0x5b471c[_0x2b6e2f(0xa5)]??'test-results','dryRun':_0x5b471c[_0x2b6e2f(0x92)]??![]},this[_0x2b6e2f(0xb7)]=new AssetCollector(this[_0x2b6e2f(0x8c)][_0x2b6e2f(0xa5)]),this[_0x2b6e2f(0xd0)]=new Zipper({'outputPath':this[_0x2b6e2f(0x8c)]['outputPath']});if(!this[_0x2b6e2f(0x8c)][_0x2b6e2f(0x92)]&&this[_0x2b6e2f(0x8c)][_0x2b6e2f(0x96)]&&this[_0x2b6e2f(0x8c)][_0x2b6e2f(0xa8)]){const _0x13c347=new a7_0x392266({'apiKey':this[_0x2b6e2f(0x8c)][_0x2b6e2f(0x96)],'accountId':this['options'][_0x2b6e2f(0xa8)],'baseUrl':_0x4a49bc});this['testResults']=new TestResults(_0x13c347[_0x2b6e2f(0xa6)]());}}[a7_0x244810(0x80)](_0x2df6e6,_0x3339f9){const _0x487736=a7_0x244810;this[_0x487736(0x7b)]=new Date();if(!this[_0x487736(0x75)])return;try{const _0x4823df=getDirectoryName(),_0x23aa94=[{'name':_0x4823df}],_0x3308bc=process['env'][_0x487736(0x7c)]?'https://github.com/'+process[_0x487736(0xc4)][_0x487736(0x7c)]:undefined,_0x5ec80d=_0x3308bc?{'repoUrl':_0x3308bc,'commitId':process['env'][_0x487736(0xa3)],'branchName':process[_0x487736(0xc4)]['GITHUB_REF_NAME'],'commitOwner':process[_0x487736(0xc4)][_0x487736(0xb6)],'commitMessage':process[_0x487736(0xc4)][_0x487736(0x85)]}:undefined;this[_0x487736(0x75)][_0x487736(0xbd)]({'name':'Playwright\x20Test\x20Session:\x20'+_0x4823df,'environment':process['env']['NODE_ENV']||'test','repoInfo':_0x5ec80d,'startedAt':this['startTime']['getTime'](),'testResults':_0x23aa94,'provider':_0x487736(0xca)})[_0x487736(0x67)](_0x4b8d03=>{const _0x15782e=_0x487736;this[_0x15782e(0x6f)]=_0x4b8d03,_0x4b8d03[_0x15782e(0xbb)]&&console[_0x15782e(0xb8)](_0x15782e(0xd3)+_0x4b8d03['link']+'\x0a');})['catch'](_0x2219a7=>{const _0x63f42a=_0x487736;console[_0x63f42a(0x6b)](_0x63f42a(0x7a),_0x2219a7[_0x63f42a(0x81)]);});}catch(_0x40020b){console['error'](_0x487736(0xd1),_0x40020b);}}[a7_0x244810(0xa2)](_0x56f5f7,_0x268351){const _0x17e7ee=a7_0x244810;try{const _0x4b2496=_0x268351[_0x17e7ee(0xc3)]==='passed'||_0x268351[_0x17e7ee(0x6e)]===_0x56f5f7[_0x17e7ee(0xd6)];if(!_0x4b2496)return;const _0x26d380=_0x56f5f7[_0x17e7ee(0x97)]()==='flaky';if(_0x26d380)this[_0x17e7ee(0x8d)][_0x17e7ee(0x91)]++,this[_0x17e7ee(0x8d)]['passed']++;else{if(_0x268351[_0x17e7ee(0xc3)]==='passed')this['testCounts'][_0x17e7ee(0xd9)]++;else _0x268351[_0x17e7ee(0xc3)]===_0x17e7ee(0x8f)&&this[_0x17e7ee(0x8d)][_0x17e7ee(0x8f)]++;}}catch(_0x5d05ed){console[_0x17e7ee(0x6b)](_0x17e7ee(0xc1),_0x5d05ed);}}async['onEnd'](){const _0x2b71ea=a7_0x244810;try{const _0x3e239b=this[_0x2b71ea(0x8c)][_0x2b71ea(0xb5)];if(!a7_0x197052[_0x2b71ea(0xc5)](_0x3e239b)){console['error'](_0x2b71ea(0xb9)+_0x3e239b),console[_0x2b71ea(0x6b)]('[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:'),console[_0x2b71ea(0x6b)](_0x2b71ea(0xc6)+_0x2b71ea(0x76)+_0x2b71ea(0xcf)+_0x2b71ea(0x77));return;}const _0x5c9f11=a7_0x197052[_0x2b71ea(0xce)](_0x3e239b,_0x2b71ea(0x74)),_0x2bf56a=JSON[_0x2b71ea(0x8a)](_0x5c9f11),_0x3b551b=await this['assetCollector']['collectAssets'](_0x2bf56a),_0x19b581=await this[_0x2b71ea(0xd0)]['createZip'](_0x3e239b,_0x3b551b);if(this[_0x2b71ea(0x75)]&&this[_0x2b71ea(0x6f)]){await this[_0x2b71ea(0x9d)](_0x2bf56a,_0x19b581['zipPath'],_0x19b581[_0x2b71ea(0xbe)]);if(!this['options']['dryRun'])try{a7_0x197052[_0x2b71ea(0xcd)](_0x19b581[_0x2b71ea(0x9a)]);}catch(_0x1474c7){console[_0x2b71ea(0xb0)]('[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20'+_0x1474c7);}}this['testResults']&&this[_0x2b71ea(0x6f)]?.[_0x2b71ea(0xbb)]&&this[_0x2b71ea(0x84)](_0x2bf56a,this[_0x2b71ea(0x6f)]);}catch(_0x4a3643){console[_0x2b71ea(0x6b)](_0x2b71ea(0xa4),_0x4a3643);}}[a7_0x244810(0x84)](_0xeb017f,_0x565bc8){const _0x3f7345=a7_0x244810,_0x2305ec=pluralRules['select'](_0xeb017f['config'][_0x3f7345(0x9c)][_0x3f7345(0x98)]);console[_0x3f7345(0xb8)](_0x3f7345(0xba)),console['log'](_0x3f7345(0x70)+pkgVersion),console[_0x3f7345(0xb8)](_0x3f7345(0x78)+_0xeb017f[_0x3f7345(0xc8)][_0x3f7345(0x87)]),console['log'](_0x3f7345(0xb1)+projectForms[_0x2305ec]+':\x20'+_0xeb017f[_0x3f7345(0xc8)][_0x3f7345(0x9c)]['map'](({name:_0x533b85})=>_0x533b85)[_0x3f7345(0xd5)](',')),console[_0x3f7345(0xb8)](_0x3f7345(0x6d)+_0x565bc8['link']),console[_0x3f7345(0xb8)](_0x3f7345(0xb4));}async['uploadResults'](_0x4b3d09,_0x29c1f1,_0x48c39f){const _0x485aa5=a7_0x244810;if(!this['testResults']||!this[_0x485aa5(0x6f)])return;try{const {failed:_0x484b67,flaky:_0x159c07}=this[_0x485aa5(0x8d)],_0x114dce=_0x484b67>0x0?_0x485aa5(0xda):_0x485aa5(0x88),_0x435e0d=_0x484b67===0x0&&_0x159c07>0x0,_0x3ef773=new Date(),_0x3873ee=this['startTime']?Math[_0x485aa5(0x90)](0x0,_0x3ef773[_0x485aa5(0xcb)]()-this[_0x485aa5(0x7b)][_0x485aa5(0xcb)]()):0x0,_0x4ef5c1=(await a7_0x197052[_0x485aa5(0x7e)][_0x485aa5(0x83)](_0x29c1f1))[_0x485aa5(0x93)];if(this[_0x485aa5(0x6f)]['testResults'][_0x485aa5(0x98)]>0x0){const _0x153a00=this['testSession']['testResults'][0x0];let _0x57f423;if(_0x4ef5c1>0x0)try{const _0x361b66=a7_0x197052[_0x485aa5(0x68)](_0x29c1f1),_0x45e57f=await this[_0x485aa5(0x75)][_0x485aa5(0xd2)](this[_0x485aa5(0x6f)][_0x485aa5(0x69)],_0x153a00[_0x485aa5(0xab)],_0x361b66);_0x57f423=_0x45e57f['assetId'];}catch(_0x4ba0c8){const _0x3cf97b=_0x4ba0c8 instanceof Error?_0x4ba0c8[_0x485aa5(0x81)]:String(_0x4ba0c8);console[_0x485aa5(0x6b)]('[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:',_0x3cf97b);}await this[_0x485aa5(0x75)][_0x485aa5(0xd4)](this[_0x485aa5(0x6f)]['testSessionId'],_0x153a00[_0x485aa5(0xab)],{'status':_0x114dce,'assetEntries':_0x57f423?_0x48c39f:undefined,'isDegraded':_0x435e0d,'startedAt':this[_0x485aa5(0x7b)]?.['toISOString'](),'stoppedAt':_0x3ef773[_0x485aa5(0x86)](),'responseTime':_0x3873ee,'metadata':{'usageData':{'s3PostTotalBytes':_0x4ef5c1}}});}}catch(_0x488791){const _0x3eb5b5=_0x488791 instanceof Error?_0x488791['message']:String(_0x488791);console[_0x485aa5(0x6b)]('[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:',_0x3eb5b5);}}[a7_0x244810(0xc9)](_0x25d656){const _0x453f3c=a7_0x244810;console[_0x453f3c(0x6b)](_0x453f3c(0x8b),_0x25d656);}}
1
+ const a7_0x59f70a=a7_0x1110;(function(_0x56e630,_0x57a466){const _0x5ba450=a7_0x1110,_0x22ae22=_0x56e630();while(!![]){try{const _0x1851e6=parseInt(_0x5ba450(0x202))/0x1*(-parseInt(_0x5ba450(0x201))/0x2)+-parseInt(_0x5ba450(0x1cf))/0x3*(parseInt(_0x5ba450(0x19f))/0x4)+parseInt(_0x5ba450(0x1d2))/0x5*(parseInt(_0x5ba450(0x1b9))/0x6)+-parseInt(_0x5ba450(0x1f0))/0x7+parseInt(_0x5ba450(0x1dc))/0x8+-parseInt(_0x5ba450(0x1c8))/0x9+-parseInt(_0x5ba450(0x19c))/0xa*(-parseInt(_0x5ba450(0x194))/0xb);if(_0x1851e6===_0x57a466)break;else _0x22ae22['push'](_0x22ae22['shift']());}catch(_0x5cb75f){_0x22ae22['push'](_0x22ae22['shift']());}}}(a7_0x326b,0x39c93));import*as a7_0x20a9f6 from'fs';import*as a7_0x1add55 from'path';function a7_0x1110(_0x37825a,_0x1bed09){const _0x326ba9=a7_0x326b();return a7_0x1110=function(_0x111074,_0x4a542d){_0x111074=_0x111074-0x192;let _0x231226=_0x326ba9[_0x111074];return _0x231226;},a7_0x1110(_0x37825a,_0x1bed09);}import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';function a7_0x326b(){const _0x18e5ec=['status','onTestEnd','link','stat','outputPath','58449SUrlZd','GITHUB_REF_NAME','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','251365AvdDTG','join','passed','select','https://github.com/','flaky','testSession','error','Project','env','1427496OtpvzT','max','accountId','Projects','en-US','warn','test-results/playwright-test-report.json','uploadTestResultAsset','assetId','retry','then','createReadStream','substring','testCounts','testResults','createTestSession','CHECKLY_ACCOUNT_ID','local','apiKey','dryRun','1416422ROuamA','version','\x0a======================================================','onError','onBegin','test-results','cwd','GITHUB_REPOSITORY','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','testResultId','🔗\x20Test\x20session\x20URL:\x20','CHECKLY_ENV','[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','zipper','printSummary','map','48194nlAwKE','9OomvMa','checkly-report.zip','GITHUB_ACTOR','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','getTime','11pAinMC','testResultsDir','CHECKLY_API_KEY','NODE_ENV','log','entries','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','[Checkly\x20Reporter]\x20Global\x20error:','5848490owdWXJ','testSessionId','package.json','4LvtssU','outcome','https://api-test.checklyhq.com','Playwright\x20Test\x20Session:\x20','readFileSync','\x0a======================================================\x0a','getAxiosInstance','https://api-dev.checklyhq.com','PW_REPORTER','onEnd','environment','toISOString','GITHUB_SHA','collectAssets','test','\x20\x20reporter:\x20[\x0a','url','startTime','message','\x22,\x20using\x20\x22production\x22','failed','PluralRules','promises','options','development','zipPath','18LKpVKO','jsonReportPath','includes','production','unlinkSync','FAILED','createZip','projects','assetCollector','config','length','replace','existsSync','uploadResults','utf-8','2148408lvPhxA','🦝\x20Checkly\x20reporter:\x20'];a7_0x326b=function(){return _0x18e5ec;};return a7_0x326b();}import a7_0x2b7161 from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';const __filename=fileURLToPath(import.meta[a7_0x59f70a(0x1af)]),__dirname=dirname(__filename),packageJson=JSON['parse'](readFileSync(join(__dirname,'..',a7_0x59f70a(0x19e)),a7_0x59f70a(0x1c7))),pkgVersion=packageJson['version'],pluralRules=new Intl[(a7_0x59f70a(0x1b4))](a7_0x59f70a(0x1e0)),projectForms={'zero':a7_0x59f70a(0x1da),'one':a7_0x59f70a(0x1da),'two':a7_0x59f70a(0x1df),'few':a7_0x59f70a(0x1df),'many':a7_0x59f70a(0x1df),'other':a7_0x59f70a(0x1df)};function getApiUrl(_0x4a7582){const _0x10a5f4=a7_0x59f70a,_0x3dcbee={'local':'http://127.0.0.1:3000','development':_0x10a5f4(0x1a6),'staging':_0x10a5f4(0x1a1),'production':'https://api.checklyhq.com'};return _0x3dcbee[_0x4a7582];}function getEnvironment(_0x47838f){const _0x113405=a7_0x59f70a,_0x1ac4c4=_0x47838f?.[_0x113405(0x1a9)],_0x7ff0ea=process['env'][_0x113405(0x1fb)],_0x37199e=_0x1ac4c4||_0x7ff0ea||'production',_0x1547fb=[_0x113405(0x1ed),_0x113405(0x1b7),'staging',_0x113405(0x1bc)];if(!_0x1547fb[_0x113405(0x1bb)](_0x37199e))return console[_0x113405(0x1e1)](_0x113405(0x1fd)+_0x37199e+_0x113405(0x1b2)),'production';return _0x37199e;}function getDirectoryName(){const _0x2d922e=a7_0x59f70a,_0xff4474=process[_0x2d922e(0x1f6)]();let _0x5adab1=a7_0x1add55['basename'](_0xff4474);return(!_0x5adab1||_0x5adab1==='/'||_0x5adab1==='.')&&(_0x5adab1='playwright-tests'),_0x5adab1=_0x5adab1[_0x2d922e(0x1c4)](/[<>:"|?*]/g,'-'),_0x5adab1['length']>0xff&&(_0x5adab1=_0x5adab1[_0x2d922e(0x1e8)](0x0,0xff)),_0x5adab1;}export class ChecklyReporter{[a7_0x59f70a(0x1b6)];[a7_0x59f70a(0x1c1)];[a7_0x59f70a(0x1fe)];[a7_0x59f70a(0x1ea)];[a7_0x59f70a(0x1d8)];[a7_0x59f70a(0x1b0)];[a7_0x59f70a(0x1e9)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x41aec0={}){const _0x1eece8=a7_0x59f70a,_0x47bc50=getEnvironment(_0x41aec0),_0x252358=getApiUrl(_0x47bc50),_0x16dde3=process[_0x1eece8(0x1db)][_0x1eece8(0x196)]||_0x41aec0[_0x1eece8(0x1ee)],_0x4ac4b8=process[_0x1eece8(0x1db)][_0x1eece8(0x1ec)]||_0x41aec0['accountId'];this[_0x1eece8(0x1b6)]={'accountId':_0x4ac4b8,'apiKey':_0x16dde3,'outputPath':_0x41aec0[_0x1eece8(0x1ce)]??_0x1eece8(0x203),'jsonReportPath':_0x41aec0[_0x1eece8(0x1ba)]??_0x1eece8(0x1e2),'testResultsDir':_0x41aec0[_0x1eece8(0x195)]??_0x1eece8(0x1f5),'dryRun':_0x41aec0[_0x1eece8(0x1ef)]??![]},this[_0x1eece8(0x1c1)]=new AssetCollector(this[_0x1eece8(0x1b6)][_0x1eece8(0x195)]),this['zipper']=new Zipper({'outputPath':this[_0x1eece8(0x1b6)][_0x1eece8(0x1ce)]});if(!this[_0x1eece8(0x1b6)]['dryRun']&&this['options'][_0x1eece8(0x1ee)]&&this[_0x1eece8(0x1b6)][_0x1eece8(0x1de)]){const _0x3ab771=new a7_0x2b7161({'apiKey':this[_0x1eece8(0x1b6)][_0x1eece8(0x1ee)],'accountId':this[_0x1eece8(0x1b6)]['accountId'],'baseUrl':_0x252358});this[_0x1eece8(0x1ea)]=new TestResults(_0x3ab771[_0x1eece8(0x1a5)]());}}[a7_0x59f70a(0x1f4)](_0x3e8cb7,_0x3a7e2d){const _0x3675fa=a7_0x59f70a;this[_0x3675fa(0x1b0)]=new Date();if(!this['testResults'])return;try{const _0x43ff2c=getDirectoryName(),_0x14e31e=[{'name':_0x43ff2c}],_0x13b2cd=process[_0x3675fa(0x1db)]['GITHUB_REPOSITORY']?_0x3675fa(0x1d6)+process['env'][_0x3675fa(0x1f7)]:undefined,_0xb99e88=_0x13b2cd?{'repoUrl':_0x13b2cd,'commitId':process[_0x3675fa(0x1db)][_0x3675fa(0x1ab)],'branchName':process[_0x3675fa(0x1db)][_0x3675fa(0x1d0)],'commitOwner':process[_0x3675fa(0x1db)][_0x3675fa(0x204)],'commitMessage':process['env']['GITHUB_EVENT_NAME']}:undefined;this[_0x3675fa(0x1ea)][_0x3675fa(0x1eb)]({'name':_0x3675fa(0x1a2)+_0x43ff2c,'environment':process[_0x3675fa(0x1db)][_0x3675fa(0x197)]||_0x3675fa(0x1ad),'repoInfo':_0xb99e88,'startedAt':this[_0x3675fa(0x1b0)]['getTime'](),'testResults':_0x14e31e,'provider':_0x3675fa(0x1a7)})[_0x3675fa(0x1e6)](_0x486313=>{const _0x57abad=_0x3675fa;this[_0x57abad(0x1d8)]=_0x486313;})['catch'](_0x58bd68=>{const _0x2a3b9f=_0x3675fa;console['error']('[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:',_0x58bd68[_0x2a3b9f(0x1b1)]);});}catch(_0x3bbf89){console['error']('[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:',_0x3bbf89);}}[a7_0x59f70a(0x1cb)](_0xe4a4c6,_0x2747e3){const _0xe21c61=a7_0x59f70a;try{const _0x4cb088=_0x2747e3[_0xe21c61(0x1ca)]===_0xe21c61(0x1d4)||_0x2747e3[_0xe21c61(0x1e5)]===_0xe4a4c6['retries'];if(!_0x4cb088)return;const _0xca72e3=_0xe4a4c6[_0xe21c61(0x1a0)]()===_0xe21c61(0x1d7);if(_0xca72e3)this[_0xe21c61(0x1e9)][_0xe21c61(0x1d7)]++,this[_0xe21c61(0x1e9)][_0xe21c61(0x1d4)]++;else{if(_0x2747e3['status']===_0xe21c61(0x1d4))this[_0xe21c61(0x1e9)][_0xe21c61(0x1d4)]++;else _0x2747e3[_0xe21c61(0x1ca)]===_0xe21c61(0x1b3)&&this['testCounts']['failed']++;}}catch(_0x405795){console[_0xe21c61(0x1d9)](_0xe21c61(0x19a),_0x405795);}}async[a7_0x59f70a(0x1a8)](){const _0x45e28a=a7_0x59f70a;try{const _0x17e659=this[_0x45e28a(0x1b6)][_0x45e28a(0x1ba)];if(!a7_0x20a9f6[_0x45e28a(0x1c5)](_0x17e659)){console['error'](_0x45e28a(0x1f8)+_0x17e659),console[_0x45e28a(0x1d9)]('[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:'),console[_0x45e28a(0x1d9)](_0x45e28a(0x1ae)+_0x45e28a(0x1d1)+'\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a'+'\x20\x20]');return;}const _0x3be43c=a7_0x20a9f6[_0x45e28a(0x1a3)](_0x17e659,_0x45e28a(0x1c7)),_0x4fbe60=JSON['parse'](_0x3be43c),_0x29c683=await this[_0x45e28a(0x1c1)][_0x45e28a(0x1ac)](_0x4fbe60),_0x21708c=await this[_0x45e28a(0x1fe)][_0x45e28a(0x1bf)](_0x17e659,_0x29c683);if(this[_0x45e28a(0x1ea)]&&this['testSession']){await this['uploadResults'](_0x4fbe60,_0x21708c['zipPath'],_0x21708c[_0x45e28a(0x199)]);if(!this[_0x45e28a(0x1b6)][_0x45e28a(0x1ef)])try{a7_0x20a9f6[_0x45e28a(0x1bd)](_0x21708c[_0x45e28a(0x1b8)]);}catch(_0x3febb6){console[_0x45e28a(0x1e1)](_0x45e28a(0x192)+_0x3febb6);}}this['testResults']&&this[_0x45e28a(0x1d8)]?.[_0x45e28a(0x1cc)]&&this[_0x45e28a(0x1ff)](_0x4fbe60,this[_0x45e28a(0x1d8)]);}catch(_0x12d929){console[_0x45e28a(0x1d9)]('[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:',_0x12d929);}}[a7_0x59f70a(0x1ff)](_0x11a9d0,_0x276fe5){const _0x5ec8cf=a7_0x59f70a,_0x2e624a=pluralRules[_0x5ec8cf(0x1d5)](_0x11a9d0[_0x5ec8cf(0x1c2)][_0x5ec8cf(0x1c0)][_0x5ec8cf(0x1c3)]);console[_0x5ec8cf(0x198)](_0x5ec8cf(0x1a4)),console['log'](_0x5ec8cf(0x1c9)+pkgVersion),console['log']('🎭\x20Playwright:\x20'+_0x11a9d0[_0x5ec8cf(0x1c2)][_0x5ec8cf(0x1f1)]),console['log']('📔\x20'+projectForms[_0x2e624a]+':\x20'+_0x11a9d0[_0x5ec8cf(0x1c2)][_0x5ec8cf(0x1c0)][_0x5ec8cf(0x200)](({name:_0x52ccb8})=>_0x52ccb8)[_0x5ec8cf(0x1d3)](',')),console[_0x5ec8cf(0x198)](_0x5ec8cf(0x1fa)+_0x276fe5[_0x5ec8cf(0x1cc)]),console[_0x5ec8cf(0x198)](_0x5ec8cf(0x1f2));}async[a7_0x59f70a(0x1c6)](_0x447a4b,_0x297a7c,_0x38862e){const _0x3f839a=a7_0x59f70a;if(!this[_0x3f839a(0x1ea)]||!this['testSession'])return;try{const {failed:_0x2dcef8,flaky:_0x432b74}=this[_0x3f839a(0x1e9)],_0x2e8368=_0x2dcef8>0x0?_0x3f839a(0x1be):'PASSED',_0x99e3fb=_0x2dcef8===0x0&&_0x432b74>0x0,_0x5c4713=new Date(),_0x5c01a8=this['startTime']?Math[_0x3f839a(0x1dd)](0x0,_0x5c4713[_0x3f839a(0x193)]()-this[_0x3f839a(0x1b0)]['getTime']()):0x0,_0x3b77fd=(await a7_0x20a9f6[_0x3f839a(0x1b5)][_0x3f839a(0x1cd)](_0x297a7c))['size'];if(this[_0x3f839a(0x1d8)][_0x3f839a(0x1ea)]['length']>0x0){const _0x2579ec=this[_0x3f839a(0x1d8)][_0x3f839a(0x1ea)][0x0];let _0x30205b;if(_0x3b77fd>0x0)try{const _0x221e8b=a7_0x20a9f6[_0x3f839a(0x1e7)](_0x297a7c),_0x453f38=await this[_0x3f839a(0x1ea)][_0x3f839a(0x1e3)](this[_0x3f839a(0x1d8)][_0x3f839a(0x19d)],_0x2579ec[_0x3f839a(0x1f9)],_0x221e8b);_0x30205b=_0x453f38[_0x3f839a(0x1e4)];}catch(_0x5e4bb9){const _0x1ca9de=_0x5e4bb9 instanceof Error?_0x5e4bb9['message']:String(_0x5e4bb9);console[_0x3f839a(0x1d9)]('[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:',_0x1ca9de);}await this['testResults']['updateTestResult'](this['testSession'][_0x3f839a(0x19d)],_0x2579ec[_0x3f839a(0x1f9)],{'status':_0x2e8368,'assetEntries':_0x30205b?_0x38862e:undefined,'isDegraded':_0x99e3fb,'startedAt':this['startTime']?.[_0x3f839a(0x1aa)](),'stoppedAt':_0x5c4713[_0x3f839a(0x1aa)](),'responseTime':_0x5c01a8,'metadata':{'usageData':{'s3PostTotalBytes':_0x3b77fd}}});}}catch(_0x28f3a7){const _0xad2a7b=_0x28f3a7 instanceof Error?_0x28f3a7[_0x3f839a(0x1b1)]:String(_0x28f3a7);console[_0x3f839a(0x1d9)](_0x3f839a(0x1fc),_0xad2a7b);}}[a7_0x59f70a(0x1f3)](_0x431893){const _0x55268b=a7_0x59f70a;console['error'](_0x55268b(0x19b),_0x431893);}}
package/dist/zipper.js CHANGED
@@ -1 +1 @@
1
- const a9_0x56b225=a9_0x1a9c;(function(_0xc5140f,_0x1e8890){const _0x5b680e=a9_0x1a9c,_0x5253a5=_0xc5140f();while(!![]){try{const _0x1b2b8f=parseInt(_0x5b680e(0xec))/0x1*(parseInt(_0x5b680e(0xe3))/0x2)+parseInt(_0x5b680e(0xca))/0x3+parseInt(_0x5b680e(0xbb))/0x4*(parseInt(_0x5b680e(0xd0))/0x5)+parseInt(_0x5b680e(0xbd))/0x6*(-parseInt(_0x5b680e(0xd9))/0x7)+parseInt(_0x5b680e(0xe1))/0x8+-parseInt(_0x5b680e(0xcc))/0x9+-parseInt(_0x5b680e(0xe6))/0xa*(-parseInt(_0x5b680e(0xdb))/0xb);if(_0x1b2b8f===_0x1e8890)break;else _0x5253a5['push'](_0x5253a5['shift']());}catch(_0x1b732b){_0x5253a5['push'](_0x5253a5['shift']());}}}(a9_0x1e93,0x7e1f3));import*as a9_0x30bf38 from'fs';import*as a9_0x1f52b1 from'path';function a9_0x1e93(){const _0x205a58=['pointer','2548592dttjhb','indexOf','6pakkpo','join','utf-8','9369820HlCUHn','playwright-test-report-','contents','output/playwright-test-report.json','pipe','outputPath','108371XWuKpy','parse','8ADdmSz','transformAttachmentPaths','570642UBiJtu','sourcePath','warn','.json','entry','close','archivePath','createWriteStream','Report\x20file\x20not\x20found:\x20','string','finalize','replace','substring','310881acTqsp','file','9107226kxyhZa','normalizeAttachmentPath','object','attachments','323835ninWuV','[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20','readFileSync','now','error','csize','isArray','values','forEach','21SPlLhf','push','11qRsLgs','path','tmpdir','createZip','stringify'];a9_0x1e93=function(){return _0x205a58;};return a9_0x1e93();}import*as a9_0x17b355 from'os';function a9_0x1a9c(_0x5858c1,_0x3b3894){const _0x1e93b6=a9_0x1e93();return a9_0x1a9c=function(_0x1a9c4e,_0x1105a2){_0x1a9c4e=_0x1a9c4e-0xbb;let _0x5df851=_0x1e93b6[_0x1a9c4e];return _0x5df851;},a9_0x1a9c(_0x5858c1,_0x3b3894);}import{ZipArchive}from'archiver';export class Zipper{[a9_0x56b225(0xeb)];constructor(_0x1177f5){const _0x28784f=a9_0x56b225;this[_0x28784f(0xeb)]=_0x1177f5['outputPath'];}async[a9_0x56b225(0xde)](_0x1008ff,_0xeaaad5){const _0xd6830=[];return new Promise((_0x3323e4,_0xd4a075)=>{const _0x59a7cf=a9_0x1a9c;try{const _0x625fc1=a9_0x30bf38[_0x59a7cf(0xc4)](this[_0x59a7cf(0xeb)]),_0x306f8d=new ZipArchive({'zlib':{'level':0x0}});_0x306f8d['on'](_0x59a7cf(0xc1),_0x2d2dc9=>{const _0x38b2df=_0x59a7cf,_0x5aee1b=_0x2d2dc9['name']['replace'](/\\/g,'/'),_0x31dd03=_0x2d2dc9['_offsets']?.[_0x38b2df(0xe8)]??0x0,_0x46e271=_0x2d2dc9['_offsets']?.[_0x38b2df(0xe8)]+(_0x2d2dc9[_0x38b2df(0xd5)]??0x0)-0x1;_0xd6830[_0x38b2df(0xda)]({'name':_0x5aee1b,'start':_0x31dd03,'end':_0x46e271});}),_0x625fc1['on'](_0x59a7cf(0xc2),()=>{const _0x7c1142=_0x59a7cf,_0x2584d0=_0x306f8d[_0x7c1142(0xe0)]();_0x3323e4({'zipPath':this['outputPath'],'size':_0x2584d0,'entryCount':_0xd6830['length'],'entries':_0xd6830});}),_0x306f8d['on'](_0x59a7cf(0xd4),_0x2cc0c3=>{_0xd4a075(_0x2cc0c3);}),_0x625fc1['on'](_0x59a7cf(0xd4),_0x1ba911=>{_0xd4a075(_0x1ba911);}),_0x306f8d[_0x59a7cf(0xea)](_0x625fc1);if(!a9_0x30bf38['existsSync'](_0x1008ff)){_0xd4a075(new Error(_0x59a7cf(0xc5)+_0x1008ff));return;}const _0xc4d3a3=this['transformJsonReport'](_0x1008ff);_0x306f8d[_0x59a7cf(0xcb)](_0xc4d3a3,{'name':_0x59a7cf(0xe9)});for(const _0xcda0cf of _0xeaaad5){if(!a9_0x30bf38['existsSync'](_0xcda0cf[_0x59a7cf(0xbe)])){_0xd4a075(new Error('Asset\x20file\x20not\x20found:\x20'+_0xcda0cf[_0x59a7cf(0xbe)]));return;}_0x306f8d[_0x59a7cf(0xcb)](_0xcda0cf['sourcePath'],{'name':_0xcda0cf[_0x59a7cf(0xc3)]});}_0x306f8d[_0x59a7cf(0xc7)]();}catch(_0x4350ef){_0xd4a075(_0x4350ef);}});}['transformJsonReport'](_0x1c1bc0){const _0xa81b83=a9_0x56b225,_0x3712fd=a9_0x30bf38[_0xa81b83(0xd2)](_0x1c1bc0,_0xa81b83(0xe5)),_0x40dc79=JSON[_0xa81b83(0xed)](_0x3712fd);this[_0xa81b83(0xbc)](_0x40dc79);const _0x5ae1dc=a9_0x1f52b1[_0xa81b83(0xe4)](a9_0x17b355[_0xa81b83(0xdd)](),_0xa81b83(0xe7)+Date[_0xa81b83(0xd3)]()+_0xa81b83(0xc0));return a9_0x30bf38['writeFileSync'](_0x5ae1dc,JSON[_0xa81b83(0xdf)](_0x40dc79,null,0x2)),_0x5ae1dc;}['transformAttachmentPaths'](_0x28f587){const _0xd570b0=a9_0x56b225;if(typeof _0x28f587!==_0xd570b0(0xce)||_0x28f587===null)return;if(Array[_0xd570b0(0xd6)](_0x28f587)){_0x28f587[_0xd570b0(0xd8)](_0xfa8b04=>this['transformAttachmentPaths'](_0xfa8b04));return;}_0x28f587[_0xd570b0(0xcf)]&&Array['isArray'](_0x28f587[_0xd570b0(0xcf)])&&_0x28f587[_0xd570b0(0xcf)][_0xd570b0(0xd8)](_0x530566=>{const _0x3c0774=_0xd570b0;_0x530566[_0x3c0774(0xdc)]&&typeof _0x530566[_0x3c0774(0xdc)]===_0x3c0774(0xc6)&&(_0x530566['path']=this[_0x3c0774(0xcd)](_0x530566[_0x3c0774(0xdc)]));}),Object[_0xd570b0(0xd7)](_0x28f587)['forEach'](_0x4f04db=>this['transformAttachmentPaths'](_0x4f04db));}[a9_0x56b225(0xcd)](_0x5a5755){const _0x327384=a9_0x56b225,_0x42305e=_0x5a5755[_0x327384(0xe2)]('test-results');if(_0x42305e!==-0x1)return _0x5a5755[_0x327384(0xc9)](_0x42305e)[_0x327384(0xc8)](/\\/g,'/');return console[_0x327384(0xbf)](_0x327384(0xd1)+_0x5a5755),_0x5a5755;}}
1
+ const a9_0x2b7114=a9_0x33d0;function a9_0x33d0(_0x473665,_0x79480c){const _0x408210=a9_0x4082();return a9_0x33d0=function(_0x33d018,_0x933ac8){_0x33d018=_0x33d018-0x1c9;let _0x5eeeac=_0x408210[_0x33d018];return _0x5eeeac;},a9_0x33d0(_0x473665,_0x79480c);}(function(_0x4a07d0,_0x38ee3a){const _0x4491eb=a9_0x33d0,_0x1ead4f=_0x4a07d0();while(!![]){try{const _0x2ac1b3=-parseInt(_0x4491eb(0x1d1))/0x1*(parseInt(_0x4491eb(0x1da))/0x2)+-parseInt(_0x4491eb(0x1f5))/0x3*(parseInt(_0x4491eb(0x1e6))/0x4)+-parseInt(_0x4491eb(0x1d8))/0x5*(parseInt(_0x4491eb(0x1fe))/0x6)+-parseInt(_0x4491eb(0x1ee))/0x7+-parseInt(_0x4491eb(0x1e0))/0x8*(parseInt(_0x4491eb(0x1d5))/0x9)+-parseInt(_0x4491eb(0x1f7))/0xa*(parseInt(_0x4491eb(0x1f0))/0xb)+-parseInt(_0x4491eb(0x1e9))/0xc*(-parseInt(_0x4491eb(0x1d6))/0xd);if(_0x2ac1b3===_0x38ee3a)break;else _0x1ead4f['push'](_0x1ead4f['shift']());}catch(_0x45e815){_0x1ead4f['push'](_0x1ead4f['shift']());}}}(a9_0x4082,0xe9788));import*as a9_0x210cab from'fs';import*as a9_0x531dd8 from'path';import*as a9_0x173ac5 from'os';import{ZipArchive}from'archiver';function a9_0x4082(){const _0x896d0b=['error','utf-8','tmpdir','lastIndexOf','createZip','108weUDLx','replace','push','57780lpCOtZ','now','playwright-test-report-','substring','_offsets','62986pQoqLG','archivePath','11xwaKee','output/playwright-test-report.json','normalizeAttachmentPath','transformAttachmentPaths','transformJsonReport','105843TLBvVn','file','18620230aQkGeX','pointer','close','Report\x20file\x20not\x20found:\x20','screenshots/','writeFileSync','forEach','6DEZRGS','finalize','indexOf','attachments','sourcePath','contents','__screenshots__/','-snapshots/','path','isArray','.json','1621MUXpJg','Asset\x20file\x20not\x20found:\x20','existsSync','parse','261PnqcNT','19773htTSjv','createWriteStream','5665045lbpHsH','join','2230LOBqyY','length','outputPath','string','values','warn','166424OeFgyi'];a9_0x4082=function(){return _0x896d0b;};return a9_0x4082();}export class Zipper{[a9_0x2b7114(0x1dc)];constructor(_0x5097b1){const _0x179d09=a9_0x2b7114;this['outputPath']=_0x5097b1[_0x179d09(0x1dc)];}async[a9_0x2b7114(0x1e5)](_0x41e9a9,_0x37e059){const _0xe2f2b=[];return new Promise((_0x3bc307,_0x3a5103)=>{const _0x4268b2=a9_0x33d0;try{const _0x4281de=a9_0x210cab[_0x4268b2(0x1d7)](this[_0x4268b2(0x1dc)]),_0x18df51=new ZipArchive({'zlib':{'level':0x0}});_0x18df51['on']('entry',_0xeb6589=>{const _0x2d8911=_0x4268b2,_0x30720b=_0xeb6589['name'][_0x2d8911(0x1e7)](/\\/g,'/'),_0x58c275=_0xeb6589[_0x2d8911(0x1ed)]?.[_0x2d8911(0x1cb)]??0x0,_0x5cf855=_0xeb6589[_0x2d8911(0x1ed)]?.[_0x2d8911(0x1cb)]+(_0xeb6589['csize']??0x0)-0x1;_0xe2f2b[_0x2d8911(0x1e8)]({'name':_0x30720b,'start':_0x58c275,'end':_0x5cf855});}),_0x4281de['on'](_0x4268b2(0x1f9),()=>{const _0x29c491=_0x4268b2,_0x51966e=_0x18df51[_0x29c491(0x1f8)]();_0x3bc307({'zipPath':this[_0x29c491(0x1dc)],'size':_0x51966e,'entryCount':_0xe2f2b[_0x29c491(0x1db)],'entries':_0xe2f2b});}),_0x18df51['on'](_0x4268b2(0x1e1),_0x2bd253=>{_0x3a5103(_0x2bd253);}),_0x4281de['on']('error',_0xdb8dab=>{_0x3a5103(_0xdb8dab);}),_0x18df51['pipe'](_0x4281de);if(!a9_0x210cab[_0x4268b2(0x1d3)](_0x41e9a9)){_0x3a5103(new Error(_0x4268b2(0x1fa)+_0x41e9a9));return;}const _0xa88159=this[_0x4268b2(0x1f4)](_0x41e9a9);_0x18df51[_0x4268b2(0x1f6)](_0xa88159,{'name':_0x4268b2(0x1f1)});for(const _0x458a00 of _0x37e059){if(!a9_0x210cab['existsSync'](_0x458a00[_0x4268b2(0x1ca)])){_0x3a5103(new Error(_0x4268b2(0x1d2)+_0x458a00[_0x4268b2(0x1ca)]));return;}_0x18df51['file'](_0x458a00[_0x4268b2(0x1ca)],{'name':_0x458a00[_0x4268b2(0x1ef)]});}_0x18df51[_0x4268b2(0x1ff)]();}catch(_0x59f170){_0x3a5103(_0x59f170);}});}[a9_0x2b7114(0x1f4)](_0x277e9c){const _0x1a803f=a9_0x2b7114,_0x588f78=a9_0x210cab['readFileSync'](_0x277e9c,_0x1a803f(0x1e2)),_0x59e1ec=JSON[_0x1a803f(0x1d4)](_0x588f78);this[_0x1a803f(0x1f3)](_0x59e1ec);const _0x17291a=a9_0x531dd8[_0x1a803f(0x1d9)](a9_0x173ac5[_0x1a803f(0x1e3)](),_0x1a803f(0x1eb)+Date[_0x1a803f(0x1ea)]()+_0x1a803f(0x1d0));return a9_0x210cab[_0x1a803f(0x1fc)](_0x17291a,JSON['stringify'](_0x59e1ec,null,0x2)),_0x17291a;}['transformAttachmentPaths'](_0x337c5d){const _0x30ebd8=a9_0x2b7114;if(typeof _0x337c5d!=='object'||_0x337c5d===null)return;if(Array['isArray'](_0x337c5d)){_0x337c5d[_0x30ebd8(0x1fd)](_0x561b92=>this['transformAttachmentPaths'](_0x561b92));return;}_0x337c5d[_0x30ebd8(0x1c9)]&&Array[_0x30ebd8(0x1cf)](_0x337c5d['attachments'])&&_0x337c5d[_0x30ebd8(0x1c9)][_0x30ebd8(0x1fd)](_0x5bf381=>{const _0x58868c=_0x30ebd8;_0x5bf381[_0x58868c(0x1ce)]&&typeof _0x5bf381['path']===_0x58868c(0x1dd)&&(_0x5bf381[_0x58868c(0x1ce)]=this[_0x58868c(0x1f2)](_0x5bf381[_0x58868c(0x1ce)]));}),Object[_0x30ebd8(0x1de)](_0x337c5d)[_0x30ebd8(0x1fd)](_0x314306=>this[_0x30ebd8(0x1f3)](_0x314306));}[a9_0x2b7114(0x1f2)](_0x4607ee){const _0x320676=a9_0x2b7114,_0x31725d=_0x4607ee[_0x320676(0x1e7)](/\\/g,'/'),_0x1fdd36=_0x31725d[_0x320676(0x200)]('test-results/');if(_0x1fdd36!==-0x1)return _0x31725d['substring'](_0x1fdd36);const _0x1c7e53=_0x31725d[_0x320676(0x200)](_0x320676(0x1cd));if(_0x1c7e53!==-0x1){const _0x2f5511=_0x31725d[_0x320676(0x1ec)](0x0,_0x1c7e53),_0xd98156=_0x2f5511[_0x320676(0x1e4)]('/'),_0x1b73c5=_0xd98156!==-0x1?_0xd98156+0x1:0x0;return _0x31725d[_0x320676(0x1ec)](_0x1b73c5);}const _0x2e2faf=[_0x320676(0x1cc),'__snapshots__/',_0x320676(0x1fb),'snapshots/'];for(const _0x59ba9d of _0x2e2faf){const _0x107037=_0x31725d['indexOf'](_0x59ba9d);if(_0x107037!==-0x1)return _0x31725d[_0x320676(0x1ec)](_0x107037);}return console[_0x320676(0x1df)]('[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20'+_0x4607ee),_0x4607ee;}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkly/playwright-reporter",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Playwright reporter that generates ZIP archives containing JSON reports and test assets",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",