@checkly/playwright-reporter 0.1.4 → 0.1.5

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
- function a0_0x384b(_0x378286,_0x5ed1a7){const _0x38ea3f=a0_0x38ea();return a0_0x384b=function(_0x384b91,_0x3f2658){_0x384b91=_0x384b91-0x193;let _0x106896=_0x38ea3f[_0x384b91];return _0x106896;},a0_0x384b(_0x378286,_0x5ed1a7);}const a0_0x4c5a26=a0_0x384b;function a0_0x38ea(){const _0x34e052=['.htm','.log','3832592KPLdct','image/jpeg','application/zip','.jpeg','includes','3TlvlNG','join','.svg','14261700BQnwYe','basename','determineAssetType','.avi','has','testResultsDir','.zip','8lAWhAf','video/x-msvideo','collectAssetsRecursive','video','collectAssets','shouldSkipFile','520HpApEj','isDirectory','relative','5138ntFHXT','getImageContentType','.html','.json','71586ufFRAt','.txt','.mov','trace','other','image/png','screenshot','video/webm','.webm','.gif','application/json','23083687cVRYol','resolve','.jpg','video/mp4','application/octet-stream','97025dNsuDX','name','attachment','.mp4','createAsset','image/gif','extname','getVideoContentType','9028467xMjwkl','.png','existsSync','readdirSync','138qsFovQ','push','text/html','text/plain','isFile'];a0_0x38ea=function(){return _0x34e052;};return a0_0x38ea();}(function(_0x2b8eba,_0x40856b){const _0x3f4c29=a0_0x384b,_0x107a42=_0x2b8eba();while(!![]){try{const _0x2ca200=-parseInt(_0x3f4c29(0x1b0))/0x1*(parseInt(_0x3f4c29(0x1b9))/0x2)+parseInt(_0x3f4c29(0x1a6))/0x3*(-parseInt(_0x3f4c29(0x1a1))/0x4)+-parseInt(_0x3f4c29(0x1cd))/0x5*(-parseInt(_0x3f4c29(0x19a))/0x6)+parseInt(_0x3f4c29(0x196))/0x7+parseInt(_0x3f4c29(0x1b6))/0x8*(-parseInt(_0x3f4c29(0x1bd))/0x9)+-parseInt(_0x3f4c29(0x1a9))/0xa+parseInt(_0x3f4c29(0x1c8))/0xb;if(_0x2ca200===_0x40856b)break;else _0x107a42['push'](_0x107a42['shift']());}catch(_0x3158fb){_0x107a42['push'](_0x107a42['shift']());}}}(a0_0x38ea,0xded5d));import*as a0_0x214fe5 from'fs';import*as a0_0x2c5356 from'path';export class AssetCollector{['testResultsDir'];constructor(_0x540630){this['testResultsDir']=_0x540630;}async[a0_0x4c5a26(0x1b4)](_0x4ba095){const _0x26e3a1=a0_0x4c5a26,_0x5c38b7=[],_0x5e9c73=new Set();if(!a0_0x214fe5[_0x26e3a1(0x198)](this['testResultsDir']))return _0x5c38b7;return await this[_0x26e3a1(0x1b2)](this[_0x26e3a1(0x1ae)],'',_0x5c38b7,_0x5e9c73),_0x5c38b7;}async['collectAssetsRecursive'](_0x25842c,_0x14bc12,_0x46657d,_0xee04cb){const _0x311597=a0_0x4c5a26;let _0x426e58;try{_0x426e58=a0_0x214fe5[_0x311597(0x199)](_0x25842c,{'withFileTypes':!![]});}catch{return;}const _0x2c21da=a0_0x2c5356[_0x311597(0x1aa)](a0_0x2c5356[_0x311597(0x1c9)](this[_0x311597(0x1ae)]));for(const _0x1f34ae of _0x426e58){const _0x482219=a0_0x2c5356['join'](_0x25842c,_0x1f34ae['name']),_0x43b732=a0_0x2c5356[_0x311597(0x1b8)](this[_0x311597(0x1ae)],_0x482219),_0x3750c6=a0_0x2c5356['join'](_0x2c21da,_0x43b732);if(this['shouldSkipFile'](_0x1f34ae[_0x311597(0x1ce)]))continue;if(_0x1f34ae[_0x311597(0x1b7)]())await this[_0x311597(0x1b2)](_0x482219,_0x3750c6,_0x46657d,_0xee04cb);else{if(_0x1f34ae[_0x311597(0x19e)]()){if(!_0xee04cb[_0x311597(0x1ad)](_0x482219)){const _0xc20c4b=this[_0x311597(0x1d1)](_0x482219,_0x3750c6);_0x46657d[_0x311597(0x19b)](_0xc20c4b),_0xee04cb['add'](_0x482219);}}}}}[a0_0x4c5a26(0x1b5)](_0x3c827f){const _0x37a76c=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x37a76c['some'](_0x378699=>_0x378699['test'](_0x3c827f));}[a0_0x4c5a26(0x1d1)](_0x4fb38e,_0x1dcead){const _0x2fe0d3=a0_0x4c5a26,_0x455c84=a0_0x2c5356[_0x2fe0d3(0x194)](_0x4fb38e)['toLowerCase'](),{type:_0x4a9523,contentType:_0xdf692a}=this[_0x2fe0d3(0x1ab)](_0x455c84),_0x32c674=_0x1dcead['split'](a0_0x2c5356['sep'])[_0x2fe0d3(0x1a7)]('/');return{'sourcePath':_0x4fb38e,'archivePath':_0x32c674,'type':_0x4a9523,'contentType':_0xdf692a};}['determineAssetType'](_0x18ea93){const _0x5bb93d=a0_0x4c5a26;if([_0x5bb93d(0x197),_0x5bb93d(0x1ca),_0x5bb93d(0x1a4),_0x5bb93d(0x1c6),'.bmp',_0x5bb93d(0x1a8)][_0x5bb93d(0x1a5)](_0x18ea93))return{'type':_0x5bb93d(0x1c3),'contentType':this[_0x5bb93d(0x1ba)](_0x18ea93)};if([_0x5bb93d(0x1c5),_0x5bb93d(0x1d0),_0x5bb93d(0x1ac),_0x5bb93d(0x1bf)][_0x5bb93d(0x1a5)](_0x18ea93))return{'type':_0x5bb93d(0x1b3),'contentType':this[_0x5bb93d(0x195)](_0x18ea93)};if(_0x18ea93===_0x5bb93d(0x1af))return{'type':_0x5bb93d(0x1c0),'contentType':_0x5bb93d(0x1a3)};if(_0x18ea93===_0x5bb93d(0x1bb)||_0x18ea93===_0x5bb93d(0x19f))return{'type':_0x5bb93d(0x1cf),'contentType':_0x5bb93d(0x19c)};if(_0x18ea93===_0x5bb93d(0x1bc))return{'type':_0x5bb93d(0x1cf),'contentType':_0x5bb93d(0x1c7)};if(_0x18ea93===_0x5bb93d(0x1be)||_0x18ea93===_0x5bb93d(0x1a0))return{'type':'attachment','contentType':_0x5bb93d(0x19d)};return{'type':_0x5bb93d(0x1c1),'contentType':_0x5bb93d(0x1cc)};}[a0_0x4c5a26(0x1ba)](_0x4d6c64){const _0x1b524b=a0_0x4c5a26,_0xf1f35c={'.png':_0x1b524b(0x1c2),'.jpg':_0x1b524b(0x1a2),'.jpeg':_0x1b524b(0x1a2),'.gif':_0x1b524b(0x193),'.bmp':'image/bmp','.svg':'image/svg+xml'};return _0xf1f35c[_0x4d6c64]||_0x1b524b(0x1c2);}['getVideoContentType'](_0x11eb3d){const _0x33e994=a0_0x4c5a26,_0x34003e={'.webm':_0x33e994(0x1c4),'.mp4':_0x33e994(0x1cb),'.avi':_0x33e994(0x1b1),'.mov':'video/quicktime'};return _0x34003e[_0x11eb3d]||_0x33e994(0x1c4);}}
1
+ function a0_0xef21(_0x56de62,_0x13ba8f){_0x56de62=_0x56de62-0x64;const _0x1cb662=a0_0x1cb6();let _0xef215=_0x1cb662[_0x56de62];return _0xef215;}const a0_0x475340=a0_0xef21;function a0_0x1cb6(){const _0x1a5619=['createAsset','18HzDvVL','.zip','video','9205zRDZnT','shouldSkipFile','readdirSync','collectAssetsRecursive','.png','6602772mtENsy','image/bmp','resolve','toLowerCase','name','.gif','118113zqdWJO','extname','relative','50FdyUCn','testResultsDir','join','collectAssets','attachment','152712QkrovE','.avi','includes','getImageContentType','text/plain','52EIClac','image/gif','getVideoContentType','video/webm','video/mp4','test','other','6296bXPeUK','.mov','sep','determineAssetType','.txt','image/jpeg','.jpeg','.bmp','basename','.jpg','.svg','.webm','16277rZJExV','trace','some','video/x-msvideo','text/html','image/svg+xml','.mp4','271705VwTpgy','split','application/zip','existsSync','video/quicktime','1012626xWgOqL','image/png'];a0_0x1cb6=function(){return _0x1a5619;};return a0_0x1cb6();}(function(_0x233634,_0x589c28){const _0x30b879=a0_0xef21,_0x30e730=_0x233634();while(!![]){try{const _0xb195ca=parseInt(_0x30b879(0x87))/0x1+parseInt(_0x30b879(0x6f))/0x2+-parseInt(_0x30b879(0x67))/0x3*(parseInt(_0x30b879(0x74))/0x4)+parseInt(_0x30b879(0x8e))/0x5*(parseInt(_0x30b879(0x96))/0x6)+parseInt(_0x30b879(0x99))/0x7*(parseInt(_0x30b879(0x7b))/0x8)+-parseInt(_0x30b879(0x93))/0x9*(-parseInt(_0x30b879(0x6a))/0xa)+-parseInt(_0x30b879(0x9e))/0xb;if(_0xb195ca===_0x589c28)break;else _0x30e730['push'](_0x30e730['shift']());}catch(_0x55d32f){_0x30e730['push'](_0x30e730['shift']());}}}(a0_0x1cb6,0xb4ec0));import*as a0_0x116555 from'fs';import*as a0_0x4a9982 from'path';export class AssetCollector{[a0_0x475340(0x6b)];constructor(_0x176648){const _0x58c69a=a0_0x475340;this[_0x58c69a(0x6b)]=_0x176648;}async[a0_0x475340(0x6d)](_0x1332aa){const _0x5b06e7=a0_0x475340,_0x56faa2=[],_0x376a00=new Set();if(!a0_0x116555[_0x5b06e7(0x91)](this[_0x5b06e7(0x6b)]))return _0x56faa2;return await this[_0x5b06e7(0x9c)](this[_0x5b06e7(0x6b)],'',_0x56faa2,_0x376a00),_0x56faa2;}async['collectAssetsRecursive'](_0x54bcb1,_0x2f3135,_0x412989,_0x20b37a){const _0x16cf14=a0_0x475340;let _0x4fc1fe;try{_0x4fc1fe=a0_0x116555[_0x16cf14(0x9b)](_0x54bcb1,{'withFileTypes':!![]});}catch{return;}const _0x3ad32f=a0_0x4a9982[_0x16cf14(0x83)](a0_0x4a9982[_0x16cf14(0xa0)](this[_0x16cf14(0x6b)]));for(const _0x491c8e of _0x4fc1fe){const _0x4f7de5=a0_0x4a9982[_0x16cf14(0x6c)](_0x54bcb1,_0x491c8e[_0x16cf14(0x65)]),_0x131ef2=a0_0x4a9982[_0x16cf14(0x69)](this['testResultsDir'],_0x4f7de5),_0x542449=a0_0x4a9982[_0x16cf14(0x6c)](_0x3ad32f,_0x131ef2);if(this[_0x16cf14(0x9a)](_0x491c8e[_0x16cf14(0x65)]))continue;if(_0x491c8e['isDirectory']())await this[_0x16cf14(0x9c)](_0x4f7de5,_0x542449,_0x412989,_0x20b37a);else{if(_0x491c8e['isFile']()){if(!_0x20b37a['has'](_0x4f7de5)){const _0x34c983=this[_0x16cf14(0x95)](_0x4f7de5,_0x542449);_0x412989['push'](_0x34c983),_0x20b37a['add'](_0x4f7de5);}}}}}[a0_0x475340(0x9a)](_0xce36b0){const _0x47e316=a0_0x475340,_0x70c03=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x70c03[_0x47e316(0x89)](_0x23ae8c=>_0x23ae8c[_0x47e316(0x79)](_0xce36b0));}[a0_0x475340(0x95)](_0x5885db,_0x24b180){const _0x9ea562=a0_0x475340,_0x479ff0=a0_0x4a9982[_0x9ea562(0x68)](_0x5885db)[_0x9ea562(0x64)](),{type:_0x2cb575,contentType:_0x4db46d}=this['determineAssetType'](_0x479ff0),_0x4e5129=_0x24b180[_0x9ea562(0x8f)](a0_0x4a9982[_0x9ea562(0x7d)])[_0x9ea562(0x6c)]('/');return{'sourcePath':_0x5885db,'archivePath':_0x4e5129,'type':_0x2cb575,'contentType':_0x4db46d};}[a0_0x475340(0x7e)](_0x5cbfe2){const _0x4f9179=a0_0x475340;if([_0x4f9179(0x9d),_0x4f9179(0x84),_0x4f9179(0x81),_0x4f9179(0x66),_0x4f9179(0x82),_0x4f9179(0x85)][_0x4f9179(0x71)](_0x5cbfe2))return{'type':'screenshot','contentType':this['getImageContentType'](_0x5cbfe2)};if([_0x4f9179(0x86),_0x4f9179(0x8d),_0x4f9179(0x70),_0x4f9179(0x7c)][_0x4f9179(0x71)](_0x5cbfe2))return{'type':_0x4f9179(0x98),'contentType':this[_0x4f9179(0x76)](_0x5cbfe2)};if(_0x5cbfe2===_0x4f9179(0x97))return{'type':_0x4f9179(0x88),'contentType':_0x4f9179(0x90)};if(_0x5cbfe2==='.html'||_0x5cbfe2==='.htm')return{'type':_0x4f9179(0x6e),'contentType':_0x4f9179(0x8b)};if(_0x5cbfe2==='.json')return{'type':_0x4f9179(0x6e),'contentType':'application/json'};if(_0x5cbfe2===_0x4f9179(0x7f)||_0x5cbfe2==='.log')return{'type':'attachment','contentType':_0x4f9179(0x73)};return{'type':_0x4f9179(0x7a),'contentType':'application/octet-stream'};}[a0_0x475340(0x72)](_0x48123c){const _0x508c6c=a0_0x475340,_0x24f098={'.png':_0x508c6c(0x94),'.jpg':'image/jpeg','.jpeg':_0x508c6c(0x80),'.gif':_0x508c6c(0x75),'.bmp':_0x508c6c(0x9f),'.svg':_0x508c6c(0x8c)};return _0x24f098[_0x48123c]||_0x508c6c(0x94);}['getVideoContentType'](_0x5a43ac){const _0xa9bb9a=a0_0x475340,_0x3bc8fa={'.webm':_0xa9bb9a(0x77),'.mp4':_0xa9bb9a(0x78),'.avi':_0xa9bb9a(0x8a),'.mov':_0xa9bb9a(0x92)};return _0x3bc8fa[_0x5a43ac]||_0xa9bb9a(0x77);}}
@@ -1 +1 @@
1
- var a1_0xf650f4=a1_0x5d8f;(function(_0x29ac56,_0x53d13a){var _0x27625c=a1_0x5d8f,_0x11e59e=_0x29ac56();while(!![]){try{var _0xb6cf92=parseInt(_0x27625c(0x169))/0x1*(-parseInt(_0x27625c(0x172))/0x2)+-parseInt(_0x27625c(0x178))/0x3+-parseInt(_0x27625c(0x179))/0x4+parseInt(_0x27625c(0x167))/0x5*(-parseInt(_0x27625c(0x17a))/0x6)+-parseInt(_0x27625c(0x16d))/0x7*(-parseInt(_0x27625c(0x168))/0x8)+parseInt(_0x27625c(0x162))/0x9*(parseInt(_0x27625c(0x164))/0xa)+parseInt(_0x27625c(0x163))/0xb*(parseInt(_0x27625c(0x16a))/0xc);if(_0xb6cf92===_0x53d13a)break;else _0x11e59e['push'](_0x11e59e['shift']());}catch(_0x3602b4){_0x11e59e['push'](_0x11e59e['shift']());}}}(a1_0x334a,0x299bf));import a1_0x6350e5 from'axios';import{handleErrorResponse}from'./errors.js';function getVersion(){var _0xc71fc1=a1_0x5d8f;return _0xc71fc1(0x175);}export function createRequestInterceptor(_0x3297a6,_0x23216f){return _0x148a45=>{var _0x3691fb=a1_0x5d8f;return _0x148a45[_0x3691fb(0x16c)]&&(_0x148a45[_0x3691fb(0x16c)]['Authorization']=_0x3691fb(0x174)+_0x3297a6,_0x148a45[_0x3691fb(0x16c)][_0x3691fb(0x16e)]=_0x23216f,_0x148a45[_0x3691fb(0x16c)][_0x3691fb(0x171)]='@checkly/playwright-reporter/'+getVersion()),_0x148a45;};}function a1_0x5d8f(_0x491118,_0x1d7f2c){var _0x334aef=a1_0x334a();return a1_0x5d8f=function(_0x5d8f65,_0x175ad4){_0x5d8f65=_0x5d8f65-0x162;var _0x15e7de=_0x334aef[_0x5d8f65];return _0x15e7de;},a1_0x5d8f(_0x491118,_0x1d7f2c);}function a1_0x334a(){var _0x436e1b=['1725399JQRRoo','64339EFbiLN','10ClfxwR','use','api','115HgTwac','9392QuiQwh','35SwVAGm','588bBERSx','create','headers','1043myzmiq','x-checkly-account','apiKey','accountId','User-Agent','1150xAcPzC','request','Bearer\x20','0.1.0','baseUrl','interceptors','559398RYhvxe','876888IezLvA','14868RlYIKj'];a1_0x334a=function(){return _0x436e1b;};return a1_0x334a();}export function createResponseErrorInterceptor(){return _0x311bf6=>{handleErrorResponse(_0x311bf6);};}export default class ChecklyClient{['apiKey'];[a1_0xf650f4(0x176)];['accountId'];[a1_0xf650f4(0x166)];constructor(_0x390075){var _0xede48b=a1_0xf650f4;this[_0xede48b(0x170)]=_0x390075[_0xede48b(0x170)],this[_0xede48b(0x16f)]=_0x390075['apiKey'],this[_0xede48b(0x176)]=_0x390075[_0xede48b(0x176)],this[_0xede48b(0x166)]=a1_0x6350e5[_0xede48b(0x16b)]({'baseURL':this[_0xede48b(0x176)],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0xede48b(0x166)][_0xede48b(0x177)][_0xede48b(0x173)][_0xede48b(0x165)](createRequestInterceptor(this[_0xede48b(0x16f)],this['accountId'])),this[_0xede48b(0x166)][_0xede48b(0x177)]['response']['use'](_0x55c1a8=>_0x55c1a8,createResponseErrorInterceptor());}['getAxiosInstance'](){var _0x51d725=a1_0xf650f4;return this[_0x51d725(0x166)];}}
1
+ var a1_0x11a668=a1_0x5cd3;function a1_0x5cd3(_0x258139,_0x46de){_0x258139=_0x258139-0x1d0;var _0x5681a6=a1_0x5681();var _0x5cd32d=_0x5681a6[_0x258139];return _0x5cd32d;}(function(_0x1327ff,_0x1784bc){var _0x1c3c54=a1_0x5cd3,_0x339be7=_0x1327ff();while(!![]){try{var _0x10bb9a=-parseInt(_0x1c3c54(0x1da))/0x1+-parseInt(_0x1c3c54(0x1e3))/0x2+-parseInt(_0x1c3c54(0x1e7))/0x3*(-parseInt(_0x1c3c54(0x1e2))/0x4)+parseInt(_0x1c3c54(0x1d4))/0x5+parseInt(_0x1c3c54(0x1e4))/0x6+-parseInt(_0x1c3c54(0x1e5))/0x7+-parseInt(_0x1c3c54(0x1dc))/0x8*(-parseInt(_0x1c3c54(0x1d6))/0x9);if(_0x10bb9a===_0x1784bc)break;else _0x339be7['push'](_0x339be7['shift']());}catch(_0x14ee8d){_0x339be7['push'](_0x339be7['shift']());}}}(a1_0x5681,0x4ebf5));import a1_0x27f9fa from'axios';import{handleErrorResponse}from'./errors.js';function getVersion(){return'0.1.0';}export function createRequestInterceptor(_0x37144f,_0xe2ad97){return _0x33cd67=>{var _0x467c76=a1_0x5cd3;return _0x33cd67['headers']&&(_0x33cd67[_0x467c76(0x1d5)][_0x467c76(0x1db)]=_0x467c76(0x1d2)+_0x37144f,_0x33cd67['headers'][_0x467c76(0x1de)]=_0xe2ad97,_0x33cd67['headers'][_0x467c76(0x1d0)]=_0x467c76(0x1df)+getVersion()),_0x33cd67;};}export function createResponseErrorInterceptor(){return _0xe00502=>{handleErrorResponse(_0xe00502);};}function a1_0x5681(){var _0x417f0e=['Bearer\x20','apiKey','440110JEqjLM','headers','29547JZPhyo','accountId','getAxiosInstance','interceptors','31805jOkWik','Authorization','1456ZeifxJ','use','x-checkly-account','@checkly/playwright-reporter/','create','api','4GvjcEA','957954tEYNyF','3164166bzoHwA','4028388lzUBKz','baseUrl','587778htxmsh','User-Agent','response'];a1_0x5681=function(){return _0x417f0e;};return a1_0x5681();}export default class ChecklyClient{[a1_0x11a668(0x1d3)];[a1_0x11a668(0x1e6)];['accountId'];[a1_0x11a668(0x1e1)];constructor(_0x3303ee){var _0x2a3a05=a1_0x11a668;this['accountId']=_0x3303ee[_0x2a3a05(0x1d7)],this['apiKey']=_0x3303ee['apiKey'],this[_0x2a3a05(0x1e6)]=_0x3303ee[_0x2a3a05(0x1e6)],this[_0x2a3a05(0x1e1)]=a1_0x27f9fa[_0x2a3a05(0x1e0)]({'baseURL':this[_0x2a3a05(0x1e6)],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0x2a3a05(0x1e1)][_0x2a3a05(0x1d9)]['request'][_0x2a3a05(0x1dd)](createRequestInterceptor(this[_0x2a3a05(0x1d3)],this[_0x2a3a05(0x1d7)])),this[_0x2a3a05(0x1e1)][_0x2a3a05(0x1d9)][_0x2a3a05(0x1d1)][_0x2a3a05(0x1dd)](_0xc5f088=>_0xc5f088,createResponseErrorInterceptor());}[a1_0x11a668(0x1d8)](){return this['api'];}}
@@ -1 +1 @@
1
- const a2_0x35e760=a2_0x3ccf;(function(_0x310170,_0x56d8c7){const _0x2e3588=a2_0x3ccf,_0x5d9e91=_0x310170();while(!![]){try{const _0x2a09db=parseInt(_0x2e3588(0xbb))/0x1+parseInt(_0x2e3588(0xc2))/0x2+-parseInt(_0x2e3588(0xb0))/0x3*(parseInt(_0x2e3588(0xc0))/0x4)+-parseInt(_0x2e3588(0xb3))/0x5+parseInt(_0x2e3588(0xb9))/0x6+-parseInt(_0x2e3588(0xb4))/0x7+-parseInt(_0x2e3588(0xb7))/0x8*(-parseInt(_0x2e3588(0xb1))/0x9);if(_0x2a09db===_0x56d8c7)break;else _0x5d9e91['push'](_0x5d9e91['shift']());}catch(_0x33069b){_0x5d9e91['push'](_0x5d9e91['shift']());}}}(a2_0x2810,0x4b4ba));export class ApiError extends Error{[a2_0x35e760(0xb5)];constructor(_0x5b2121,_0x2a2721){const _0x470c0b=a2_0x35e760;super(_0x5b2121['message'],_0x2a2721),this[_0x470c0b(0xbd)]=this[_0x470c0b(0xb2)][_0x470c0b(0xbd)],this['data']=_0x5b2121;}}export class ValidationError extends ApiError{constructor(_0x2dfc3f,_0x52eb04){super(_0x2dfc3f,_0x52eb04);}}export class UnauthorizedError extends ApiError{constructor(_0x1a18c6,_0x1fd789){super(_0x1a18c6,_0x1fd789);}}export class ForbiddenError extends ApiError{constructor(_0x28a30e,_0x489e93){super(_0x28a30e,_0x489e93);}}export class NotFoundError extends ApiError{constructor(_0x3e9ce3,_0x5dd1a7){super(_0x3e9ce3,_0x5dd1a7);}}export class RequestTimeoutError extends ApiError{constructor(_0x26d1f7,_0x545a71){super(_0x26d1f7,_0x545a71);}}function a2_0x3ccf(_0x4482b8,_0x123399){const _0x28100f=a2_0x2810();return a2_0x3ccf=function(_0x3ccf83,_0x1e6d70){_0x3ccf83=_0x3ccf83-0xad;let _0x30cc7f=_0x28100f[_0x3ccf83];return _0x30cc7f;},a2_0x3ccf(_0x4482b8,_0x123399);}function a2_0x2810(){const _0x148053=['constructor','2600065yqRyJu','1594453eYmMqq','data','string','1240LHEqaZ','statusCode','3250092AaktrT','Unknown\x20error','601906gxmLWl','object','name','error','Network\x20error','908876cfWiQE','MissingResponseError','90256qggFOL','errorCode','response','message','3ZDBPDm','5499iPZpNX'];a2_0x2810=function(){return _0x148053;};return a2_0x2810();}export class ConflictError extends ApiError{constructor(_0xa208a2,_0x1d8c47){super(_0xa208a2,_0x1d8c47);}}export class ServerError extends ApiError{constructor(_0x33b04b,_0x11f226){super(_0x33b04b,_0x11f226);}}export class MiscellaneousError extends ApiError{constructor(_0x5c087f,_0x3e9bd1){super(_0x5c087f,_0x3e9bd1);}}export class MissingResponseError extends Error{constructor(_0x4bee08,_0x34fc1f){const _0x3ee4de=a2_0x35e760;super(_0x4bee08,_0x34fc1f),this[_0x3ee4de(0xbd)]=_0x3ee4de(0xc1);}}export function parseErrorData(_0x48630c,_0x24fc0f){const _0x5806f4=a2_0x35e760;if(!_0x48630c)return undefined;if(typeof _0x48630c==='object'&&_0x48630c[_0x5806f4(0xb8)]&&_0x48630c[_0x5806f4(0xbe)]&&_0x48630c['message'])return{'statusCode':_0x48630c[_0x5806f4(0xb8)],'error':_0x48630c[_0x5806f4(0xbe)],'message':_0x48630c[_0x5806f4(0xaf)],'errorCode':_0x48630c['errorCode']};if(typeof _0x48630c===_0x5806f4(0xbc)&&_0x48630c[_0x5806f4(0xbe)]&&!_0x48630c['message'])return{'statusCode':_0x24fc0f['statusCode'],'error':_0x48630c[_0x5806f4(0xbe)],'message':_0x48630c[_0x5806f4(0xbe)]};if(typeof _0x48630c==='object'&&_0x48630c['error']&&_0x48630c['message'])return{'statusCode':_0x24fc0f[_0x5806f4(0xb8)],'error':_0x48630c[_0x5806f4(0xbe)],'message':_0x48630c['message'],'errorCode':_0x48630c[_0x5806f4(0xad)]};if(typeof _0x48630c===_0x5806f4(0xbc)&&_0x48630c[_0x5806f4(0xaf)])return{'statusCode':_0x24fc0f[_0x5806f4(0xb8)],'error':_0x48630c[_0x5806f4(0xaf)],'message':_0x48630c[_0x5806f4(0xaf)],'errorCode':_0x48630c[_0x5806f4(0xad)]};if(typeof _0x48630c===_0x5806f4(0xb6))return{'statusCode':_0x24fc0f['statusCode'],'error':_0x48630c,'message':_0x48630c};return undefined;}export function handleErrorResponse(_0x563603){const _0x175cbf=a2_0x35e760;if(!_0x563603[_0x175cbf(0xae)])throw new MissingResponseError(_0x563603[_0x175cbf(0xaf)]||_0x175cbf(0xbf));const {status:_0x52ebae,data:_0x15c3ac}=_0x563603['response'],_0x56b613=parseErrorData(_0x15c3ac,{'statusCode':_0x52ebae});if(!_0x56b613)throw new MiscellaneousError({'statusCode':_0x52ebae,'error':_0x175cbf(0xba),'message':_0x563603[_0x175cbf(0xaf)]||'An\x20error\x20occurred'});switch(_0x52ebae){case 0x190:throw new ValidationError(_0x56b613);case 0x191:throw new UnauthorizedError(_0x56b613);case 0x193:throw new ForbiddenError(_0x56b613);case 0x194:throw new NotFoundError(_0x56b613);case 0x198:throw new RequestTimeoutError(_0x56b613);case 0x199:throw new ConflictError(_0x56b613);default:if(_0x52ebae>=0x1f4)throw new ServerError(_0x56b613);throw new MiscellaneousError(_0x56b613);}}
1
+ const a2_0x48f638=a2_0x4cae;(function(_0x2dcc25,_0x1338f3){const _0x2b667f=a2_0x4cae,_0x137188=_0x2dcc25();while(!![]){try{const _0x5bdf01=-parseInt(_0x2b667f(0xd4))/0x1+parseInt(_0x2b667f(0xdf))/0x2*(parseInt(_0x2b667f(0xe3))/0x3)+-parseInt(_0x2b667f(0xdb))/0x4*(parseInt(_0x2b667f(0xd6))/0x5)+-parseInt(_0x2b667f(0xdd))/0x6+parseInt(_0x2b667f(0xe1))/0x7*(-parseInt(_0x2b667f(0xce))/0x8)+parseInt(_0x2b667f(0xcd))/0x9+parseInt(_0x2b667f(0xd9))/0xa;if(_0x5bdf01===_0x1338f3)break;else _0x137188['push'](_0x137188['shift']());}catch(_0x521927){_0x137188['push'](_0x137188['shift']());}}}(a2_0x17c6,0x66698));function a2_0x17c6(){const _0x25b9cf=['statusCode','3RNsOCe','errorCode','5166954zFLgwP','234488hmQdyt','name','error','Unknown\x20error','response','object','468672OVextW','MissingResponseError','635pmTUer','An\x20error\x20occurred','data','13452730DvtXXq','string','5304SugmGO','constructor','3931194picTDC','message','933054zFKyPk','Network\x20error','161rznpON'];a2_0x17c6=function(){return _0x25b9cf;};return a2_0x17c6();}export class ApiError extends Error{[a2_0x48f638(0xd8)];constructor(_0x5ec489,_0x2eaa3d){const _0xbfd4f1=a2_0x48f638;super(_0x5ec489[_0xbfd4f1(0xde)],_0x2eaa3d),this[_0xbfd4f1(0xcf)]=this[_0xbfd4f1(0xdc)]['name'],this['data']=_0x5ec489;}}export class ValidationError extends ApiError{constructor(_0x4ecad2,_0x41f051){super(_0x4ecad2,_0x41f051);}}export class UnauthorizedError extends ApiError{constructor(_0x5cc46e,_0x5e885a){super(_0x5cc46e,_0x5e885a);}}export class ForbiddenError extends ApiError{constructor(_0x5e5a12,_0x996b8f){super(_0x5e5a12,_0x996b8f);}}export class NotFoundError extends ApiError{constructor(_0xcab78b,_0x525a30){super(_0xcab78b,_0x525a30);}}export class RequestTimeoutError extends ApiError{constructor(_0x23820b,_0x1db4b3){super(_0x23820b,_0x1db4b3);}}function a2_0x4cae(_0x93ea2,_0x55ff55){_0x93ea2=_0x93ea2-0xcc;const _0x17c6a0=a2_0x17c6();let _0x4cae19=_0x17c6a0[_0x93ea2];return _0x4cae19;}export class ConflictError extends ApiError{constructor(_0x73ae46,_0x1d4d1c){super(_0x73ae46,_0x1d4d1c);}}export class ServerError extends ApiError{constructor(_0x30b292,_0xe0ef32){super(_0x30b292,_0xe0ef32);}}export class MiscellaneousError extends ApiError{constructor(_0x51415d,_0x4daea6){super(_0x51415d,_0x4daea6);}}export class MissingResponseError extends Error{constructor(_0x5c7ae9,_0x3361db){const _0x242002=a2_0x48f638;super(_0x5c7ae9,_0x3361db),this[_0x242002(0xcf)]=_0x242002(0xd5);}}export function parseErrorData(_0x7273bd,_0x354084){const _0xe0970f=a2_0x48f638;if(!_0x7273bd)return undefined;if(typeof _0x7273bd==='object'&&_0x7273bd[_0xe0970f(0xe2)]&&_0x7273bd[_0xe0970f(0xd0)]&&_0x7273bd[_0xe0970f(0xde)])return{'statusCode':_0x7273bd[_0xe0970f(0xe2)],'error':_0x7273bd[_0xe0970f(0xd0)],'message':_0x7273bd['message'],'errorCode':_0x7273bd[_0xe0970f(0xcc)]};if(typeof _0x7273bd==='object'&&_0x7273bd['error']&&!_0x7273bd['message'])return{'statusCode':_0x354084['statusCode'],'error':_0x7273bd[_0xe0970f(0xd0)],'message':_0x7273bd[_0xe0970f(0xd0)]};if(typeof _0x7273bd===_0xe0970f(0xd3)&&_0x7273bd[_0xe0970f(0xd0)]&&_0x7273bd['message'])return{'statusCode':_0x354084['statusCode'],'error':_0x7273bd[_0xe0970f(0xd0)],'message':_0x7273bd[_0xe0970f(0xde)],'errorCode':_0x7273bd[_0xe0970f(0xcc)]};if(typeof _0x7273bd===_0xe0970f(0xd3)&&_0x7273bd[_0xe0970f(0xde)])return{'statusCode':_0x354084[_0xe0970f(0xe2)],'error':_0x7273bd[_0xe0970f(0xde)],'message':_0x7273bd[_0xe0970f(0xde)],'errorCode':_0x7273bd[_0xe0970f(0xcc)]};if(typeof _0x7273bd===_0xe0970f(0xda))return{'statusCode':_0x354084[_0xe0970f(0xe2)],'error':_0x7273bd,'message':_0x7273bd};return undefined;}export function handleErrorResponse(_0xbcbe7f){const _0x19ff67=a2_0x48f638;if(!_0xbcbe7f['response'])throw new MissingResponseError(_0xbcbe7f[_0x19ff67(0xde)]||_0x19ff67(0xe0));const {status:_0x5b31f6,data:_0x4163fe}=_0xbcbe7f[_0x19ff67(0xd2)],_0x5deab4=parseErrorData(_0x4163fe,{'statusCode':_0x5b31f6});if(!_0x5deab4)throw new MiscellaneousError({'statusCode':_0x5b31f6,'error':_0x19ff67(0xd1),'message':_0xbcbe7f[_0x19ff67(0xde)]||_0x19ff67(0xd7)});switch(_0x5b31f6){case 0x190:throw new ValidationError(_0x5deab4);case 0x191:throw new UnauthorizedError(_0x5deab4);case 0x193:throw new ForbiddenError(_0x5deab4);case 0x194:throw new NotFoundError(_0x5deab4);case 0x198:throw new RequestTimeoutError(_0x5deab4);case 0x199:throw new ConflictError(_0x5deab4);default:if(_0x5b31f6>=0x1f4)throw new ServerError(_0x5deab4);throw new MiscellaneousError(_0x5deab4);}}
@@ -1 +1 @@
1
- (function(_0x299063,_0x4770f8){var _0x3fe5b6=a3_0x408d,_0x5e806f=_0x299063();while(!![]){try{var _0x57e8d3=-parseInt(_0x3fe5b6(0x10e))/0x1+-parseInt(_0x3fe5b6(0x111))/0x2+parseInt(_0x3fe5b6(0x110))/0x3+-parseInt(_0x3fe5b6(0x10f))/0x4*(parseInt(_0x3fe5b6(0x112))/0x5)+parseInt(_0x3fe5b6(0x113))/0x6*(-parseInt(_0x3fe5b6(0x116))/0x7)+-parseInt(_0x3fe5b6(0x114))/0x8+parseInt(_0x3fe5b6(0x115))/0x9;if(_0x57e8d3===_0x4770f8)break;else _0x5e806f['push'](_0x5e806f['shift']());}catch(_0x1f42a6){_0x5e806f['push'](_0x5e806f['shift']());}}}(a3_0x27b3,0xa7083));export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';export*from'./types.js';export*from'./errors.js';function a3_0x408d(_0x3fa733,_0x34b2da){var _0x27b3fd=a3_0x27b3();return a3_0x408d=function(_0x408d92,_0x221b57){_0x408d92=_0x408d92-0x10e;var _0x3de2f3=_0x27b3fd[_0x408d92];return _0x3de2f3;},a3_0x408d(_0x3fa733,_0x34b2da);}function a3_0x27b3(){var _0x42e58c=['8772160cTllhg','17332218owwnHs','30079IDMRFC','994215LtTHfU','1391024mYrsfE','4058970FlbNbS','148990OgXAAa','5QIwYur','114ZKfowf'];a3_0x27b3=function(){return _0x42e58c;};return a3_0x27b3();}
1
+ (function(_0x3f3af6,_0x114878){var _0x396f4b=a3_0x3918,_0x3dd07d=_0x3f3af6();while(!![]){try{var _0x10d4d1=-parseInt(_0x396f4b(0x97))/0x1+-parseInt(_0x396f4b(0x95))/0x2*(-parseInt(_0x396f4b(0x90))/0x3)+parseInt(_0x396f4b(0x94))/0x4+parseInt(_0x396f4b(0x93))/0x5+-parseInt(_0x396f4b(0x8f))/0x6+parseInt(_0x396f4b(0x92))/0x7+-parseInt(_0x396f4b(0x91))/0x8*(parseInt(_0x396f4b(0x96))/0x9);if(_0x10d4d1===_0x114878)break;else _0x3dd07d['push'](_0x3dd07d['shift']());}catch(_0x2ee737){_0x3dd07d['push'](_0x3dd07d['shift']());}}}(a3_0x2a18,0x3667e));function a3_0x3918(_0xe3a34e,_0x15d3ff){_0xe3a34e=_0xe3a34e-0x8f;var _0x2a1840=a3_0x2a18();var _0x3918ac=_0x2a1840[_0xe3a34e];return _0x3918ac;}export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';export*from'./types.js';function a3_0x2a18(){var _0x1e9db7=['9fkzFhW','46989yBkmCR','1227144IOthEK','12039cZuFVi','502968QyuhDq','447832Zmevbp','1658200toAexu','68844eFpNNE','62PxTzsN'];a3_0x2a18=function(){return _0x1e9db7;};return a3_0x2a18();}export*from'./errors.js';
@@ -1 +1 @@
1
- const a4_0x1375db=a4_0x3311;function a4_0x3311(_0x1fc5d2,_0x229435){const _0x175dde=a4_0x175d();return a4_0x3311=function(_0x33118f,_0x39968f){_0x33118f=_0x33118f-0x1d0;let _0xebbe55=_0x175dde[_0x33118f];return _0xebbe55;},a4_0x3311(_0x1fc5d2,_0x229435);}(function(_0x4c83f5,_0x55cff3){const _0x328f21=a4_0x3311,_0x405ecf=_0x4c83f5();while(!![]){try{const _0x242b59=-parseInt(_0x328f21(0x1d6))/0x1+parseInt(_0x328f21(0x1e3))/0x2+-parseInt(_0x328f21(0x1df))/0x3*(-parseInt(_0x328f21(0x1d4))/0x4)+parseInt(_0x328f21(0x1e2))/0x5*(-parseInt(_0x328f21(0x1dc))/0x6)+-parseInt(_0x328f21(0x1d0))/0x7+-parseInt(_0x328f21(0x1d8))/0x8+parseInt(_0x328f21(0x1e5))/0x9;if(_0x242b59===_0x55cff3)break;else _0x405ecf['push'](_0x405ecf['shift']());}catch(_0x5d5ea2){_0x405ecf['push'](_0x405ecf['shift']());}}}(a4_0x175d,0x6345c));import a4_0x44ffb5 from'form-data';function a4_0x175d(){const _0x4fdb6e=['data','954BzHnmT','/assets','uploadTestResultAsset','72FqVDqp','createTestSession','post','20645HPOzlN','491582xhzsYz','/next/test-sessions/create','21901383mDnisj','updateTestResult','5336198ovsNtG','/next/test-sessions/','api','append','19356jBHQop','getHeaders','414401jOysAF','assets','4444544ydsBIY','application/zip','/results/'];a4_0x175d=function(){return _0x4fdb6e;};return a4_0x175d();}export class TestResults{[a4_0x1375db(0x1d2)];constructor(_0x3c44f7){const _0x31e419=a4_0x1375db;this[_0x31e419(0x1d2)]=_0x3c44f7;}async[a4_0x1375db(0x1e0)](_0xfa8ac3){const _0x242ea1=a4_0x1375db,_0x1cd753=await this[_0x242ea1(0x1d2)][_0x242ea1(0x1e1)](_0x242ea1(0x1e4),_0xfa8ac3);return _0x1cd753[_0x242ea1(0x1db)];}async[a4_0x1375db(0x1de)](_0x58641d,_0xdaa7e0,_0xc3bd40){const _0x2f25eb=a4_0x1375db,_0x436890=new a4_0x44ffb5();_0x436890[_0x2f25eb(0x1d3)](_0x2f25eb(0x1d7),_0xc3bd40,{'filename':'assets.zip','contentType':_0x2f25eb(0x1d9)});const _0x3f0446=await this[_0x2f25eb(0x1d2)]['post']('/next/test-sessions/'+_0x58641d+_0x2f25eb(0x1da)+_0xdaa7e0+_0x2f25eb(0x1dd),_0x436890,{'headers':{..._0x436890[_0x2f25eb(0x1d5)]()}});return _0x3f0446[_0x2f25eb(0x1db)];}async[a4_0x1375db(0x1e6)](_0xd513d6,_0x2f35e4,_0x304579){const _0x43a4de=a4_0x1375db,_0x5674a3=await this[_0x43a4de(0x1d2)]['post'](_0x43a4de(0x1d1)+_0xd513d6+_0x43a4de(0x1da)+_0x2f35e4,_0x304579);return _0x5674a3[_0x43a4de(0x1db)];}}
1
+ function a4_0x2efc(_0xbd3651,_0x534f51){_0xbd3651=_0xbd3651-0x1bd;const _0x3665a6=a4_0x3665();let _0x2efca8=_0x3665a6[_0xbd3651];return _0x2efca8;}function a4_0x3665(){const _0x2b976d=['/next/test-sessions/','11oQdMlH','5letnPD','1199802GkMlQm','post','getHeaders','append','62068gyihrH','1814706Uzjqvu','api','19271IQXebF','/results/','216IiqClk','application/zip','/assets','assets','data','2311830WgyJFt','assets.zip','623945PUaRUo','18artZqa','/next/test-sessions/create','130968KahNLr'];a4_0x3665=function(){return _0x2b976d;};return a4_0x3665();}(function(_0x3e3441,_0x1cdab7){const _0x3c7fd5=a4_0x2efc,_0x2c9929=_0x3e3441();while(!![]){try{const _0x5f50d8=-parseInt(_0x3c7fd5(0x1c5))/0x1*(-parseInt(_0x3c7fd5(0x1ca))/0x2)+-parseInt(_0x3c7fd5(0x1c0))/0x3*(parseInt(_0x3c7fd5(0x1c2))/0x4)+-parseInt(_0x3c7fd5(0x1bf))/0x5+parseInt(_0x3c7fd5(0x1c6))/0x6+-parseInt(_0x3c7fd5(0x1cd))/0x7*(-parseInt(_0x3c7fd5(0x1cf))/0x8)+-parseInt(_0x3c7fd5(0x1cb))/0x9+parseInt(_0x3c7fd5(0x1bd))/0xa*(parseInt(_0x3c7fd5(0x1c4))/0xb);if(_0x5f50d8===_0x1cdab7)break;else _0x2c9929['push'](_0x2c9929['shift']());}catch(_0xa44d69){_0x2c9929['push'](_0x2c9929['shift']());}}}(a4_0x3665,0x21a30));import a4_0x1013ef from'form-data';export class TestResults{['api'];constructor(_0x3dc818){this['api']=_0x3dc818;}async['createTestSession'](_0x34003c){const _0x2dd26e=a4_0x2efc,_0x256198=await this['api'][_0x2dd26e(0x1c7)](_0x2dd26e(0x1c1),_0x34003c);return _0x256198['data'];}async['uploadTestResultAsset'](_0x21b8b6,_0xaa9fd6,_0x57498e){const _0x5490d4=a4_0x2efc,_0x9ee64=new a4_0x1013ef();_0x9ee64[_0x5490d4(0x1c9)](_0x5490d4(0x1d2),_0x57498e,{'filename':_0x5490d4(0x1be),'contentType':_0x5490d4(0x1d0)});const _0x119579=await this[_0x5490d4(0x1cc)]['post'](_0x5490d4(0x1c3)+_0x21b8b6+_0x5490d4(0x1ce)+_0xaa9fd6+_0x5490d4(0x1d1),_0x9ee64,{'headers':{..._0x9ee64[_0x5490d4(0x1c8)]()}});return _0x119579['data'];}async['updateTestResult'](_0x508406,_0x3c9b9,_0x3c7a23){const _0x41957a=a4_0x2efc,_0x3b8a47=await this[_0x41957a(0x1cc)][_0x41957a(0x1c7)]('/next/test-sessions/'+_0x508406+_0x41957a(0x1ce)+_0x3c9b9,_0x3c7a23);return _0x3b8a47[_0x41957a(0x1d3)];}}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x517d01,_0x5ba935){var _0x5cb378=a6_0x42ff,_0x2aafa2=_0x517d01();while(!![]){try{var _0x3b5959=-parseInt(_0x5cb378(0x1b5))/0x1+-parseInt(_0x5cb378(0x1b3))/0x2+-parseInt(_0x5cb378(0x1b7))/0x3*(parseInt(_0x5cb378(0x1b8))/0x4)+parseInt(_0x5cb378(0x1b9))/0x5*(-parseInt(_0x5cb378(0x1b6))/0x6)+parseInt(_0x5cb378(0x1bb))/0x7*(-parseInt(_0x5cb378(0x1bc))/0x8)+-parseInt(_0x5cb378(0x1ba))/0x9+parseInt(_0x5cb378(0x1b4))/0xa;if(_0x3b5959===_0x5ba935)break;else _0x2aafa2['push'](_0x2aafa2['shift']());}catch(_0x46fd05){_0x2aafa2['push'](_0x2aafa2['shift']());}}}(a6_0x3948,0xbb2bd));export{ChecklyReporter}from'./reporter.js';function a6_0x3948(){var _0x13898b=['50774470JoIDKn','1069754lWbMDL','6RhxRih','9984ZQIwwx','52Itvcis','1714970LUnIMy','10399608ncFDIJ','21kJwkgW','3621808KxnMML','682184OvAUCG'];a6_0x3948=function(){return _0x13898b;};return a6_0x3948();}export{AssetCollector}from'./asset-collector.js';function a6_0x42ff(_0x39adbf,_0xb391b8){var _0x394835=a6_0x3948();return a6_0x42ff=function(_0x42ffd6,_0x559694){_0x42ffd6=_0x42ffd6-0x1b3;var _0x452101=_0x394835[_0x42ffd6];return _0x452101;},a6_0x42ff(_0x39adbf,_0xb391b8);}export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';
1
+ function a6_0x9da0(_0x181701,_0x24254e){_0x181701=_0x181701-0x1c0;var _0x1016ec=a6_0x1016();var _0x9da0d7=_0x1016ec[_0x181701];return _0x9da0d7;}(function(_0x5bc3a0,_0x6585ad){var _0x427d94=a6_0x9da0,_0x196632=_0x5bc3a0();while(!![]){try{var _0x1863df=parseInt(_0x427d94(0x1c7))/0x1*(parseInt(_0x427d94(0x1c9))/0x2)+-parseInt(_0x427d94(0x1c0))/0x3*(parseInt(_0x427d94(0x1c4))/0x4)+parseInt(_0x427d94(0x1c1))/0x5*(-parseInt(_0x427d94(0x1c5))/0x6)+-parseInt(_0x427d94(0x1c8))/0x7+-parseInt(_0x427d94(0x1c3))/0x8+parseInt(_0x427d94(0x1c6))/0x9+parseInt(_0x427d94(0x1c2))/0xa;if(_0x1863df===_0x6585ad)break;else _0x196632['push'](_0x196632['shift']());}catch(_0x6a0cb4){_0x196632['push'](_0x196632['shift']());}}}(a6_0x1016,0x2c5fc));function a6_0x1016(){var _0x3baf3f=['27114qglyOx','814041updBIT','19542XDbSZA','1359253GFKSKw','16UXhciG','293790bpXJMH','270htEmFX','5993960opQwGf','242880kIhRkx','8jGckKj'];a6_0x1016=function(){return _0x3baf3f;};return a6_0x1016();}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_0x3d9455=a7_0x34c7;(function(_0x4fd62d,_0x72ce1b){const _0x5411f8=a7_0x34c7,_0x4d3ae2=_0x4fd62d();while(!![]){try{const _0x375cfb=parseInt(_0x5411f8(0x1f4))/0x1+-parseInt(_0x5411f8(0x200))/0x2*(-parseInt(_0x5411f8(0x214))/0x3)+-parseInt(_0x5411f8(0x1f8))/0x4*(-parseInt(_0x5411f8(0x1ab))/0x5)+parseInt(_0x5411f8(0x1e8))/0x6*(-parseInt(_0x5411f8(0x1aa))/0x7)+parseInt(_0x5411f8(0x1b7))/0x8*(-parseInt(_0x5411f8(0x1c0))/0x9)+parseInt(_0x5411f8(0x1e9))/0xa*(parseInt(_0x5411f8(0x1f3))/0xb)+-parseInt(_0x5411f8(0x1df))/0xc*(parseInt(_0x5411f8(0x1b1))/0xd);if(_0x375cfb===_0x72ce1b)break;else _0x4d3ae2['push'](_0x4d3ae2['shift']());}catch(_0x1b1363){_0x4d3ae2['push'](_0x4d3ae2['shift']());}}}(a7_0x2637,0x7873d));import*as a7_0x39e285 from'fs';import*as a7_0x4066ea from'path';import{AssetCollector}from'./asset-collector.js';function a7_0x34c7(_0x47d2e7,_0x3f8f27){const _0x263760=a7_0x2637();return a7_0x34c7=function(_0x34c76d,_0x19c94e){_0x34c76d=_0x34c76d-0x1a9;let _0x6f2e8e=_0x263760[_0x34c76d];return _0x6f2e8e;},a7_0x34c7(_0x47d2e7,_0x3f8f27);}import{Zipper}from'./zipper.js';import a7_0x51fdd9 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';function a7_0x2637(){const _0x27d31e=['updateTestResult','169527pkEnwz','testResultsDir','21lQxmCW','371155jUbJXP','outcome','\x22,\x20using\x20\x22production\x22','options','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','development','26BQiTpX','zipPath','staging','Project','\x0a======================================================\x0a','testResults','8dmrwCV','Playwright\x20Test\x20Session:\x20','env','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','https://api.checklyhq.com','testResultId','dryRun','testCounts','test-results/playwright-test-report.json','1158093ImpQFn','production','test','join','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','uploadTestResultAsset','log','version','passed','parse','readFileSync','startTime','PASSED','cwd','length','FAILED','CHECKLY_ACCOUNT_ID','stat','package.json','warn','jsonReportPath','🦝\x20Checkly\x20reporter:\x20','📔\x20','\x20\x20reporter:\x20[\x0a','GITHUB_EVENT_NAME','flaky','zipper','CHECKLY_ENV','then','GITHUB_ACTOR','createReadStream','1661388eAQbhi','config','onBegin','checkly-report.zip','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','status','outputPath','\x20\x20]','618222syVlUG','447540MtuxFp','includes','link','[Checkly\x20Reporter]\x20Global\x20error:','printSummary','test-results','failed','substring','max','testSession','55GAlZsj','288459lTyvuJ','apiKey','assetId','accountId','4HKFUrK','Projects','https://api-dev.checklyhq.com','utf-8','onEnd','retries','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','message','22KdhOgC','testSessionId','environment','GITHUB_SHA','uploadResults','CHECKLY_API_KEY','error','[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:','toISOString','onTestEnd','projects','en-US','getTime','unlinkSync','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','GITHUB_REPOSITORY','onError','retry','PW_REPORTER'];a7_0x2637=function(){return _0x27d31e;};return a7_0x2637();}const __filename=fileURLToPath(import.meta['url']),__dirname=dirname(__filename),packageJson=JSON[a7_0x3d9455(0x1c9)](readFileSync(join(__dirname,'..',a7_0x3d9455(0x1d2)),a7_0x3d9455(0x1fb))),pkgVersion=packageJson[a7_0x3d9455(0x1c7)],pluralRules=new Intl['PluralRules'](a7_0x3d9455(0x20b)),projectForms={'zero':'Project','one':a7_0x3d9455(0x1b4),'two':a7_0x3d9455(0x1f9),'few':'Projects','many':a7_0x3d9455(0x1f9),'other':a7_0x3d9455(0x1f9)};function getApiUrl(_0x45db26){const _0x2b5d50=a7_0x3d9455,_0x1a5e1d={'local':'http://127.0.0.1:3000','development':_0x2b5d50(0x1fa),'staging':'https://api-test.checklyhq.com','production':_0x2b5d50(0x1bb)};return _0x1a5e1d[_0x45db26];}function getEnvironment(_0x33cdf2){const _0x229e68=a7_0x3d9455,_0x33dc90=_0x33cdf2?.[_0x229e68(0x202)],_0x4c5178=process[_0x229e68(0x1b9)][_0x229e68(0x1db)],_0x7dbeca=_0x33dc90||_0x4c5178||'production',_0x520974=['local',_0x229e68(0x1b0),_0x229e68(0x1b3),_0x229e68(0x1c1)];if(!_0x520974[_0x229e68(0x1ea)](_0x7dbeca))return console[_0x229e68(0x1d3)](_0x229e68(0x1e3)+_0x7dbeca+_0x229e68(0x1ad)),_0x229e68(0x1c1);return _0x7dbeca;}function getDirectoryName(){const _0x3adcea=a7_0x3d9455,_0x298af5=process[_0x3adcea(0x1cd)]();let _0x57305f=a7_0x4066ea['basename'](_0x298af5);return(!_0x57305f||_0x57305f==='/'||_0x57305f==='.')&&(_0x57305f='playwright-tests'),_0x57305f=_0x57305f['replace'](/[<>:"|?*]/g,'-'),_0x57305f[_0x3adcea(0x1ce)]>0xff&&(_0x57305f=_0x57305f[_0x3adcea(0x1f0)](0x0,0xff)),_0x57305f;}export class ChecklyReporter{[a7_0x3d9455(0x1ae)];['assetCollector'];[a7_0x3d9455(0x1da)];[a7_0x3d9455(0x1b6)];[a7_0x3d9455(0x1f2)];[a7_0x3d9455(0x1cb)];[a7_0x3d9455(0x1be)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x29a42e={}){const _0x14edc5=a7_0x3d9455,_0x14141a=getEnvironment(_0x29a42e),_0x3b450f=getApiUrl(_0x14141a),_0x2b490d=process['env'][_0x14edc5(0x205)]||_0x29a42e[_0x14edc5(0x1f5)],_0x4f4cb2=process[_0x14edc5(0x1b9)][_0x14edc5(0x1d0)]||_0x29a42e['accountId'];this[_0x14edc5(0x1ae)]={'accountId':_0x4f4cb2,'apiKey':_0x2b490d,'outputPath':_0x29a42e[_0x14edc5(0x1e6)]??_0x14edc5(0x1e2),'jsonReportPath':_0x29a42e['jsonReportPath']??_0x14edc5(0x1bf),'testResultsDir':_0x29a42e[_0x14edc5(0x1a9)]??_0x14edc5(0x1ee),'dryRun':_0x29a42e[_0x14edc5(0x1bd)]??![]},this['assetCollector']=new AssetCollector(this['options'][_0x14edc5(0x1a9)]),this[_0x14edc5(0x1da)]=new Zipper({'outputPath':this[_0x14edc5(0x1ae)]['outputPath']});if(!this[_0x14edc5(0x1ae)][_0x14edc5(0x1bd)]&&this[_0x14edc5(0x1ae)][_0x14edc5(0x1f5)]&&this[_0x14edc5(0x1ae)][_0x14edc5(0x1f7)]){const _0x46caf5=new a7_0x51fdd9({'apiKey':this[_0x14edc5(0x1ae)][_0x14edc5(0x1f5)],'accountId':this[_0x14edc5(0x1ae)][_0x14edc5(0x1f7)],'baseUrl':_0x3b450f});this[_0x14edc5(0x1b6)]=new TestResults(_0x46caf5['getAxiosInstance']());}}[a7_0x3d9455(0x1e1)](_0x5cbf9a,_0x5b964d){const _0xffbb8f=a7_0x3d9455;this[_0xffbb8f(0x1cb)]=new Date();if(!this['testResults'])return;try{const _0x49f7a3=getDirectoryName(),_0x20602f=[{'name':_0x49f7a3}],_0x307ab8=process[_0xffbb8f(0x1b9)][_0xffbb8f(0x20f)]?'https://github.com/'+process[_0xffbb8f(0x1b9)][_0xffbb8f(0x20f)]:undefined,_0x19035c=_0x307ab8?{'repoUrl':_0x307ab8,'commitId':process[_0xffbb8f(0x1b9)][_0xffbb8f(0x203)],'branchName':process[_0xffbb8f(0x1b9)]['GITHUB_REF_NAME'],'commitOwner':process[_0xffbb8f(0x1b9)][_0xffbb8f(0x1dd)],'commitMessage':process[_0xffbb8f(0x1b9)][_0xffbb8f(0x1d8)]}:undefined;this['testResults']['createTestSession']({'name':_0xffbb8f(0x1b8)+_0x49f7a3,'environment':process['env']['NODE_ENV']||_0xffbb8f(0x1c2),'repoInfo':_0x19035c,'startedAt':this[_0xffbb8f(0x1cb)][_0xffbb8f(0x20c)](),'testResults':_0x20602f,'provider':_0xffbb8f(0x212)})[_0xffbb8f(0x1dc)](_0x3d61a6=>{const _0x32a2ca=_0xffbb8f;this[_0x32a2ca(0x1f2)]=_0x3d61a6;})['catch'](_0x2918d3=>{const _0x56601e=_0xffbb8f;console[_0x56601e(0x206)](_0x56601e(0x1c4),_0x2918d3['message']);});}catch(_0x331382){console[_0xffbb8f(0x206)]('[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:',_0x331382);}}[a7_0x3d9455(0x209)](_0x4b0fbe,_0x125684){const _0x10da5d=a7_0x3d9455;try{const _0x3de55a=_0x125684[_0x10da5d(0x1e5)]===_0x10da5d(0x1c8)||_0x125684[_0x10da5d(0x211)]===_0x4b0fbe[_0x10da5d(0x1fd)];if(!_0x3de55a)return;const _0xf2d7ac=_0x4b0fbe[_0x10da5d(0x1ac)]()==='flaky';if(_0xf2d7ac)this[_0x10da5d(0x1be)][_0x10da5d(0x1d9)]++,this[_0x10da5d(0x1be)][_0x10da5d(0x1c8)]++;else{if(_0x125684[_0x10da5d(0x1e5)]===_0x10da5d(0x1c8))this['testCounts'][_0x10da5d(0x1c8)]++;else _0x125684[_0x10da5d(0x1e5)]===_0x10da5d(0x1ef)&&this[_0x10da5d(0x1be)][_0x10da5d(0x1ef)]++;}}catch(_0x377454){console['error'](_0x10da5d(0x1fe),_0x377454);}}async[a7_0x3d9455(0x1fc)](){const _0x2a81ea=a7_0x3d9455;try{const _0x32dad2=this[_0x2a81ea(0x1ae)][_0x2a81ea(0x1d4)];if(!a7_0x39e285['existsSync'](_0x32dad2)){console[_0x2a81ea(0x206)](_0x2a81ea(0x20e)+_0x32dad2),console[_0x2a81ea(0x206)]('[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:'),console['error'](_0x2a81ea(0x1d7)+_0x2a81ea(0x1ba)+_0x2a81ea(0x1af)+_0x2a81ea(0x1e7));return;}const _0x19222c=a7_0x39e285[_0x2a81ea(0x1ca)](_0x32dad2,'utf-8'),_0x141d44=JSON['parse'](_0x19222c),_0x17b24c=await this['assetCollector']['collectAssets'](_0x141d44),_0x288251=await this[_0x2a81ea(0x1da)]['createZip'](_0x32dad2,_0x17b24c);if(this[_0x2a81ea(0x1b6)]&&this[_0x2a81ea(0x1f2)]){await this[_0x2a81ea(0x204)](_0x141d44,_0x288251[_0x2a81ea(0x1b2)],_0x288251['entries']);if(!this[_0x2a81ea(0x1ae)][_0x2a81ea(0x1bd)])try{a7_0x39e285[_0x2a81ea(0x20d)](_0x288251[_0x2a81ea(0x1b2)]);}catch(_0x3032e8){console[_0x2a81ea(0x1d3)](_0x2a81ea(0x1e4)+_0x3032e8);}}this['testResults']&&this[_0x2a81ea(0x1f2)]?.[_0x2a81ea(0x1eb)]&&this[_0x2a81ea(0x1ed)](_0x141d44,this[_0x2a81ea(0x1f2)]);}catch(_0x34b3fe){console[_0x2a81ea(0x206)]('[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:',_0x34b3fe);}}[a7_0x3d9455(0x1ed)](_0x5f05be,_0x4326b9){const _0x4059d4=a7_0x3d9455,_0x9c1507=pluralRules['select'](_0x5f05be['config'][_0x4059d4(0x20a)][_0x4059d4(0x1ce)]);console['log'](_0x4059d4(0x1b5)),console[_0x4059d4(0x1c6)](_0x4059d4(0x1d5)+pkgVersion),console['log']('🎭\x20Playwright:\x20'+_0x5f05be[_0x4059d4(0x1e0)][_0x4059d4(0x1c7)]),console[_0x4059d4(0x1c6)](_0x4059d4(0x1d6)+projectForms[_0x9c1507]+':\x20'+_0x5f05be[_0x4059d4(0x1e0)][_0x4059d4(0x20a)]['map'](({name:_0x7b2b3})=>_0x7b2b3)[_0x4059d4(0x1c3)](',')),console[_0x4059d4(0x1c6)]('🔗\x20Test\x20session\x20URL:\x20'+_0x4326b9[_0x4059d4(0x1eb)]),console[_0x4059d4(0x1c6)]('\x0a======================================================');}async[a7_0x3d9455(0x204)](_0x589e1b,_0x4276d1,_0x3e79d1){const _0x408106=a7_0x3d9455;if(!this['testResults']||!this[_0x408106(0x1f2)])return;try{const {failed:_0x3be0c2,flaky:_0x18951f}=this[_0x408106(0x1be)],_0x97f312=_0x3be0c2>0x0?_0x408106(0x1cf):_0x408106(0x1cc),_0x2907c6=_0x3be0c2===0x0&&_0x18951f>0x0,_0x33c78e=new Date(),_0x346a08=this[_0x408106(0x1cb)]?Math[_0x408106(0x1f1)](0x0,_0x33c78e[_0x408106(0x20c)]()-this[_0x408106(0x1cb)][_0x408106(0x20c)]()):0x0,_0x586ac7=(await a7_0x39e285['promises'][_0x408106(0x1d1)](_0x4276d1))['size'];if(this[_0x408106(0x1f2)]['testResults'][_0x408106(0x1ce)]>0x0){const _0x40dc28=this[_0x408106(0x1f2)][_0x408106(0x1b6)][0x0];let _0x3d966b;if(_0x586ac7>0x0)try{const _0x33f37e=a7_0x39e285[_0x408106(0x1de)](_0x4276d1),_0x34e6bd=await this['testResults'][_0x408106(0x1c5)](this['testSession'][_0x408106(0x201)],_0x40dc28[_0x408106(0x1bc)],_0x33f37e);_0x3d966b=_0x34e6bd[_0x408106(0x1f6)];}catch(_0x30d1cd){const _0x3dd9c1=_0x30d1cd instanceof Error?_0x30d1cd[_0x408106(0x1ff)]:String(_0x30d1cd);console['error'](_0x408106(0x207),_0x3dd9c1);}await this[_0x408106(0x1b6)][_0x408106(0x213)](this[_0x408106(0x1f2)][_0x408106(0x201)],_0x40dc28[_0x408106(0x1bc)],{'status':_0x97f312,'assetEntries':_0x3d966b?_0x3e79d1:undefined,'isDegraded':_0x2907c6,'startedAt':this[_0x408106(0x1cb)]?.[_0x408106(0x208)](),'stoppedAt':_0x33c78e[_0x408106(0x208)](),'responseTime':_0x346a08,'metadata':{'usageData':{'s3PostTotalBytes':_0x586ac7}}});}}catch(_0x7a76b0){const _0x1cd1c9=_0x7a76b0 instanceof Error?_0x7a76b0[_0x408106(0x1ff)]:String(_0x7a76b0);console['error']('[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:',_0x1cd1c9);}}[a7_0x3d9455(0x210)](_0x33f3dc){const _0x5cc44a=a7_0x3d9455;console[_0x5cc44a(0x206)](_0x5cc44a(0x1ec),_0x33f3dc);}}
1
+ const a7_0x4caca5=a7_0x3617;(function(_0x3abe83,_0x11b944){const _0x58fcb8=a7_0x3617,_0x296b05=_0x3abe83();while(!![]){try{const _0x2a8b76=parseInt(_0x58fcb8(0x12a))/0x1*(-parseInt(_0x58fcb8(0x11d))/0x2)+parseInt(_0x58fcb8(0x12e))/0x3+-parseInt(_0x58fcb8(0x13f))/0x4+parseInt(_0x58fcb8(0x136))/0x5+parseInt(_0x58fcb8(0x101))/0x6+-parseInt(_0x58fcb8(0xed))/0x7+parseInt(_0x58fcb8(0xd3))/0x8;if(_0x2a8b76===_0x11b944)break;else _0x296b05['push'](_0x296b05['shift']());}catch(_0x1865bf){_0x296b05['push'](_0x296b05['shift']());}}}(a7_0xbb47,0x82e7f));import*as a7_0x1b685b from'fs';function a7_0x3617(_0x1302ce,_0x3fa550){_0x1302ce=_0x1302ce-0xcc;const _0xbb47aa=a7_0xbb47();let _0x361777=_0xbb47aa[_0x1302ce];return _0x361777;}import*as a7_0x3ca764 from'path';function a7_0xbb47(){const _0x31d0bd=['\x20\x20]','retry','https://api.checklyhq.com','log','5DHHorQ','printSummary','timedOut','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','708360tjpWFs','existsSync','passed','playwright-tests','outputPath','\x20\x20reporter:\x20[\x0a','checkly-report.zip','CHECKLY_ENV','1198490CuOwbc','uploadTestResultAsset','FAILED','toISOString','🦝\x20Checkly\x20reporter:\x20','CHECKLY_ACCOUNT_ID','apiKey','\x0a======================================================\x0a','🎭\x20Playwright:\x20','1388556IZrcCu','version','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','join','\x22,\x20using\x20\x22production\x22','getTime','testResultId','GITHUB_REPOSITORY','14409688OyHRKH','link','createReadStream','error','flaky','GITHUB_SHA','includes','basename','accountId','[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:','outcome','getAxiosInstance','testResults','GITHUB_REF_NAME','development','parse','select','updateTestResult','https://github.com/','readFileSync','NODE_ENV','options','message','promises','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','replace','7437374DhowDe','📔\x20','config','PASSED','testSessionId','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','utf-8','env','http://127.0.0.1:3000','staging','onTestEnd','🔗\x20Test\x20session\x20URL:\x20','production','\x0a======================================================','testCounts','dryRun','jsonReportPath','unlinkSync','https://api-dev.checklyhq.com','environment','777228NDWqZZ','PW_REPORTER','startTime','[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:','en-US','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','testSession','retries','max','collectAssets','package.json','Playwright\x20Test\x20Session:\x20','CHECKLY_API_KEY','projects','stat','test-results','PluralRules','zipper','https://api-test.checklyhq.com','assetCollector','onEnd','warn','Projects','test','cwd','size','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','uploadResults','184302GRVMPc','length','local','testResultsDir','zipPath','GITHUB_EVENT_NAME','test-results/playwright-test-report.json','substring','status'];a7_0xbb47=function(){return _0x31d0bd;};return a7_0xbb47();}import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0x310b0b 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.url),__dirname=dirname(__filename),packageJson=JSON['parse'](readFileSync(join(__dirname,'..',a7_0x4caca5(0x10b)),a7_0x4caca5(0xf3))),pkgVersion=packageJson[a7_0x4caca5(0xcc)],pluralRules=new Intl[(a7_0x4caca5(0x111))](a7_0x4caca5(0x105)),projectForms={'zero':'Project','one':'Project','two':a7_0x4caca5(0x117),'few':a7_0x4caca5(0x117),'many':'Projects','other':a7_0x4caca5(0x117)};function getApiUrl(_0x469658){const _0x56dec7=a7_0x4caca5,_0x544da7={'local':_0x56dec7(0xf5),'development':_0x56dec7(0xff),'staging':_0x56dec7(0x113),'production':_0x56dec7(0x128)};return _0x544da7[_0x469658];}function getEnvironment(_0x47f5eb){const _0x4f53c0=a7_0x4caca5,_0x35eea0=_0x47f5eb?.[_0x4f53c0(0x100)],_0x412e98=process[_0x4f53c0(0xf4)][_0x4f53c0(0x135)],_0x242551=_0x35eea0||_0x412e98||_0x4f53c0(0xf9),_0x1ba7c1=[_0x4f53c0(0x11f),_0x4f53c0(0xe1),_0x4f53c0(0xf6),_0x4f53c0(0xf9)];if(!_0x1ba7c1[_0x4f53c0(0xd9)](_0x242551))return console[_0x4f53c0(0x116)](_0x4f53c0(0xcd)+_0x242551+_0x4f53c0(0xcf)),'production';return _0x242551;}function getDirectoryName(){const _0x2093e0=a7_0x4caca5,_0x46197d=process[_0x2093e0(0x119)]();let _0x29d812=a7_0x3ca764[_0x2093e0(0xda)](_0x46197d);return(!_0x29d812||_0x29d812==='/'||_0x29d812==='.')&&(_0x29d812=_0x2093e0(0x131)),_0x29d812=_0x29d812[_0x2093e0(0xec)](/[<>:"|?*]/g,'-'),_0x29d812[_0x2093e0(0x11e)]>0xff&&(_0x29d812=_0x29d812[_0x2093e0(0x124)](0x0,0xff)),_0x29d812;}export class ChecklyReporter{[a7_0x4caca5(0xe8)];[a7_0x4caca5(0x114)];[a7_0x4caca5(0x112)];['testResults'];[a7_0x4caca5(0x107)];['startTime'];['testCounts']={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x579924={}){const _0x5d2c2a=a7_0x4caca5,_0x55c625=getEnvironment(_0x579924),_0x4fcdf4=getApiUrl(_0x55c625),_0x4dfa7d=process['env'][_0x5d2c2a(0x10d)]||_0x579924[_0x5d2c2a(0x13c)],_0x3a1a30=process[_0x5d2c2a(0xf4)][_0x5d2c2a(0x13b)]||_0x579924[_0x5d2c2a(0xdb)];this[_0x5d2c2a(0xe8)]={'accountId':_0x3a1a30,'apiKey':_0x4dfa7d,'outputPath':_0x579924[_0x5d2c2a(0x132)]??_0x5d2c2a(0x134),'jsonReportPath':_0x579924[_0x5d2c2a(0xfd)]??_0x5d2c2a(0x123),'testResultsDir':_0x579924[_0x5d2c2a(0x120)]??_0x5d2c2a(0x110),'dryRun':_0x579924[_0x5d2c2a(0xfc)]??![]},this[_0x5d2c2a(0x114)]=new AssetCollector(this[_0x5d2c2a(0xe8)][_0x5d2c2a(0x120)]),this[_0x5d2c2a(0x112)]=new Zipper({'outputPath':this[_0x5d2c2a(0xe8)][_0x5d2c2a(0x132)]});if(!this[_0x5d2c2a(0xe8)][_0x5d2c2a(0xfc)]&&this[_0x5d2c2a(0xe8)][_0x5d2c2a(0x13c)]&&this[_0x5d2c2a(0xe8)][_0x5d2c2a(0xdb)]){const _0x4d96cf=new a7_0x310b0b({'apiKey':this[_0x5d2c2a(0xe8)][_0x5d2c2a(0x13c)],'accountId':this[_0x5d2c2a(0xe8)][_0x5d2c2a(0xdb)],'baseUrl':_0x4fcdf4});this['testResults']=new TestResults(_0x4d96cf[_0x5d2c2a(0xde)]());}}['onBegin'](_0x26ade8,_0x5b016d){const _0x4b89ad=a7_0x4caca5;this[_0x4b89ad(0x103)]=new Date();if(!this[_0x4b89ad(0xdf)])return;try{const _0x43acd4=getDirectoryName(),_0x5a729b=[{'name':_0x43acd4}],_0xe49b24=process[_0x4b89ad(0xf4)][_0x4b89ad(0xd2)]?_0x4b89ad(0xe5)+process['env'][_0x4b89ad(0xd2)]:undefined,_0xe2feee=_0xe49b24?{'repoUrl':_0xe49b24,'commitId':process[_0x4b89ad(0xf4)][_0x4b89ad(0xd8)],'branchName':process['env'][_0x4b89ad(0xe0)],'commitOwner':process[_0x4b89ad(0xf4)]['GITHUB_ACTOR'],'commitMessage':process['env'][_0x4b89ad(0x122)]}:undefined;this['testResults']['createTestSession']({'name':_0x4b89ad(0x10c)+_0x43acd4,'environment':process[_0x4b89ad(0xf4)][_0x4b89ad(0xe7)]||_0x4b89ad(0x118),'repoInfo':_0xe2feee,'startedAt':this[_0x4b89ad(0x103)]['getTime'](),'testResults':_0x5a729b,'provider':_0x4b89ad(0x102)})['then'](_0x1f2d8d=>{const _0x8780bd=_0x4b89ad;this[_0x8780bd(0x107)]=_0x1f2d8d;})['catch'](_0x412069=>{const _0x205466=_0x4b89ad;console[_0x205466(0xd6)](_0x205466(0x11b),_0x412069[_0x205466(0xe9)]);});}catch(_0x339b92){console[_0x4b89ad(0xd6)](_0x4b89ad(0x104),_0x339b92);}}[a7_0x4caca5(0xf7)](_0x585144,_0x5ad52d){const _0x4cd974=a7_0x4caca5;try{const _0x315b25=_0x585144[_0x4cd974(0xdd)](),_0x55d1fa=_0x5ad52d[_0x4cd974(0x127)]===_0x585144[_0x4cd974(0x108)]||_0x315b25!=='unexpected';if(!_0x55d1fa)return;const _0x1c1fbd=_0x315b25===_0x4cd974(0xd7);if(_0x1c1fbd)this[_0x4cd974(0xfb)]['flaky']++,this[_0x4cd974(0xfb)][_0x4cd974(0x130)]++;else{if(_0x5ad52d[_0x4cd974(0x125)]===_0x4cd974(0x130))this[_0x4cd974(0xfb)]['passed']++;else(_0x5ad52d[_0x4cd974(0x125)]==='failed'||_0x5ad52d[_0x4cd974(0x125)]===_0x4cd974(0x12c))&&this[_0x4cd974(0xfb)]['failed']++;}}catch(_0x31f5dc){console[_0x4cd974(0xd6)](_0x4cd974(0xf2),_0x31f5dc);}}async[a7_0x4caca5(0x115)](){const _0x32c7ca=a7_0x4caca5;try{const _0x51d2c1=this[_0x32c7ca(0xe8)]['jsonReportPath'];if(!a7_0x1b685b[_0x32c7ca(0x12f)](_0x51d2c1)){console[_0x32c7ca(0xd6)](_0x32c7ca(0x12d)+_0x51d2c1),console[_0x32c7ca(0xd6)](_0x32c7ca(0xdc)),console[_0x32c7ca(0xd6)](_0x32c7ca(0x133)+_0x32c7ca(0xeb)+_0x32c7ca(0x106)+_0x32c7ca(0x126));return;}const _0x1616f2=a7_0x1b685b[_0x32c7ca(0xe6)](_0x51d2c1,'utf-8'),_0x45b079=JSON[_0x32c7ca(0xe2)](_0x1616f2),_0x59165e=await this[_0x32c7ca(0x114)][_0x32c7ca(0x10a)](_0x45b079),_0x4d3301=await this[_0x32c7ca(0x112)]['createZip'](_0x51d2c1,_0x59165e);if(this[_0x32c7ca(0xdf)]&&this[_0x32c7ca(0x107)]){await this[_0x32c7ca(0x11c)](_0x45b079,_0x4d3301[_0x32c7ca(0x121)],_0x4d3301['entries']);if(!this[_0x32c7ca(0xe8)][_0x32c7ca(0xfc)])try{a7_0x1b685b[_0x32c7ca(0xfe)](_0x4d3301[_0x32c7ca(0x121)]);}catch(_0x2a0242){console[_0x32c7ca(0x116)]('[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20'+_0x2a0242);}}this['testResults']&&this['testSession']?.[_0x32c7ca(0xd4)]&&this[_0x32c7ca(0x12b)](_0x45b079,this['testSession']);}catch(_0x3fa22f){console[_0x32c7ca(0xd6)]('[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:',_0x3fa22f);}}[a7_0x4caca5(0x12b)](_0x449979,_0x1ac191){const _0x189bdd=a7_0x4caca5,_0x21e4e9=pluralRules[_0x189bdd(0xe3)](_0x449979[_0x189bdd(0xef)][_0x189bdd(0x10e)][_0x189bdd(0x11e)]);console[_0x189bdd(0x129)](_0x189bdd(0x13d)),console[_0x189bdd(0x129)](_0x189bdd(0x13a)+pkgVersion),console[_0x189bdd(0x129)](_0x189bdd(0x13e)+_0x449979[_0x189bdd(0xef)][_0x189bdd(0xcc)]),console[_0x189bdd(0x129)](_0x189bdd(0xee)+projectForms[_0x21e4e9]+':\x20'+_0x449979[_0x189bdd(0xef)]['projects']['map'](({name:_0x5ae52e})=>_0x5ae52e)[_0x189bdd(0xce)](',')),console['log'](_0x189bdd(0xf8)+_0x1ac191[_0x189bdd(0xd4)]),console[_0x189bdd(0x129)](_0x189bdd(0xfa));}async['uploadResults'](_0x250bf4,_0x3ddd37,_0x28ed6c){const _0x1b714b=a7_0x4caca5;if(!this['testResults']||!this[_0x1b714b(0x107)])return;try{const {failed:_0x13b0ba,flaky:_0x71f53c}=this[_0x1b714b(0xfb)],_0x42a4d8=_0x13b0ba>0x0?_0x1b714b(0x138):_0x1b714b(0xf0),_0x1a0fde=_0x13b0ba===0x0&&_0x71f53c>0x0,_0x1cb4a7=new Date(),_0x2f82cf=this[_0x1b714b(0x103)]?Math[_0x1b714b(0x109)](0x0,_0x1cb4a7['getTime']()-this[_0x1b714b(0x103)][_0x1b714b(0xd0)]()):0x0,_0x1133a2=(await a7_0x1b685b[_0x1b714b(0xea)][_0x1b714b(0x10f)](_0x3ddd37))[_0x1b714b(0x11a)];if(this[_0x1b714b(0x107)][_0x1b714b(0xdf)][_0x1b714b(0x11e)]>0x0){const _0x259922=this[_0x1b714b(0x107)][_0x1b714b(0xdf)][0x0];let _0x53f836;if(_0x1133a2>0x0)try{const _0x40d3b3=a7_0x1b685b[_0x1b714b(0xd5)](_0x3ddd37),_0xa815d7=await this['testResults'][_0x1b714b(0x137)](this['testSession'][_0x1b714b(0xf1)],_0x259922[_0x1b714b(0xd1)],_0x40d3b3);_0x53f836=_0xa815d7['assetId'];}catch(_0x1fbf7e){const _0x338b34=_0x1fbf7e instanceof Error?_0x1fbf7e[_0x1b714b(0xe9)]:String(_0x1fbf7e);console[_0x1b714b(0xd6)]('[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:',_0x338b34);}await this[_0x1b714b(0xdf)][_0x1b714b(0xe4)](this[_0x1b714b(0x107)]['testSessionId'],_0x259922[_0x1b714b(0xd1)],{'status':_0x42a4d8,'assetEntries':_0x53f836?_0x28ed6c:undefined,'isDegraded':_0x1a0fde,'startedAt':this[_0x1b714b(0x103)]?.[_0x1b714b(0x139)](),'stoppedAt':_0x1cb4a7[_0x1b714b(0x139)](),'responseTime':_0x2f82cf,'metadata':{'usageData':{'s3PostTotalBytes':_0x1133a2}}});}}catch(_0x3a70ba){const _0x58e4b0=_0x3a70ba instanceof Error?_0x3a70ba[_0x1b714b(0xe9)]:String(_0x3a70ba);console[_0x1b714b(0xd6)]('[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:',_0x58e4b0);}}['onError'](_0x4e822b){const _0xd4d836=a7_0x4caca5;console[_0xd4d836(0xd6)]('[Checkly\x20Reporter]\x20Global\x20error:',_0x4e822b);}}
package/dist/zipper.js CHANGED
@@ -1 +1 @@
1
- const a9_0x43d28b=a9_0x16a0;function a9_0x16a0(_0x5d4079,_0x21bec2){const _0xe61b65=a9_0xe61b();return a9_0x16a0=function(_0x16a0d8,_0x267f19){_0x16a0d8=_0x16a0d8-0x165;let _0x3379e1=_0xe61b65[_0x16a0d8];return _0x3379e1;},a9_0x16a0(_0x5d4079,_0x21bec2);}(function(_0x27a7a2,_0x8f7e01){const _0x988db7=a9_0x16a0,_0x58b7ea=_0x27a7a2();while(!![]){try{const _0x422096=parseInt(_0x988db7(0x16f))/0x1*(parseInt(_0x988db7(0x178))/0x2)+parseInt(_0x988db7(0x175))/0x3*(parseInt(_0x988db7(0x187))/0x4)+-parseInt(_0x988db7(0x177))/0x5+-parseInt(_0x988db7(0x167))/0x6*(-parseInt(_0x988db7(0x17f))/0x7)+-parseInt(_0x988db7(0x17c))/0x8+-parseInt(_0x988db7(0x18c))/0x9*(-parseInt(_0x988db7(0x197))/0xa)+-parseInt(_0x988db7(0x17b))/0xb*(parseInt(_0x988db7(0x169))/0xc);if(_0x422096===_0x8f7e01)break;else _0x58b7ea['push'](_0x58b7ea['shift']());}catch(_0x5a9e29){_0x58b7ea['push'](_0x58b7ea['shift']());}}}(a9_0xe61b,0x7fc0d));import*as a9_0x433878 from'fs';import*as a9_0x383a98 from'path';import*as a9_0xdb0610 from'os';import{ZipArchive}from'archiver';function a9_0xe61b(){const _0x123fe2=['sourcePath','createZip','indexOf','contents','108gAxZgT','_offsets','12RKFSDn','Report\x20file\x20not\x20found:\x20','finalize','isArray','test-results/','parse','9111bkmSqR','transformAttachmentPaths','pipe','name','push','attachments','2793whyxxg','path','1817835LAlFbV','156xRnGpG','output/playwright-test-report.json','join','11771639FpSqvL','6285856qzYQdq','error','close','353857RdKkIL','existsSync','playwright-test-report-','stringify','__snapshots__/','utf-8','lastIndexOf','file','3748tFWGKQ','now','__screenshots__/','forEach','replace','160587ZObwPa','Asset\x20file\x20not\x20found:\x20','normalizeAttachmentPath','substring','outputPath','transformJsonReport','values','archivePath','object','warn','snapshots/','140gtvhCe','string','screenshots/','createWriteStream'];a9_0xe61b=function(){return _0x123fe2;};return a9_0xe61b();}export class Zipper{[a9_0x43d28b(0x190)];constructor(_0x2db449){const _0x3722d0=a9_0x43d28b;this[_0x3722d0(0x190)]=_0x2db449[_0x3722d0(0x190)];}async[a9_0x43d28b(0x19c)](_0x3193a1,_0x11c37f){const _0x4e0b21=[];return new Promise((_0x3a08c1,_0x14f1d3)=>{const _0x4eb8ed=a9_0x16a0;try{const _0x1f5468=a9_0x433878[_0x4eb8ed(0x19a)](this[_0x4eb8ed(0x190)]),_0x2f5db0=new ZipArchive({'zlib':{'level':0x0}});_0x2f5db0['on']('entry',_0x5a809c=>{const _0x55ed8f=_0x4eb8ed,_0x59660f=_0x5a809c[_0x55ed8f(0x172)][_0x55ed8f(0x18b)](/\\/g,'/'),_0x198a00=_0x5a809c[_0x55ed8f(0x168)]?.['contents']??0x0,_0x5cd36f=_0x5a809c[_0x55ed8f(0x168)]?.[_0x55ed8f(0x166)]+(_0x5a809c['csize']??0x0)-0x1;_0x4e0b21[_0x55ed8f(0x173)]({'name':_0x59660f,'start':_0x198a00,'end':_0x5cd36f});}),_0x1f5468['on'](_0x4eb8ed(0x17e),()=>{const _0x4d13c3=_0x2f5db0['pointer']();_0x3a08c1({'zipPath':this['outputPath'],'size':_0x4d13c3,'entryCount':_0x4e0b21['length'],'entries':_0x4e0b21});}),_0x2f5db0['on'](_0x4eb8ed(0x17d),_0x120bb4=>{_0x14f1d3(_0x120bb4);}),_0x1f5468['on'](_0x4eb8ed(0x17d),_0x3d298b=>{_0x14f1d3(_0x3d298b);}),_0x2f5db0[_0x4eb8ed(0x171)](_0x1f5468);if(!a9_0x433878[_0x4eb8ed(0x180)](_0x3193a1)){_0x14f1d3(new Error(_0x4eb8ed(0x16a)+_0x3193a1));return;}const _0x5b77f5=this[_0x4eb8ed(0x191)](_0x3193a1);_0x2f5db0['file'](_0x5b77f5,{'name':_0x4eb8ed(0x179)});for(const _0x2c035c of _0x11c37f){if(!a9_0x433878['existsSync'](_0x2c035c[_0x4eb8ed(0x19b)])){_0x14f1d3(new Error(_0x4eb8ed(0x18d)+_0x2c035c['sourcePath']));return;}_0x2f5db0[_0x4eb8ed(0x186)](_0x2c035c[_0x4eb8ed(0x19b)],{'name':_0x2c035c[_0x4eb8ed(0x193)]});}_0x2f5db0[_0x4eb8ed(0x16b)]();}catch(_0x2da9b5){_0x14f1d3(_0x2da9b5);}});}[a9_0x43d28b(0x191)](_0xe036ae){const _0x47cc89=a9_0x43d28b,_0x5699a3=a9_0x433878['readFileSync'](_0xe036ae,_0x47cc89(0x184)),_0x22e2d9=JSON[_0x47cc89(0x16e)](_0x5699a3);this['transformAttachmentPaths'](_0x22e2d9);const _0x4dc54a=a9_0x383a98[_0x47cc89(0x17a)](a9_0xdb0610['tmpdir'](),_0x47cc89(0x181)+Date[_0x47cc89(0x188)]()+'.json');return a9_0x433878['writeFileSync'](_0x4dc54a,JSON[_0x47cc89(0x182)](_0x22e2d9,null,0x2)),_0x4dc54a;}[a9_0x43d28b(0x170)](_0x8c0ef4){const _0x52e796=a9_0x43d28b;if(typeof _0x8c0ef4!==_0x52e796(0x194)||_0x8c0ef4===null)return;if(Array[_0x52e796(0x16c)](_0x8c0ef4)){_0x8c0ef4[_0x52e796(0x18a)](_0x1758ee=>this[_0x52e796(0x170)](_0x1758ee));return;}_0x8c0ef4[_0x52e796(0x174)]&&Array[_0x52e796(0x16c)](_0x8c0ef4[_0x52e796(0x174)])&&_0x8c0ef4[_0x52e796(0x174)]['forEach'](_0xf0de80=>{const _0x3e0081=_0x52e796;_0xf0de80['path']&&typeof _0xf0de80[_0x3e0081(0x176)]===_0x3e0081(0x198)&&(_0xf0de80['path']=this['normalizeAttachmentPath'](_0xf0de80['path']));}),Object[_0x52e796(0x192)](_0x8c0ef4)[_0x52e796(0x18a)](_0x3e04a6=>this[_0x52e796(0x170)](_0x3e04a6));}[a9_0x43d28b(0x18e)](_0x448ca3){const _0x5988ef=a9_0x43d28b,_0x550715=_0x448ca3['replace'](/\\/g,'/'),_0x536387=_0x550715[_0x5988ef(0x165)](_0x5988ef(0x16d));if(_0x536387!==-0x1)return _0x550715[_0x5988ef(0x18f)](_0x536387);const _0x23a03e=_0x550715[_0x5988ef(0x165)]('-snapshots/');if(_0x23a03e!==-0x1){const _0x4388fd=_0x550715[_0x5988ef(0x18f)](0x0,_0x23a03e),_0x3c654a=_0x4388fd[_0x5988ef(0x185)]('/'),_0xca75e5=_0x3c654a!==-0x1?_0x3c654a+0x1:0x0;return _0x550715[_0x5988ef(0x18f)](_0xca75e5);}const _0x3ddb38=[_0x5988ef(0x189),_0x5988ef(0x183),_0x5988ef(0x199),_0x5988ef(0x196)];for(const _0x4237e2 of _0x3ddb38){const _0x5eae79=_0x550715[_0x5988ef(0x165)](_0x4237e2);if(_0x5eae79!==-0x1)return _0x550715[_0x5988ef(0x18f)](_0x5eae79);}return console[_0x5988ef(0x195)]('[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20'+_0x448ca3),_0x448ca3;}}
1
+ function a9_0x5b22(_0x538716,_0x27f691){_0x538716=_0x538716-0x1c5;const _0xd9640a=a9_0xd964();let _0x5b22ce=_0xd9640a[_0x538716];return _0x5b22ce;}const a9_0x48733b=a9_0x5b22;(function(_0x2749c1,_0x5abcc2){const _0x44393b=a9_0x5b22,_0x567b1d=_0x2749c1();while(!![]){try{const _0x448026=parseInt(_0x44393b(0x1cf))/0x1+-parseInt(_0x44393b(0x1ea))/0x2*(parseInt(_0x44393b(0x1d2))/0x3)+-parseInt(_0x44393b(0x1da))/0x4*(parseInt(_0x44393b(0x1e1))/0x5)+-parseInt(_0x44393b(0x1f4))/0x6*(-parseInt(_0x44393b(0x1cc))/0x7)+parseInt(_0x44393b(0x1c7))/0x8*(parseInt(_0x44393b(0x1e8))/0x9)+parseInt(_0x44393b(0x1d7))/0xa+-parseInt(_0x44393b(0x1d6))/0xb;if(_0x448026===_0x5abcc2)break;else _0x567b1d['push'](_0x567b1d['shift']());}catch(_0x7c5b9d){_0x567b1d['push'](_0x567b1d['shift']());}}}(a9_0xd964,0x874ab));import*as a9_0x4c388a from'fs';function a9_0xd964(){const _0x2f1784=['4551RzxNRf','isArray','archivePath','outputPath','787743OCSOdb','188370VpREuP','transformJsonReport','close','4icKfTj','finalize','error','pointer','stringify','.json','__snapshots__/','3945165xIVbca','entry','substring','writeFileSync','file','Report\x20file\x20not\x20found:\x20','indexOf','953532ehWdmm','pipe','1370svBicX','-snapshots/','tmpdir','parse','Asset\x20file\x20not\x20found:\x20','path','attachments','__screenshots__/','forEach','createZip','1434pHyvvC','utf-8','test-results/','contents','_offsets','64OKFUId','string','transformAttachmentPaths','length','existsSync','22141VRXoBc','normalizeAttachmentPath','sourcePath','831568IzETjT','playwright-test-report-','object'];a9_0xd964=function(){return _0x2f1784;};return a9_0xd964();}import*as a9_0x4a6679 from'path';import*as a9_0x3c8511 from'os';import{ZipArchive}from'archiver';export class Zipper{[a9_0x48733b(0x1d5)];constructor(_0x6bbd3f){const _0x4cdaf8=a9_0x48733b;this[_0x4cdaf8(0x1d5)]=_0x6bbd3f[_0x4cdaf8(0x1d5)];}async[a9_0x48733b(0x1f3)](_0x12c746,_0x1105a0){const _0xda1e14=[];return new Promise((_0x132e99,_0x51d202)=>{const _0x3d349f=a9_0x5b22;try{const _0x2f0a16=a9_0x4c388a['createWriteStream'](this['outputPath']),_0x266bc5=new ZipArchive({'zlib':{'level':0x0}});_0x266bc5['on'](_0x3d349f(0x1e2),_0x40527b=>{const _0x3c50fc=_0x3d349f,_0x218119=_0x40527b['name']['replace'](/\\/g,'/'),_0x47fe96=_0x40527b[_0x3c50fc(0x1c6)]?.[_0x3c50fc(0x1c5)]??0x0,_0x2d95e1=_0x40527b['_offsets']?.[_0x3c50fc(0x1c5)]+(_0x40527b['csize']??0x0)-0x1;_0xda1e14['push']({'name':_0x218119,'start':_0x47fe96,'end':_0x2d95e1});}),_0x2f0a16['on'](_0x3d349f(0x1d9),()=>{const _0x4f3b63=_0x3d349f,_0x31691f=_0x266bc5[_0x4f3b63(0x1dd)]();_0x132e99({'zipPath':this[_0x4f3b63(0x1d5)],'size':_0x31691f,'entryCount':_0xda1e14[_0x4f3b63(0x1ca)],'entries':_0xda1e14});}),_0x266bc5['on'](_0x3d349f(0x1dc),_0xcf3dd6=>{_0x51d202(_0xcf3dd6);}),_0x2f0a16['on'](_0x3d349f(0x1dc),_0x1236a9=>{_0x51d202(_0x1236a9);}),_0x266bc5[_0x3d349f(0x1e9)](_0x2f0a16);if(!a9_0x4c388a['existsSync'](_0x12c746)){_0x51d202(new Error(_0x3d349f(0x1e6)+_0x12c746));return;}const _0xa945a1=this[_0x3d349f(0x1d8)](_0x12c746);_0x266bc5['file'](_0xa945a1,{'name':'output/playwright-test-report.json'});for(const _0x4e7d6b of _0x1105a0){if(!a9_0x4c388a[_0x3d349f(0x1cb)](_0x4e7d6b[_0x3d349f(0x1ce)])){_0x51d202(new Error(_0x3d349f(0x1ee)+_0x4e7d6b[_0x3d349f(0x1ce)]));return;}_0x266bc5[_0x3d349f(0x1e5)](_0x4e7d6b[_0x3d349f(0x1ce)],{'name':_0x4e7d6b[_0x3d349f(0x1d4)]});}_0x266bc5[_0x3d349f(0x1db)]();}catch(_0x1fee40){_0x51d202(_0x1fee40);}});}[a9_0x48733b(0x1d8)](_0x419375){const _0x55c609=a9_0x48733b,_0x26b876=a9_0x4c388a['readFileSync'](_0x419375,_0x55c609(0x1f5)),_0x2e939f=JSON[_0x55c609(0x1ed)](_0x26b876);this['transformAttachmentPaths'](_0x2e939f);const _0x7ecded=a9_0x4a6679['join'](a9_0x3c8511[_0x55c609(0x1ec)](),_0x55c609(0x1d0)+Date['now']()+_0x55c609(0x1df));return a9_0x4c388a[_0x55c609(0x1e4)](_0x7ecded,JSON[_0x55c609(0x1de)](_0x2e939f,null,0x2)),_0x7ecded;}[a9_0x48733b(0x1c9)](_0x3519c1){const _0x3e2eac=a9_0x48733b;if(typeof _0x3519c1!==_0x3e2eac(0x1d1)||_0x3519c1===null)return;if(Array['isArray'](_0x3519c1)){_0x3519c1[_0x3e2eac(0x1f2)](_0x210d81=>this[_0x3e2eac(0x1c9)](_0x210d81));return;}_0x3519c1['attachments']&&Array[_0x3e2eac(0x1d3)](_0x3519c1['attachments'])&&_0x3519c1[_0x3e2eac(0x1f0)]['forEach'](_0x11bdfe=>{const _0x29da6e=_0x3e2eac;_0x11bdfe[_0x29da6e(0x1ef)]&&typeof _0x11bdfe[_0x29da6e(0x1ef)]===_0x29da6e(0x1c8)&&(_0x11bdfe[_0x29da6e(0x1ef)]=this[_0x29da6e(0x1cd)](_0x11bdfe[_0x29da6e(0x1ef)]));}),Object['values'](_0x3519c1)[_0x3e2eac(0x1f2)](_0x357b85=>this['transformAttachmentPaths'](_0x357b85));}[a9_0x48733b(0x1cd)](_0x400a50){const _0x9fdd49=a9_0x48733b,_0x14cf48=_0x400a50['replace'](/\\/g,'/'),_0x483efa=_0x14cf48['indexOf'](_0x9fdd49(0x1f6));if(_0x483efa!==-0x1)return _0x14cf48[_0x9fdd49(0x1e3)](_0x483efa);const _0x5f5d6a=_0x14cf48['indexOf'](_0x9fdd49(0x1eb));if(_0x5f5d6a!==-0x1){const _0x4ef6b2=_0x14cf48[_0x9fdd49(0x1e3)](0x0,_0x5f5d6a),_0x5911c7=_0x4ef6b2['lastIndexOf']('/'),_0x7f7c4c=_0x5911c7!==-0x1?_0x5911c7+0x1:0x0;return _0x14cf48[_0x9fdd49(0x1e3)](_0x7f7c4c);}const _0x3e9582=[_0x9fdd49(0x1f1),_0x9fdd49(0x1e0),'screenshots/','snapshots/'];for(const _0x3665ee of _0x3e9582){const _0x46902a=_0x14cf48[_0x9fdd49(0x1e7)](_0x3665ee);if(_0x46902a!==-0x1)return _0x14cf48[_0x9fdd49(0x1e3)](_0x46902a);}return console['warn']('[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20'+_0x400a50),_0x400a50;}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkly/playwright-reporter",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
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",