@checkly/playwright-reporter 0.0.4-alpha → 0.0.5-alpha

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_0x3184(_0x4f4240,_0x19368e){const _0x43eba5=a0_0x43eb();return a0_0x3184=function(_0x3184ac,_0x559074){_0x3184ac=_0x3184ac-0x18f;let _0x16af12=_0x43eba5[_0x3184ac];return _0x16af12;},a0_0x3184(_0x4f4240,_0x19368e);}const a0_0x1a1f12=a0_0x3184;function a0_0x43eb(){const _0x9010e8=['determineAssetType','.avi','1032702PYiVlK','sep','collectAssetsRecursive','.html','135792yzJyCr','video/mp4','10rlhwXD','readdirSync','other','.jpg','4MKPxHh','has','split','testResultsDir','attachment','.svg','getVideoContentType','join','name','.bmp','createAsset','existsSync','.webm','.jpeg','12xPbfWM','.txt','.htm','575800sdtEiF','some','resolve','image/bmp','collectAssets','extname','67291hALAAU','video/webm','text/plain','633237MqikwB','image/gif','image/png','video/x-msvideo','19944xIyqBI','.mov','test','video/quicktime','image/jpeg','.zip','.json','application/octet-stream','basename','.png','isDirectory','567nKxQBJ','includes','.mp4','.log','video','add','shouldSkipFile','getImageContentType','5536lWUsnP','image/svg+xml','application/json','application/zip'];a0_0x43eb=function(){return _0x9010e8;};return a0_0x43eb();}(function(_0x457cdc,_0x5a7772){const _0x514c79=a0_0x3184,_0x10d3b8=_0x457cdc();while(!![]){try{const _0x1d154c=parseInt(_0x514c79(0x1aa))/0x1*(-parseInt(_0x514c79(0x193))/0x2)+-parseInt(_0x514c79(0x1ad))/0x3+parseInt(_0x514c79(0x1a1))/0x4*(parseInt(_0x514c79(0x1a4))/0x5)+parseInt(_0x514c79(0x1ce))/0x6+parseInt(_0x514c79(0x1bc))/0x7*(parseInt(_0x514c79(0x1c4))/0x8)+-parseInt(_0x514c79(0x1b1))/0x9*(-parseInt(_0x514c79(0x18f))/0xa)+parseInt(_0x514c79(0x1ca))/0xb;if(_0x1d154c===_0x5a7772)break;else _0x10d3b8['push'](_0x10d3b8['shift']());}catch(_0x4b5480){_0x10d3b8['push'](_0x10d3b8['shift']());}}}(a0_0x43eb,0x2aa09));import*as a0_0x2bdd11 from'fs';import*as a0_0x1b7484 from'path';export class AssetCollector{[a0_0x1a1f12(0x196)];constructor(_0x2f9cc2){this['testResultsDir']=_0x2f9cc2;}async[a0_0x1a1f12(0x1a8)](_0x5477d2){const _0x280088=a0_0x1a1f12,_0x300425=[],_0x4786a8=new Set();if(!a0_0x2bdd11[_0x280088(0x19e)](this[_0x280088(0x196)]))return _0x300425;return await this[_0x280088(0x1cc)](this['testResultsDir'],'',_0x300425,_0x4786a8),_0x300425;}async['collectAssetsRecursive'](_0x594bf5,_0x211c98,_0x423b7,_0x1837c6){const _0x598e73=a0_0x1a1f12;let _0x3d864e;try{_0x3d864e=a0_0x2bdd11[_0x598e73(0x190)](_0x594bf5,{'withFileTypes':!![]});}catch{return;}const _0x347835=a0_0x1b7484[_0x598e73(0x1b9)](a0_0x1b7484[_0x598e73(0x1a6)](this[_0x598e73(0x196)]));for(const _0x1a0c00 of _0x3d864e){const _0x4b1409=a0_0x1b7484[_0x598e73(0x19a)](_0x594bf5,_0x1a0c00[_0x598e73(0x19b)]),_0x188e59=a0_0x1b7484['relative'](this[_0x598e73(0x196)],_0x4b1409),_0x52cb93=a0_0x1b7484['join'](_0x347835,_0x188e59);if(this[_0x598e73(0x1c2)](_0x1a0c00[_0x598e73(0x19b)]))continue;if(_0x1a0c00[_0x598e73(0x1bb)]())await this[_0x598e73(0x1cc)](_0x4b1409,_0x52cb93,_0x423b7,_0x1837c6);else{if(_0x1a0c00['isFile']()){if(!_0x1837c6[_0x598e73(0x194)](_0x4b1409)){const _0x1201be=this[_0x598e73(0x19d)](_0x4b1409,_0x52cb93);_0x423b7['push'](_0x1201be),_0x1837c6[_0x598e73(0x1c1)](_0x4b1409);}}}}}[a0_0x1a1f12(0x1c2)](_0x3d0dab){const _0x4d7821=a0_0x1a1f12,_0xf15af0=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0xf15af0[_0x4d7821(0x1a5)](_0x2e38bd=>_0x2e38bd[_0x4d7821(0x1b3)](_0x3d0dab));}['createAsset'](_0x5ab734,_0x508fb7){const _0x246565=a0_0x1a1f12,_0x1cbaa4=a0_0x1b7484[_0x246565(0x1a9)](_0x5ab734)['toLowerCase'](),{type:_0x774b0f,contentType:_0x22fb63}=this[_0x246565(0x1c8)](_0x1cbaa4),_0x16255c=_0x508fb7[_0x246565(0x195)](a0_0x1b7484[_0x246565(0x1cb)])[_0x246565(0x19a)]('/');return{'sourcePath':_0x5ab734,'archivePath':_0x16255c,'type':_0x774b0f,'contentType':_0x22fb63};}[a0_0x1a1f12(0x1c8)](_0xf54370){const _0x2d000e=a0_0x1a1f12;if([_0x2d000e(0x1ba),_0x2d000e(0x192),_0x2d000e(0x1a0),'.gif',_0x2d000e(0x19c),_0x2d000e(0x198)][_0x2d000e(0x1bd)](_0xf54370))return{'type':'screenshot','contentType':this[_0x2d000e(0x1c3)](_0xf54370)};if([_0x2d000e(0x19f),_0x2d000e(0x1be),_0x2d000e(0x1c9),_0x2d000e(0x1b2)]['includes'](_0xf54370))return{'type':_0x2d000e(0x1c0),'contentType':this[_0x2d000e(0x199)](_0xf54370)};if(_0xf54370===_0x2d000e(0x1b6))return{'type':'trace','contentType':_0x2d000e(0x1c7)};if(_0xf54370===_0x2d000e(0x1cd)||_0xf54370===_0x2d000e(0x1a3))return{'type':_0x2d000e(0x197),'contentType':'text/html'};if(_0xf54370===_0x2d000e(0x1b7))return{'type':_0x2d000e(0x197),'contentType':_0x2d000e(0x1c6)};if(_0xf54370===_0x2d000e(0x1a2)||_0xf54370===_0x2d000e(0x1bf))return{'type':'attachment','contentType':_0x2d000e(0x1ac)};return{'type':_0x2d000e(0x191),'contentType':_0x2d000e(0x1b8)};}[a0_0x1a1f12(0x1c3)](_0x16dd79){const _0x5d9714=a0_0x1a1f12,_0x1e1afe={'.png':_0x5d9714(0x1af),'.jpg':_0x5d9714(0x1b5),'.jpeg':_0x5d9714(0x1b5),'.gif':_0x5d9714(0x1ae),'.bmp':_0x5d9714(0x1a7),'.svg':_0x5d9714(0x1c5)};return _0x1e1afe[_0x16dd79]||'image/png';}[a0_0x1a1f12(0x199)](_0x429ebe){const _0x599b4c=a0_0x1a1f12,_0x1f679e={'.webm':_0x599b4c(0x1ab),'.mp4':_0x599b4c(0x1cf),'.avi':_0x599b4c(0x1b0),'.mov':_0x599b4c(0x1b4)};return _0x1f679e[_0x429ebe]||_0x599b4c(0x1ab);}}
1
+ const a0_0x435bbd=a0_0xd910;function a0_0x2505(){const _0x3f3f70=['name','trace','createAsset','10016zUPIkb','.mov','screenshot','getVideoContentType','collectAssetsRecursive','extname','.svg','.log','test','getImageContentType','other','.json','application/json','.gif','.html','isFile','basename','determineAssetType','some','.jpg','text/html','testResultsDir','toLowerCase','includes','video/webm','1970NlkZBr','video/x-msvideo','sep','7mAuHeR','has','application/octet-stream','3137299hiWaqr','relative','collectAssets','12465CUqTcI','video/quicktime','.htm','video','attachment','resolve','shouldSkipFile','525XHHECv','787470ojSlDP','readdirSync','push','image/png','96254FztuBM','join','20883CouWmg','1709840INwCmu','image/svg+xml','image/jpeg','add','existsSync','.zip','text/plain','26TDAVLn'];a0_0x2505=function(){return _0x3f3f70;};return a0_0x2505();}(function(_0x52a4ad,_0x26949a){const _0x2dca1a=a0_0xd910,_0x571b41=_0x52a4ad();while(!![]){try{const _0x4afd17=parseInt(_0x2dca1a(0x9e))/0x1+-parseInt(_0x2dca1a(0x6c))/0x2*(-parseInt(_0x2dca1a(0x64))/0x3)+parseInt(_0x2dca1a(0x70))/0x4*(parseInt(_0x2dca1a(0x99))/0x5)+-parseInt(_0x2dca1a(0x9a))/0x6*(-parseInt(_0x2dca1a(0x8c))/0x7)+parseInt(_0x2dca1a(0x65))/0x8+parseInt(_0x2dca1a(0x92))/0x9*(-parseInt(_0x2dca1a(0x89))/0xa)+-parseInt(_0x2dca1a(0x8f))/0xb;if(_0x4afd17===_0x26949a)break;else _0x571b41['push'](_0x571b41['shift']());}catch(_0x4f3082){_0x571b41['push'](_0x571b41['shift']());}}}(a0_0x2505,0x39c2c));import*as a0_0x3b7e4d from'fs';function a0_0xd910(_0x2e6234,_0x458f16){const _0x250578=a0_0x2505();return a0_0xd910=function(_0xd910b0,_0x1db373){_0xd910b0=_0xd910b0-0x64;let _0x16b8a5=_0x250578[_0xd910b0];return _0x16b8a5;},a0_0xd910(_0x2e6234,_0x458f16);}import*as a0_0x2237a3 from'path';export class AssetCollector{[a0_0x435bbd(0x85)];constructor(_0x11780c){this['testResultsDir']=_0x11780c;}async[a0_0x435bbd(0x91)](_0x51b50b){const _0x5eb31a=a0_0x435bbd,_0x58d213=[],_0x334a84=new Set();if(!a0_0x3b7e4d[_0x5eb31a(0x69)](this[_0x5eb31a(0x85)]))return _0x58d213;return await this[_0x5eb31a(0x74)](this['testResultsDir'],'',_0x58d213,_0x334a84),_0x58d213;}async[a0_0x435bbd(0x74)](_0x140f33,_0x43db79,_0x4af6eb,_0xc957a1){const _0x47a184=a0_0x435bbd;let _0x298d50;try{_0x298d50=a0_0x3b7e4d[_0x47a184(0x9b)](_0x140f33,{'withFileTypes':!![]});}catch{return;}const _0x1c1a56=a0_0x2237a3[_0x47a184(0x80)](a0_0x2237a3[_0x47a184(0x97)](this[_0x47a184(0x85)]));for(const _0xebd936 of _0x298d50){const _0x4de578=a0_0x2237a3[_0x47a184(0x9f)](_0x140f33,_0xebd936[_0x47a184(0x6d)]),_0x193454=a0_0x2237a3[_0x47a184(0x90)](this[_0x47a184(0x85)],_0x4de578),_0x3e4509=a0_0x2237a3['join'](_0x1c1a56,_0x193454);if(this[_0x47a184(0x98)](_0xebd936[_0x47a184(0x6d)]))continue;if(_0xebd936['isDirectory']())await this['collectAssetsRecursive'](_0x4de578,_0x3e4509,_0x4af6eb,_0xc957a1);else{if(_0xebd936[_0x47a184(0x7f)]()){if(!_0xc957a1[_0x47a184(0x8d)](_0x4de578)){const _0x1972a9=this['createAsset'](_0x4de578,_0x3e4509);_0x4af6eb[_0x47a184(0x9c)](_0x1972a9),_0xc957a1[_0x47a184(0x68)](_0x4de578);}}}}}[a0_0x435bbd(0x98)](_0x54f838){const _0x8a327=a0_0x435bbd,_0x30be09=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x30be09[_0x8a327(0x82)](_0x1906f5=>_0x1906f5[_0x8a327(0x78)](_0x54f838));}[a0_0x435bbd(0x6f)](_0x2d3c15,_0x41f351){const _0x5d614f=a0_0x435bbd,_0x5c7890=a0_0x2237a3[_0x5d614f(0x75)](_0x2d3c15)[_0x5d614f(0x86)](),{type:_0x11f3dd,contentType:_0x1e1286}=this[_0x5d614f(0x81)](_0x5c7890),_0xcb9262=_0x41f351['split'](a0_0x2237a3[_0x5d614f(0x8b)])[_0x5d614f(0x9f)]('/');return{'sourcePath':_0x2d3c15,'archivePath':_0xcb9262,'type':_0x11f3dd,'contentType':_0x1e1286};}[a0_0x435bbd(0x81)](_0x360bb6){const _0x2ff9e9=a0_0x435bbd;if(['.png',_0x2ff9e9(0x83),'.jpeg',_0x2ff9e9(0x7d),'.bmp',_0x2ff9e9(0x76)][_0x2ff9e9(0x87)](_0x360bb6))return{'type':_0x2ff9e9(0x72),'contentType':this[_0x2ff9e9(0x79)](_0x360bb6)};if(['.webm','.mp4','.avi',_0x2ff9e9(0x71)]['includes'](_0x360bb6))return{'type':_0x2ff9e9(0x95),'contentType':this['getVideoContentType'](_0x360bb6)};if(_0x360bb6===_0x2ff9e9(0x6a))return{'type':_0x2ff9e9(0x6e),'contentType':'application/zip'};if(_0x360bb6===_0x2ff9e9(0x7e)||_0x360bb6===_0x2ff9e9(0x94))return{'type':_0x2ff9e9(0x96),'contentType':_0x2ff9e9(0x84)};if(_0x360bb6===_0x2ff9e9(0x7b))return{'type':_0x2ff9e9(0x96),'contentType':_0x2ff9e9(0x7c)};if(_0x360bb6==='.txt'||_0x360bb6===_0x2ff9e9(0x77))return{'type':'attachment','contentType':_0x2ff9e9(0x6b)};return{'type':_0x2ff9e9(0x7a),'contentType':_0x2ff9e9(0x8e)};}[a0_0x435bbd(0x79)](_0x1a8bd6){const _0x597773=a0_0x435bbd,_0x4a34a2={'.png':_0x597773(0x9d),'.jpg':_0x597773(0x67),'.jpeg':_0x597773(0x67),'.gif':'image/gif','.bmp':'image/bmp','.svg':_0x597773(0x66)};return _0x4a34a2[_0x1a8bd6]||_0x597773(0x9d);}[a0_0x435bbd(0x73)](_0x422abe){const _0x3dbca4=a0_0x435bbd,_0x85b30={'.webm':_0x3dbca4(0x88),'.mp4':'video/mp4','.avi':_0x3dbca4(0x8a),'.mov':_0x3dbca4(0x93)};return _0x85b30[_0x422abe]||_0x3dbca4(0x88);}}
@@ -1 +1 @@
1
- function a1_0x104b(){var _0x41837f=['26750eSpRyU','5bRjWho','getAxiosInstance','5781ALWRiC','x-checkly-account','headers','apiKey','Authorization','request','736fceSmM','376222hLcNCP','5910615nYJuqz','16584PeYzUf','api','create','3607314sEuTcq','interceptors','679JAkqhA','baseUrl','7546pkgsUB','accountId','use','32696DbPAVN','Bearer\x20','@checkly/playwright-reporter/','User-Agent'];a1_0x104b=function(){return _0x41837f;};return a1_0x104b();}var a1_0xd51dc6=a1_0x4630;function a1_0x4630(_0x21ad5f,_0x232398){var _0x104b14=a1_0x104b();return a1_0x4630=function(_0x46303b,_0x32d974){_0x46303b=_0x46303b-0x6f;var _0x4552d4=_0x104b14[_0x46303b];return _0x4552d4;},a1_0x4630(_0x21ad5f,_0x232398);}(function(_0x33260c,_0x2742e9){var _0x4c58bb=a1_0x4630,_0x166452=_0x33260c();while(!![]){try{var _0x7ca763=parseInt(_0x4c58bb(0x82))/0x1+-parseInt(_0x4c58bb(0x74))/0x2+-parseInt(_0x4c58bb(0x7b))/0x3*(-parseInt(_0x4c58bb(0x81))/0x4)+parseInt(_0x4c58bb(0x79))/0x5*(parseInt(_0x4c58bb(0x87))/0x6)+parseInt(_0x4c58bb(0x6f))/0x7*(parseInt(_0x4c58bb(0x84))/0x8)+parseInt(_0x4c58bb(0x83))/0x9+parseInt(_0x4c58bb(0x78))/0xa*(-parseInt(_0x4c58bb(0x71))/0xb);if(_0x7ca763===_0x2742e9)break;else _0x166452['push'](_0x166452['shift']());}catch(_0x18f988){_0x166452['push'](_0x166452['shift']());}}}(a1_0x104b,0x529fb));import a1_0x9c4eef from'axios';import{handleErrorResponse}from'./errors.js';function getVersion(){return'0.1.0';}export function createRequestInterceptor(_0x4c05c9,_0x131b84){return _0x42600e=>{var _0x4e3aa1=a1_0x4630;return _0x42600e[_0x4e3aa1(0x7d)]&&(_0x42600e['headers'][_0x4e3aa1(0x7f)]=_0x4e3aa1(0x75)+_0x4c05c9,_0x42600e[_0x4e3aa1(0x7d)][_0x4e3aa1(0x7c)]=_0x131b84,_0x42600e[_0x4e3aa1(0x7d)][_0x4e3aa1(0x77)]=_0x4e3aa1(0x76)+getVersion()),_0x42600e;};}export function createResponseErrorInterceptor(){return _0x20e2ce=>{handleErrorResponse(_0x20e2ce);};}export default class ChecklyClient{[a1_0xd51dc6(0x7e)];[a1_0xd51dc6(0x70)];[a1_0xd51dc6(0x72)];[a1_0xd51dc6(0x85)];constructor(_0x51aab4){var _0xe8aac4=a1_0xd51dc6;this['accountId']=_0x51aab4[_0xe8aac4(0x72)],this[_0xe8aac4(0x7e)]=_0x51aab4[_0xe8aac4(0x7e)],this[_0xe8aac4(0x70)]=_0x51aab4[_0xe8aac4(0x70)],this[_0xe8aac4(0x85)]=a1_0x9c4eef[_0xe8aac4(0x86)]({'baseURL':this[_0xe8aac4(0x70)],'timeout':0x7530}),this[_0xe8aac4(0x85)][_0xe8aac4(0x88)][_0xe8aac4(0x80)][_0xe8aac4(0x73)](createRequestInterceptor(this[_0xe8aac4(0x7e)],this[_0xe8aac4(0x72)])),this['api'][_0xe8aac4(0x88)]['response'][_0xe8aac4(0x73)](_0x3da585=>_0x3da585,createResponseErrorInterceptor());}[a1_0xd51dc6(0x7a)](){return this['api'];}}
1
+ var a1_0x251c9a=a1_0x3dff;function a1_0x3ca8(){var _0x4e61b7=['baseUrl','x-checkly-account','68938PuwFmB','11uyDDMC','5547oAnHiV','24AiagmD','0.1.0','headers','use','Bearer\x20','1790505YlXUNZ','7617250XozWcI','@checkly/playwright-reporter/','775395icFAfD','getAxiosInstance','2264955jxvhxw','apiKey','User-Agent','response','interceptors','796SEXlSf','api','2479800jPyCUs','2KMwGaJ','accountId','request'];a1_0x3ca8=function(){return _0x4e61b7;};return a1_0x3ca8();}(function(_0x3287ca,_0x114a3c){var _0x1a7436=a1_0x3dff,_0x98dfc5=_0x3287ca();while(!![]){try{var _0x5b82f4=parseInt(_0x1a7436(0xc3))/0x1*(-parseInt(_0x1a7436(0xbe))/0x2)+-parseInt(_0x1a7436(0xab))/0x3*(-parseInt(_0x1a7436(0xbb))/0x4)+-parseInt(_0x1a7436(0xb1))/0x5+-parseInt(_0x1a7436(0xbd))/0x6+-parseInt(_0x1a7436(0xb6))/0x7+-parseInt(_0x1a7436(0xac))/0x8*(-parseInt(_0x1a7436(0xb4))/0x9)+parseInt(_0x1a7436(0xb2))/0xa*(parseInt(_0x1a7436(0xc4))/0xb);if(_0x5b82f4===_0x114a3c)break;else _0x98dfc5['push'](_0x98dfc5['shift']());}catch(_0x5c87cd){_0x98dfc5['push'](_0x98dfc5['shift']());}}}(a1_0x3ca8,0x36bed));import a1_0x17f4e6 from'axios';import{handleErrorResponse}from'./errors.js';function a1_0x3dff(_0x177ea6,_0x54c258){var _0x3ca8b6=a1_0x3ca8();return a1_0x3dff=function(_0x3dff10,_0x22c8e9){_0x3dff10=_0x3dff10-0xab;var _0x18f01c=_0x3ca8b6[_0x3dff10];return _0x18f01c;},a1_0x3dff(_0x177ea6,_0x54c258);}function getVersion(){var _0x3d0f81=a1_0x3dff;return _0x3d0f81(0xad);}export function createRequestInterceptor(_0x39b4be,_0xa9812){return _0x30bf1d=>{var _0x385daa=a1_0x3dff;return _0x30bf1d['headers']&&(_0x30bf1d['headers']['Authorization']=_0x385daa(0xb0)+_0x39b4be,_0x30bf1d[_0x385daa(0xae)][_0x385daa(0xc2)]=_0xa9812,_0x30bf1d[_0x385daa(0xae)][_0x385daa(0xb8)]=_0x385daa(0xb3)+getVersion()),_0x30bf1d;};}export function createResponseErrorInterceptor(){return _0x3aba5f=>{handleErrorResponse(_0x3aba5f);};}export default class ChecklyClient{[a1_0x251c9a(0xb7)];[a1_0x251c9a(0xc1)];[a1_0x251c9a(0xbf)];[a1_0x251c9a(0xbc)];constructor(_0x33c703){var _0x4b8987=a1_0x251c9a;this[_0x4b8987(0xbf)]=_0x33c703[_0x4b8987(0xbf)],this['apiKey']=_0x33c703[_0x4b8987(0xb7)],this['baseUrl']=_0x33c703[_0x4b8987(0xc1)],this['api']=a1_0x17f4e6['create']({'baseURL':this[_0x4b8987(0xc1)],'timeout':0x7530}),this[_0x4b8987(0xbc)][_0x4b8987(0xba)][_0x4b8987(0xc0)]['use'](createRequestInterceptor(this[_0x4b8987(0xb7)],this[_0x4b8987(0xbf)])),this[_0x4b8987(0xbc)][_0x4b8987(0xba)][_0x4b8987(0xb9)][_0x4b8987(0xaf)](_0xa0c487=>_0xa0c487,createResponseErrorInterceptor());}[a1_0x251c9a(0xb5)](){var _0x5656da=a1_0x251c9a;return this[_0x5656da(0xbc)];}}
@@ -1 +1 @@
1
- function a2_0x4a2c(){const _0x2acd61=['4478675nNSOkL','85012YTFcpu','An\x20error\x20occurred','Unknown\x20error','10UMWJmf','24Hhpfem','error','data','9vsjRbF','Network\x20error','3588543IMGFDI','response','6104784TerNRP','148224ypxMUC','name','6054150AOfxxh','7148709lgVrSZ','object','constructor','message','MissingResponseError','statusCode','errorCode'];a2_0x4a2c=function(){return _0x2acd61;};return a2_0x4a2c();}const a2_0x138650=a2_0x3b5d;(function(_0x399f3b,_0x54684e){const _0x1ef2e1=a2_0x3b5d,_0x5a234a=_0x399f3b();while(!![]){try{const _0x2a1613=parseInt(_0x1ef2e1(0xb0))/0x1*(parseInt(_0x1ef2e1(0xa9))/0x2)+parseInt(_0x1ef2e1(0xad))/0x3*(-parseInt(_0x1ef2e1(0xb5))/0x4)+parseInt(_0x1ef2e1(0xa8))/0x5+-parseInt(_0x1ef2e1(0xb7))/0x6+parseInt(_0x1ef2e1(0xb2))/0x7+-parseInt(_0x1ef2e1(0xb4))/0x8+parseInt(_0x1ef2e1(0xb8))/0x9*(parseInt(_0x1ef2e1(0xac))/0xa);if(_0x2a1613===_0x54684e)break;else _0x5a234a['push'](_0x5a234a['shift']());}catch(_0x348236){_0x5a234a['push'](_0x5a234a['shift']());}}}(a2_0x4a2c,0x7e23c));export class ApiError extends Error{[a2_0x138650(0xaf)];constructor(_0x287154,_0x30b0e8){const _0xc280a4=a2_0x138650;super(_0x287154['message'],_0x30b0e8),this[_0xc280a4(0xb6)]=this[_0xc280a4(0xba)][_0xc280a4(0xb6)],this[_0xc280a4(0xaf)]=_0x287154;}}export class ValidationError extends ApiError{constructor(_0x334230,_0x5732da){super(_0x334230,_0x5732da);}}export class UnauthorizedError extends ApiError{constructor(_0x27f46c,_0xc6cbcb){super(_0x27f46c,_0xc6cbcb);}}export class ForbiddenError extends ApiError{constructor(_0x3277ed,_0x436f6e){super(_0x3277ed,_0x436f6e);}}export class NotFoundError extends ApiError{constructor(_0x5b04cb,_0x651a77){super(_0x5b04cb,_0x651a77);}}function a2_0x3b5d(_0xb1a2b3,_0x585637){const _0x4a2c22=a2_0x4a2c();return a2_0x3b5d=function(_0x3b5d18,_0x18bace){_0x3b5d18=_0x3b5d18-0xa6;let _0x586a9b=_0x4a2c22[_0x3b5d18];return _0x586a9b;},a2_0x3b5d(_0xb1a2b3,_0x585637);}export class RequestTimeoutError extends ApiError{constructor(_0x1a5fd8,_0x54ca81){super(_0x1a5fd8,_0x54ca81);}}export class ConflictError extends ApiError{constructor(_0x3f9a2f,_0xea23b1){super(_0x3f9a2f,_0xea23b1);}}export class ServerError extends ApiError{constructor(_0x1a5744,_0x4920b1){super(_0x1a5744,_0x4920b1);}}export class MiscellaneousError extends ApiError{constructor(_0x1ce85f,_0x2a201b){super(_0x1ce85f,_0x2a201b);}}export class MissingResponseError extends Error{constructor(_0x43b3a1,_0x4e7b45){const _0xbd1643=a2_0x138650;super(_0x43b3a1,_0x4e7b45),this[_0xbd1643(0xb6)]=_0xbd1643(0xbc);}}export function parseErrorData(_0x5aba5f,_0x18da63){const _0x45cf31=a2_0x138650;if(!_0x5aba5f)return undefined;if(typeof _0x5aba5f===_0x45cf31(0xb9)&&_0x5aba5f[_0x45cf31(0xa6)]&&_0x5aba5f[_0x45cf31(0xae)]&&_0x5aba5f[_0x45cf31(0xbb)])return{'statusCode':_0x5aba5f[_0x45cf31(0xa6)],'error':_0x5aba5f[_0x45cf31(0xae)],'message':_0x5aba5f[_0x45cf31(0xbb)],'errorCode':_0x5aba5f[_0x45cf31(0xa7)]};if(typeof _0x5aba5f===_0x45cf31(0xb9)&&_0x5aba5f['error']&&!_0x5aba5f[_0x45cf31(0xbb)])return{'statusCode':_0x18da63[_0x45cf31(0xa6)],'error':_0x5aba5f['error'],'message':_0x5aba5f[_0x45cf31(0xae)]};if(typeof _0x5aba5f===_0x45cf31(0xb9)&&_0x5aba5f[_0x45cf31(0xae)]&&_0x5aba5f['message'])return{'statusCode':_0x18da63[_0x45cf31(0xa6)],'error':_0x5aba5f[_0x45cf31(0xae)],'message':_0x5aba5f[_0x45cf31(0xbb)],'errorCode':_0x5aba5f[_0x45cf31(0xa7)]};if(typeof _0x5aba5f==='object'&&_0x5aba5f[_0x45cf31(0xbb)])return{'statusCode':_0x18da63[_0x45cf31(0xa6)],'error':_0x5aba5f[_0x45cf31(0xbb)],'message':_0x5aba5f[_0x45cf31(0xbb)],'errorCode':_0x5aba5f[_0x45cf31(0xa7)]};if(typeof _0x5aba5f==='string')return{'statusCode':_0x18da63[_0x45cf31(0xa6)],'error':_0x5aba5f,'message':_0x5aba5f};return undefined;}export function handleErrorResponse(_0xccc483){const _0x4a6eba=a2_0x138650;if(!_0xccc483[_0x4a6eba(0xb3)])throw new MissingResponseError(_0xccc483['message']||_0x4a6eba(0xb1));const {status:_0x31698d,data:_0x184436}=_0xccc483[_0x4a6eba(0xb3)],_0xcf0277=parseErrorData(_0x184436,{'statusCode':_0x31698d});if(!_0xcf0277)throw new MiscellaneousError({'statusCode':_0x31698d,'error':_0x4a6eba(0xab),'message':_0xccc483[_0x4a6eba(0xbb)]||_0x4a6eba(0xaa)});switch(_0x31698d){case 0x190:throw new ValidationError(_0xcf0277);case 0x191:throw new UnauthorizedError(_0xcf0277);case 0x193:throw new ForbiddenError(_0xcf0277);case 0x194:throw new NotFoundError(_0xcf0277);case 0x198:throw new RequestTimeoutError(_0xcf0277);case 0x199:throw new ConflictError(_0xcf0277);default:if(_0x31698d>=0x1f4)throw new ServerError(_0xcf0277);throw new MiscellaneousError(_0xcf0277);}}
1
+ const a2_0x14d4d5=a2_0x2e22;(function(_0x5c6de4,_0x3a0a3a){const _0x5b1378=a2_0x2e22,_0x2fb91c=_0x5c6de4();while(!![]){try{const _0x4f9609=parseInt(_0x5b1378(0x156))/0x1+parseInt(_0x5b1378(0x149))/0x2+parseInt(_0x5b1378(0x14a))/0x3+parseInt(_0x5b1378(0x158))/0x4*(-parseInt(_0x5b1378(0x155))/0x5)+-parseInt(_0x5b1378(0x154))/0x6+-parseInt(_0x5b1378(0x153))/0x7*(-parseInt(_0x5b1378(0x14b))/0x8)+parseInt(_0x5b1378(0x14c))/0x9*(parseInt(_0x5b1378(0x15a))/0xa);if(_0x4f9609===_0x3a0a3a)break;else _0x2fb91c['push'](_0x2fb91c['shift']());}catch(_0x58c91a){_0x2fb91c['push'](_0x2fb91c['shift']());}}}(a2_0x2450,0xb246c));function a2_0x2450(){const _0x45a367=['4979484eutAmQ','object','294820TltQCB','error','message','name','Network\x20error','1407462WGbyaA','2224857tVQEav','135712BuGCjy','351syZZyV','MissingResponseError','Unknown\x20error','data','response','errorCode','statusCode','119TetfBl','6520794pgeJgp','5vRgTtl','178354yhvrjR','string'];a2_0x2450=function(){return _0x45a367;};return a2_0x2450();}export class ApiError extends Error{[a2_0x14d4d5(0x14f)];constructor(_0x273434,_0x3416ed){const _0xc54808=a2_0x14d4d5;super(_0x273434['message'],_0x3416ed),this['name']=this['constructor'][_0xc54808(0x147)],this[_0xc54808(0x14f)]=_0x273434;}}export class ValidationError extends ApiError{constructor(_0x3d83e6,_0x4bdd28){super(_0x3d83e6,_0x4bdd28);}}export class UnauthorizedError extends ApiError{constructor(_0x21bf3c,_0x59d2cc){super(_0x21bf3c,_0x59d2cc);}}export class ForbiddenError extends ApiError{constructor(_0x4b79de,_0x410493){super(_0x4b79de,_0x410493);}}export class NotFoundError extends ApiError{constructor(_0x335285,_0x5951f1){super(_0x335285,_0x5951f1);}}export class RequestTimeoutError extends ApiError{constructor(_0x22ac7b,_0x388a61){super(_0x22ac7b,_0x388a61);}}export class ConflictError extends ApiError{constructor(_0x1a0355,_0x454364){super(_0x1a0355,_0x454364);}}export class ServerError extends ApiError{constructor(_0x308928,_0x1655f2){super(_0x308928,_0x1655f2);}}export class MiscellaneousError extends ApiError{constructor(_0x10ab11,_0x38bb75){super(_0x10ab11,_0x38bb75);}}function a2_0x2e22(_0x5afa9f,_0x105d1d){const _0x245062=a2_0x2450();return a2_0x2e22=function(_0x2e224a,_0x22d1d1){_0x2e224a=_0x2e224a-0x146;let _0x236b83=_0x245062[_0x2e224a];return _0x236b83;},a2_0x2e22(_0x5afa9f,_0x105d1d);}export class MissingResponseError extends Error{constructor(_0x4e6808,_0x5b7249){const _0x48960d=a2_0x14d4d5;super(_0x4e6808,_0x5b7249),this[_0x48960d(0x147)]=_0x48960d(0x14d);}}export function parseErrorData(_0x28ce58,_0x1f067e){const _0x583d28=a2_0x14d4d5;if(!_0x28ce58)return undefined;if(typeof _0x28ce58===_0x583d28(0x159)&&_0x28ce58[_0x583d28(0x152)]&&_0x28ce58[_0x583d28(0x15b)]&&_0x28ce58[_0x583d28(0x146)])return{'statusCode':_0x28ce58[_0x583d28(0x152)],'error':_0x28ce58[_0x583d28(0x15b)],'message':_0x28ce58[_0x583d28(0x146)],'errorCode':_0x28ce58['errorCode']};if(typeof _0x28ce58===_0x583d28(0x159)&&_0x28ce58[_0x583d28(0x15b)]&&!_0x28ce58[_0x583d28(0x146)])return{'statusCode':_0x1f067e[_0x583d28(0x152)],'error':_0x28ce58[_0x583d28(0x15b)],'message':_0x28ce58[_0x583d28(0x15b)]};if(typeof _0x28ce58==='object'&&_0x28ce58[_0x583d28(0x15b)]&&_0x28ce58[_0x583d28(0x146)])return{'statusCode':_0x1f067e[_0x583d28(0x152)],'error':_0x28ce58[_0x583d28(0x15b)],'message':_0x28ce58[_0x583d28(0x146)],'errorCode':_0x28ce58['errorCode']};if(typeof _0x28ce58===_0x583d28(0x159)&&_0x28ce58[_0x583d28(0x146)])return{'statusCode':_0x1f067e[_0x583d28(0x152)],'error':_0x28ce58['message'],'message':_0x28ce58['message'],'errorCode':_0x28ce58[_0x583d28(0x151)]};if(typeof _0x28ce58===_0x583d28(0x157))return{'statusCode':_0x1f067e[_0x583d28(0x152)],'error':_0x28ce58,'message':_0x28ce58};return undefined;}export function handleErrorResponse(_0x28492e){const _0x1748ce=a2_0x14d4d5;if(!_0x28492e[_0x1748ce(0x150)])throw new MissingResponseError(_0x28492e['message']||_0x1748ce(0x148));const {status:_0x4c384b,data:_0x4046a3}=_0x28492e[_0x1748ce(0x150)],_0x148eff=parseErrorData(_0x4046a3,{'statusCode':_0x4c384b});if(!_0x148eff)throw new MiscellaneousError({'statusCode':_0x4c384b,'error':_0x1748ce(0x14e),'message':_0x28492e['message']||'An\x20error\x20occurred'});switch(_0x4c384b){case 0x190:throw new ValidationError(_0x148eff);case 0x191:throw new UnauthorizedError(_0x148eff);case 0x193:throw new ForbiddenError(_0x148eff);case 0x194:throw new NotFoundError(_0x148eff);case 0x198:throw new RequestTimeoutError(_0x148eff);case 0x199:throw new ConflictError(_0x148eff);default:if(_0x4c384b>=0x1f4)throw new ServerError(_0x148eff);throw new MiscellaneousError(_0x148eff);}}
@@ -1 +1 @@
1
- (function(_0x5295a9,_0x135ded){var _0x13f7e3=a3_0x30f4,_0x56788b=_0x5295a9();while(!![]){try{var _0x2a1d7c=parseInt(_0x13f7e3(0x17c))/0x1+-parseInt(_0x13f7e3(0x183))/0x2*(-parseInt(_0x13f7e3(0x17d))/0x3)+parseInt(_0x13f7e3(0x180))/0x4*(-parseInt(_0x13f7e3(0x17e))/0x5)+-parseInt(_0x13f7e3(0x179))/0x6*(-parseInt(_0x13f7e3(0x17f))/0x7)+parseInt(_0x13f7e3(0x181))/0x8+parseInt(_0x13f7e3(0x17a))/0x9*(-parseInt(_0x13f7e3(0x17b))/0xa)+parseInt(_0x13f7e3(0x182))/0xb;if(_0x2a1d7c===_0x135ded)break;else _0x56788b['push'](_0x56788b['shift']());}catch(_0x45089d){_0x56788b['push'](_0x56788b['shift']());}}}(a3_0x5efd,0x68c1c));export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';function a3_0x30f4(_0xbfa855,_0x2f2d6f){var _0x5efd7f=a3_0x5efd();return a3_0x30f4=function(_0x30f432,_0x21d98c){_0x30f432=_0x30f432-0x179;var _0x37f2e1=_0x5efd7f[_0x30f432];return _0x37f2e1;},a3_0x30f4(_0xbfa855,_0x2f2d6f);}export*from'./types.js';function a3_0x5efd(){var _0x49fca9=['1707644ELvaji','2578064EhZtVB','1664157BQSIPS','62hrdFcU','861774gpedrj','18sDQaez','3867900vZesJv','441536cFvgxL','55245nickOG','5IvMQII','7vrlHwb'];a3_0x5efd=function(){return _0x49fca9;};return a3_0x5efd();}export*from'./errors.js';
1
+ (function(_0x5b385e,_0x45f039){var _0x120ccd=a3_0x1f5f,_0x4c9ad7=_0x5b385e();while(!![]){try{var _0x5cdd9d=parseInt(_0x120ccd(0x9d))/0x1+parseInt(_0x120ccd(0x9b))/0x2*(parseInt(_0x120ccd(0x97))/0x3)+parseInt(_0x120ccd(0x9e))/0x4+-parseInt(_0x120ccd(0x95))/0x5*(-parseInt(_0x120ccd(0x98))/0x6)+-parseInt(_0x120ccd(0x9c))/0x7*(-parseInt(_0x120ccd(0x96))/0x8)+parseInt(_0x120ccd(0x99))/0x9+-parseInt(_0x120ccd(0x9a))/0xa;if(_0x5cdd9d===_0x45f039)break;else _0x4c9ad7['push'](_0x4c9ad7['shift']());}catch(_0xa0956d){_0x4c9ad7['push'](_0x4c9ad7['shift']());}}}(a3_0x4963,0xc0a58));export{default as ChecklyClient}from'./checkly-client.js';function a3_0x4963(){var _0x363b49=['76720DSWGuJ','25293XCoLWQ','6vKzBaI','14001813VcoZhp','39337230jyEYrX','166ykhCnp','994ahvbEp','292149FanGAk','2824108ttOBNA','536585SVJFWP'];a3_0x4963=function(){return _0x363b49;};return a3_0x4963();}function a3_0x1f5f(_0x2e8552,_0x10d0d1){var _0x496320=a3_0x4963();return a3_0x1f5f=function(_0x1f5fea,_0x4bdd78){_0x1f5fea=_0x1f5fea-0x95;var _0x139d0f=_0x496320[_0x1f5fea];return _0x139d0f;},a3_0x1f5f(_0x2e8552,_0x10d0d1);}export{TestResults}from'./test-results.js';export*from'./types.js';export*from'./errors.js';
@@ -1 +1 @@
1
- function a4_0x17f9(_0x10388c,_0x1c66d1){const _0x2335b0=a4_0x2335();return a4_0x17f9=function(_0x17f969,_0x29cf8e){_0x17f969=_0x17f969-0x132;let _0x539bfa=_0x2335b0[_0x17f969];return _0x539bfa;},a4_0x17f9(_0x10388c,_0x1c66d1);}function a4_0x2335(){const _0x1bede1=['5VoJNQx','/next/test-sessions/create','6dIQvtp','189507TrTCRn','1285278AAffBd','3049564kKyinj','createTestSession','1052144OzJxQh','9iFHTSw','data','updateTestResult','1847660bEskXp','/results/','8246440JkZBjQ','api','186502RVpiNu','post'];a4_0x2335=function(){return _0x1bede1;};return a4_0x2335();}const a4_0x1d7c47=a4_0x17f9;(function(_0xa8a86c,_0xf72c36){const _0x334d2a=a4_0x17f9,_0x46ec8e=_0xa8a86c();while(!![]){try{const _0x2c1b40=-parseInt(_0x334d2a(0x134))/0x1+parseInt(_0x334d2a(0x140))/0x2+parseInt(_0x334d2a(0x135))/0x3+parseInt(_0x334d2a(0x13c))/0x4*(parseInt(_0x334d2a(0x142))/0x5)+parseInt(_0x334d2a(0x133))/0x6*(parseInt(_0x334d2a(0x136))/0x7)+-parseInt(_0x334d2a(0x138))/0x8+-parseInt(_0x334d2a(0x139))/0x9*(parseInt(_0x334d2a(0x13e))/0xa);if(_0x2c1b40===_0xf72c36)break;else _0x46ec8e['push'](_0x46ec8e['shift']());}catch(_0x214687){_0x46ec8e['push'](_0x46ec8e['shift']());}}}(a4_0x2335,0x42ca7));export class TestResults{[a4_0x1d7c47(0x13f)];constructor(_0x67caf5){const _0x35edcd=a4_0x1d7c47;this[_0x35edcd(0x13f)]=_0x67caf5;}async[a4_0x1d7c47(0x137)](_0xb575d9){const _0xe76987=a4_0x1d7c47,_0x1539b1=await this[_0xe76987(0x13f)][_0xe76987(0x141)](_0xe76987(0x132),_0xb575d9);return _0x1539b1[_0xe76987(0x13a)];}async[a4_0x1d7c47(0x13b)](_0x52c576,_0x53bf4d,_0x5d2052){const _0x4a7339=a4_0x1d7c47,_0x27cfdd=await this['api'][_0x4a7339(0x141)]('/next/test-sessions/'+_0x52c576+_0x4a7339(0x13d)+_0x53bf4d,_0x5d2052);return _0x27cfdd[_0x4a7339(0x13a)];}}
1
+ const a4_0x56af42=a4_0x5999;(function(_0x1a3261,_0x2d78ef){const _0xf21a61=a4_0x5999,_0x57f1f3=_0x1a3261();while(!![]){try{const _0x4baf9c=parseInt(_0xf21a61(0xe1))/0x1+-parseInt(_0xf21a61(0xdf))/0x2+parseInt(_0xf21a61(0xea))/0x3*(parseInt(_0xf21a61(0xe7))/0x4)+-parseInt(_0xf21a61(0xe3))/0x5*(parseInt(_0xf21a61(0xe5))/0x6)+-parseInt(_0xf21a61(0xec))/0x7*(parseInt(_0xf21a61(0xe8))/0x8)+parseInt(_0xf21a61(0xe4))/0x9*(-parseInt(_0xf21a61(0xeb))/0xa)+parseInt(_0xf21a61(0xe2))/0xb;if(_0x4baf9c===_0x2d78ef)break;else _0x57f1f3['push'](_0x57f1f3['shift']());}catch(_0x4a3964){_0x57f1f3['push'](_0x57f1f3['shift']());}}}(a4_0x1f02,0x5f221));function a4_0x5999(_0x1ce4cc,_0x5551c2){const _0x1f0264=a4_0x1f02();return a4_0x5999=function(_0x5999dd,_0x3b2f56){_0x5999dd=_0x5999dd-0xdc;let _0x254c8e=_0x1f0264[_0x5999dd];return _0x254c8e;},a4_0x5999(_0x1ce4cc,_0x5551c2);}function a4_0x1f02(){const _0x6f6a5b=['75681IlMCiA','37428attRBo','/results/','36672gbZacX','2078584aeMUlo','/next/test-sessions/create','138OaRGYZ','800jWaiSn','7svvLLp','api','data','/next/test-sessions/','updateTestResult','1278794mrQxNE','post','360751cfBWGn','18734298rDYtHm','420maAXQf'];a4_0x1f02=function(){return _0x6f6a5b;};return a4_0x1f02();}export class TestResults{['api'];constructor(_0x4eb39f){const _0x5594ae=a4_0x5999;this[_0x5594ae(0xed)]=_0x4eb39f;}async['createTestSession'](_0x3b61b8){const _0x49db87=a4_0x5999,_0x35e759=await this[_0x49db87(0xed)][_0x49db87(0xe0)](_0x49db87(0xe9),_0x3b61b8);return _0x35e759[_0x49db87(0xdc)];}async[a4_0x56af42(0xde)](_0x372e94,_0x341412,_0x50528d){const _0x32669c=a4_0x56af42,_0x3d0ef1=await this[_0x32669c(0xed)][_0x32669c(0xe0)](_0x32669c(0xdd)+_0x372e94+_0x32669c(0xe6)+_0x341412,_0x50528d);return _0x3d0ef1[_0x32669c(0xdc)];}}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x224e3f,_0x8952f5){var _0x55b649=a6_0x3919,_0xc194a4=_0x224e3f();while(!![]){try{var _0x63dfe1=parseInt(_0x55b649(0x132))/0x1*(-parseInt(_0x55b649(0x131))/0x2)+-parseInt(_0x55b649(0x12e))/0x3+-parseInt(_0x55b649(0x135))/0x4+parseInt(_0x55b649(0x12f))/0x5+parseInt(_0x55b649(0x133))/0x6*(-parseInt(_0x55b649(0x12d))/0x7)+parseInt(_0x55b649(0x130))/0x8+parseInt(_0x55b649(0x134))/0x9;if(_0x63dfe1===_0x8952f5)break;else _0xc194a4['push'](_0xc194a4['shift']());}catch(_0x40a031){_0xc194a4['push'](_0xc194a4['shift']());}}}(a6_0x37ce,0xc3d12));function a6_0x3919(_0x4ae2a1,_0x1efa39){var _0x37ce14=a6_0x37ce();return a6_0x3919=function(_0x3919f5,_0x36279b){_0x3919f5=_0x3919f5-0x12d;var _0x176e02=_0x37ce14[_0x3919f5];return _0x176e02;},a6_0x3919(_0x4ae2a1,_0x1efa39);}export{ChecklyReporter}from'./reporter.js';export{AssetCollector}from'./asset-collector.js';function a6_0x37ce(){var _0x53e9b8=['1966136vPKXSc','1113bWlOcK','3605808AOOfem','3423620GnoFnO','629792FMCZvh','2Gqbpxc','48537sGNynO','43434NamtTN','26384634zsSLxD'];a6_0x37ce=function(){return _0x53e9b8;};return a6_0x37ce();}export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';
1
+ (function(_0x348ff7,_0x8970eb){var _0x5d374b=a6_0x2460,_0x16036a=_0x348ff7();while(!![]){try{var _0x299fdd=-parseInt(_0x5d374b(0xe9))/0x1+parseInt(_0x5d374b(0xe5))/0x2+parseInt(_0x5d374b(0xeb))/0x3+-parseInt(_0x5d374b(0xe6))/0x4*(-parseInt(_0x5d374b(0xe8))/0x5)+-parseInt(_0x5d374b(0xea))/0x6+-parseInt(_0x5d374b(0xe7))/0x7+parseInt(_0x5d374b(0xe4))/0x8;if(_0x299fdd===_0x8970eb)break;else _0x16036a['push'](_0x16036a['shift']());}catch(_0x17d4cc){_0x16036a['push'](_0x16036a['shift']());}}}(a6_0x4726,0x78d6f));export{ChecklyReporter}from'./reporter.js';function a6_0x4726(){var _0x478b31=['4327344BXgzFP','277645kyzVnq','837875grAcGe','3327042yqOBQp','2037600zjsSNF','11460520fFYGaI','565420RNxWlG','8ihyHdx'];a6_0x4726=function(){return _0x478b31;};return a6_0x4726();}export{AssetCollector}from'./asset-collector.js';export{Zipper}from'./zipper.js';function a6_0x2460(_0x831377,_0x4d3c63){var _0x47267a=a6_0x4726();return a6_0x2460=function(_0x2460a3,_0x1eaa8d){_0x2460a3=_0x2460a3-0xe4;var _0x4f4e67=_0x47267a[_0x2460a3];return _0x4f4e67;},a6_0x2460(_0x831377,_0x4d3c63);}export{ChecklyReporter as default}from'./reporter.js';
package/dist/reporter.js CHANGED
@@ -1 +1 @@
1
- const a7_0x4d2b2e=a7_0x433c;(function(_0x324154,_0x2acced){const _0x2b78e8=a7_0x433c,_0x585f40=_0x324154();while(!![]){try{const _0x536c21=-parseInt(_0x2b78e8(0xd0))/0x1*(-parseInt(_0x2b78e8(0xce))/0x2)+-parseInt(_0x2b78e8(0xbf))/0x3+-parseInt(_0x2b78e8(0x9f))/0x4*(-parseInt(_0x2b78e8(0xe5))/0x5)+parseInt(_0x2b78e8(0xa7))/0x6*(-parseInt(_0x2b78e8(0xbb))/0x7)+parseInt(_0x2b78e8(0xad))/0x8+-parseInt(_0x2b78e8(0xc9))/0x9*(-parseInt(_0x2b78e8(0xa5))/0xa)+-parseInt(_0x2b78e8(0xb1))/0xb;if(_0x536c21===_0x2acced)break;else _0x585f40['push'](_0x585f40['shift']());}catch(_0x39d9ae){_0x585f40['push'](_0x585f40['shift']());}}}(a7_0x4e33,0x90bb6));function a7_0x433c(_0x159aa1,_0x1aa745){const _0x4e33b8=a7_0x4e33();return a7_0x433c=function(_0x433c83,_0x23cae0){_0x433c83=_0x433c83-0x91;let _0x22a0dc=_0x4e33b8[_0x433c83];return _0x22a0dc;},a7_0x433c(_0x159aa1,_0x1aa745);}import*as a7_0x110a5b from'fs';import*as a7_0xfcc085 from'path';import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0x412e42 from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';function a7_0x4e33(){const _0x569deb=['max','log','Playwright\x20Test\x20Session:\x20','failed','length','\x0aView\x20test\x20results:\x20','passed','\x20\x20reporter:\x20[\x0a','CHECKLY_ENV','926379HucUqy','https://api.checklyhq.com','onTestEnd','http://127.0.0.1:3000','NODE_ENV','381298MSRxGM','flaky','2AgnmPw','outcome','createZip','updateTestResult','replace','message','[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:','env','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','zipPath','testSessionId','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','dryRun','options','toString','apiKey','https://github.com/','substring','link','staging','getTime','10MNKzBb','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','error','getAxiosInstance','retry','[Checkly\x20Reporter]\x20Global\x20error:','status','onError','testCounts','[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:','test-results','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','assetCollector','https://api-test.checklyhq.com','production','GITHUB_REPOSITORY','[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:','CHECKLY_API_KEY','outputPath','startTime','basename','checkly-report.zip','testResults','base64','collectAssets','853092InjfNs','uploadResults','GITHUB_REF_NAME','catch','testResultsDir','testResultId','30zLCDgN','\x0a✓\x20Check\x20the\x20results:\x20','6TRSKQx','accountId','entries','onEnd','warn','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','4013192HSKbwY','toISOString','PW_REPORTER','cwd','10057751MWuOkL','readFileSync','\x20\x20]','unlinkSync','playwright-tests','PASSED','zipper','parse','https://api-dev.checklyhq.com','testSession','225757RPQDZE','\x22,\x20using\x20\x22production\x22','GITHUB_ACTOR','[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:','236616ZiqswJ'];a7_0x4e33=function(){return _0x569deb;};return a7_0x4e33();}function getApiUrl(_0x54c2da){const _0x516b3b=a7_0x433c,_0xc9f45b={'local':_0x516b3b(0xcc),'development':_0x516b3b(0xb9),'staging':_0x516b3b(0x93),'production':_0x516b3b(0xca)};return _0xc9f45b[_0x54c2da];}function getEnvironment(_0x35829f){const _0x52ed7a=a7_0x433c,_0x58ec26=_0x35829f?.['environment'],_0x1eddea=process[_0x52ed7a(0xd7)][_0x52ed7a(0xc8)],_0x46f27c=_0x58ec26||_0x1eddea||_0x52ed7a(0x94),_0xd7a0bd=['local','development',_0x52ed7a(0xe3),'production'];if(!_0xd7a0bd['includes'](_0x46f27c))return console[_0x52ed7a(0xab)](_0x52ed7a(0xe6)+_0x46f27c+_0x52ed7a(0xbc)),_0x52ed7a(0x94);return _0x46f27c;}function getDirectoryName(){const _0x1d747a=a7_0x433c,_0x5d09fb=process[_0x1d747a(0xb0)]();let _0x48c919=a7_0xfcc085[_0x1d747a(0x9a)](_0x5d09fb);return(!_0x48c919||_0x48c919==='/'||_0x48c919==='.')&&(_0x48c919=_0x1d747a(0xb5)),_0x48c919=_0x48c919[_0x1d747a(0xd4)](/[<>:"|?*]/g,'-'),_0x48c919[_0x1d747a(0xc4)]>0xff&&(_0x48c919=_0x48c919[_0x1d747a(0xe1)](0x0,0xff)),_0x48c919;}export class ChecklyReporter{[a7_0x4d2b2e(0xdd)];[a7_0x4d2b2e(0x92)];[a7_0x4d2b2e(0xb7)];[a7_0x4d2b2e(0x9c)];[a7_0x4d2b2e(0xba)];[a7_0x4d2b2e(0x99)];['testCounts']={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x2b1f32={}){const _0x5c531a=a7_0x4d2b2e,_0x86cc7a=getEnvironment(_0x2b1f32),_0x11f915=getApiUrl(_0x86cc7a),_0x4c2715=process[_0x5c531a(0xd7)][_0x5c531a(0x97)]||_0x2b1f32[_0x5c531a(0xdf)],_0x64f9c3=process[_0x5c531a(0xd7)]['CHECKLY_ACCOUNT_ID']||_0x2b1f32['accountId'];this[_0x5c531a(0xdd)]={'accountId':_0x64f9c3,'apiKey':_0x4c2715,'outputPath':_0x2b1f32[_0x5c531a(0x98)]??_0x5c531a(0x9b),'jsonReportPath':_0x2b1f32['jsonReportPath']??'test-results/playwright-test-report.json','testResultsDir':_0x2b1f32[_0x5c531a(0xa3)]??_0x5c531a(0xef),'dryRun':_0x2b1f32[_0x5c531a(0xdc)]??![]},this['assetCollector']=new AssetCollector(this[_0x5c531a(0xdd)][_0x5c531a(0xa3)]),this[_0x5c531a(0xb7)]=new Zipper({'outputPath':this[_0x5c531a(0xdd)][_0x5c531a(0x98)]});if(!this[_0x5c531a(0xdd)]['dryRun']&&this[_0x5c531a(0xdd)][_0x5c531a(0xdf)]&&this['options'][_0x5c531a(0xa8)]){const _0x28e3ca=new a7_0x412e42({'apiKey':this['options'][_0x5c531a(0xdf)],'accountId':this['options']['accountId'],'baseUrl':_0x11f915});this[_0x5c531a(0x9c)]=new TestResults(_0x28e3ca[_0x5c531a(0xe8)]());}}['onBegin'](_0x138bc7,_0x39baeb){const _0x2f930e=a7_0x4d2b2e;this['startTime']=new Date();if(!this['testResults'])return;try{const _0xc39d41=getDirectoryName(),_0x3d280a=[{'name':_0xc39d41}],_0xe92a17=process[_0x2f930e(0xd7)]['GITHUB_REPOSITORY']?_0x2f930e(0xe0)+process[_0x2f930e(0xd7)][_0x2f930e(0x95)]:undefined,_0xe689f3=_0xe92a17?{'repoUrl':_0xe92a17,'commitId':process[_0x2f930e(0xd7)]['GITHUB_SHA'],'branchName':process[_0x2f930e(0xd7)][_0x2f930e(0xa1)],'commitOwner':process[_0x2f930e(0xd7)][_0x2f930e(0xbd)],'commitMessage':process[_0x2f930e(0xd7)]['GITHUB_EVENT_NAME']}:undefined;this[_0x2f930e(0x9c)]['createTestSession']({'name':_0x2f930e(0xc2)+_0xc39d41,'environment':process[_0x2f930e(0xd7)][_0x2f930e(0xcd)]||'test','repoInfo':_0xe689f3,'startedAt':this[_0x2f930e(0x99)][_0x2f930e(0xe4)](),'testResults':_0x3d280a,'provider':_0x2f930e(0xaf)})['then'](_0x23b79c=>{const _0x1ffc24=_0x2f930e;this[_0x1ffc24(0xba)]=_0x23b79c,_0x23b79c[_0x1ffc24(0xe2)]&&console['log'](_0x1ffc24(0xc5)+_0x23b79c['link']+'\x0a');})[_0x2f930e(0xa2)](_0x5c4dd6=>{const _0x2448bc=_0x2f930e;console[_0x2448bc(0xe7)](_0x2448bc(0x91),_0x5c4dd6[_0x2448bc(0xd5)]);});}catch(_0x3a883d){console['error'](_0x2f930e(0xee),_0x3a883d);}}[a7_0x4d2b2e(0xcb)](_0x2e08b6,_0x4c7947){const _0x2ea2e7=a7_0x4d2b2e;try{const _0x128de9=_0x4c7947[_0x2ea2e7(0xeb)]==='passed'||_0x4c7947[_0x2ea2e7(0xe9)]===_0x2e08b6['retries'];if(!_0x128de9)return;const _0x16385e=_0x2e08b6[_0x2ea2e7(0xd1)]()==='flaky';if(_0x16385e)this[_0x2ea2e7(0xed)][_0x2ea2e7(0xcf)]++,this[_0x2ea2e7(0xed)][_0x2ea2e7(0xc6)]++;else{if(_0x4c7947[_0x2ea2e7(0xeb)]==='passed')this[_0x2ea2e7(0xed)][_0x2ea2e7(0xc6)]++;else _0x4c7947[_0x2ea2e7(0xeb)]===_0x2ea2e7(0xc3)&&this[_0x2ea2e7(0xed)][_0x2ea2e7(0xc3)]++;}}catch(_0x4966fe){console[_0x2ea2e7(0xe7)](_0x2ea2e7(0xdb),_0x4966fe);}}async[a7_0x4d2b2e(0xaa)](){const _0x5544dc=a7_0x4d2b2e;try{const _0x4ff7ad=this[_0x5544dc(0xdd)]['jsonReportPath'];if(!a7_0x110a5b['existsSync'](_0x4ff7ad)){console[_0x5544dc(0xe7)]('[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20'+_0x4ff7ad),console[_0x5544dc(0xe7)](_0x5544dc(0xd6)),console[_0x5544dc(0xe7)](_0x5544dc(0xc7)+_0x5544dc(0xac)+_0x5544dc(0xd8)+_0x5544dc(0xb3));return;}const _0x20ee15=a7_0x110a5b['readFileSync'](_0x4ff7ad,'utf-8'),_0x302a32=JSON[_0x5544dc(0xb8)](_0x20ee15),_0x178369=await this[_0x5544dc(0x92)][_0x5544dc(0x9e)](_0x302a32),_0x5a6d0f=await this[_0x5544dc(0xb7)][_0x5544dc(0xd2)](_0x4ff7ad,_0x178369);if(this[_0x5544dc(0x9c)]&&this['testSession']){await this[_0x5544dc(0xa0)](_0x302a32,_0x5a6d0f['zipPath'],_0x5a6d0f[_0x5544dc(0xa9)]);if(!this[_0x5544dc(0xdd)][_0x5544dc(0xdc)])try{a7_0x110a5b[_0x5544dc(0xb4)](_0x5a6d0f[_0x5544dc(0xd9)]);}catch(_0x3ba5cf){console[_0x5544dc(0xab)]('[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20'+_0x3ba5cf);}}this[_0x5544dc(0x9c)]&&this[_0x5544dc(0xba)]?.[_0x5544dc(0xe2)]&&console[_0x5544dc(0xc1)](_0x5544dc(0xa6)+this['testSession'][_0x5544dc(0xe2)]+'\x0a');}catch(_0x185130){console['error'](_0x5544dc(0x96),_0x185130);}}async[a7_0x4d2b2e(0xa0)](_0x4e802f,_0x206b5b,_0x39ab27){const _0x472a55=a7_0x4d2b2e;if(!this['testResults']||!this['testSession'])return;try{const {failed:_0x3f183b,flaky:_0x8f0129}=this['testCounts'],_0xf5c320=_0x3f183b>0x0?'FAILED':_0x472a55(0xb6),_0x196c4c=_0x3f183b===0x0&&_0x8f0129>0x0,_0x5c4a02=new Date(),_0x433621=this[_0x472a55(0x99)]?Math[_0x472a55(0xc0)](0x0,_0x5c4a02['getTime']()-this[_0x472a55(0x99)][_0x472a55(0xe4)]()):0x0,_0x422da9=a7_0x110a5b[_0x472a55(0xb2)](_0x206b5b),_0x2289a5=_0x422da9[_0x472a55(0xc4)],_0x33e252=_0x422da9[_0x472a55(0xde)](_0x472a55(0x9d));if(this[_0x472a55(0xba)][_0x472a55(0x9c)][_0x472a55(0xc4)]>0x0){const _0x412e9f=this[_0x472a55(0xba)][_0x472a55(0x9c)][0x0];await this[_0x472a55(0x9c)][_0x472a55(0xd3)](this[_0x472a55(0xba)][_0x472a55(0xda)],_0x412e9f[_0x472a55(0xa4)],{'status':_0xf5c320,'isDegraded':_0x196c4c,'startedAt':this[_0x472a55(0x99)]?.[_0x472a55(0xae)](),'stoppedAt':_0x5c4a02['toISOString'](),'responseTime':_0x433621,'assets':{'assetsZip':_0x33e252,'entries':_0x39ab27},'metadata':{'usageData':{'s3PostTotalBytes':_0x2289a5}}});}}catch(_0xd48933){const _0xfbe8e2=_0xd48933 instanceof Error?_0xd48933['message']:String(_0xd48933);console[_0x472a55(0xe7)](_0x472a55(0xbe),_0xfbe8e2);}}[a7_0x4d2b2e(0xec)](_0x3834cc){const _0x2ee513=a7_0x4d2b2e;console[_0x2ee513(0xe7)](_0x2ee513(0xea),_0x3834cc);}}
1
+ const a7_0x7e9f5=a7_0x49b0;function a7_0x49b0(_0x1d7734,_0x4646ba){const _0x20b7b4=a7_0x20b7();return a7_0x49b0=function(_0x49b0ff,_0x5a3ee0){_0x49b0ff=_0x49b0ff-0x1ad;let _0x5f36b5=_0x20b7b4[_0x49b0ff];return _0x5f36b5;},a7_0x49b0(_0x1d7734,_0x4646ba);}(function(_0x35412f,_0x5aa1fc){const _0x279098=a7_0x49b0,_0x2257d8=_0x35412f();while(!![]){try{const _0x1815dc=-parseInt(_0x279098(0x202))/0x1+-parseInt(_0x279098(0x1f8))/0x2*(parseInt(_0x279098(0x1b3))/0x3)+-parseInt(_0x279098(0x1d1))/0x4+-parseInt(_0x279098(0x200))/0x5+parseInt(_0x279098(0x1b2))/0x6+-parseInt(_0x279098(0x1c0))/0x7+parseInt(_0x279098(0x1eb))/0x8;if(_0x1815dc===_0x5aa1fc)break;else _0x2257d8['push'](_0x2257d8['shift']());}catch(_0x1751a1){_0x2257d8['push'](_0x2257d8['shift']());}}}(a7_0x20b7,0x34232));import*as a7_0x23f2cf from'fs';import*as a7_0x5554f1 from'path';import{AssetCollector}from'./asset-collector.js';function a7_0x20b7(){const _0x241991=['toISOString','📦\x20Checkly\x20Playwright\x20reporter:\x20','message','parse','env','select','🔗\x20Test\x20session\x20URL:\x20','http://127.0.0.1:3000','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','testResultId','[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:','assetCollector','entries','https://api.checklyhq.com','PW_REPORTER','GITHUB_REPOSITORY','testSession','Projects','error','map','uploadResults','readFileSync','\x0a🔗\x20View\x20test\x20session:\x20','[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:','catch','752946FBrEvr','138OqbXfC','version','CHECKLY_ACCOUNT_ID','environment','createTestSession','jsonReportPath','en-US','https://github.com/','test-results','staging','\x0a======================================================','startTime','zipPath','1424521ZeFlGK','PASSED','unlinkSync','existsSync','log','status','package.json','GITHUB_EVENT_NAME','options','testResultsDir','testSessionId','warn','CHECKLY_API_KEY','getTime','outputPath','then','passed','1527668StgfpG','CHECKLY_ENV','max','printSummary','📔\x20','collectAssets','config','testCounts','local','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','onEnd','cwd','dryRun','FAILED','https://api-test.checklyhq.com','accountId','Project','zipper','\x0a======================================================\x0a','substring','development','testResults','\x20\x20]','https://api-dev.checklyhq.com','[Checkly\x20Reporter]\x20Global\x20error:','length','12440152FuMZhR','outcome','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','\x20\x20reporter:\x20[\x0a','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','production','GITHUB_ACTOR','apiKey','playwright-tests','basename','createZip','projects','includes','16706byLYiN','🎭\x20Playwright:\x20','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','GITHUB_REF_NAME','NODE_ENV','link','PluralRules','utf-8','467595GkhTOR','flaky','403779RtXQuk','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a'];a7_0x20b7=function(){return _0x241991;};return a7_0x20b7();}import{Zipper}from'./zipper.js';import a7_0x14c379 from'./clients/checkly-client.js';import{TestResults}from'./clients';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_0x7e9f5(0x1c6)),a7_0x7e9f5(0x1ff))),pkgVersion=packageJson[a7_0x7e9f5(0x1b4)],pluralRules=new Intl[(a7_0x7e9f5(0x1fe))](a7_0x7e9f5(0x1b9)),projectForms={'zero':a7_0x7e9f5(0x1e1),'one':'Project','two':a7_0x7e9f5(0x215),'few':a7_0x7e9f5(0x215),'many':a7_0x7e9f5(0x215),'other':a7_0x7e9f5(0x215)};function getApiUrl(_0xb6e8a7){const _0x1280ad=a7_0x7e9f5,_0x28508a={'local':_0x1280ad(0x20b),'development':_0x1280ad(0x1e8),'staging':_0x1280ad(0x1df),'production':_0x1280ad(0x211)};return _0x28508a[_0xb6e8a7];}function getEnvironment(_0x11e3c1){const _0x5ebd59=a7_0x7e9f5,_0x3f32bc=_0x11e3c1?.[_0x5ebd59(0x1b6)],_0x501e20=process[_0x5ebd59(0x208)][_0x5ebd59(0x1d2)],_0x17e7ac=_0x3f32bc||_0x501e20||_0x5ebd59(0x1f0),_0x3c0a42=[_0x5ebd59(0x1d9),_0x5ebd59(0x1e5),_0x5ebd59(0x1bc),'production'];if(!_0x3c0a42[_0x5ebd59(0x1f7)](_0x17e7ac))return console[_0x5ebd59(0x1cb)](_0x5ebd59(0x1da)+_0x17e7ac+'\x22,\x20using\x20\x22production\x22'),_0x5ebd59(0x1f0);return _0x17e7ac;}function getDirectoryName(){const _0x39c92a=a7_0x7e9f5,_0xa9f5a=process[_0x39c92a(0x1dc)]();let _0x4b381e=a7_0x5554f1[_0x39c92a(0x1f4)](_0xa9f5a);return(!_0x4b381e||_0x4b381e==='/'||_0x4b381e==='.')&&(_0x4b381e=_0x39c92a(0x1f3)),_0x4b381e=_0x4b381e['replace'](/[<>:"|?*]/g,'-'),_0x4b381e['length']>0xff&&(_0x4b381e=_0x4b381e[_0x39c92a(0x1e4)](0x0,0xff)),_0x4b381e;}export class ChecklyReporter{[a7_0x7e9f5(0x1c8)];[a7_0x7e9f5(0x20f)];['zipper'];[a7_0x7e9f5(0x1e6)];[a7_0x7e9f5(0x214)];[a7_0x7e9f5(0x1be)];[a7_0x7e9f5(0x1d8)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x34125a={}){const _0x2a8e7e=a7_0x7e9f5,_0x1c3381=getEnvironment(_0x34125a),_0x238d78=getApiUrl(_0x1c3381),_0x1e6519=process[_0x2a8e7e(0x208)][_0x2a8e7e(0x1cc)]||_0x34125a['apiKey'],_0x275a00=process[_0x2a8e7e(0x208)][_0x2a8e7e(0x1b5)]||_0x34125a[_0x2a8e7e(0x1e0)];this['options']={'accountId':_0x275a00,'apiKey':_0x1e6519,'outputPath':_0x34125a[_0x2a8e7e(0x1ce)]??'checkly-report.zip','jsonReportPath':_0x34125a[_0x2a8e7e(0x1b8)]??'test-results/playwright-test-report.json','testResultsDir':_0x34125a[_0x2a8e7e(0x1c9)]??_0x2a8e7e(0x1bb),'dryRun':_0x34125a[_0x2a8e7e(0x1dd)]??![]},this['assetCollector']=new AssetCollector(this[_0x2a8e7e(0x1c8)]['testResultsDir']),this[_0x2a8e7e(0x1e2)]=new Zipper({'outputPath':this[_0x2a8e7e(0x1c8)][_0x2a8e7e(0x1ce)]});if(!this[_0x2a8e7e(0x1c8)]['dryRun']&&this[_0x2a8e7e(0x1c8)][_0x2a8e7e(0x1f2)]&&this[_0x2a8e7e(0x1c8)][_0x2a8e7e(0x1e0)]){const _0x28dcc9=new a7_0x14c379({'apiKey':this[_0x2a8e7e(0x1c8)]['apiKey'],'accountId':this[_0x2a8e7e(0x1c8)][_0x2a8e7e(0x1e0)],'baseUrl':_0x238d78});this['testResults']=new TestResults(_0x28dcc9['getAxiosInstance']());}}['onBegin'](_0x194ae3,_0x1fb9d4){const _0x19a0bf=a7_0x7e9f5;this['startTime']=new Date();if(!this[_0x19a0bf(0x1e6)])return;try{const _0x1236a5=getDirectoryName(),_0x30bcc7=[{'name':_0x1236a5}],_0x165492=process['env'][_0x19a0bf(0x213)]?_0x19a0bf(0x1ba)+process[_0x19a0bf(0x208)][_0x19a0bf(0x213)]:undefined,_0x42a3ad=_0x165492?{'repoUrl':_0x165492,'commitId':process[_0x19a0bf(0x208)]['GITHUB_SHA'],'branchName':process[_0x19a0bf(0x208)][_0x19a0bf(0x1fb)],'commitOwner':process[_0x19a0bf(0x208)][_0x19a0bf(0x1f1)],'commitMessage':process[_0x19a0bf(0x208)][_0x19a0bf(0x1c7)]}:undefined;this[_0x19a0bf(0x1e6)][_0x19a0bf(0x1b7)]({'name':'Playwright\x20Test\x20Session:\x20'+_0x1236a5,'environment':process['env'][_0x19a0bf(0x1fc)]||'test','repoInfo':_0x42a3ad,'startedAt':this['startTime'][_0x19a0bf(0x1cd)](),'testResults':_0x30bcc7,'provider':_0x19a0bf(0x212)})[_0x19a0bf(0x1cf)](_0x55b144=>{const _0x40908a=_0x19a0bf;this[_0x40908a(0x214)]=_0x55b144,_0x55b144[_0x40908a(0x1fd)]&&console[_0x40908a(0x1c4)](_0x40908a(0x1af)+_0x55b144[_0x40908a(0x1fd)]+'\x0a');})[_0x19a0bf(0x1b1)](_0x1cc7ab=>{const _0x1ae5aa=_0x19a0bf;console[_0x1ae5aa(0x216)]('[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:',_0x1cc7ab[_0x1ae5aa(0x206)]);});}catch(_0x28a0db){console[_0x19a0bf(0x216)](_0x19a0bf(0x1b0),_0x28a0db);}}['onTestEnd'](_0xd41879,_0x2832e6){const _0x13fd9d=a7_0x7e9f5;try{const _0x552a50=_0x2832e6[_0x13fd9d(0x1c5)]===_0x13fd9d(0x1d0)||_0x2832e6['retry']===_0xd41879['retries'];if(!_0x552a50)return;const _0xb16d69=_0xd41879[_0x13fd9d(0x1ec)]()===_0x13fd9d(0x201);if(_0xb16d69)this['testCounts']['flaky']++,this[_0x13fd9d(0x1d8)][_0x13fd9d(0x1d0)]++;else{if(_0x2832e6['status']===_0x13fd9d(0x1d0))this[_0x13fd9d(0x1d8)][_0x13fd9d(0x1d0)]++;else _0x2832e6[_0x13fd9d(0x1c5)]==='failed'&&this[_0x13fd9d(0x1d8)]['failed']++;}}catch(_0xf10d22){console[_0x13fd9d(0x216)](_0x13fd9d(0x1fa),_0xf10d22);}}async[a7_0x7e9f5(0x1db)](){const _0xac405f=a7_0x7e9f5;try{const _0x2d7611=this[_0xac405f(0x1c8)][_0xac405f(0x1b8)];if(!a7_0x23f2cf[_0xac405f(0x1c3)](_0x2d7611)){console[_0xac405f(0x216)](_0xac405f(0x20c)+_0x2d7611),console[_0xac405f(0x216)]('[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:'),console[_0xac405f(0x216)](_0xac405f(0x1ee)+_0xac405f(0x1ef)+_0xac405f(0x203)+_0xac405f(0x1e7));return;}const _0x1c79b1=a7_0x23f2cf[_0xac405f(0x1ae)](_0x2d7611,_0xac405f(0x1ff)),_0xc134e1=JSON[_0xac405f(0x207)](_0x1c79b1),_0x657615=await this[_0xac405f(0x20f)][_0xac405f(0x1d6)](_0xc134e1),_0x13db98=await this[_0xac405f(0x1e2)][_0xac405f(0x1f5)](_0x2d7611,_0x657615);if(this[_0xac405f(0x1e6)]&&this[_0xac405f(0x214)]){await this['uploadResults'](_0xc134e1,_0x13db98['zipPath'],_0x13db98[_0xac405f(0x210)]);if(!this[_0xac405f(0x1c8)][_0xac405f(0x1dd)])try{a7_0x23f2cf[_0xac405f(0x1c2)](_0x13db98[_0xac405f(0x1bf)]);}catch(_0x1ab282){console['warn'](_0xac405f(0x1ed)+_0x1ab282);}}this[_0xac405f(0x1e6)]&&this[_0xac405f(0x214)]?.[_0xac405f(0x1fd)]&&this[_0xac405f(0x1d4)](_0xc134e1,this['testSession']);}catch(_0x5f402e){console[_0xac405f(0x216)](_0xac405f(0x20e),_0x5f402e);}}[a7_0x7e9f5(0x1d4)](_0x2b4de5,_0x2b075e){const _0x31009d=a7_0x7e9f5,_0x550f25=pluralRules[_0x31009d(0x209)](_0x2b4de5[_0x31009d(0x1d7)][_0x31009d(0x1f6)]['length']);console[_0x31009d(0x1c4)](_0x31009d(0x1e3)),console['log'](_0x31009d(0x205)+pkgVersion),console['log'](_0x31009d(0x1f9)+_0x2b4de5[_0x31009d(0x1d7)][_0x31009d(0x1b4)]),console[_0x31009d(0x1c4)](_0x31009d(0x1d5)+projectForms[_0x550f25]+':\x20'+_0x2b4de5['config'][_0x31009d(0x1f6)][_0x31009d(0x217)](({name:_0x19e51d})=>_0x19e51d)['join'](',')),console[_0x31009d(0x1c4)](_0x31009d(0x20a)+_0x2b075e[_0x31009d(0x1fd)]),console[_0x31009d(0x1c4)](_0x31009d(0x1bd));}async[a7_0x7e9f5(0x1ad)](_0x179fbb,_0x135aef,_0x26ed17){const _0x10568b=a7_0x7e9f5;if(!this[_0x10568b(0x1e6)]||!this[_0x10568b(0x214)])return;try{const {failed:_0x4cc5bf,flaky:_0x3e32a3}=this[_0x10568b(0x1d8)],_0x2ac8ca=_0x4cc5bf>0x0?_0x10568b(0x1de):_0x10568b(0x1c1),_0x1bc7a4=_0x4cc5bf===0x0&&_0x3e32a3>0x0,_0x10a435=new Date(),_0x32fc6e=this['startTime']?Math[_0x10568b(0x1d3)](0x0,_0x10a435[_0x10568b(0x1cd)]()-this['startTime'][_0x10568b(0x1cd)]()):0x0,_0x5c6382=a7_0x23f2cf[_0x10568b(0x1ae)](_0x135aef),_0x4eabb4=_0x5c6382[_0x10568b(0x1ea)],_0x44686b=_0x5c6382['toString']('base64');if(this[_0x10568b(0x214)][_0x10568b(0x1e6)][_0x10568b(0x1ea)]>0x0){const _0x1091d7=this[_0x10568b(0x214)][_0x10568b(0x1e6)][0x0];await this[_0x10568b(0x1e6)]['updateTestResult'](this[_0x10568b(0x214)][_0x10568b(0x1ca)],_0x1091d7[_0x10568b(0x20d)],{'status':_0x2ac8ca,'isDegraded':_0x1bc7a4,'startedAt':this[_0x10568b(0x1be)]?.['toISOString'](),'stoppedAt':_0x10a435[_0x10568b(0x204)](),'responseTime':_0x32fc6e,'assets':{'assetsZip':_0x44686b,'entries':_0x26ed17},'metadata':{'usageData':{'s3PostTotalBytes':_0x4eabb4}}});}}catch(_0xb1d22){const _0xcbd247=_0xb1d22 instanceof Error?_0xb1d22['message']:String(_0xb1d22);console[_0x10568b(0x216)]('[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:',_0xcbd247);}}['onError'](_0xd30b7){const _0x4a88a4=a7_0x7e9f5;console[_0x4a88a4(0x216)](_0x4a88a4(0x1e9),_0xd30b7);}}
package/dist/zipper.js CHANGED
@@ -1 +1 @@
1
- const a9_0x4143a9=a9_0x5ccc;(function(_0x3fc6ab,_0x1c65de){const _0x29990e=a9_0x5ccc,_0xb27166=_0x3fc6ab();while(!![]){try{const _0x323c2e=-parseInt(_0x29990e(0x116))/0x1+-parseInt(_0x29990e(0x10d))/0x2*(parseInt(_0x29990e(0x109))/0x3)+-parseInt(_0x29990e(0x111))/0x4+-parseInt(_0x29990e(0x10a))/0x5+parseInt(_0x29990e(0xfc))/0x6*(parseInt(_0x29990e(0x10f))/0x7)+-parseInt(_0x29990e(0xf7))/0x8*(-parseInt(_0x29990e(0x11a))/0x9)+-parseInt(_0x29990e(0xfa))/0xa*(-parseInt(_0x29990e(0xf9))/0xb);if(_0x323c2e===_0x1c65de)break;else _0xb27166['push'](_0xb27166['shift']());}catch(_0x523c1e){_0xb27166['push'](_0xb27166['shift']());}}}(a9_0x11d1,0x30dfe));import*as a9_0x59f3c0 from'fs';import*as a9_0x4c99b3 from'path';import*as a9_0x535a64 from'os';import{ZipArchive}from'archiver';export class Zipper{['outputPath'];constructor(_0x184899){const _0x3e112b=a9_0x5ccc;this[_0x3e112b(0x11f)]=_0x184899[_0x3e112b(0x11f)];}async[a9_0x4143a9(0xf6)](_0x590945,_0x32e933){const _0x11ac15=[];return new Promise((_0x17fda5,_0x5d5ac2)=>{const _0x44ed8a=a9_0x5ccc;try{const _0x3817aa=a9_0x59f3c0[_0x44ed8a(0x105)](this[_0x44ed8a(0x11f)]),_0x38d56a=new ZipArchive({'zlib':{'level':0x0}});_0x38d56a['on']('entry',_0x2e53b0=>{const _0x49233c=_0x44ed8a,_0x12bcb3=_0x2e53b0['name'][_0x49233c(0xfb)](/\\/g,'/'),_0x540ebf=_0x2e53b0[_0x49233c(0x117)]?.[_0x49233c(0x10e)]??0x0,_0x51a8bd=_0x2e53b0[_0x49233c(0x117)]?.[_0x49233c(0x10e)]+(_0x2e53b0['csize']??0x0)-0x1;_0x11ac15[_0x49233c(0x110)]({'name':_0x12bcb3,'start':_0x540ebf,'end':_0x51a8bd});}),_0x3817aa['on'](_0x44ed8a(0x11d),()=>{const _0x2a62cd=_0x44ed8a,_0x2f3da8=_0x38d56a[_0x2a62cd(0x10b)]();_0x17fda5({'zipPath':this[_0x2a62cd(0x11f)],'size':_0x2f3da8,'entryCount':_0x11ac15[_0x2a62cd(0x102)],'entries':_0x11ac15});}),_0x38d56a['on'](_0x44ed8a(0xfd),_0x535465=>{_0x5d5ac2(_0x535465);}),_0x3817aa['on'](_0x44ed8a(0xfd),_0x5a2ced=>{_0x5d5ac2(_0x5a2ced);}),_0x38d56a[_0x44ed8a(0x104)](_0x3817aa);if(!a9_0x59f3c0[_0x44ed8a(0x122)](_0x590945)){_0x5d5ac2(new Error(_0x44ed8a(0x120)+_0x590945));return;}const _0x2c4ad3=this[_0x44ed8a(0xfe)](_0x590945);_0x38d56a[_0x44ed8a(0xf4)](_0x2c4ad3,{'name':'output/playwright-test-report.json'});for(const _0x146d6e of _0x32e933){if(!a9_0x59f3c0[_0x44ed8a(0x122)](_0x146d6e['sourcePath'])){_0x5d5ac2(new Error(_0x44ed8a(0x106)+_0x146d6e[_0x44ed8a(0x118)]));return;}_0x38d56a[_0x44ed8a(0xf4)](_0x146d6e[_0x44ed8a(0x118)],{'name':_0x146d6e[_0x44ed8a(0x121)]});}_0x38d56a['finalize']();}catch(_0x24ead4){_0x5d5ac2(_0x24ead4);}});}[a9_0x4143a9(0xfe)](_0x635e6b){const _0x280cd6=a9_0x4143a9,_0x4b209a=a9_0x59f3c0[_0x280cd6(0x11c)](_0x635e6b,'utf-8'),_0x1f2ae7=JSON[_0x280cd6(0x11b)](_0x4b209a);this[_0x280cd6(0x119)](_0x1f2ae7);const _0x5c6186=a9_0x4c99b3['join'](a9_0x535a64[_0x280cd6(0x112)](),_0x280cd6(0x10c)+Date['now']()+_0x280cd6(0x113));return a9_0x59f3c0['writeFileSync'](_0x5c6186,JSON[_0x280cd6(0x11e)](_0x1f2ae7,null,0x2)),_0x5c6186;}[a9_0x4143a9(0x119)](_0x5e524c){const _0x57ccef=a9_0x4143a9;if(typeof _0x5e524c!==_0x57ccef(0x107)||_0x5e524c===null)return;if(Array[_0x57ccef(0xf5)](_0x5e524c)){_0x5e524c[_0x57ccef(0xf3)](_0x2c69cd=>this[_0x57ccef(0x119)](_0x2c69cd));return;}_0x5e524c[_0x57ccef(0x108)]&&Array[_0x57ccef(0xf5)](_0x5e524c[_0x57ccef(0x108)])&&_0x5e524c[_0x57ccef(0x108)][_0x57ccef(0xf3)](_0x1205fd=>{const _0x920d17=_0x57ccef;_0x1205fd[_0x920d17(0xf8)]&&typeof _0x1205fd[_0x920d17(0xf8)]===_0x920d17(0x101)&&(_0x1205fd['path']=this[_0x920d17(0xff)](_0x1205fd[_0x920d17(0xf8)]));}),Object[_0x57ccef(0x114)](_0x5e524c)[_0x57ccef(0xf3)](_0x4c82bf=>this[_0x57ccef(0x119)](_0x4c82bf));}[a9_0x4143a9(0xff)](_0x592ed0){const _0x1be8c7=a9_0x4143a9,_0x45149d=_0x592ed0['indexOf']('test-results');if(_0x45149d!==-0x1)return _0x592ed0[_0x1be8c7(0x115)](_0x45149d)[_0x1be8c7(0xfb)](/\\/g,'/');return console[_0x1be8c7(0x103)](_0x1be8c7(0x100)+_0x592ed0),_0x592ed0;}}function a9_0x5ccc(_0x2a54e2,_0x146761){const _0x11d15b=a9_0x11d1();return a9_0x5ccc=function(_0x5ccc8d,_0x371dee){_0x5ccc8d=_0x5ccc8d-0xf3;let _0x9b76e7=_0x11d15b[_0x5ccc8d];return _0x9b76e7;},a9_0x5ccc(_0x2a54e2,_0x146761);}function a9_0x11d1(){const _0x3583d5=['attachments','3FNiSCq','380815LijNwN','pointer','playwright-test-report-','324986eaahEm','contents','15883SmfWII','push','349700PWIfbH','tmpdir','.json','values','substring','249280ENeQSN','_offsets','sourcePath','transformAttachmentPaths','62757unWNDu','parse','readFileSync','close','stringify','outputPath','Report\x20file\x20not\x20found:\x20','archivePath','existsSync','forEach','file','isArray','createZip','176zvunfZ','path','99tpQddr','618160rBoKUb','replace','174chQkyW','error','transformJsonReport','normalizeAttachmentPath','[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20','string','length','warn','pipe','createWriteStream','Asset\x20file\x20not\x20found:\x20','object'];a9_0x11d1=function(){return _0x3583d5;};return a9_0x11d1();}
1
+ const a9_0x51a44b=a9_0xd24b;(function(_0x18013b,_0x555a41){const _0x39d4ad=a9_0xd24b,_0x105fac=_0x18013b();while(!![]){try{const _0x446f77=-parseInt(_0x39d4ad(0xc2))/0x1*(-parseInt(_0x39d4ad(0xda))/0x2)+-parseInt(_0x39d4ad(0xc4))/0x3+parseInt(_0x39d4ad(0xbf))/0x4+-parseInt(_0x39d4ad(0xdc))/0x5*(parseInt(_0x39d4ad(0xe0))/0x6)+parseInt(_0x39d4ad(0xca))/0x7+-parseInt(_0x39d4ad(0xdb))/0x8+-parseInt(_0x39d4ad(0xd0))/0x9;if(_0x446f77===_0x555a41)break;else _0x105fac['push'](_0x105fac['shift']());}catch(_0x1fef55){_0x105fac['push'](_0x105fac['shift']());}}}(a9_0x2769,0x4396e));import*as a9_0x32ece0 from'fs';function a9_0x2769(){const _0x22ba60=['join','.json','now','[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20','createZip','utf-8','existsSync','stringify','parse','346aGuAxz','109528wvkMDW','121320eXZTNo','push','Report\x20file\x20not\x20found:\x20','error','6uLwkyR','createWriteStream','object','file','replace','writeFileSync','readFileSync','warn','string','Asset\x20file\x20not\x20found:\x20','_offsets','playwright-test-report-','values','indexOf','1270856sTYwva','length','name','1761dXsQTn','transformJsonReport','73161SYEEQL','finalize','csize','normalizeAttachmentPath','contents','outputPath','1285970yqNnMp','path','sourcePath','output/playwright-test-report.json','transformAttachmentPaths','attachments','4202001kmJdeR'];a9_0x2769=function(){return _0x22ba60;};return a9_0x2769();}function a9_0xd24b(_0x1d7066,_0x4d0b48){const _0x276948=a9_0x2769();return a9_0xd24b=function(_0xd24bdb,_0x227a95){_0xd24bdb=_0xd24bdb-0xb6;let _0x263fe5=_0x276948[_0xd24bdb];return _0x263fe5;},a9_0xd24b(_0x1d7066,_0x4d0b48);}import*as a9_0x1cb30c from'path';import*as a9_0x55b437 from'os';import{ZipArchive}from'archiver';export class Zipper{[a9_0x51a44b(0xc9)];constructor(_0x2edfae){const _0x5e9a56=a9_0x51a44b;this[_0x5e9a56(0xc9)]=_0x2edfae[_0x5e9a56(0xc9)];}async[a9_0x51a44b(0xd5)](_0x2cab90,_0x2ae7e5){const _0x4173ba=[];return new Promise((_0x373b41,_0xb4af17)=>{const _0x480e0b=a9_0xd24b;try{const _0x195872=a9_0x32ece0[_0x480e0b(0xe1)](this[_0x480e0b(0xc9)]),_0x4c5d98=new ZipArchive({'zlib':{'level':0x0}});_0x4c5d98['on']('entry',_0x7ee162=>{const _0x50008e=_0x480e0b,_0x444459=_0x7ee162[_0x50008e(0xc1)][_0x50008e(0xe4)](/\\/g,'/'),_0x3ccbde=_0x7ee162['_offsets']?.[_0x50008e(0xc8)]??0x0,_0x583899=_0x7ee162[_0x50008e(0xbb)]?.[_0x50008e(0xc8)]+(_0x7ee162[_0x50008e(0xc6)]??0x0)-0x1;_0x4173ba[_0x50008e(0xdd)]({'name':_0x444459,'start':_0x3ccbde,'end':_0x583899});}),_0x195872['on']('close',()=>{const _0x2d3ae6=_0x480e0b,_0x20c20a=_0x4c5d98['pointer']();_0x373b41({'zipPath':this[_0x2d3ae6(0xc9)],'size':_0x20c20a,'entryCount':_0x4173ba[_0x2d3ae6(0xc0)],'entries':_0x4173ba});}),_0x4c5d98['on'](_0x480e0b(0xdf),_0x38f253=>{_0xb4af17(_0x38f253);}),_0x195872['on']('error',_0x126edd=>{_0xb4af17(_0x126edd);}),_0x4c5d98['pipe'](_0x195872);if(!a9_0x32ece0[_0x480e0b(0xd7)](_0x2cab90)){_0xb4af17(new Error(_0x480e0b(0xde)+_0x2cab90));return;}const _0x3204ac=this[_0x480e0b(0xc3)](_0x2cab90);_0x4c5d98[_0x480e0b(0xe3)](_0x3204ac,{'name':_0x480e0b(0xcd)});for(const _0x18f1e9 of _0x2ae7e5){if(!a9_0x32ece0[_0x480e0b(0xd7)](_0x18f1e9[_0x480e0b(0xcc)])){_0xb4af17(new Error(_0x480e0b(0xba)+_0x18f1e9[_0x480e0b(0xcc)]));return;}_0x4c5d98[_0x480e0b(0xe3)](_0x18f1e9[_0x480e0b(0xcc)],{'name':_0x18f1e9['archivePath']});}_0x4c5d98[_0x480e0b(0xc5)]();}catch(_0x1b19d7){_0xb4af17(_0x1b19d7);}});}[a9_0x51a44b(0xc3)](_0x1ae25d){const _0x5caec8=a9_0x51a44b,_0x1fcff6=a9_0x32ece0[_0x5caec8(0xb7)](_0x1ae25d,_0x5caec8(0xd6)),_0x16e125=JSON[_0x5caec8(0xd9)](_0x1fcff6);this[_0x5caec8(0xce)](_0x16e125);const _0xd91273=a9_0x1cb30c[_0x5caec8(0xd1)](a9_0x55b437['tmpdir'](),_0x5caec8(0xbc)+Date[_0x5caec8(0xd3)]()+_0x5caec8(0xd2));return a9_0x32ece0[_0x5caec8(0xb6)](_0xd91273,JSON[_0x5caec8(0xd8)](_0x16e125,null,0x2)),_0xd91273;}[a9_0x51a44b(0xce)](_0x357d25){const _0x3a4b7=a9_0x51a44b;if(typeof _0x357d25!==_0x3a4b7(0xe2)||_0x357d25===null)return;if(Array['isArray'](_0x357d25)){_0x357d25['forEach'](_0x5dea1f=>this[_0x3a4b7(0xce)](_0x5dea1f));return;}_0x357d25[_0x3a4b7(0xcf)]&&Array['isArray'](_0x357d25[_0x3a4b7(0xcf)])&&_0x357d25[_0x3a4b7(0xcf)]['forEach'](_0x320a6f=>{const _0x4b9a66=_0x3a4b7;_0x320a6f[_0x4b9a66(0xcb)]&&typeof _0x320a6f[_0x4b9a66(0xcb)]===_0x4b9a66(0xb9)&&(_0x320a6f['path']=this[_0x4b9a66(0xc7)](_0x320a6f[_0x4b9a66(0xcb)]));}),Object[_0x3a4b7(0xbd)](_0x357d25)['forEach'](_0x3ee450=>this['transformAttachmentPaths'](_0x3ee450));}[a9_0x51a44b(0xc7)](_0x3bce82){const _0x3b1023=a9_0x51a44b,_0x46e36c=_0x3bce82[_0x3b1023(0xbe)]('test-results');if(_0x46e36c!==-0x1)return _0x3bce82['substring'](_0x46e36c)['replace'](/\\/g,'/');return console[_0x3b1023(0xb8)](_0x3b1023(0xd4)+_0x3bce82),_0x3bce82;}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkly/playwright-reporter",
3
- "version": "0.0.4-alpha",
3
+ "version": "0.0.5-alpha",
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",