@checkly/playwright-reporter 0.1.0-beta → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,10 +7,14 @@
7
7
 
8
8
  Seamlessly integrate Playwright test results with Checkly monitoring. Automatically upload test results, screenshots, videos, and traces to gain visibility into your application's health across test runs.
9
9
 
10
+ > **Important**: This package is currently in an early private release.
11
+ [Contact the Checkly team](https://app.checklyhq.com/?support=true) to get early access.
12
+ Always ensure you're using the latest version. Expect breaking changes, features in development, and possible bugs.
13
+
10
14
  ## Installation
11
15
 
12
16
  ```bash
13
- npm install --save-dev @checkly/playwright-reporter@alpha
17
+ npm install --save-dev @checkly/playwright-reporter
14
18
  ```
15
19
 
16
20
  **Requirements:**
@@ -1 +1 @@
1
- const a0_0x1e2bb6=a0_0xc4ed;function a0_0xc4ed(_0x3f527c,_0x3bb25f){const _0x4757bc=a0_0x4757();return a0_0xc4ed=function(_0xc4ede1,_0x43d8d0){_0xc4ede1=_0xc4ede1-0x13c;let _0x551885=_0x4757bc[_0xc4ede1];return _0x551885;},a0_0xc4ed(_0x3f527c,_0x3bb25f);}(function(_0x3d0c84,_0x51d57f){const _0x3899ab=a0_0xc4ed,_0x3ab98d=_0x3d0c84();while(!![]){try{const _0x4ce862=parseInt(_0x3899ab(0x171))/0x1*(-parseInt(_0x3899ab(0x14a))/0x2)+-parseInt(_0x3899ab(0x15f))/0x3*(-parseInt(_0x3899ab(0x14c))/0x4)+parseInt(_0x3899ab(0x15d))/0x5+-parseInt(_0x3899ab(0x155))/0x6+parseInt(_0x3899ab(0x140))/0x7*(-parseInt(_0x3899ab(0x16e))/0x8)+parseInt(_0x3899ab(0x166))/0x9*(-parseInt(_0x3899ab(0x14b))/0xa)+parseInt(_0x3899ab(0x176))/0xb;if(_0x4ce862===_0x51d57f)break;else _0x3ab98d['push'](_0x3ab98d['shift']());}catch(_0x298705){_0x3ab98d['push'](_0x3ab98d['shift']());}}}(a0_0x4757,0x9e370));import*as a0_0x25699e from'fs';function a0_0x4757(){const _0xf32725=['getVideoContentType','trace','.html','28GPAxnb','some','sep','join','add','attachment','push','.txt','determineAssetType','image/png','2OrxFte','2940FjEXwq','34536ZrVFts','video/webm','image/bmp','.svg','getImageContentType','.mp4','includes','readdirSync','.jpg','4960404PeDIBm','relative','collectAssetsRecursive','basename','split','testResultsDir','text/html','has','6166185EFFWEw','screenshot','24PORBiP','extname','other','.json','existsSync','image/jpeg','.mov','17145RjTZva','name','.zip','shouldSkipFile','.bmp','collectAssets','.log','.gif','932424JJVwGQ','application/zip','isDirectory','60821oALhFS','.jpeg','video/mp4','.htm','application/json','13855336Iprehk','test','.avi'];a0_0x4757=function(){return _0xf32725;};return a0_0x4757();}import*as a0_0x510860 from'path';export class AssetCollector{[a0_0x1e2bb6(0x15a)];constructor(_0x54a555){this['testResultsDir']=_0x54a555;}async[a0_0x1e2bb6(0x16b)](_0x1dc962){const _0x51d36e=a0_0x1e2bb6,_0x13148b=[],_0x5cdf0e=new Set();if(!a0_0x25699e[_0x51d36e(0x163)](this[_0x51d36e(0x15a)]))return _0x13148b;return await this[_0x51d36e(0x157)](this[_0x51d36e(0x15a)],'',_0x13148b,_0x5cdf0e),_0x13148b;}async['collectAssetsRecursive'](_0x15ba0a,_0x376c69,_0x1c10b7,_0x512488){const _0xdae905=a0_0x1e2bb6;let _0x3f607a;try{_0x3f607a=a0_0x25699e[_0xdae905(0x153)](_0x15ba0a,{'withFileTypes':!![]});}catch{return;}const _0x333be=a0_0x510860[_0xdae905(0x158)](a0_0x510860['resolve'](this['testResultsDir']));for(const _0x321cb2 of _0x3f607a){const _0x44f8d6=a0_0x510860[_0xdae905(0x143)](_0x15ba0a,_0x321cb2[_0xdae905(0x167)]),_0xeb5606=a0_0x510860[_0xdae905(0x156)](this[_0xdae905(0x15a)],_0x44f8d6),_0x59d16d=a0_0x510860[_0xdae905(0x143)](_0x333be,_0xeb5606);if(this[_0xdae905(0x169)](_0x321cb2[_0xdae905(0x167)]))continue;if(_0x321cb2[_0xdae905(0x170)]())await this['collectAssetsRecursive'](_0x44f8d6,_0x59d16d,_0x1c10b7,_0x512488);else{if(_0x321cb2['isFile']()){if(!_0x512488[_0xdae905(0x15c)](_0x44f8d6)){const _0x398c07=this['createAsset'](_0x44f8d6,_0x59d16d);_0x1c10b7[_0xdae905(0x146)](_0x398c07),_0x512488[_0xdae905(0x144)](_0x44f8d6);}}}}}[a0_0x1e2bb6(0x169)](_0x1612c2){const _0x2d9b7e=a0_0x1e2bb6,_0x7d272=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x7d272[_0x2d9b7e(0x141)](_0x55d3b7=>_0x55d3b7[_0x2d9b7e(0x177)](_0x1612c2));}['createAsset'](_0x3dd976,_0x1cdd67){const _0x338487=a0_0x1e2bb6,_0x40fb85=a0_0x510860[_0x338487(0x160)](_0x3dd976)['toLowerCase'](),{type:_0x4865c9,contentType:_0x3d96ca}=this[_0x338487(0x148)](_0x40fb85),_0x2d839b=_0x1cdd67[_0x338487(0x159)](a0_0x510860[_0x338487(0x142)])[_0x338487(0x143)]('/');return{'sourcePath':_0x3dd976,'archivePath':_0x2d839b,'type':_0x4865c9,'contentType':_0x3d96ca};}[a0_0x1e2bb6(0x148)](_0x43d83f){const _0xd18634=a0_0x1e2bb6;if(['.png',_0xd18634(0x154),_0xd18634(0x172),_0xd18634(0x16d),_0xd18634(0x16a),_0xd18634(0x14f)][_0xd18634(0x152)](_0x43d83f))return{'type':_0xd18634(0x15e),'contentType':this[_0xd18634(0x150)](_0x43d83f)};if(['.webm',_0xd18634(0x151),_0xd18634(0x13c),_0xd18634(0x165)][_0xd18634(0x152)](_0x43d83f))return{'type':'video','contentType':this[_0xd18634(0x13d)](_0x43d83f)};if(_0x43d83f===_0xd18634(0x168))return{'type':_0xd18634(0x13e),'contentType':_0xd18634(0x16f)};if(_0x43d83f===_0xd18634(0x13f)||_0x43d83f===_0xd18634(0x174))return{'type':_0xd18634(0x145),'contentType':_0xd18634(0x15b)};if(_0x43d83f===_0xd18634(0x162))return{'type':_0xd18634(0x145),'contentType':_0xd18634(0x175)};if(_0x43d83f===_0xd18634(0x147)||_0x43d83f===_0xd18634(0x16c))return{'type':_0xd18634(0x145),'contentType':'text/plain'};return{'type':_0xd18634(0x161),'contentType':'application/octet-stream'};}[a0_0x1e2bb6(0x150)](_0x953a8a){const _0x111cc7=a0_0x1e2bb6,_0x253955={'.png':_0x111cc7(0x149),'.jpg':_0x111cc7(0x164),'.jpeg':_0x111cc7(0x164),'.gif':'image/gif','.bmp':_0x111cc7(0x14e),'.svg':'image/svg+xml'};return _0x253955[_0x953a8a]||_0x111cc7(0x149);}['getVideoContentType'](_0x5695ed){const _0x615c13=a0_0x1e2bb6,_0x480ab9={'.webm':_0x615c13(0x14d),'.mp4':_0x615c13(0x173),'.avi':'video/x-msvideo','.mov':'video/quicktime'};return _0x480ab9[_0x5695ed]||_0x615c13(0x14d);}}
1
+ const a0_0x2cc579=a0_0xf64e;(function(_0x35812c,_0x5989d3){const _0xecf01a=a0_0xf64e,_0x5ca1be=_0x35812c();while(!![]){try{const _0x29c7d4=-parseInt(_0xecf01a(0x191))/0x1*(parseInt(_0xecf01a(0x1ad))/0x2)+parseInt(_0xecf01a(0x1a3))/0x3*(parseInt(_0xecf01a(0x1ac))/0x4)+parseInt(_0xecf01a(0x18f))/0x5*(-parseInt(_0xecf01a(0x1a5))/0x6)+-parseInt(_0xecf01a(0x180))/0x7*(-parseInt(_0xecf01a(0x198))/0x8)+parseInt(_0xecf01a(0x1b8))/0x9*(parseInt(_0xecf01a(0x19c))/0xa)+parseInt(_0xecf01a(0x19d))/0xb+-parseInt(_0xecf01a(0x1a7))/0xc*(parseInt(_0xecf01a(0x19f))/0xd);if(_0x29c7d4===_0x5989d3)break;else _0x5ca1be['push'](_0x5ca1be['shift']());}catch(_0x4df96b){_0x5ca1be['push'](_0x5ca1be['shift']());}}}(a0_0x4f49,0x19b70));import*as a0_0x3b396d from'fs';import*as a0_0x259516 from'path';function a0_0xf64e(_0x28ba58,_0x313d24){const _0x4f4920=a0_0x4f49();return a0_0xf64e=function(_0xf64ec5,_0x1b57fc){_0xf64ec5=_0xf64ec5-0x17f;let _0x4f641e=_0x4f4920[_0xf64ec5];return _0x4f641e;},a0_0xf64e(_0x28ba58,_0x313d24);}function a0_0x4f49(){const _0x231179=['collectAssetsRecursive','other','application/zip','join','name','readdirSync','video/webm','.zip','.webm','split','243SziKnV','isFile','7AZPfEH','shouldSkipFile','createAsset','attachment','image/gif','image/jpeg','resolve','.htm','video','includes','screenshot','image/png','getVideoContentType','.html','push','204945VhSLQm','getImageContentType','432NBdJHo','existsSync','.svg','extname','add','.gif','sep','920072njQEqq','video/mp4','.txt','relative','62530zKEQdR','2216181lXZysf','.jpeg','117JluXFJ','.jpg','testResultsDir','application/json','54fWPSKg','.png','6bazRCW','determineAssetType','391656LfLmCd','image/svg+xml','some','image/bmp','.json','7416IdudRD','364wKYThS'];a0_0x4f49=function(){return _0x231179;};return a0_0x4f49();}export class AssetCollector{['testResultsDir'];constructor(_0x4fd2ef){const _0x37a590=a0_0xf64e;this[_0x37a590(0x1a1)]=_0x4fd2ef;}async['collectAssets'](_0x31b279){const _0x4d43a2=a0_0xf64e,_0x2c4006=[],_0x1b5358=new Set();if(!a0_0x3b396d[_0x4d43a2(0x192)](this[_0x4d43a2(0x1a1)]))return _0x2c4006;return await this[_0x4d43a2(0x1ae)](this['testResultsDir'],'',_0x2c4006,_0x1b5358),_0x2c4006;}async['collectAssetsRecursive'](_0x1006bd,_0x2e1198,_0x5d468b,_0x1f16f9){const _0x208055=a0_0xf64e;let _0x384684;try{_0x384684=a0_0x3b396d[_0x208055(0x1b3)](_0x1006bd,{'withFileTypes':!![]});}catch{return;}const _0x91c87b=a0_0x259516['basename'](a0_0x259516[_0x208055(0x186)](this[_0x208055(0x1a1)]));for(const _0x472f2a of _0x384684){const _0x4be759=a0_0x259516[_0x208055(0x1b1)](_0x1006bd,_0x472f2a[_0x208055(0x1b2)]),_0x478c3a=a0_0x259516[_0x208055(0x19b)](this[_0x208055(0x1a1)],_0x4be759),_0xc9daf8=a0_0x259516[_0x208055(0x1b1)](_0x91c87b,_0x478c3a);if(this[_0x208055(0x181)](_0x472f2a[_0x208055(0x1b2)]))continue;if(_0x472f2a['isDirectory']())await this[_0x208055(0x1ae)](_0x4be759,_0xc9daf8,_0x5d468b,_0x1f16f9);else{if(_0x472f2a[_0x208055(0x17f)]()){if(!_0x1f16f9['has'](_0x4be759)){const _0x4ecb8d=this[_0x208055(0x182)](_0x4be759,_0xc9daf8);_0x5d468b[_0x208055(0x18e)](_0x4ecb8d),_0x1f16f9[_0x208055(0x195)](_0x4be759);}}}}}[a0_0x2cc579(0x181)](_0x11d8fe){const _0x395774=a0_0x2cc579,_0x42f130=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x42f130[_0x395774(0x1a9)](_0x3c8f01=>_0x3c8f01['test'](_0x11d8fe));}[a0_0x2cc579(0x182)](_0x49d15f,_0x58e4c4){const _0x2eaf83=a0_0x2cc579,_0x19f432=a0_0x259516[_0x2eaf83(0x194)](_0x49d15f)['toLowerCase'](),{type:_0x15b54f,contentType:_0xc78d39}=this[_0x2eaf83(0x1a6)](_0x19f432),_0x1d9004=_0x58e4c4[_0x2eaf83(0x1b7)](a0_0x259516[_0x2eaf83(0x197)])[_0x2eaf83(0x1b1)]('/');return{'sourcePath':_0x49d15f,'archivePath':_0x1d9004,'type':_0x15b54f,'contentType':_0xc78d39};}[a0_0x2cc579(0x1a6)](_0x14ed01){const _0x2afefc=a0_0x2cc579;if([_0x2afefc(0x1a4),_0x2afefc(0x1a0),_0x2afefc(0x19e),_0x2afefc(0x196),'.bmp',_0x2afefc(0x193)][_0x2afefc(0x189)](_0x14ed01))return{'type':_0x2afefc(0x18a),'contentType':this[_0x2afefc(0x190)](_0x14ed01)};if([_0x2afefc(0x1b6),'.mp4','.avi','.mov'][_0x2afefc(0x189)](_0x14ed01))return{'type':_0x2afefc(0x188),'contentType':this[_0x2afefc(0x18c)](_0x14ed01)};if(_0x14ed01===_0x2afefc(0x1b5))return{'type':'trace','contentType':_0x2afefc(0x1b0)};if(_0x14ed01===_0x2afefc(0x18d)||_0x14ed01===_0x2afefc(0x187))return{'type':_0x2afefc(0x183),'contentType':'text/html'};if(_0x14ed01===_0x2afefc(0x1ab))return{'type':_0x2afefc(0x183),'contentType':_0x2afefc(0x1a2)};if(_0x14ed01===_0x2afefc(0x19a)||_0x14ed01==='.log')return{'type':_0x2afefc(0x183),'contentType':'text/plain'};return{'type':_0x2afefc(0x1af),'contentType':'application/octet-stream'};}[a0_0x2cc579(0x190)](_0x3e216a){const _0x3ba5fb=a0_0x2cc579,_0x4ed2cb={'.png':'image/png','.jpg':'image/jpeg','.jpeg':_0x3ba5fb(0x185),'.gif':_0x3ba5fb(0x184),'.bmp':_0x3ba5fb(0x1aa),'.svg':_0x3ba5fb(0x1a8)};return _0x4ed2cb[_0x3e216a]||_0x3ba5fb(0x18b);}['getVideoContentType'](_0x48292f){const _0x44fc7a=a0_0x2cc579,_0x274c22={'.webm':_0x44fc7a(0x1b4),'.mp4':_0x44fc7a(0x199),'.avi':'video/x-msvideo','.mov':'video/quicktime'};return _0x274c22[_0x48292f]||_0x44fc7a(0x1b4);}}
@@ -1 +1 @@
1
- var a1_0x288ca3=a1_0x2449;function a1_0x2328(){var _0x5605b0=['Bearer\x20','apiKey','accountId','api','6NAltEV','headers','@checkly/playwright-reporter/','549420BRyrcv','7684448fZgRkm','create','97617BhZfhS','Authorization','baseUrl','response','49ZDzySV','1087356YyWzHx','use','request','1661760JLYnkP','interceptors','3892675nLQsND','x-checkly-account','User-Agent','1575532TYWVjY'];a1_0x2328=function(){return _0x5605b0;};return a1_0x2328();}(function(_0x473776,_0x54aee4){var _0x172725=a1_0x2449,_0x22af51=_0x473776();while(!![]){try{var _0x2831e4=-parseInt(_0x172725(0x16e))/0x1+parseInt(_0x172725(0x173))/0x2+parseInt(_0x172725(0x180))/0x3*(-parseInt(_0x172725(0x17b))/0x4)+parseInt(_0x172725(0x178))/0x5+parseInt(_0x172725(0x16b))/0x6*(-parseInt(_0x172725(0x172))/0x7)+parseInt(_0x172725(0x16c))/0x8+-parseInt(_0x172725(0x176))/0x9;if(_0x2831e4===_0x54aee4)break;else _0x22af51['push'](_0x22af51['shift']());}catch(_0x2a572b){_0x22af51['push'](_0x22af51['shift']());}}}(a1_0x2328,0x8b96c));import a1_0x101fad from'axios';import{handleErrorResponse}from'./errors.js';function getVersion(){return'0.1.0';}function a1_0x2449(_0x19364d,_0x5c5665){var _0x232859=a1_0x2328();return a1_0x2449=function(_0x24494f,_0x10f7e1){_0x24494f=_0x24494f-0x16b;var _0x283a84=_0x232859[_0x24494f];return _0x283a84;},a1_0x2449(_0x19364d,_0x5c5665);}export function createRequestInterceptor(_0x50e0ed,_0x56ab48){return _0x5dc3dc=>{var _0x8ff1ae=a1_0x2449;return _0x5dc3dc[_0x8ff1ae(0x181)]&&(_0x5dc3dc[_0x8ff1ae(0x181)][_0x8ff1ae(0x16f)]=_0x8ff1ae(0x17c)+_0x50e0ed,_0x5dc3dc[_0x8ff1ae(0x181)][_0x8ff1ae(0x179)]=_0x56ab48,_0x5dc3dc[_0x8ff1ae(0x181)][_0x8ff1ae(0x17a)]=_0x8ff1ae(0x182)+getVersion()),_0x5dc3dc;};}export function createResponseErrorInterceptor(){return _0x3c7028=>{handleErrorResponse(_0x3c7028);};}export default class ChecklyClient{[a1_0x288ca3(0x17d)];[a1_0x288ca3(0x170)];['accountId'];[a1_0x288ca3(0x17f)];constructor(_0x174bb5){var _0x130cfe=a1_0x288ca3;this[_0x130cfe(0x17e)]=_0x174bb5[_0x130cfe(0x17e)],this['apiKey']=_0x174bb5[_0x130cfe(0x17d)],this['baseUrl']=_0x174bb5['baseUrl'],this[_0x130cfe(0x17f)]=a1_0x101fad[_0x130cfe(0x16d)]({'baseURL':this[_0x130cfe(0x170)],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0x130cfe(0x17f)][_0x130cfe(0x177)][_0x130cfe(0x175)]['use'](createRequestInterceptor(this[_0x130cfe(0x17d)],this[_0x130cfe(0x17e)])),this['api'][_0x130cfe(0x177)][_0x130cfe(0x171)][_0x130cfe(0x174)](_0x33c7e0=>_0x33c7e0,createResponseErrorInterceptor());}['getAxiosInstance'](){var _0x15a704=a1_0x288ca3;return this[_0x15a704(0x17f)];}}
1
+ var a1_0x3b35d7=a1_0x27ba;(function(_0xbcbd43,_0x538295){var _0x1360ac=a1_0x27ba,_0xaaf1b6=_0xbcbd43();while(!![]){try{var _0x5a99a7=-parseInt(_0x1360ac(0x124))/0x1*(parseInt(_0x1360ac(0x11a))/0x2)+parseInt(_0x1360ac(0x120))/0x3+parseInt(_0x1360ac(0x118))/0x4+-parseInt(_0x1360ac(0x125))/0x5*(-parseInt(_0x1360ac(0x126))/0x6)+parseInt(_0x1360ac(0x11c))/0x7+parseInt(_0x1360ac(0x12a))/0x8*(parseInt(_0x1360ac(0x128))/0x9)+-parseInt(_0x1360ac(0x12d))/0xa;if(_0x5a99a7===_0x538295)break;else _0xaaf1b6['push'](_0xaaf1b6['shift']());}catch(_0x2eec3e){_0xaaf1b6['push'](_0xaaf1b6['shift']());}}}(a1_0x22b3,0xb164f));import a1_0x162146 from'axios';import{handleErrorResponse}from'./errors.js';function getVersion(){var _0xac9ea2=a1_0x27ba;return _0xac9ea2(0x11e);}export function createRequestInterceptor(_0xbef8b6,_0x1732be){return _0x353ee4=>{var _0x10ce6c=a1_0x27ba;return _0x353ee4[_0x10ce6c(0x12b)]&&(_0x353ee4[_0x10ce6c(0x12b)][_0x10ce6c(0x129)]='Bearer\x20'+_0xbef8b6,_0x353ee4[_0x10ce6c(0x12b)][_0x10ce6c(0x127)]=_0x1732be,_0x353ee4[_0x10ce6c(0x12b)][_0x10ce6c(0x119)]='@checkly/playwright-reporter/'+getVersion()),_0x353ee4;};}function a1_0x27ba(_0x3b9a77,_0x2c354c){var _0x22b3c0=a1_0x22b3();return a1_0x27ba=function(_0x27ba38,_0x39123f){_0x27ba38=_0x27ba38-0x118;var _0x147b31=_0x22b3c0[_0x27ba38];return _0x147b31;},a1_0x27ba(_0x3b9a77,_0x2c354c);}export function createResponseErrorInterceptor(){return _0x3bf31c=>{handleErrorResponse(_0x3bf31c);};}export default class ChecklyClient{[a1_0x3b35d7(0x122)];['baseUrl'];[a1_0x3b35d7(0x11f)];[a1_0x3b35d7(0x11b)];constructor(_0x24c6bd){var _0x3d4940=a1_0x3b35d7;this[_0x3d4940(0x11f)]=_0x24c6bd['accountId'],this['apiKey']=_0x24c6bd[_0x3d4940(0x122)],this[_0x3d4940(0x12c)]=_0x24c6bd[_0x3d4940(0x12c)],this['api']=a1_0x162146['create']({'baseURL':this['baseUrl'],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0x3d4940(0x11b)][_0x3d4940(0x121)]['request']['use'](createRequestInterceptor(this[_0x3d4940(0x122)],this[_0x3d4940(0x11f)])),this[_0x3d4940(0x11b)][_0x3d4940(0x121)][_0x3d4940(0x123)]['use'](_0x34ffd9=>_0x34ffd9,createResponseErrorInterceptor());}[a1_0x3b35d7(0x11d)](){return this['api'];}}function a1_0x22b3(){var _0x5c9c0=['User-Agent','18692gZdYkc','api','8162784pezBgK','getAxiosInstance','0.1.0','accountId','1190259mvwfAr','interceptors','apiKey','response','73KbXYsT','5turKQj','5135538WgqBEk','x-checkly-account','9zcqDDF','Authorization','4080072MkirIG','headers','baseUrl','26291970TFufSD','4437060bHKapr'];a1_0x22b3=function(){return _0x5c9c0;};return a1_0x22b3();}
@@ -1 +1 @@
1
- const a2_0x141508=a2_0x1a45;(function(_0x346360,_0x2095fe){const _0x35a8b=a2_0x1a45,_0xc164a4=_0x346360();while(!![]){try{const _0x40c946=parseInt(_0x35a8b(0xad))/0x1+-parseInt(_0x35a8b(0xb2))/0x2+parseInt(_0x35a8b(0xbf))/0x3+parseInt(_0x35a8b(0xb4))/0x4*(-parseInt(_0x35a8b(0xba))/0x5)+parseInt(_0x35a8b(0xb8))/0x6+-parseInt(_0x35a8b(0xb6))/0x7+parseInt(_0x35a8b(0xb1))/0x8;if(_0x40c946===_0x2095fe)break;else _0xc164a4['push'](_0xc164a4['shift']());}catch(_0x315b4d){_0xc164a4['push'](_0xc164a4['shift']());}}}(a2_0x26d0,0xdf25e));export class ApiError extends Error{[a2_0x141508(0xb9)];constructor(_0xfa057b,_0x329de0){const _0x30de0f=a2_0x141508;super(_0xfa057b[_0x30de0f(0xbc)],_0x329de0),this[_0x30de0f(0xaf)]=this[_0x30de0f(0xb7)][_0x30de0f(0xaf)],this[_0x30de0f(0xb9)]=_0xfa057b;}}export class ValidationError extends ApiError{constructor(_0x1c9858,_0x442ac1){super(_0x1c9858,_0x442ac1);}}export class UnauthorizedError extends ApiError{constructor(_0x21d6f2,_0x14384c){super(_0x21d6f2,_0x14384c);}}function a2_0x26d0(){const _0x2b3d8c=['response','object','3920178QDcsXL','Unknown\x20error','820210fMDVUn','statusCode','name','error','16876024cxfOOV','2077248ecfqnK','Network\x20error','4MRtQlf','An\x20error\x20occurred','9295706vRsyNU','constructor','1162860jRwCDO','data','5748265JiEJTO','MissingResponseError','message'];a2_0x26d0=function(){return _0x2b3d8c;};return a2_0x26d0();}export class ForbiddenError extends ApiError{constructor(_0x3619d0,_0xeb486b){super(_0x3619d0,_0xeb486b);}}export class NotFoundError extends ApiError{constructor(_0x4d7e69,_0x1fb3c1){super(_0x4d7e69,_0x1fb3c1);}}function a2_0x1a45(_0x5bfeff,_0x55abb5){const _0x26d043=a2_0x26d0();return a2_0x1a45=function(_0x1a450f,_0x2805e9){_0x1a450f=_0x1a450f-0xac;let _0x4e0c28=_0x26d043[_0x1a450f];return _0x4e0c28;},a2_0x1a45(_0x5bfeff,_0x55abb5);}export class RequestTimeoutError extends ApiError{constructor(_0x3f32a8,_0xe96b3){super(_0x3f32a8,_0xe96b3);}}export class ConflictError extends ApiError{constructor(_0x6f2160,_0x201fc0){super(_0x6f2160,_0x201fc0);}}export class ServerError extends ApiError{constructor(_0x504ae6,_0x1305cf){super(_0x504ae6,_0x1305cf);}}export class MiscellaneousError extends ApiError{constructor(_0x15628c,_0x476e3c){super(_0x15628c,_0x476e3c);}}export class MissingResponseError extends Error{constructor(_0x5a6e25,_0x529aa5){const _0x5c649e=a2_0x141508;super(_0x5a6e25,_0x529aa5),this[_0x5c649e(0xaf)]=_0x5c649e(0xbb);}}export function parseErrorData(_0x3ef38e,_0x4a6665){const _0x3a469c=a2_0x141508;if(!_0x3ef38e)return undefined;if(typeof _0x3ef38e===_0x3a469c(0xbe)&&_0x3ef38e['statusCode']&&_0x3ef38e[_0x3a469c(0xb0)]&&_0x3ef38e[_0x3a469c(0xbc)])return{'statusCode':_0x3ef38e[_0x3a469c(0xae)],'error':_0x3ef38e[_0x3a469c(0xb0)],'message':_0x3ef38e[_0x3a469c(0xbc)],'errorCode':_0x3ef38e['errorCode']};if(typeof _0x3ef38e===_0x3a469c(0xbe)&&_0x3ef38e['error']&&!_0x3ef38e['message'])return{'statusCode':_0x4a6665[_0x3a469c(0xae)],'error':_0x3ef38e['error'],'message':_0x3ef38e['error']};if(typeof _0x3ef38e===_0x3a469c(0xbe)&&_0x3ef38e[_0x3a469c(0xb0)]&&_0x3ef38e[_0x3a469c(0xbc)])return{'statusCode':_0x4a6665[_0x3a469c(0xae)],'error':_0x3ef38e['error'],'message':_0x3ef38e[_0x3a469c(0xbc)],'errorCode':_0x3ef38e['errorCode']};if(typeof _0x3ef38e===_0x3a469c(0xbe)&&_0x3ef38e['message'])return{'statusCode':_0x4a6665[_0x3a469c(0xae)],'error':_0x3ef38e['message'],'message':_0x3ef38e[_0x3a469c(0xbc)],'errorCode':_0x3ef38e['errorCode']};if(typeof _0x3ef38e==='string')return{'statusCode':_0x4a6665[_0x3a469c(0xae)],'error':_0x3ef38e,'message':_0x3ef38e};return undefined;}export function handleErrorResponse(_0x5e5840){const _0x4af979=a2_0x141508;if(!_0x5e5840[_0x4af979(0xbd)])throw new MissingResponseError(_0x5e5840[_0x4af979(0xbc)]||_0x4af979(0xb3));const {status:_0x20c3e6,data:_0x2779e0}=_0x5e5840[_0x4af979(0xbd)],_0x2c6917=parseErrorData(_0x2779e0,{'statusCode':_0x20c3e6});if(!_0x2c6917)throw new MiscellaneousError({'statusCode':_0x20c3e6,'error':_0x4af979(0xac),'message':_0x5e5840[_0x4af979(0xbc)]||_0x4af979(0xb5)});switch(_0x20c3e6){case 0x190:throw new ValidationError(_0x2c6917);case 0x191:throw new UnauthorizedError(_0x2c6917);case 0x193:throw new ForbiddenError(_0x2c6917);case 0x194:throw new NotFoundError(_0x2c6917);case 0x198:throw new RequestTimeoutError(_0x2c6917);case 0x199:throw new ConflictError(_0x2c6917);default:if(_0x20c3e6>=0x1f4)throw new ServerError(_0x2c6917);throw new MiscellaneousError(_0x2c6917);}}
1
+ const a2_0x92ec9d=a2_0x1d3c;(function(_0x4deebc,_0x1fc191){const _0x29753f=a2_0x1d3c,_0x33fde8=_0x4deebc();while(!![]){try{const _0x23024c=-parseInt(_0x29753f(0x1b9))/0x1*(parseInt(_0x29753f(0x1b2))/0x2)+parseInt(_0x29753f(0x1b1))/0x3+parseInt(_0x29753f(0x1b5))/0x4*(parseInt(_0x29753f(0x1ba))/0x5)+parseInt(_0x29753f(0x1be))/0x6*(parseInt(_0x29753f(0x1bc))/0x7)+-parseInt(_0x29753f(0x1a8))/0x8*(parseInt(_0x29753f(0x1ae))/0x9)+-parseInt(_0x29753f(0x1a7))/0xa*(parseInt(_0x29753f(0x1b4))/0xb)+parseInt(_0x29753f(0x1aa))/0xc;if(_0x23024c===_0x1fc191)break;else _0x33fde8['push'](_0x33fde8['shift']());}catch(_0x1c3ec2){_0x33fde8['push'](_0x33fde8['shift']());}}}(a2_0x1121,0x7166b));export class ApiError extends Error{[a2_0x92ec9d(0x1ab)];constructor(_0x382556,_0x166c3e){const _0x5a4064=a2_0x92ec9d;super(_0x382556[_0x5a4064(0x1b8)],_0x166c3e),this[_0x5a4064(0x1bb)]=this['constructor'][_0x5a4064(0x1bb)],this[_0x5a4064(0x1ab)]=_0x382556;}}export class ValidationError extends ApiError{constructor(_0x309499,_0x182bc6){super(_0x309499,_0x182bc6);}}export class UnauthorizedError extends ApiError{constructor(_0x206703,_0x388cb7){super(_0x206703,_0x388cb7);}}export class ForbiddenError extends ApiError{constructor(_0xc20d81,_0x18ecd2){super(_0xc20d81,_0x18ecd2);}}export class NotFoundError extends ApiError{constructor(_0x3ffd19,_0x27a961){super(_0x3ffd19,_0x27a961);}}export class RequestTimeoutError extends ApiError{constructor(_0x4ca67f,_0x1fb65e){super(_0x4ca67f,_0x1fb65e);}}export class ConflictError extends ApiError{constructor(_0x4abe28,_0x423f4a){super(_0x4abe28,_0x423f4a);}}export class ServerError extends ApiError{constructor(_0x4df550,_0x45ec46){super(_0x4df550,_0x45ec46);}}export class MiscellaneousError extends ApiError{constructor(_0x53d136,_0x283cc8){super(_0x53d136,_0x283cc8);}}function a2_0x1d3c(_0xda9256,_0x3b8721){const _0x112100=a2_0x1121();return a2_0x1d3c=function(_0x1d3cf7,_0x11eab6){_0x1d3cf7=_0x1d3cf7-0x1a7;let _0x61602b=_0x112100[_0x1d3cf7];return _0x61602b;},a2_0x1d3c(_0xda9256,_0x3b8721);}export class MissingResponseError extends Error{constructor(_0x4c5490,_0x45df65){const _0x126331=a2_0x92ec9d;super(_0x4c5490,_0x45df65),this[_0x126331(0x1bb)]=_0x126331(0x1b7);}}export function parseErrorData(_0xc53bd6,_0x5303d5){const _0x22b805=a2_0x92ec9d;if(!_0xc53bd6)return undefined;if(typeof _0xc53bd6==='object'&&_0xc53bd6['statusCode']&&_0xc53bd6[_0x22b805(0x1b0)]&&_0xc53bd6['message'])return{'statusCode':_0xc53bd6[_0x22b805(0x1bd)],'error':_0xc53bd6['error'],'message':_0xc53bd6['message'],'errorCode':_0xc53bd6[_0x22b805(0x1ad)]};if(typeof _0xc53bd6===_0x22b805(0x1af)&&_0xc53bd6[_0x22b805(0x1b0)]&&!_0xc53bd6[_0x22b805(0x1b8)])return{'statusCode':_0x5303d5[_0x22b805(0x1bd)],'error':_0xc53bd6[_0x22b805(0x1b0)],'message':_0xc53bd6[_0x22b805(0x1b0)]};if(typeof _0xc53bd6==='object'&&_0xc53bd6[_0x22b805(0x1b0)]&&_0xc53bd6['message'])return{'statusCode':_0x5303d5[_0x22b805(0x1bd)],'error':_0xc53bd6[_0x22b805(0x1b0)],'message':_0xc53bd6[_0x22b805(0x1b8)],'errorCode':_0xc53bd6[_0x22b805(0x1ad)]};if(typeof _0xc53bd6===_0x22b805(0x1af)&&_0xc53bd6[_0x22b805(0x1b8)])return{'statusCode':_0x5303d5[_0x22b805(0x1bd)],'error':_0xc53bd6[_0x22b805(0x1b8)],'message':_0xc53bd6[_0x22b805(0x1b8)],'errorCode':_0xc53bd6[_0x22b805(0x1ad)]};if(typeof _0xc53bd6==='string')return{'statusCode':_0x5303d5[_0x22b805(0x1bd)],'error':_0xc53bd6,'message':_0xc53bd6};return undefined;}export function handleErrorResponse(_0x36fc71){const _0x4e23d3=a2_0x92ec9d;if(!_0x36fc71[_0x4e23d3(0x1ac)])throw new MissingResponseError(_0x36fc71[_0x4e23d3(0x1b8)]||_0x4e23d3(0x1a9));const {status:_0x11ebc6,data:_0x22bfd8}=_0x36fc71['response'],_0x2a6e58=parseErrorData(_0x22bfd8,{'statusCode':_0x11ebc6});if(!_0x2a6e58)throw new MiscellaneousError({'statusCode':_0x11ebc6,'error':_0x4e23d3(0x1b6),'message':_0x36fc71[_0x4e23d3(0x1b8)]||_0x4e23d3(0x1b3)});switch(_0x11ebc6){case 0x190:throw new ValidationError(_0x2a6e58);case 0x191:throw new UnauthorizedError(_0x2a6e58);case 0x193:throw new ForbiddenError(_0x2a6e58);case 0x194:throw new NotFoundError(_0x2a6e58);case 0x198:throw new RequestTimeoutError(_0x2a6e58);case 0x199:throw new ConflictError(_0x2a6e58);default:if(_0x11ebc6>=0x1f4)throw new ServerError(_0x2a6e58);throw new MiscellaneousError(_0x2a6e58);}}function a2_0x1121(){const _0x3b68ec=['Unknown\x20error','MissingResponseError','message','8969IlbLRs','5izkMOw','name','651LKotiP','statusCode','33900LDYgJt','140YBtwbC','1936VWBLDj','Network\x20error','2539128SJqilN','data','response','errorCode','34227oStQdx','object','error','2613612doEETP','28betTgc','An\x20error\x20occurred','418198gCdoBO','1737548BrNJzb'];a2_0x1121=function(){return _0x3b68ec;};return a2_0x1121();}
@@ -1 +1 @@
1
- function a3_0x3135(_0x328470,_0x2581b0){var _0x59d2e8=a3_0x59d2();return a3_0x3135=function(_0x31352e,_0x129aad){_0x31352e=_0x31352e-0x8a;var _0x2d998f=_0x59d2e8[_0x31352e];return _0x2d998f;},a3_0x3135(_0x328470,_0x2581b0);}(function(_0x13a1c9,_0x46c92a){var _0xebd7b=a3_0x3135,_0x541e05=_0x13a1c9();while(!![]){try{var _0xa5895f=parseInt(_0xebd7b(0x95))/0x1+parseInt(_0xebd7b(0x91))/0x2*(-parseInt(_0xebd7b(0x92))/0x3)+parseInt(_0xebd7b(0x94))/0x4*(-parseInt(_0xebd7b(0x8b))/0x5)+parseInt(_0xebd7b(0x90))/0x6*(parseInt(_0xebd7b(0x93))/0x7)+-parseInt(_0xebd7b(0x8a))/0x8*(-parseInt(_0xebd7b(0x8f))/0x9)+-parseInt(_0xebd7b(0x8e))/0xa+parseInt(_0xebd7b(0x8d))/0xb*(parseInt(_0xebd7b(0x8c))/0xc);if(_0xa5895f===_0x46c92a)break;else _0x541e05['push'](_0x541e05['shift']());}catch(_0x123321){_0x541e05['push'](_0x541e05['shift']());}}}(a3_0x59d2,0xa018c));export{default as ChecklyClient}from'./checkly-client.js';function a3_0x59d2(){var _0x462a3a=['24UGrbKu','4699398EPFnxX','2660520GNtAib','1648377PoNnfo','876108dBMiIE','820702ihlwbo','3BMXzdN','28ofdyem','5235148qbUOCv','1019285DBJVzr','8dOpSwq','5ASBbzq'];a3_0x59d2=function(){return _0x462a3a;};return a3_0x59d2();}export{TestResults}from'./test-results.js';export*from'./types.js';export*from'./errors.js';
1
+ (function(_0x1979ee,_0x3a2bb1){var _0x344ae4=a3_0x3c64,_0x210a68=_0x1979ee();while(!![]){try{var _0x38e890=-parseInt(_0x344ae4(0x83))/0x1*(parseInt(_0x344ae4(0x82))/0x2)+parseInt(_0x344ae4(0x8a))/0x3*(-parseInt(_0x344ae4(0x85))/0x4)+-parseInt(_0x344ae4(0x89))/0x5+parseInt(_0x344ae4(0x80))/0x6*(-parseInt(_0x344ae4(0x86))/0x7)+parseInt(_0x344ae4(0x8b))/0x8*(-parseInt(_0x344ae4(0x84))/0x9)+-parseInt(_0x344ae4(0x81))/0xa+parseInt(_0x344ae4(0x87))/0xb*(parseInt(_0x344ae4(0x88))/0xc);if(_0x38e890===_0x3a2bb1)break;else _0x210a68['push'](_0x210a68['shift']());}catch(_0x45221e){_0x210a68['push'](_0x210a68['shift']());}}}(a3_0x1188,0x5e1aa));function a3_0x1188(){var _0x4f9e7c=['408SJbPrJ','988280UWfZPv','1943382wKDxdT','2098710VntRYN','10490dwEcUi','125qfoTYR','45XvuoCD','19752kPjAHl','14DPHDXg','11JBlygt','41370804crzcHk','1297920eYjBQB'];a3_0x1188=function(){return _0x4f9e7c;};return a3_0x1188();}export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';export*from'./types.js';function a3_0x3c64(_0x1133ea,_0x4657aa){var _0x11889c=a3_0x1188();return a3_0x3c64=function(_0x3c64cb,_0x346f92){_0x3c64cb=_0x3c64cb-0x80;var _0x3ac0c8=_0x11889c[_0x3c64cb];return _0x3ac0c8;},a3_0x3c64(_0x1133ea,_0x4657aa);}export*from'./errors.js';
@@ -1 +1 @@
1
- function a4_0x2127(){const _0x2bff19=['/next/test-sessions/create','append','data','80omgTyP','161181sgZdnE','uploadTestResultAsset','getHeaders','api','679752mIVpVi','createTestSession','307106KYEvdI','3660NwsmCE','635621CpdJvo','assets.zip','assets','post','164208gfeoit','application/zip','1086xieYwD','200127qoTslm','/next/test-sessions/','/results/'];a4_0x2127=function(){return _0x2bff19;};return a4_0x2127();}function a4_0x4b6a(_0x2cc46b,_0x5e6a23){const _0x2127b4=a4_0x2127();return a4_0x4b6a=function(_0x4b6ab7,_0x530680){_0x4b6ab7=_0x4b6ab7-0x15e;let _0xa304ec=_0x2127b4[_0x4b6ab7];return _0xa304ec;},a4_0x4b6a(_0x2cc46b,_0x5e6a23);}const a4_0x2a8ed2=a4_0x4b6a;(function(_0x1c8b20,_0x1c4dd5){const _0x376706=a4_0x4b6a,_0x1bd86f=_0x1c8b20();while(!![]){try{const _0x32096e=-parseInt(_0x376706(0x16d))/0x1+parseInt(_0x376706(0x164))/0x2+-parseInt(_0x376706(0x16a))/0x3+parseInt(_0x376706(0x162))/0x4+-parseInt(_0x376706(0x165))/0x5*(-parseInt(_0x376706(0x16c))/0x6)+parseInt(_0x376706(0x166))/0x7+-parseInt(_0x376706(0x173))/0x8*(parseInt(_0x376706(0x15e))/0x9);if(_0x32096e===_0x1c4dd5)break;else _0x1bd86f['push'](_0x1bd86f['shift']());}catch(_0x5b01f6){_0x1bd86f['push'](_0x1bd86f['shift']());}}}(a4_0x2127,0x1b8c1));import a4_0x58266c from'form-data';export class TestResults{[a4_0x2a8ed2(0x161)];constructor(_0x3ca5ab){const _0x7ee85f=a4_0x2a8ed2;this[_0x7ee85f(0x161)]=_0x3ca5ab;}async[a4_0x2a8ed2(0x163)](_0xa1a0ab){const _0x548ee3=a4_0x2a8ed2,_0x3b3ab8=await this[_0x548ee3(0x161)][_0x548ee3(0x169)](_0x548ee3(0x170),_0xa1a0ab);return _0x3b3ab8[_0x548ee3(0x172)];}async[a4_0x2a8ed2(0x15f)](_0x4336bf,_0x112390,_0xf9f692){const _0x2e0d02=a4_0x2a8ed2,_0x4d9989=new a4_0x58266c();_0x4d9989[_0x2e0d02(0x171)](_0x2e0d02(0x168),_0xf9f692,{'filename':_0x2e0d02(0x167),'contentType':_0x2e0d02(0x16b)});const _0x8eb5be=await this['api'][_0x2e0d02(0x169)](_0x2e0d02(0x16e)+_0x4336bf+_0x2e0d02(0x16f)+_0x112390+'/assets',_0x4d9989,{'headers':{..._0x4d9989[_0x2e0d02(0x160)]()}});return _0x8eb5be[_0x2e0d02(0x172)];}async['updateTestResult'](_0x54f093,_0x5cbdf1,_0x34e9ed){const _0x1b2e80=a4_0x2a8ed2,_0x10b85b=await this[_0x1b2e80(0x161)][_0x1b2e80(0x169)](_0x1b2e80(0x16e)+_0x54f093+_0x1b2e80(0x16f)+_0x5cbdf1,_0x34e9ed);return _0x10b85b[_0x1b2e80(0x172)];}}
1
+ const a4_0x550c7f=a4_0x4818;(function(_0x1f8974,_0x38a933){const _0xc66613=a4_0x4818,_0x9e0bb2=_0x1f8974();while(!![]){try{const _0x4208c6=-parseInt(_0xc66613(0x17c))/0x1*(parseInt(_0xc66613(0x175))/0x2)+-parseInt(_0xc66613(0x17d))/0x3*(-parseInt(_0xc66613(0x169))/0x4)+-parseInt(_0xc66613(0x179))/0x5*(parseInt(_0xc66613(0x17e))/0x6)+-parseInt(_0xc66613(0x17b))/0x7*(parseInt(_0xc66613(0x171))/0x8)+-parseInt(_0xc66613(0x16e))/0x9+-parseInt(_0xc66613(0x167))/0xa+parseInt(_0xc66613(0x172))/0xb*(parseInt(_0xc66613(0x17a))/0xc);if(_0x4208c6===_0x38a933)break;else _0x9e0bb2['push'](_0x9e0bb2['shift']());}catch(_0x1487c2){_0x9e0bb2['push'](_0x9e0bb2['shift']());}}}(a4_0x5eaf,0x919cd));import a4_0x103103 from'form-data';function a4_0x4818(_0x536db6,_0x5a0da4){const _0x5eaf3a=a4_0x5eaf();return a4_0x4818=function(_0x4818fb,_0x2ddc5b){_0x4818fb=_0x4818fb-0x167;let _0x1ed335=_0x5eaf3a[_0x4818fb];return _0x1ed335;},a4_0x4818(_0x536db6,_0x5a0da4);}export class TestResults{[a4_0x550c7f(0x16f)];constructor(_0x2455ac){const _0x3330f5=a4_0x550c7f;this[_0x3330f5(0x16f)]=_0x2455ac;}async[a4_0x550c7f(0x173)](_0x4d180c){const _0xae34eb=a4_0x550c7f,_0x550bc9=await this[_0xae34eb(0x16f)]['post'](_0xae34eb(0x177),_0x4d180c);return _0x550bc9[_0xae34eb(0x170)];}async['uploadTestResultAsset'](_0x59a6ef,_0x1ebc26,_0x1a844c){const _0x469896=a4_0x550c7f,_0x5c7b20=new a4_0x103103();_0x5c7b20[_0x469896(0x174)]('assets',_0x1a844c,{'filename':_0x469896(0x16a),'contentType':_0x469896(0x176)});const _0x1beb9a=await this[_0x469896(0x16f)][_0x469896(0x16b)](_0x469896(0x16d)+_0x59a6ef+'/results/'+_0x1ebc26+_0x469896(0x16c),_0x5c7b20,{'headers':{..._0x5c7b20[_0x469896(0x168)]()}});return _0x1beb9a['data'];}async['updateTestResult'](_0x2ca77f,_0x339245,_0x1e4177){const _0x53bea1=a4_0x550c7f,_0x47d226=await this['api'][_0x53bea1(0x16b)](_0x53bea1(0x16d)+_0x2ca77f+_0x53bea1(0x178)+_0x339245,_0x1e4177);return _0x47d226[_0x53bea1(0x170)];}}function a4_0x5eaf(){const _0x2ea39d=['assets.zip','post','/assets','/next/test-sessions/','3323511MGDJgk','api','data','8FTvInP','16555187zXtuAg','createTestSession','append','532516llvHKy','application/zip','/next/test-sessions/create','/results/','65KEVLPY','24bKYbGB','190799bTIgiD','2hGaLQy','19938vpIkRa','529668PqpkwH','4100450DcvtBf','getHeaders','44IHTDrC'];a4_0x5eaf=function(){return _0x2ea39d;};return a4_0x5eaf();}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- function a6_0x52f5(_0x1ff4e9,_0x1fcba8){var _0x143d03=a6_0x143d();return a6_0x52f5=function(_0x52f5f6,_0x27cd8f){_0x52f5f6=_0x52f5f6-0x19c;var _0x55e58b=_0x143d03[_0x52f5f6];return _0x55e58b;},a6_0x52f5(_0x1ff4e9,_0x1fcba8);}function a6_0x143d(){var _0x28905e=['1891468cIaMuw','6jYREIz','2473980kROXHI','2EtzZNe','729272wtXKpT','2714832vrlXvl','469265huhsFS','1863777TLHtci','962171jeZiEB'];a6_0x143d=function(){return _0x28905e;};return a6_0x143d();}(function(_0x5236fb,_0x52eda1){var _0x46bb5e=a6_0x52f5,_0x4bbac6=_0x5236fb();while(!![]){try{var _0x391cd5=-parseInt(_0x46bb5e(0x1a1))/0x1+parseInt(_0x46bb5e(0x19e))/0x2*(-parseInt(_0x46bb5e(0x1a2))/0x3)+parseInt(_0x46bb5e(0x1a4))/0x4+parseInt(_0x46bb5e(0x19d))/0x5+parseInt(_0x46bb5e(0x19c))/0x6*(parseInt(_0x46bb5e(0x1a3))/0x7)+parseInt(_0x46bb5e(0x19f))/0x8+parseInt(_0x46bb5e(0x1a0))/0x9;if(_0x391cd5===_0x52eda1)break;else _0x4bbac6['push'](_0x4bbac6['shift']());}catch(_0x3d2ae7){_0x4bbac6['push'](_0x4bbac6['shift']());}}}(a6_0x143d,0x63767));export{ChecklyReporter}from'./reporter.js';export{AssetCollector}from'./asset-collector.js';export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';
1
+ (function(_0x41c7b4,_0x405170){var _0x3fe97c=a6_0x5343,_0x30d52f=_0x41c7b4();while(!![]){try{var _0x3d8a04=-parseInt(_0x3fe97c(0x123))/0x1+-parseInt(_0x3fe97c(0x121))/0x2+-parseInt(_0x3fe97c(0x125))/0x3+-parseInt(_0x3fe97c(0x11f))/0x4+parseInt(_0x3fe97c(0x124))/0x5*(-parseInt(_0x3fe97c(0x122))/0x6)+parseInt(_0x3fe97c(0x11e))/0x7+parseInt(_0x3fe97c(0x120))/0x8;if(_0x3d8a04===_0x405170)break;else _0x30d52f['push'](_0x30d52f['shift']());}catch(_0x3f2c0b){_0x30d52f['push'](_0x30d52f['shift']());}}}(a6_0x5c9b,0xb8204));export{ChecklyReporter}from'./reporter.js';function a6_0x5343(_0x4293d3,_0x3418b7){var _0x5c9bd1=a6_0x5c9b();return a6_0x5343=function(_0x5343a3,_0x375ba4){_0x5343a3=_0x5343a3-0x11e;var _0x11769d=_0x5c9bd1[_0x5343a3];return _0x11769d;},a6_0x5343(_0x4293d3,_0x3418b7);}export{AssetCollector}from'./asset-collector.js';export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';function a6_0x5c9b(){var _0x21b3fb=['8247806Yeafru','142480ccJMiq','28250744DlkuhL','1485774epkipQ','42AJAZCQ','1153894wygeaZ','830565npIoLP','2580687XVGTEC'];a6_0x5c9b=function(){return _0x21b3fb;};return a6_0x5c9b();}
package/dist/reporter.js CHANGED
@@ -1 +1 @@
1
- const a7_0x12a85f=a7_0x5a2b;function a7_0x1f90(){const _0x4a87b9=['[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:','unlinkSync','testCounts','zipper','warn','GITHUB_ACTOR','dryRun','log','PluralRules','retry','http://127.0.0.1:3000','📔\x20','36ycUGYd','assetId','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','984109YdDiUq','env','entries','size','testSession','\x20\x20reporter:\x20[\x0a','GITHUB_REPOSITORY','outcome','zipPath','test-results/playwright-test-report.json','playwright-tests','production','message','252lBTVYY','testSessionId','\x0a======================================================','onError','https://api-dev.checklyhq.com','createReadStream','toISOString','testResultsDir','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','Playwright\x20Test\x20Session:\x20','[Checkly\x20Reporter]\x20Global\x20error:','GITHUB_SHA','collectAssets','length','cwd','assetCollector','testResults','error','options','url','accountId','join','test-results','getAxiosInstance','PW_REPORTER','map','readFileSync','jsonReportPath','[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:','6VJyblk','max','parse','substring','development','\x22,\x20using\x20\x22production\x22','68660JyDqQk','113514eAMPAC','GITHUB_EVENT_NAME','🦝\x20Checkly\x20reporter:\x20','flaky','FAILED','CHECKLY_ACCOUNT_ID','promises','status','onEnd','stat','4504969WcATbQ','link','11zKMPqR','config','failed','https://api.checklyhq.com','testResultId','startTime','Project','\x0a======================================================\x0a','passed','includes','24471108lvxYhP','apiKey','projects','Projects','getTime','uploadTestResultAsset','staging','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','outputPath','utf-8','uploadResults','https://api-test.checklyhq.com','catch','969444tAApwj','printSummary','10rtLFJS','environment','existsSync','package.json','🎭\x20Playwright:\x20','5777168hngWaU'];a7_0x1f90=function(){return _0x4a87b9;};return a7_0x1f90();}(function(_0x13dfa4,_0x3170dd){const _0x5a57d1=a7_0x5a2b,_0x493cc0=_0x13dfa4();while(!![]){try{const _0x4ef690=parseInt(_0x5a57d1(0x131))/0x1+parseInt(_0x5a57d1(0x162))/0x2*(parseInt(_0x5a57d1(0x12e))/0x3)+parseInt(_0x5a57d1(0x13e))/0x4*(parseInt(_0x5a57d1(0x161))/0x5)+parseInt(_0x5a57d1(0x15b))/0x6*(parseInt(_0x5a57d1(0x16c))/0x7)+-parseInt(_0x5a57d1(0x121))/0x8+-parseInt(_0x5a57d1(0x11a))/0x9*(-parseInt(_0x5a57d1(0x11c))/0xa)+parseInt(_0x5a57d1(0x16e))/0xb*(-parseInt(_0x5a57d1(0x178))/0xc);if(_0x4ef690===_0x3170dd)break;else _0x493cc0['push'](_0x493cc0['shift']());}catch(_0x2be90e){_0x493cc0['push'](_0x493cc0['shift']());}}}(a7_0x1f90,0x7effb));import*as a7_0x1562bd from'fs';import*as a7_0x46ac3e from'path';function a7_0x5a2b(_0xdfcf77,_0x259a28){const _0x1f90ea=a7_0x1f90();return a7_0x5a2b=function(_0x5a2bde,_0x342b65){_0x5a2bde=_0x5a2bde-0x11a;let _0x1f5e14=_0x1f90ea[_0x5a2bde];return _0x1f5e14;},a7_0x5a2b(_0xdfcf77,_0x259a28);}import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0x4fdafc from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';const __filename=fileURLToPath(import.meta[a7_0x12a85f(0x151)]),__dirname=dirname(__filename),packageJson=JSON[a7_0x12a85f(0x15d)](readFileSync(join(__dirname,'..',a7_0x12a85f(0x11f)),a7_0x12a85f(0x181))),pkgVersion=packageJson['version'],pluralRules=new Intl[(a7_0x12a85f(0x12a))]('en-US'),projectForms={'zero':a7_0x12a85f(0x174),'one':a7_0x12a85f(0x174),'two':'Projects','few':a7_0x12a85f(0x17b),'many':a7_0x12a85f(0x17b),'other':a7_0x12a85f(0x17b)};function getApiUrl(_0x353b30){const _0x2deb3f=a7_0x12a85f,_0x3a714a={'local':_0x2deb3f(0x12c),'development':_0x2deb3f(0x142),'staging':_0x2deb3f(0x183),'production':_0x2deb3f(0x171)};return _0x3a714a[_0x353b30];}function getEnvironment(_0xa36932){const _0x40a1e3=a7_0x12a85f,_0x129c47=_0xa36932?.[_0x40a1e3(0x11d)],_0x136b81=process[_0x40a1e3(0x132)]['CHECKLY_ENV'],_0x1b5663=_0x129c47||_0x136b81||_0x40a1e3(0x13c),_0x165916=['local',_0x40a1e3(0x15f),_0x40a1e3(0x17e),_0x40a1e3(0x13c)];if(!_0x165916[_0x40a1e3(0x177)](_0x1b5663))return console[_0x40a1e3(0x126)]('[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22'+_0x1b5663+_0x40a1e3(0x160)),_0x40a1e3(0x13c);return _0x1b5663;}function getDirectoryName(){const _0x1f5ecf=a7_0x12a85f,_0x5666a8=process[_0x1f5ecf(0x14c)]();let _0x4b6c2f=a7_0x46ac3e['basename'](_0x5666a8);return(!_0x4b6c2f||_0x4b6c2f==='/'||_0x4b6c2f==='.')&&(_0x4b6c2f=_0x1f5ecf(0x13b)),_0x4b6c2f=_0x4b6c2f['replace'](/[<>:"|?*]/g,'-'),_0x4b6c2f['length']>0xff&&(_0x4b6c2f=_0x4b6c2f[_0x1f5ecf(0x15e)](0x0,0xff)),_0x4b6c2f;}export class ChecklyReporter{['options'];[a7_0x12a85f(0x14d)];[a7_0x12a85f(0x125)];[a7_0x12a85f(0x14e)];['testSession'];[a7_0x12a85f(0x173)];['testCounts']={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0xd07bfe={}){const _0x25f09f=a7_0x12a85f,_0x960312=getEnvironment(_0xd07bfe),_0x3f504b=getApiUrl(_0x960312),_0x2afec7=process[_0x25f09f(0x132)]['CHECKLY_API_KEY']||_0xd07bfe[_0x25f09f(0x179)],_0x1633cf=process[_0x25f09f(0x132)][_0x25f09f(0x167)]||_0xd07bfe['accountId'];this[_0x25f09f(0x150)]={'accountId':_0x1633cf,'apiKey':_0x2afec7,'outputPath':_0xd07bfe['outputPath']??'checkly-report.zip','jsonReportPath':_0xd07bfe[_0x25f09f(0x159)]??_0x25f09f(0x13a),'testResultsDir':_0xd07bfe[_0x25f09f(0x145)]??_0x25f09f(0x154),'dryRun':_0xd07bfe[_0x25f09f(0x128)]??![]},this[_0x25f09f(0x14d)]=new AssetCollector(this[_0x25f09f(0x150)][_0x25f09f(0x145)]),this[_0x25f09f(0x125)]=new Zipper({'outputPath':this[_0x25f09f(0x150)][_0x25f09f(0x180)]});if(!this[_0x25f09f(0x150)][_0x25f09f(0x128)]&&this['options'][_0x25f09f(0x179)]&&this[_0x25f09f(0x150)]['accountId']){const _0x25485b=new a7_0x4fdafc({'apiKey':this[_0x25f09f(0x150)][_0x25f09f(0x179)],'accountId':this['options'][_0x25f09f(0x152)],'baseUrl':_0x3f504b});this[_0x25f09f(0x14e)]=new TestResults(_0x25485b[_0x25f09f(0x155)]());}}['onBegin'](_0x497a61,_0x1938ed){const _0x44b37a=a7_0x12a85f;this[_0x44b37a(0x173)]=new Date();if(!this[_0x44b37a(0x14e)])return;try{const _0xcf5354=getDirectoryName(),_0x123967=[{'name':_0xcf5354}],_0x4481d9=process[_0x44b37a(0x132)][_0x44b37a(0x137)]?'https://github.com/'+process['env'][_0x44b37a(0x137)]:undefined,_0x1f1266=_0x4481d9?{'repoUrl':_0x4481d9,'commitId':process[_0x44b37a(0x132)][_0x44b37a(0x149)],'branchName':process['env']['GITHUB_REF_NAME'],'commitOwner':process[_0x44b37a(0x132)][_0x44b37a(0x127)],'commitMessage':process[_0x44b37a(0x132)][_0x44b37a(0x163)]}:undefined;this['testResults']['createTestSession']({'name':_0x44b37a(0x147)+_0xcf5354,'environment':process[_0x44b37a(0x132)]['NODE_ENV']||'test','repoInfo':_0x1f1266,'startedAt':this[_0x44b37a(0x173)]['getTime'](),'testResults':_0x123967,'provider':_0x44b37a(0x156)})['then'](_0xd44dc4=>{const _0x2dfc58=_0x44b37a;this[_0x2dfc58(0x135)]=_0xd44dc4,_0xd44dc4[_0x2dfc58(0x16d)]&&console[_0x2dfc58(0x129)]('\x0a🔗\x20View\x20test\x20session:\x20'+_0xd44dc4[_0x2dfc58(0x16d)]+'\x0a');})[_0x44b37a(0x184)](_0x3d5983=>{const _0x330b69=_0x44b37a;console[_0x330b69(0x14f)]('[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:',_0x3d5983['message']);});}catch(_0x489649){console[_0x44b37a(0x14f)]('[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:',_0x489649);}}['onTestEnd'](_0x1b5051,_0x51efc7){const _0x3294f=a7_0x12a85f;try{const _0x5c1714=_0x51efc7[_0x3294f(0x169)]==='passed'||_0x51efc7[_0x3294f(0x12b)]===_0x1b5051['retries'];if(!_0x5c1714)return;const _0x3ba395=_0x1b5051[_0x3294f(0x138)]()===_0x3294f(0x165);if(_0x3ba395)this[_0x3294f(0x124)][_0x3294f(0x165)]++,this[_0x3294f(0x124)][_0x3294f(0x176)]++;else{if(_0x51efc7[_0x3294f(0x169)]===_0x3294f(0x176))this[_0x3294f(0x124)][_0x3294f(0x176)]++;else _0x51efc7['status']===_0x3294f(0x170)&&this['testCounts'][_0x3294f(0x170)]++;}}catch(_0x28a846){console[_0x3294f(0x14f)](_0x3294f(0x17f),_0x28a846);}}async[a7_0x12a85f(0x16a)](){const _0xb90d01=a7_0x12a85f;try{const _0x41b4bb=this[_0xb90d01(0x150)][_0xb90d01(0x159)];if(!a7_0x1562bd[_0xb90d01(0x11e)](_0x41b4bb)){console[_0xb90d01(0x14f)]('[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20'+_0x41b4bb),console[_0xb90d01(0x14f)](_0xb90d01(0x122)),console[_0xb90d01(0x14f)](_0xb90d01(0x136)+'\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a'+_0xb90d01(0x130)+'\x20\x20]');return;}const _0xbe845e=a7_0x1562bd[_0xb90d01(0x158)](_0x41b4bb,_0xb90d01(0x181)),_0x1c1091=JSON[_0xb90d01(0x15d)](_0xbe845e),_0x56a6bd=await this[_0xb90d01(0x14d)][_0xb90d01(0x14a)](_0x1c1091),_0x2b6baf=await this['zipper']['createZip'](_0x41b4bb,_0x56a6bd);if(this[_0xb90d01(0x14e)]&&this['testSession']){await this['uploadResults'](_0x1c1091,_0x2b6baf['zipPath'],_0x2b6baf[_0xb90d01(0x133)]);if(!this[_0xb90d01(0x150)][_0xb90d01(0x128)])try{a7_0x1562bd[_0xb90d01(0x123)](_0x2b6baf[_0xb90d01(0x139)]);}catch(_0x4391b7){console['warn'](_0xb90d01(0x146)+_0x4391b7);}}this[_0xb90d01(0x14e)]&&this[_0xb90d01(0x135)]?.[_0xb90d01(0x16d)]&&this[_0xb90d01(0x11b)](_0x1c1091,this[_0xb90d01(0x135)]);}catch(_0x583421){console[_0xb90d01(0x14f)]('[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:',_0x583421);}}[a7_0x12a85f(0x11b)](_0xefc31a,_0x45d05f){const _0x44bb0f=a7_0x12a85f,_0x12c650=pluralRules['select'](_0xefc31a['config'][_0x44bb0f(0x17a)][_0x44bb0f(0x14b)]);console[_0x44bb0f(0x129)](_0x44bb0f(0x175)),console[_0x44bb0f(0x129)](_0x44bb0f(0x164)+pkgVersion),console[_0x44bb0f(0x129)](_0x44bb0f(0x120)+_0xefc31a[_0x44bb0f(0x16f)]['version']),console[_0x44bb0f(0x129)](_0x44bb0f(0x12d)+projectForms[_0x12c650]+':\x20'+_0xefc31a[_0x44bb0f(0x16f)][_0x44bb0f(0x17a)][_0x44bb0f(0x157)](({name:_0x45a1fc})=>_0x45a1fc)[_0x44bb0f(0x153)](',')),console['log']('🔗\x20Test\x20session\x20URL:\x20'+_0x45d05f[_0x44bb0f(0x16d)]),console['log'](_0x44bb0f(0x140));}async[a7_0x12a85f(0x182)](_0x459737,_0x2b48fa,_0x739a62){const _0x24365d=a7_0x12a85f;if(!this['testResults']||!this[_0x24365d(0x135)])return;try{const {failed:_0x1e1b6d,flaky:_0x115060}=this['testCounts'],_0x45fb2c=_0x1e1b6d>0x0?_0x24365d(0x166):'PASSED',_0x1e72d2=_0x1e1b6d===0x0&&_0x115060>0x0,_0x3d05f0=new Date(),_0x260886=this['startTime']?Math[_0x24365d(0x15c)](0x0,_0x3d05f0[_0x24365d(0x17c)]()-this[_0x24365d(0x173)][_0x24365d(0x17c)]()):0x0,_0x1b7e02=(await a7_0x1562bd[_0x24365d(0x168)][_0x24365d(0x16b)](_0x2b48fa))[_0x24365d(0x134)];if(this[_0x24365d(0x135)]['testResults']['length']>0x0){const _0x2f135d=this[_0x24365d(0x135)][_0x24365d(0x14e)][0x0];let _0xb269e6;if(_0x1b7e02>0x0)try{const _0x15013c=a7_0x1562bd[_0x24365d(0x143)](_0x2b48fa),_0x448d9e=await this[_0x24365d(0x14e)][_0x24365d(0x17d)](this[_0x24365d(0x135)][_0x24365d(0x13f)],_0x2f135d['testResultId'],_0x15013c);_0xb269e6=_0x448d9e[_0x24365d(0x12f)];}catch(_0x149026){const _0x3ef7a9=_0x149026 instanceof Error?_0x149026[_0x24365d(0x13d)]:String(_0x149026);console['error'](_0x24365d(0x15a),_0x3ef7a9);}await this[_0x24365d(0x14e)]['updateTestResult'](this['testSession']['testSessionId'],_0x2f135d[_0x24365d(0x172)],{'status':_0x45fb2c,'assetEntries':_0xb269e6?_0x739a62:undefined,'isDegraded':_0x1e72d2,'startedAt':this[_0x24365d(0x173)]?.[_0x24365d(0x144)](),'stoppedAt':_0x3d05f0[_0x24365d(0x144)](),'responseTime':_0x260886,'metadata':{'usageData':{'s3PostTotalBytes':_0x1b7e02}}});}}catch(_0xb933d6){const _0x370348=_0xb933d6 instanceof Error?_0xb933d6[_0x24365d(0x13d)]:String(_0xb933d6);console[_0x24365d(0x14f)]('[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:',_0x370348);}}[a7_0x12a85f(0x141)](_0x22e9ce){const _0x308672=a7_0x12a85f;console[_0x308672(0x14f)](_0x308672(0x148),_0x22e9ce);}}
1
+ const a7_0x244810=a7_0xaf7b;(function(_0x3a4fdd,_0x136404){const _0x4fbca8=a7_0xaf7b,_0x4d7aa5=_0x3a4fdd();while(!![]){try{const _0x457235=-parseInt(_0x4fbca8(0x7f))/0x1*(parseInt(_0x4fbca8(0xcc))/0x2)+parseInt(_0x4fbca8(0x79))/0x3*(-parseInt(_0x4fbca8(0x9b))/0x4)+-parseInt(_0x4fbca8(0xc7))/0x5*(-parseInt(_0x4fbca8(0x89))/0x6)+-parseInt(_0x4fbca8(0xbc))/0x7+-parseInt(_0x4fbca8(0xc0))/0x8+parseInt(_0x4fbca8(0xb3))/0x9+parseInt(_0x4fbca8(0x71))/0xa*(parseInt(_0x4fbca8(0xbf))/0xb);if(_0x457235===_0x136404)break;else _0x4d7aa5['push'](_0x4d7aa5['shift']());}catch(_0x8b8bff){_0x4d7aa5['push'](_0x4d7aa5['shift']());}}}(a7_0x5baf,0x1fff8));import*as a7_0x197052 from'fs';function a7_0xaf7b(_0x23951b,_0x309cf3){const _0x5baf19=a7_0x5baf();return a7_0xaf7b=function(_0xaf7bdb,_0x4505b6){_0xaf7bdb=_0xaf7bdb-0x66;let _0x50c481=_0x5baf19[_0xaf7bdb];return _0x50c481;},a7_0xaf7b(_0x23951b,_0x309cf3);}import*as a7_0x5ad403 from'path';import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0x392266 from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';function a7_0x5baf(){const _0xb47bea=['outputPath','https://api.checklyhq.com','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','onTestEnd','GITHUB_SHA','[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:','testResultsDir','getAxiosInstance','playwright-tests','accountId','PluralRules','CHECKLY_ACCOUNT_ID','testResultId','\x22,\x20using\x20\x22production\x22','includes','replace','Projects','warn','📔\x20','checkly-report.zip','875466XsvHXI','\x0a======================================================','jsonReportPath','GITHUB_ACTOR','assetCollector','log','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','\x0a======================================================\x0a','link','134953ZFSPeF','createTestSession','entries','11jQiZUP','660112RTPvud','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','test-results/playwright-test-report.json','status','env','existsSync','\x20\x20reporter:\x20[\x0a','85UkiUoP','config','onError','PW_REPORTER','getTime','270rFvsnj','unlinkSync','readFileSync','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','zipper','[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:','uploadTestResultAsset','\x0a🔗\x20View\x20test\x20session:\x20','updateTestResult','join','retries','environment','CHECKLY_ENV','passed','FAILED','CHECKLY_API_KEY','then','createReadStream','testSessionId','url','error','package.json','🔗\x20Test\x20session\x20URL:\x20','retry','testSession','🦝\x20Checkly\x20reporter:\x20','1190960HqGqRL','https://api-test.checklyhq.com','production','utf-8','testResults','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','\x20\x20]','🎭\x20Playwright:\x20','1719cSSOZf','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','startTime','GITHUB_REPOSITORY','basename','promises','1361GRPgpP','onBegin','message','http://127.0.0.1:3000','stat','printSummary','GITHUB_EVENT_NAME','toISOString','version','PASSED','92508lBNFPm','parse','[Checkly\x20Reporter]\x20Global\x20error:','options','testCounts','en-US','failed','max','flaky','dryRun','size','Project','development','apiKey','outcome','length','staging','zipPath','432NFzpqc','projects','uploadResults','cwd'];a7_0x5baf=function(){return _0xb47bea;};return a7_0x5baf();}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';const __filename=fileURLToPath(import.meta[a7_0x244810(0x6a)]),__dirname=dirname(__filename),packageJson=JSON[a7_0x244810(0x8a)](readFileSync(join(__dirname,'..',a7_0x244810(0x6c)),a7_0x244810(0x74))),pkgVersion=packageJson[a7_0x244810(0x87)],pluralRules=new Intl[(a7_0x244810(0xa9))](a7_0x244810(0x8e)),projectForms={'zero':a7_0x244810(0x94),'one':'Project','two':a7_0x244810(0xaf),'few':a7_0x244810(0xaf),'many':'Projects','other':'Projects'};function getApiUrl(_0x3d1e1d){const _0x160d58=a7_0x244810,_0x1b823b={'local':_0x160d58(0x82),'development':'https://api-dev.checklyhq.com','staging':_0x160d58(0x72),'production':_0x160d58(0xa0)};return _0x1b823b[_0x3d1e1d];}function getEnvironment(_0x197994){const _0x4295e1=a7_0x244810,_0x526b1a=_0x197994?.[_0x4295e1(0xd7)],_0x5f4355=process[_0x4295e1(0xc4)][_0x4295e1(0xd8)],_0x3cc055=_0x526b1a||_0x5f4355||_0x4295e1(0x73),_0x324f71=['local',_0x4295e1(0x95),_0x4295e1(0x99),_0x4295e1(0x73)];if(!_0x324f71[_0x4295e1(0xad)](_0x3cc055))return console['warn'](_0x4295e1(0xa1)+_0x3cc055+_0x4295e1(0xac)),_0x4295e1(0x73);return _0x3cc055;}function getDirectoryName(){const _0x2bc3e4=a7_0x244810,_0x4f2d40=process[_0x2bc3e4(0x9e)]();let _0x132d73=a7_0x5ad403[_0x2bc3e4(0x7d)](_0x4f2d40);return(!_0x132d73||_0x132d73==='/'||_0x132d73==='.')&&(_0x132d73=_0x2bc3e4(0xa7)),_0x132d73=_0x132d73[_0x2bc3e4(0xae)](/[<>:"|?*]/g,'-'),_0x132d73[_0x2bc3e4(0x98)]>0xff&&(_0x132d73=_0x132d73['substring'](0x0,0xff)),_0x132d73;}export class ChecklyReporter{['options'];['assetCollector'];['zipper'];[a7_0x244810(0x75)];['testSession'];[a7_0x244810(0x7b)];[a7_0x244810(0x8d)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x5b471c={}){const _0x2b6e2f=a7_0x244810,_0x445e9e=getEnvironment(_0x5b471c),_0x4a49bc=getApiUrl(_0x445e9e),_0xd37938=process['env'][_0x2b6e2f(0x66)]||_0x5b471c['apiKey'],_0x2eaa68=process[_0x2b6e2f(0xc4)][_0x2b6e2f(0xaa)]||_0x5b471c['accountId'];this[_0x2b6e2f(0x8c)]={'accountId':_0x2eaa68,'apiKey':_0xd37938,'outputPath':_0x5b471c[_0x2b6e2f(0x9f)]??_0x2b6e2f(0xb2),'jsonReportPath':_0x5b471c[_0x2b6e2f(0xb5)]??_0x2b6e2f(0xc2),'testResultsDir':_0x5b471c[_0x2b6e2f(0xa5)]??'test-results','dryRun':_0x5b471c[_0x2b6e2f(0x92)]??![]},this[_0x2b6e2f(0xb7)]=new AssetCollector(this[_0x2b6e2f(0x8c)][_0x2b6e2f(0xa5)]),this[_0x2b6e2f(0xd0)]=new Zipper({'outputPath':this[_0x2b6e2f(0x8c)]['outputPath']});if(!this[_0x2b6e2f(0x8c)][_0x2b6e2f(0x92)]&&this[_0x2b6e2f(0x8c)][_0x2b6e2f(0x96)]&&this[_0x2b6e2f(0x8c)][_0x2b6e2f(0xa8)]){const _0x13c347=new a7_0x392266({'apiKey':this[_0x2b6e2f(0x8c)][_0x2b6e2f(0x96)],'accountId':this['options'][_0x2b6e2f(0xa8)],'baseUrl':_0x4a49bc});this['testResults']=new TestResults(_0x13c347[_0x2b6e2f(0xa6)]());}}[a7_0x244810(0x80)](_0x2df6e6,_0x3339f9){const _0x487736=a7_0x244810;this[_0x487736(0x7b)]=new Date();if(!this[_0x487736(0x75)])return;try{const _0x4823df=getDirectoryName(),_0x23aa94=[{'name':_0x4823df}],_0x3308bc=process['env'][_0x487736(0x7c)]?'https://github.com/'+process[_0x487736(0xc4)][_0x487736(0x7c)]:undefined,_0x5ec80d=_0x3308bc?{'repoUrl':_0x3308bc,'commitId':process['env'][_0x487736(0xa3)],'branchName':process[_0x487736(0xc4)]['GITHUB_REF_NAME'],'commitOwner':process[_0x487736(0xc4)][_0x487736(0xb6)],'commitMessage':process[_0x487736(0xc4)][_0x487736(0x85)]}:undefined;this[_0x487736(0x75)][_0x487736(0xbd)]({'name':'Playwright\x20Test\x20Session:\x20'+_0x4823df,'environment':process['env']['NODE_ENV']||'test','repoInfo':_0x5ec80d,'startedAt':this['startTime']['getTime'](),'testResults':_0x23aa94,'provider':_0x487736(0xca)})[_0x487736(0x67)](_0x4b8d03=>{const _0x15782e=_0x487736;this[_0x15782e(0x6f)]=_0x4b8d03,_0x4b8d03[_0x15782e(0xbb)]&&console[_0x15782e(0xb8)](_0x15782e(0xd3)+_0x4b8d03['link']+'\x0a');})['catch'](_0x2219a7=>{const _0x63f42a=_0x487736;console[_0x63f42a(0x6b)](_0x63f42a(0x7a),_0x2219a7[_0x63f42a(0x81)]);});}catch(_0x40020b){console['error'](_0x487736(0xd1),_0x40020b);}}[a7_0x244810(0xa2)](_0x56f5f7,_0x268351){const _0x17e7ee=a7_0x244810;try{const _0x4b2496=_0x268351[_0x17e7ee(0xc3)]==='passed'||_0x268351[_0x17e7ee(0x6e)]===_0x56f5f7[_0x17e7ee(0xd6)];if(!_0x4b2496)return;const _0x26d380=_0x56f5f7[_0x17e7ee(0x97)]()==='flaky';if(_0x26d380)this[_0x17e7ee(0x8d)][_0x17e7ee(0x91)]++,this[_0x17e7ee(0x8d)]['passed']++;else{if(_0x268351[_0x17e7ee(0xc3)]==='passed')this['testCounts'][_0x17e7ee(0xd9)]++;else _0x268351[_0x17e7ee(0xc3)]===_0x17e7ee(0x8f)&&this[_0x17e7ee(0x8d)][_0x17e7ee(0x8f)]++;}}catch(_0x5d05ed){console[_0x17e7ee(0x6b)](_0x17e7ee(0xc1),_0x5d05ed);}}async['onEnd'](){const _0x2b71ea=a7_0x244810;try{const _0x3e239b=this[_0x2b71ea(0x8c)][_0x2b71ea(0xb5)];if(!a7_0x197052[_0x2b71ea(0xc5)](_0x3e239b)){console['error'](_0x2b71ea(0xb9)+_0x3e239b),console[_0x2b71ea(0x6b)]('[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:'),console[_0x2b71ea(0x6b)](_0x2b71ea(0xc6)+_0x2b71ea(0x76)+_0x2b71ea(0xcf)+_0x2b71ea(0x77));return;}const _0x5c9f11=a7_0x197052[_0x2b71ea(0xce)](_0x3e239b,_0x2b71ea(0x74)),_0x2bf56a=JSON[_0x2b71ea(0x8a)](_0x5c9f11),_0x3b551b=await this['assetCollector']['collectAssets'](_0x2bf56a),_0x19b581=await this[_0x2b71ea(0xd0)]['createZip'](_0x3e239b,_0x3b551b);if(this[_0x2b71ea(0x75)]&&this[_0x2b71ea(0x6f)]){await this[_0x2b71ea(0x9d)](_0x2bf56a,_0x19b581['zipPath'],_0x19b581[_0x2b71ea(0xbe)]);if(!this['options']['dryRun'])try{a7_0x197052[_0x2b71ea(0xcd)](_0x19b581[_0x2b71ea(0x9a)]);}catch(_0x1474c7){console[_0x2b71ea(0xb0)]('[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20'+_0x1474c7);}}this['testResults']&&this[_0x2b71ea(0x6f)]?.[_0x2b71ea(0xbb)]&&this[_0x2b71ea(0x84)](_0x2bf56a,this[_0x2b71ea(0x6f)]);}catch(_0x4a3643){console[_0x2b71ea(0x6b)](_0x2b71ea(0xa4),_0x4a3643);}}[a7_0x244810(0x84)](_0xeb017f,_0x565bc8){const _0x3f7345=a7_0x244810,_0x2305ec=pluralRules['select'](_0xeb017f['config'][_0x3f7345(0x9c)][_0x3f7345(0x98)]);console[_0x3f7345(0xb8)](_0x3f7345(0xba)),console['log'](_0x3f7345(0x70)+pkgVersion),console[_0x3f7345(0xb8)](_0x3f7345(0x78)+_0xeb017f[_0x3f7345(0xc8)][_0x3f7345(0x87)]),console['log'](_0x3f7345(0xb1)+projectForms[_0x2305ec]+':\x20'+_0xeb017f[_0x3f7345(0xc8)][_0x3f7345(0x9c)]['map'](({name:_0x533b85})=>_0x533b85)[_0x3f7345(0xd5)](',')),console[_0x3f7345(0xb8)](_0x3f7345(0x6d)+_0x565bc8['link']),console[_0x3f7345(0xb8)](_0x3f7345(0xb4));}async['uploadResults'](_0x4b3d09,_0x29c1f1,_0x48c39f){const _0x485aa5=a7_0x244810;if(!this['testResults']||!this[_0x485aa5(0x6f)])return;try{const {failed:_0x484b67,flaky:_0x159c07}=this[_0x485aa5(0x8d)],_0x114dce=_0x484b67>0x0?_0x485aa5(0xda):_0x485aa5(0x88),_0x435e0d=_0x484b67===0x0&&_0x159c07>0x0,_0x3ef773=new Date(),_0x3873ee=this['startTime']?Math[_0x485aa5(0x90)](0x0,_0x3ef773[_0x485aa5(0xcb)]()-this[_0x485aa5(0x7b)][_0x485aa5(0xcb)]()):0x0,_0x4ef5c1=(await a7_0x197052[_0x485aa5(0x7e)][_0x485aa5(0x83)](_0x29c1f1))[_0x485aa5(0x93)];if(this[_0x485aa5(0x6f)]['testResults'][_0x485aa5(0x98)]>0x0){const _0x153a00=this['testSession']['testResults'][0x0];let _0x57f423;if(_0x4ef5c1>0x0)try{const _0x361b66=a7_0x197052[_0x485aa5(0x68)](_0x29c1f1),_0x45e57f=await this[_0x485aa5(0x75)][_0x485aa5(0xd2)](this[_0x485aa5(0x6f)][_0x485aa5(0x69)],_0x153a00[_0x485aa5(0xab)],_0x361b66);_0x57f423=_0x45e57f['assetId'];}catch(_0x4ba0c8){const _0x3cf97b=_0x4ba0c8 instanceof Error?_0x4ba0c8[_0x485aa5(0x81)]:String(_0x4ba0c8);console[_0x485aa5(0x6b)]('[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:',_0x3cf97b);}await this[_0x485aa5(0x75)][_0x485aa5(0xd4)](this[_0x485aa5(0x6f)]['testSessionId'],_0x153a00[_0x485aa5(0xab)],{'status':_0x114dce,'assetEntries':_0x57f423?_0x48c39f:undefined,'isDegraded':_0x435e0d,'startedAt':this[_0x485aa5(0x7b)]?.['toISOString'](),'stoppedAt':_0x3ef773[_0x485aa5(0x86)](),'responseTime':_0x3873ee,'metadata':{'usageData':{'s3PostTotalBytes':_0x4ef5c1}}});}}catch(_0x488791){const _0x3eb5b5=_0x488791 instanceof Error?_0x488791['message']:String(_0x488791);console[_0x485aa5(0x6b)]('[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:',_0x3eb5b5);}}[a7_0x244810(0xc9)](_0x25d656){const _0x453f3c=a7_0x244810;console[_0x453f3c(0x6b)](_0x453f3c(0x8b),_0x25d656);}}
package/dist/zipper.js CHANGED
@@ -1 +1 @@
1
- const a9_0x2f6cee=a9_0x8d46;(function(_0x4331d5,_0x50a817){const _0x4137ba=a9_0x8d46,_0x51f35c=_0x4331d5();while(!![]){try{const _0x221ab0=parseInt(_0x4137ba(0xd4))/0x1*(-parseInt(_0x4137ba(0xe7))/0x2)+-parseInt(_0x4137ba(0xca))/0x3*(-parseInt(_0x4137ba(0xcc))/0x4)+parseInt(_0x4137ba(0xb9))/0x5*(-parseInt(_0x4137ba(0xbc))/0x6)+parseInt(_0x4137ba(0xe1))/0x7+parseInt(_0x4137ba(0xd5))/0x8*(parseInt(_0x4137ba(0xd9))/0x9)+parseInt(_0x4137ba(0xe6))/0xa+-parseInt(_0x4137ba(0xd7))/0xb*(parseInt(_0x4137ba(0xc9))/0xc);if(_0x221ab0===_0x50a817)break;else _0x51f35c['push'](_0x51f35c['shift']());}catch(_0x35eaad){_0x51f35c['push'](_0x51f35c['shift']());}}}(a9_0x5307,0xebebf));import*as a9_0xecef4b from'fs';import*as a9_0x2cf643 from'path';function a9_0x8d46(_0x33f152,_0x33c210){const _0x53071b=a9_0x5307();return a9_0x8d46=function(_0x8d464e,_0x554a34){_0x8d464e=_0x8d464e-0xb8;let _0x1d1e16=_0x53071b[_0x8d464e];return _0x1d1e16;},a9_0x8d46(_0x33f152,_0x33c210);}import*as a9_0x4922a8 from'os';function a9_0x5307(){const _0x5e6830=['finalize','3473965FcyVOR','entry','error','12kcWEgs','transformJsonReport','pointer','values','outputPath','writeFileSync','length','readFileSync','pipe','attachments','.json','sourcePath','path','312fIyVbS','9iJanSI','forEach','1882372XFTVwA','existsSync','stringify','playwright-test-report-','output/playwright-test-report.json','tmpdir','close','replace','130VXkMDs','11168ExMiUF','archivePath','963380BtWQzF','createWriteStream','8919aUmKva','push','Report\x20file\x20not\x20found:\x20','_offsets','name','substring','transformAttachmentPaths','now','9740759jNNArs','isArray','[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20','parse','warn','12531590rUGAbN','12414mlGeAh','contents','utf-8','file','test-results','object','normalizeAttachmentPath','string','csize'];a9_0x5307=function(){return _0x5e6830;};return a9_0x5307();}import{ZipArchive}from'archiver';export class Zipper{[a9_0x2f6cee(0xc0)];constructor(_0x4c2287){const _0x3813fd=a9_0x2f6cee;this['outputPath']=_0x4c2287[_0x3813fd(0xc0)];}async['createZip'](_0x34cc57,_0x3cc00e){const _0x5cde64=[];return new Promise((_0x38f017,_0x584d8b)=>{const _0x68f68d=a9_0x8d46;try{const _0x378f8e=a9_0xecef4b[_0x68f68d(0xd8)](this[_0x68f68d(0xc0)]),_0x4b958c=new ZipArchive({'zlib':{'level':0x0}});_0x4b958c['on'](_0x68f68d(0xba),_0x109410=>{const _0x4316c3=_0x68f68d,_0x43e735=_0x109410[_0x4316c3(0xdd)][_0x4316c3(0xd3)](/\\/g,'/'),_0x19f242=_0x109410['_offsets']?.[_0x4316c3(0xe8)]??0x0,_0x3f9e0d=_0x109410[_0x4316c3(0xdc)]?.['contents']+(_0x109410[_0x4316c3(0xef)]??0x0)-0x1;_0x5cde64[_0x4316c3(0xda)]({'name':_0x43e735,'start':_0x19f242,'end':_0x3f9e0d});}),_0x378f8e['on'](_0x68f68d(0xd2),()=>{const _0x5052e2=_0x68f68d,_0x202dbb=_0x4b958c[_0x5052e2(0xbe)]();_0x38f017({'zipPath':this[_0x5052e2(0xc0)],'size':_0x202dbb,'entryCount':_0x5cde64[_0x5052e2(0xc2)],'entries':_0x5cde64});}),_0x4b958c['on']('error',_0x36e9a5=>{_0x584d8b(_0x36e9a5);}),_0x378f8e['on'](_0x68f68d(0xbb),_0x3dd62f=>{_0x584d8b(_0x3dd62f);}),_0x4b958c[_0x68f68d(0xc4)](_0x378f8e);if(!a9_0xecef4b['existsSync'](_0x34cc57)){_0x584d8b(new Error(_0x68f68d(0xdb)+_0x34cc57));return;}const _0x408323=this[_0x68f68d(0xbd)](_0x34cc57);_0x4b958c[_0x68f68d(0xea)](_0x408323,{'name':_0x68f68d(0xd0)});for(const _0x5e358e of _0x3cc00e){if(!a9_0xecef4b[_0x68f68d(0xcd)](_0x5e358e[_0x68f68d(0xc7)])){_0x584d8b(new Error('Asset\x20file\x20not\x20found:\x20'+_0x5e358e['sourcePath']));return;}_0x4b958c[_0x68f68d(0xea)](_0x5e358e[_0x68f68d(0xc7)],{'name':_0x5e358e[_0x68f68d(0xd6)]});}_0x4b958c[_0x68f68d(0xb8)]();}catch(_0x5e1ba5){_0x584d8b(_0x5e1ba5);}});}['transformJsonReport'](_0x4e8c74){const _0x3a0f77=a9_0x2f6cee,_0x31fb07=a9_0xecef4b[_0x3a0f77(0xc3)](_0x4e8c74,_0x3a0f77(0xe9)),_0x423f23=JSON[_0x3a0f77(0xe4)](_0x31fb07);this[_0x3a0f77(0xdf)](_0x423f23);const _0x2268f0=a9_0x2cf643['join'](a9_0x4922a8[_0x3a0f77(0xd1)](),_0x3a0f77(0xcf)+Date[_0x3a0f77(0xe0)]()+_0x3a0f77(0xc6));return a9_0xecef4b[_0x3a0f77(0xc1)](_0x2268f0,JSON[_0x3a0f77(0xce)](_0x423f23,null,0x2)),_0x2268f0;}['transformAttachmentPaths'](_0x4ef016){const _0x30486e=a9_0x2f6cee;if(typeof _0x4ef016!==_0x30486e(0xec)||_0x4ef016===null)return;if(Array[_0x30486e(0xe2)](_0x4ef016)){_0x4ef016['forEach'](_0x3a744c=>this[_0x30486e(0xdf)](_0x3a744c));return;}_0x4ef016[_0x30486e(0xc5)]&&Array[_0x30486e(0xe2)](_0x4ef016['attachments'])&&_0x4ef016[_0x30486e(0xc5)][_0x30486e(0xcb)](_0x1c2304=>{const _0x18e929=_0x30486e;_0x1c2304[_0x18e929(0xc8)]&&typeof _0x1c2304['path']===_0x18e929(0xee)&&(_0x1c2304[_0x18e929(0xc8)]=this[_0x18e929(0xed)](_0x1c2304[_0x18e929(0xc8)]));}),Object[_0x30486e(0xbf)](_0x4ef016)[_0x30486e(0xcb)](_0x55adf7=>this[_0x30486e(0xdf)](_0x55adf7));}['normalizeAttachmentPath'](_0x288c71){const _0xe8aaa3=a9_0x2f6cee,_0x340e00=_0x288c71['indexOf'](_0xe8aaa3(0xeb));if(_0x340e00!==-0x1)return _0x288c71[_0xe8aaa3(0xde)](_0x340e00)['replace'](/\\/g,'/');return console[_0xe8aaa3(0xe5)](_0xe8aaa3(0xe3)+_0x288c71),_0x288c71;}}
1
+ const a9_0x56b225=a9_0x1a9c;(function(_0xc5140f,_0x1e8890){const _0x5b680e=a9_0x1a9c,_0x5253a5=_0xc5140f();while(!![]){try{const _0x1b2b8f=parseInt(_0x5b680e(0xec))/0x1*(parseInt(_0x5b680e(0xe3))/0x2)+parseInt(_0x5b680e(0xca))/0x3+parseInt(_0x5b680e(0xbb))/0x4*(parseInt(_0x5b680e(0xd0))/0x5)+parseInt(_0x5b680e(0xbd))/0x6*(-parseInt(_0x5b680e(0xd9))/0x7)+parseInt(_0x5b680e(0xe1))/0x8+-parseInt(_0x5b680e(0xcc))/0x9+-parseInt(_0x5b680e(0xe6))/0xa*(-parseInt(_0x5b680e(0xdb))/0xb);if(_0x1b2b8f===_0x1e8890)break;else _0x5253a5['push'](_0x5253a5['shift']());}catch(_0x1b732b){_0x5253a5['push'](_0x5253a5['shift']());}}}(a9_0x1e93,0x7e1f3));import*as a9_0x30bf38 from'fs';import*as a9_0x1f52b1 from'path';function a9_0x1e93(){const _0x205a58=['pointer','2548592dttjhb','indexOf','6pakkpo','join','utf-8','9369820HlCUHn','playwright-test-report-','contents','output/playwright-test-report.json','pipe','outputPath','108371XWuKpy','parse','8ADdmSz','transformAttachmentPaths','570642UBiJtu','sourcePath','warn','.json','entry','close','archivePath','createWriteStream','Report\x20file\x20not\x20found:\x20','string','finalize','replace','substring','310881acTqsp','file','9107226kxyhZa','normalizeAttachmentPath','object','attachments','323835ninWuV','[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20','readFileSync','now','error','csize','isArray','values','forEach','21SPlLhf','push','11qRsLgs','path','tmpdir','createZip','stringify'];a9_0x1e93=function(){return _0x205a58;};return a9_0x1e93();}import*as a9_0x17b355 from'os';function a9_0x1a9c(_0x5858c1,_0x3b3894){const _0x1e93b6=a9_0x1e93();return a9_0x1a9c=function(_0x1a9c4e,_0x1105a2){_0x1a9c4e=_0x1a9c4e-0xbb;let _0x5df851=_0x1e93b6[_0x1a9c4e];return _0x5df851;},a9_0x1a9c(_0x5858c1,_0x3b3894);}import{ZipArchive}from'archiver';export class Zipper{[a9_0x56b225(0xeb)];constructor(_0x1177f5){const _0x28784f=a9_0x56b225;this[_0x28784f(0xeb)]=_0x1177f5['outputPath'];}async[a9_0x56b225(0xde)](_0x1008ff,_0xeaaad5){const _0xd6830=[];return new Promise((_0x3323e4,_0xd4a075)=>{const _0x59a7cf=a9_0x1a9c;try{const _0x625fc1=a9_0x30bf38[_0x59a7cf(0xc4)](this[_0x59a7cf(0xeb)]),_0x306f8d=new ZipArchive({'zlib':{'level':0x0}});_0x306f8d['on'](_0x59a7cf(0xc1),_0x2d2dc9=>{const _0x38b2df=_0x59a7cf,_0x5aee1b=_0x2d2dc9['name']['replace'](/\\/g,'/'),_0x31dd03=_0x2d2dc9['_offsets']?.[_0x38b2df(0xe8)]??0x0,_0x46e271=_0x2d2dc9['_offsets']?.[_0x38b2df(0xe8)]+(_0x2d2dc9[_0x38b2df(0xd5)]??0x0)-0x1;_0xd6830[_0x38b2df(0xda)]({'name':_0x5aee1b,'start':_0x31dd03,'end':_0x46e271});}),_0x625fc1['on'](_0x59a7cf(0xc2),()=>{const _0x7c1142=_0x59a7cf,_0x2584d0=_0x306f8d[_0x7c1142(0xe0)]();_0x3323e4({'zipPath':this['outputPath'],'size':_0x2584d0,'entryCount':_0xd6830['length'],'entries':_0xd6830});}),_0x306f8d['on'](_0x59a7cf(0xd4),_0x2cc0c3=>{_0xd4a075(_0x2cc0c3);}),_0x625fc1['on'](_0x59a7cf(0xd4),_0x1ba911=>{_0xd4a075(_0x1ba911);}),_0x306f8d[_0x59a7cf(0xea)](_0x625fc1);if(!a9_0x30bf38['existsSync'](_0x1008ff)){_0xd4a075(new Error(_0x59a7cf(0xc5)+_0x1008ff));return;}const _0xc4d3a3=this['transformJsonReport'](_0x1008ff);_0x306f8d[_0x59a7cf(0xcb)](_0xc4d3a3,{'name':_0x59a7cf(0xe9)});for(const _0xcda0cf of _0xeaaad5){if(!a9_0x30bf38['existsSync'](_0xcda0cf[_0x59a7cf(0xbe)])){_0xd4a075(new Error('Asset\x20file\x20not\x20found:\x20'+_0xcda0cf[_0x59a7cf(0xbe)]));return;}_0x306f8d[_0x59a7cf(0xcb)](_0xcda0cf['sourcePath'],{'name':_0xcda0cf[_0x59a7cf(0xc3)]});}_0x306f8d[_0x59a7cf(0xc7)]();}catch(_0x4350ef){_0xd4a075(_0x4350ef);}});}['transformJsonReport'](_0x1c1bc0){const _0xa81b83=a9_0x56b225,_0x3712fd=a9_0x30bf38[_0xa81b83(0xd2)](_0x1c1bc0,_0xa81b83(0xe5)),_0x40dc79=JSON[_0xa81b83(0xed)](_0x3712fd);this[_0xa81b83(0xbc)](_0x40dc79);const _0x5ae1dc=a9_0x1f52b1[_0xa81b83(0xe4)](a9_0x17b355[_0xa81b83(0xdd)](),_0xa81b83(0xe7)+Date[_0xa81b83(0xd3)]()+_0xa81b83(0xc0));return a9_0x30bf38['writeFileSync'](_0x5ae1dc,JSON[_0xa81b83(0xdf)](_0x40dc79,null,0x2)),_0x5ae1dc;}['transformAttachmentPaths'](_0x28f587){const _0xd570b0=a9_0x56b225;if(typeof _0x28f587!==_0xd570b0(0xce)||_0x28f587===null)return;if(Array[_0xd570b0(0xd6)](_0x28f587)){_0x28f587[_0xd570b0(0xd8)](_0xfa8b04=>this['transformAttachmentPaths'](_0xfa8b04));return;}_0x28f587[_0xd570b0(0xcf)]&&Array['isArray'](_0x28f587[_0xd570b0(0xcf)])&&_0x28f587[_0xd570b0(0xcf)][_0xd570b0(0xd8)](_0x530566=>{const _0x3c0774=_0xd570b0;_0x530566[_0x3c0774(0xdc)]&&typeof _0x530566[_0x3c0774(0xdc)]===_0x3c0774(0xc6)&&(_0x530566['path']=this[_0x3c0774(0xcd)](_0x530566[_0x3c0774(0xdc)]));}),Object[_0xd570b0(0xd7)](_0x28f587)['forEach'](_0x4f04db=>this['transformAttachmentPaths'](_0x4f04db));}[a9_0x56b225(0xcd)](_0x5a5755){const _0x327384=a9_0x56b225,_0x42305e=_0x5a5755[_0x327384(0xe2)]('test-results');if(_0x42305e!==-0x1)return _0x5a5755[_0x327384(0xc9)](_0x42305e)[_0x327384(0xc8)](/\\/g,'/');return console[_0x327384(0xbf)](_0x327384(0xd1)+_0x5a5755),_0x5a5755;}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkly/playwright-reporter",
3
- "version": "0.1.0-beta",
3
+ "version": "0.1.2",
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",