@checkly/playwright-reporter 0.1.3 → 0.1.4

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,8 +7,8 @@
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.
10
+ > **Important**: This package is currently in an public beta.
11
+ [Contact the Checkly team](https://app.checklyhq.com/?support=true) for support or feedback.
12
12
  Always ensure you're using the latest version. Expect breaking changes, features in development, and possible bugs.
13
13
 
14
14
  ## Installation
@@ -1 +1 @@
1
- function a0_0x18f7(_0x111790,_0x7de82e){const _0x15291d=a0_0x1529();return a0_0x18f7=function(_0x18f719,_0x5dd8b0){_0x18f719=_0x18f719-0x16c;let _0x43a109=_0x15291d[_0x18f719];return _0x43a109;},a0_0x18f7(_0x111790,_0x7de82e);}const a0_0x141850=a0_0x18f7;(function(_0x3a0232,_0x16530e){const _0xd13a36=a0_0x18f7,_0x137039=_0x3a0232();while(!![]){try{const _0x3a95d5=-parseInt(_0xd13a36(0x189))/0x1+parseInt(_0xd13a36(0x185))/0x2+parseInt(_0xd13a36(0x188))/0x3+-parseInt(_0xd13a36(0x181))/0x4+-parseInt(_0xd13a36(0x19d))/0x5*(-parseInt(_0xd13a36(0x17e))/0x6)+-parseInt(_0xd13a36(0x19a))/0x7*(-parseInt(_0xd13a36(0x183))/0x8)+parseInt(_0xd13a36(0x16e))/0x9*(-parseInt(_0xd13a36(0x170))/0xa);if(_0x3a95d5===_0x16530e)break;else _0x137039['push'](_0x137039['shift']());}catch(_0x4de894){_0x137039['push'](_0x137039['shift']());}}}(a0_0x1529,0x49706));import*as a0_0x28a475 from'fs';function a0_0x1529(){const _0x43367a=['image/png','video/quicktime','toLowerCase','21DISTqo','other','collectAssetsRecursive','88970HfeKKA','getVideoContentType','testResultsDir','.svg','split','text/plain','getImageContentType','isFile','.txt','application/octet-stream','.mov','basename','includes','9MnKmYi','shouldSkipFile','2846330sdfOBd','application/json','readdirSync','resolve','.jpeg','name','image/jpeg','relative','.bmp','createAsset','add','.json','image/bmp','isDirectory','18URCwTw','application/zip','determineAssetType','888904AnHgct','.mp4','536288fBfinp','existsSync','617250AnUmYw','attachment','video/mp4','1676571hpNfmb','314307FvcEPk','video/x-msvideo','sep','join','.log','some','screenshot','video','test','.jpg','text/html','.webm','.html','image/svg+xml'];a0_0x1529=function(){return _0x43367a;};return a0_0x1529();}import*as a0_0x35e13e from'path';export class AssetCollector{[a0_0x141850(0x19f)];constructor(_0x35417f){const _0x280278=a0_0x141850;this[_0x280278(0x19f)]=_0x35417f;}async['collectAssets'](_0x166af2){const _0x5a15fb=a0_0x141850,_0x44c464=[],_0x4ea973=new Set();if(!a0_0x28a475[_0x5a15fb(0x184)](this[_0x5a15fb(0x19f)]))return _0x44c464;return await this[_0x5a15fb(0x19c)](this[_0x5a15fb(0x19f)],'',_0x44c464,_0x4ea973),_0x44c464;}async[a0_0x141850(0x19c)](_0x57a4e2,_0x333b74,_0x2a0944,_0x3b0d4b){const _0x3b9f91=a0_0x141850;let _0x518616;try{_0x518616=a0_0x28a475[_0x3b9f91(0x172)](_0x57a4e2,{'withFileTypes':!![]});}catch{return;}const _0x3d45c1=a0_0x35e13e[_0x3b9f91(0x16c)](a0_0x35e13e[_0x3b9f91(0x173)](this['testResultsDir']));for(const _0x1f8b2b of _0x518616){const _0x5cbea8=a0_0x35e13e[_0x3b9f91(0x18c)](_0x57a4e2,_0x1f8b2b[_0x3b9f91(0x175)]),_0x18123d=a0_0x35e13e[_0x3b9f91(0x177)](this['testResultsDir'],_0x5cbea8),_0x4a6282=a0_0x35e13e[_0x3b9f91(0x18c)](_0x3d45c1,_0x18123d);if(this[_0x3b9f91(0x16f)](_0x1f8b2b[_0x3b9f91(0x175)]))continue;if(_0x1f8b2b[_0x3b9f91(0x17d)]())await this[_0x3b9f91(0x19c)](_0x5cbea8,_0x4a6282,_0x2a0944,_0x3b0d4b);else{if(_0x1f8b2b[_0x3b9f91(0x1a4)]()){if(!_0x3b0d4b['has'](_0x5cbea8)){const _0x27efef=this[_0x3b9f91(0x179)](_0x5cbea8,_0x4a6282);_0x2a0944['push'](_0x27efef),_0x3b0d4b[_0x3b9f91(0x17a)](_0x5cbea8);}}}}}['shouldSkipFile'](_0x5354f8){const _0x43952a=a0_0x141850,_0x184925=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x184925[_0x43952a(0x18e)](_0x4ba32f=>_0x4ba32f[_0x43952a(0x191)](_0x5354f8));}[a0_0x141850(0x179)](_0x5a5fa4,_0x1987f4){const _0x2cdfbd=a0_0x141850,_0x59ccbf=a0_0x35e13e['extname'](_0x5a5fa4)[_0x2cdfbd(0x199)](),{type:_0x5778d9,contentType:_0x228591}=this[_0x2cdfbd(0x180)](_0x59ccbf),_0x191149=_0x1987f4[_0x2cdfbd(0x1a1)](a0_0x35e13e[_0x2cdfbd(0x18b)])[_0x2cdfbd(0x18c)]('/');return{'sourcePath':_0x5a5fa4,'archivePath':_0x191149,'type':_0x5778d9,'contentType':_0x228591};}[a0_0x141850(0x180)](_0x434d65){const _0x505988=a0_0x141850;if(['.png',_0x505988(0x192),_0x505988(0x174),'.gif',_0x505988(0x178),_0x505988(0x1a0)][_0x505988(0x16d)](_0x434d65))return{'type':_0x505988(0x18f),'contentType':this[_0x505988(0x1a3)](_0x434d65)};if([_0x505988(0x194),_0x505988(0x182),'.avi',_0x505988(0x1a7)][_0x505988(0x16d)](_0x434d65))return{'type':_0x505988(0x190),'contentType':this['getVideoContentType'](_0x434d65)};if(_0x434d65==='.zip')return{'type':'trace','contentType':_0x505988(0x17f)};if(_0x434d65===_0x505988(0x195)||_0x434d65==='.htm')return{'type':_0x505988(0x186),'contentType':_0x505988(0x193)};if(_0x434d65===_0x505988(0x17b))return{'type':_0x505988(0x186),'contentType':_0x505988(0x171)};if(_0x434d65===_0x505988(0x1a5)||_0x434d65===_0x505988(0x18d))return{'type':_0x505988(0x186),'contentType':_0x505988(0x1a2)};return{'type':_0x505988(0x19b),'contentType':_0x505988(0x1a6)};}[a0_0x141850(0x1a3)](_0x38223d){const _0x31f2cb=a0_0x141850,_0x5249a8={'.png':_0x31f2cb(0x197),'.jpg':'image/jpeg','.jpeg':_0x31f2cb(0x176),'.gif':'image/gif','.bmp':_0x31f2cb(0x17c),'.svg':_0x31f2cb(0x196)};return _0x5249a8[_0x38223d]||_0x31f2cb(0x197);}[a0_0x141850(0x19e)](_0x144660){const _0x3a985e=a0_0x141850,_0x168cbc={'.webm':'video/webm','.mp4':_0x3a985e(0x187),'.avi':_0x3a985e(0x18a),'.mov':_0x3a985e(0x198)};return _0x168cbc[_0x144660]||'video/webm';}}
1
+ function a0_0x384b(_0x378286,_0x5ed1a7){const _0x38ea3f=a0_0x38ea();return a0_0x384b=function(_0x384b91,_0x3f2658){_0x384b91=_0x384b91-0x193;let _0x106896=_0x38ea3f[_0x384b91];return _0x106896;},a0_0x384b(_0x378286,_0x5ed1a7);}const a0_0x4c5a26=a0_0x384b;function a0_0x38ea(){const _0x34e052=['.htm','.log','3832592KPLdct','image/jpeg','application/zip','.jpeg','includes','3TlvlNG','join','.svg','14261700BQnwYe','basename','determineAssetType','.avi','has','testResultsDir','.zip','8lAWhAf','video/x-msvideo','collectAssetsRecursive','video','collectAssets','shouldSkipFile','520HpApEj','isDirectory','relative','5138ntFHXT','getImageContentType','.html','.json','71586ufFRAt','.txt','.mov','trace','other','image/png','screenshot','video/webm','.webm','.gif','application/json','23083687cVRYol','resolve','.jpg','video/mp4','application/octet-stream','97025dNsuDX','name','attachment','.mp4','createAsset','image/gif','extname','getVideoContentType','9028467xMjwkl','.png','existsSync','readdirSync','138qsFovQ','push','text/html','text/plain','isFile'];a0_0x38ea=function(){return _0x34e052;};return a0_0x38ea();}(function(_0x2b8eba,_0x40856b){const _0x3f4c29=a0_0x384b,_0x107a42=_0x2b8eba();while(!![]){try{const _0x2ca200=-parseInt(_0x3f4c29(0x1b0))/0x1*(parseInt(_0x3f4c29(0x1b9))/0x2)+parseInt(_0x3f4c29(0x1a6))/0x3*(-parseInt(_0x3f4c29(0x1a1))/0x4)+-parseInt(_0x3f4c29(0x1cd))/0x5*(-parseInt(_0x3f4c29(0x19a))/0x6)+parseInt(_0x3f4c29(0x196))/0x7+parseInt(_0x3f4c29(0x1b6))/0x8*(-parseInt(_0x3f4c29(0x1bd))/0x9)+-parseInt(_0x3f4c29(0x1a9))/0xa+parseInt(_0x3f4c29(0x1c8))/0xb;if(_0x2ca200===_0x40856b)break;else _0x107a42['push'](_0x107a42['shift']());}catch(_0x3158fb){_0x107a42['push'](_0x107a42['shift']());}}}(a0_0x38ea,0xded5d));import*as a0_0x214fe5 from'fs';import*as a0_0x2c5356 from'path';export class AssetCollector{['testResultsDir'];constructor(_0x540630){this['testResultsDir']=_0x540630;}async[a0_0x4c5a26(0x1b4)](_0x4ba095){const _0x26e3a1=a0_0x4c5a26,_0x5c38b7=[],_0x5e9c73=new Set();if(!a0_0x214fe5[_0x26e3a1(0x198)](this['testResultsDir']))return _0x5c38b7;return await this[_0x26e3a1(0x1b2)](this[_0x26e3a1(0x1ae)],'',_0x5c38b7,_0x5e9c73),_0x5c38b7;}async['collectAssetsRecursive'](_0x25842c,_0x14bc12,_0x46657d,_0xee04cb){const _0x311597=a0_0x4c5a26;let _0x426e58;try{_0x426e58=a0_0x214fe5[_0x311597(0x199)](_0x25842c,{'withFileTypes':!![]});}catch{return;}const _0x2c21da=a0_0x2c5356[_0x311597(0x1aa)](a0_0x2c5356[_0x311597(0x1c9)](this[_0x311597(0x1ae)]));for(const _0x1f34ae of _0x426e58){const _0x482219=a0_0x2c5356['join'](_0x25842c,_0x1f34ae['name']),_0x43b732=a0_0x2c5356[_0x311597(0x1b8)](this[_0x311597(0x1ae)],_0x482219),_0x3750c6=a0_0x2c5356['join'](_0x2c21da,_0x43b732);if(this['shouldSkipFile'](_0x1f34ae[_0x311597(0x1ce)]))continue;if(_0x1f34ae[_0x311597(0x1b7)]())await this[_0x311597(0x1b2)](_0x482219,_0x3750c6,_0x46657d,_0xee04cb);else{if(_0x1f34ae[_0x311597(0x19e)]()){if(!_0xee04cb[_0x311597(0x1ad)](_0x482219)){const _0xc20c4b=this[_0x311597(0x1d1)](_0x482219,_0x3750c6);_0x46657d[_0x311597(0x19b)](_0xc20c4b),_0xee04cb['add'](_0x482219);}}}}}[a0_0x4c5a26(0x1b5)](_0x3c827f){const _0x37a76c=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x37a76c['some'](_0x378699=>_0x378699['test'](_0x3c827f));}[a0_0x4c5a26(0x1d1)](_0x4fb38e,_0x1dcead){const _0x2fe0d3=a0_0x4c5a26,_0x455c84=a0_0x2c5356[_0x2fe0d3(0x194)](_0x4fb38e)['toLowerCase'](),{type:_0x4a9523,contentType:_0xdf692a}=this[_0x2fe0d3(0x1ab)](_0x455c84),_0x32c674=_0x1dcead['split'](a0_0x2c5356['sep'])[_0x2fe0d3(0x1a7)]('/');return{'sourcePath':_0x4fb38e,'archivePath':_0x32c674,'type':_0x4a9523,'contentType':_0xdf692a};}['determineAssetType'](_0x18ea93){const _0x5bb93d=a0_0x4c5a26;if([_0x5bb93d(0x197),_0x5bb93d(0x1ca),_0x5bb93d(0x1a4),_0x5bb93d(0x1c6),'.bmp',_0x5bb93d(0x1a8)][_0x5bb93d(0x1a5)](_0x18ea93))return{'type':_0x5bb93d(0x1c3),'contentType':this[_0x5bb93d(0x1ba)](_0x18ea93)};if([_0x5bb93d(0x1c5),_0x5bb93d(0x1d0),_0x5bb93d(0x1ac),_0x5bb93d(0x1bf)][_0x5bb93d(0x1a5)](_0x18ea93))return{'type':_0x5bb93d(0x1b3),'contentType':this[_0x5bb93d(0x195)](_0x18ea93)};if(_0x18ea93===_0x5bb93d(0x1af))return{'type':_0x5bb93d(0x1c0),'contentType':_0x5bb93d(0x1a3)};if(_0x18ea93===_0x5bb93d(0x1bb)||_0x18ea93===_0x5bb93d(0x19f))return{'type':_0x5bb93d(0x1cf),'contentType':_0x5bb93d(0x19c)};if(_0x18ea93===_0x5bb93d(0x1bc))return{'type':_0x5bb93d(0x1cf),'contentType':_0x5bb93d(0x1c7)};if(_0x18ea93===_0x5bb93d(0x1be)||_0x18ea93===_0x5bb93d(0x1a0))return{'type':'attachment','contentType':_0x5bb93d(0x19d)};return{'type':_0x5bb93d(0x1c1),'contentType':_0x5bb93d(0x1cc)};}[a0_0x4c5a26(0x1ba)](_0x4d6c64){const _0x1b524b=a0_0x4c5a26,_0xf1f35c={'.png':_0x1b524b(0x1c2),'.jpg':_0x1b524b(0x1a2),'.jpeg':_0x1b524b(0x1a2),'.gif':_0x1b524b(0x193),'.bmp':'image/bmp','.svg':'image/svg+xml'};return _0xf1f35c[_0x4d6c64]||_0x1b524b(0x1c2);}['getVideoContentType'](_0x11eb3d){const _0x33e994=a0_0x4c5a26,_0x34003e={'.webm':_0x33e994(0x1c4),'.mp4':_0x33e994(0x1cb),'.avi':_0x33e994(0x1b1),'.mov':'video/quicktime'};return _0x34003e[_0x11eb3d]||_0x33e994(0x1c4);}}
@@ -1 +1 @@
1
- var a1_0x56b0e6=a1_0x4ec8;(function(_0x4dc10e,_0x383664){var _0x254fba=a1_0x4ec8,_0x4ac099=_0x4dc10e();while(!![]){try{var _0xfb8a80=parseInt(_0x254fba(0x1ed))/0x1*(-parseInt(_0x254fba(0x1ef))/0x2)+-parseInt(_0x254fba(0x1e0))/0x3+parseInt(_0x254fba(0x1e3))/0x4+parseInt(_0x254fba(0x1ec))/0x5+-parseInt(_0x254fba(0x1e1))/0x6+-parseInt(_0x254fba(0x1f2))/0x7*(-parseInt(_0x254fba(0x1f4))/0x8)+-parseInt(_0x254fba(0x1e4))/0x9;if(_0xfb8a80===_0x383664)break;else _0x4ac099['push'](_0x4ac099['shift']());}catch(_0x3cf2f3){_0x4ac099['push'](_0x4ac099['shift']());}}}(a1_0xc2c9,0x8c274));import a1_0x5b6806 from'axios';function a1_0x4ec8(_0x5ea127,_0x10f902){var _0xc2c908=a1_0xc2c9();return a1_0x4ec8=function(_0x4ec877,_0x3bdf39){_0x4ec877=_0x4ec877-0x1dd;var _0x79e21a=_0xc2c908[_0x4ec877];return _0x79e21a;},a1_0x4ec8(_0x5ea127,_0x10f902);}import{handleErrorResponse}from'./errors.js';function a1_0xc2c9(){var _0x24d710=['headers','3672590lyZnqT','1MjBvcr','create','1139734jxvGeR','0.1.0','@checkly/playwright-reporter/','5798807KLXDdC','use','8LgeDAZ','request','interceptors','Authorization','apiKey','User-Agent','1234749mkxrvs','1831260awmiIS','getAxiosInstance','4179968OTtUFd','6724647rcrOpH','accountId','Bearer\x20','response','baseUrl','api','x-checkly-account'];a1_0xc2c9=function(){return _0x24d710;};return a1_0xc2c9();}function getVersion(){var _0x3994c7=a1_0x4ec8;return _0x3994c7(0x1f0);}export function createRequestInterceptor(_0x516ca0,_0x5dac05){return _0x2fc58a=>{var _0xbff315=a1_0x4ec8;return _0x2fc58a['headers']&&(_0x2fc58a[_0xbff315(0x1eb)][_0xbff315(0x1dd)]=_0xbff315(0x1e6)+_0x516ca0,_0x2fc58a[_0xbff315(0x1eb)][_0xbff315(0x1ea)]=_0x5dac05,_0x2fc58a[_0xbff315(0x1eb)][_0xbff315(0x1df)]=_0xbff315(0x1f1)+getVersion()),_0x2fc58a;};}export function createResponseErrorInterceptor(){return _0x11ebe8=>{handleErrorResponse(_0x11ebe8);};}export default class ChecklyClient{[a1_0x56b0e6(0x1de)];[a1_0x56b0e6(0x1e8)];['accountId'];[a1_0x56b0e6(0x1e9)];constructor(_0x1d8246){var _0x35715f=a1_0x56b0e6;this[_0x35715f(0x1e5)]=_0x1d8246['accountId'],this[_0x35715f(0x1de)]=_0x1d8246[_0x35715f(0x1de)],this[_0x35715f(0x1e8)]=_0x1d8246['baseUrl'],this[_0x35715f(0x1e9)]=a1_0x5b6806[_0x35715f(0x1ee)]({'baseURL':this[_0x35715f(0x1e8)],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0x35715f(0x1e9)]['interceptors'][_0x35715f(0x1f5)]['use'](createRequestInterceptor(this[_0x35715f(0x1de)],this['accountId'])),this['api'][_0x35715f(0x1f6)][_0x35715f(0x1e7)][_0x35715f(0x1f3)](_0x249792=>_0x249792,createResponseErrorInterceptor());}[a1_0x56b0e6(0x1e2)](){var _0x334530=a1_0x56b0e6;return this[_0x334530(0x1e9)];}}
1
+ var a1_0xf650f4=a1_0x5d8f;(function(_0x29ac56,_0x53d13a){var _0x27625c=a1_0x5d8f,_0x11e59e=_0x29ac56();while(!![]){try{var _0xb6cf92=parseInt(_0x27625c(0x169))/0x1*(-parseInt(_0x27625c(0x172))/0x2)+-parseInt(_0x27625c(0x178))/0x3+-parseInt(_0x27625c(0x179))/0x4+parseInt(_0x27625c(0x167))/0x5*(-parseInt(_0x27625c(0x17a))/0x6)+-parseInt(_0x27625c(0x16d))/0x7*(-parseInt(_0x27625c(0x168))/0x8)+parseInt(_0x27625c(0x162))/0x9*(parseInt(_0x27625c(0x164))/0xa)+parseInt(_0x27625c(0x163))/0xb*(parseInt(_0x27625c(0x16a))/0xc);if(_0xb6cf92===_0x53d13a)break;else _0x11e59e['push'](_0x11e59e['shift']());}catch(_0x3602b4){_0x11e59e['push'](_0x11e59e['shift']());}}}(a1_0x334a,0x299bf));import a1_0x6350e5 from'axios';import{handleErrorResponse}from'./errors.js';function getVersion(){var _0xc71fc1=a1_0x5d8f;return _0xc71fc1(0x175);}export function createRequestInterceptor(_0x3297a6,_0x23216f){return _0x148a45=>{var _0x3691fb=a1_0x5d8f;return _0x148a45[_0x3691fb(0x16c)]&&(_0x148a45[_0x3691fb(0x16c)]['Authorization']=_0x3691fb(0x174)+_0x3297a6,_0x148a45[_0x3691fb(0x16c)][_0x3691fb(0x16e)]=_0x23216f,_0x148a45[_0x3691fb(0x16c)][_0x3691fb(0x171)]='@checkly/playwright-reporter/'+getVersion()),_0x148a45;};}function a1_0x5d8f(_0x491118,_0x1d7f2c){var _0x334aef=a1_0x334a();return a1_0x5d8f=function(_0x5d8f65,_0x175ad4){_0x5d8f65=_0x5d8f65-0x162;var _0x15e7de=_0x334aef[_0x5d8f65];return _0x15e7de;},a1_0x5d8f(_0x491118,_0x1d7f2c);}function a1_0x334a(){var _0x436e1b=['1725399JQRRoo','64339EFbiLN','10ClfxwR','use','api','115HgTwac','9392QuiQwh','35SwVAGm','588bBERSx','create','headers','1043myzmiq','x-checkly-account','apiKey','accountId','User-Agent','1150xAcPzC','request','Bearer\x20','0.1.0','baseUrl','interceptors','559398RYhvxe','876888IezLvA','14868RlYIKj'];a1_0x334a=function(){return _0x436e1b;};return a1_0x334a();}export function createResponseErrorInterceptor(){return _0x311bf6=>{handleErrorResponse(_0x311bf6);};}export default class ChecklyClient{['apiKey'];[a1_0xf650f4(0x176)];['accountId'];[a1_0xf650f4(0x166)];constructor(_0x390075){var _0xede48b=a1_0xf650f4;this[_0xede48b(0x170)]=_0x390075[_0xede48b(0x170)],this[_0xede48b(0x16f)]=_0x390075['apiKey'],this[_0xede48b(0x176)]=_0x390075[_0xede48b(0x176)],this[_0xede48b(0x166)]=a1_0x6350e5[_0xede48b(0x16b)]({'baseURL':this[_0xede48b(0x176)],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0xede48b(0x166)][_0xede48b(0x177)][_0xede48b(0x173)][_0xede48b(0x165)](createRequestInterceptor(this[_0xede48b(0x16f)],this['accountId'])),this[_0xede48b(0x166)][_0xede48b(0x177)]['response']['use'](_0x55c1a8=>_0x55c1a8,createResponseErrorInterceptor());}['getAxiosInstance'](){var _0x51d725=a1_0xf650f4;return this[_0x51d725(0x166)];}}
@@ -1 +1 @@
1
- const a2_0x473a3c=a2_0x1ab5;(function(_0x598992,_0x3b28e5){const _0x499dbc=a2_0x1ab5,_0x14e5a4=_0x598992();while(!![]){try{const _0x13840e=parseInt(_0x499dbc(0xb3))/0x1+parseInt(_0x499dbc(0xa7))/0x2+parseInt(_0x499dbc(0xa3))/0x3+parseInt(_0x499dbc(0x9c))/0x4*(parseInt(_0x499dbc(0xa2))/0x5)+-parseInt(_0x499dbc(0xad))/0x6*(-parseInt(_0x499dbc(0xac))/0x7)+parseInt(_0x499dbc(0xa1))/0x8+-parseInt(_0x499dbc(0xa8))/0x9*(parseInt(_0x499dbc(0xa5))/0xa);if(_0x13840e===_0x3b28e5)break;else _0x14e5a4['push'](_0x14e5a4['shift']());}catch(_0x2d5752){_0x14e5a4['push'](_0x14e5a4['shift']());}}}(a2_0xcf4c,0xe468c));export class ApiError extends Error{[a2_0x473a3c(0xaa)];constructor(_0x31874b,_0x177a38){const _0x5b55c1=a2_0x473a3c;super(_0x31874b[_0x5b55c1(0xae)],_0x177a38),this['name']=this[_0x5b55c1(0xa9)][_0x5b55c1(0x9e)],this['data']=_0x31874b;}}export class ValidationError extends ApiError{constructor(_0x508c97,_0x1199bc){super(_0x508c97,_0x1199bc);}}export class UnauthorizedError extends ApiError{constructor(_0x41974f,_0x4d309c){super(_0x41974f,_0x4d309c);}}function a2_0xcf4c(){const _0x492b4e=['3107638ivdSlz','63DSnyXP','constructor','data','string','3122427bWDwDs','6dtczFt','message','An\x20error\x20occurred','error','response','statusCode','945231ekhXKM','8wwBtCd','errorCode','name','object','MissingResponseError','7289840QiTyvD','516745KSRrUr','5198778DtegzU','Network\x20error','6943430zjQLpD','Unknown\x20error'];a2_0xcf4c=function(){return _0x492b4e;};return a2_0xcf4c();}export class ForbiddenError extends ApiError{constructor(_0x5e3fa8,_0x310159){super(_0x5e3fa8,_0x310159);}}export class NotFoundError extends ApiError{constructor(_0x23704e,_0x2f516d){super(_0x23704e,_0x2f516d);}}export class RequestTimeoutError extends ApiError{constructor(_0x174ac5,_0x1e0dbe){super(_0x174ac5,_0x1e0dbe);}}export class ConflictError extends ApiError{constructor(_0x377a6d,_0x3dd3c9){super(_0x377a6d,_0x3dd3c9);}}export class ServerError extends ApiError{constructor(_0x24265e,_0x5c6c88){super(_0x24265e,_0x5c6c88);}}export class MiscellaneousError extends ApiError{constructor(_0x4e506e,_0x541330){super(_0x4e506e,_0x541330);}}export class MissingResponseError extends Error{constructor(_0x4f34a3,_0x1bfe4e){const _0x4f3cbd=a2_0x473a3c;super(_0x4f34a3,_0x1bfe4e),this[_0x4f3cbd(0x9e)]=_0x4f3cbd(0xa0);}}function a2_0x1ab5(_0x330472,_0x46a8fe){const _0xcf4cac=a2_0xcf4c();return a2_0x1ab5=function(_0x1ab581,_0x5c992e){_0x1ab581=_0x1ab581-0x9c;let _0x29250c=_0xcf4cac[_0x1ab581];return _0x29250c;},a2_0x1ab5(_0x330472,_0x46a8fe);}export function parseErrorData(_0x376c01,_0x3c1bbc){const _0x4210fc=a2_0x473a3c;if(!_0x376c01)return undefined;if(typeof _0x376c01===_0x4210fc(0x9f)&&_0x376c01[_0x4210fc(0xb2)]&&_0x376c01[_0x4210fc(0xb0)]&&_0x376c01['message'])return{'statusCode':_0x376c01[_0x4210fc(0xb2)],'error':_0x376c01[_0x4210fc(0xb0)],'message':_0x376c01['message'],'errorCode':_0x376c01[_0x4210fc(0x9d)]};if(typeof _0x376c01===_0x4210fc(0x9f)&&_0x376c01[_0x4210fc(0xb0)]&&!_0x376c01[_0x4210fc(0xae)])return{'statusCode':_0x3c1bbc[_0x4210fc(0xb2)],'error':_0x376c01['error'],'message':_0x376c01[_0x4210fc(0xb0)]};if(typeof _0x376c01==='object'&&_0x376c01[_0x4210fc(0xb0)]&&_0x376c01['message'])return{'statusCode':_0x3c1bbc['statusCode'],'error':_0x376c01[_0x4210fc(0xb0)],'message':_0x376c01[_0x4210fc(0xae)],'errorCode':_0x376c01[_0x4210fc(0x9d)]};if(typeof _0x376c01===_0x4210fc(0x9f)&&_0x376c01[_0x4210fc(0xae)])return{'statusCode':_0x3c1bbc[_0x4210fc(0xb2)],'error':_0x376c01[_0x4210fc(0xae)],'message':_0x376c01[_0x4210fc(0xae)],'errorCode':_0x376c01[_0x4210fc(0x9d)]};if(typeof _0x376c01===_0x4210fc(0xab))return{'statusCode':_0x3c1bbc['statusCode'],'error':_0x376c01,'message':_0x376c01};return undefined;}export function handleErrorResponse(_0x5e12bb){const _0x24823c=a2_0x473a3c;if(!_0x5e12bb[_0x24823c(0xb1)])throw new MissingResponseError(_0x5e12bb[_0x24823c(0xae)]||_0x24823c(0xa4));const {status:_0x57f9b5,data:_0x468fab}=_0x5e12bb[_0x24823c(0xb1)],_0x311165=parseErrorData(_0x468fab,{'statusCode':_0x57f9b5});if(!_0x311165)throw new MiscellaneousError({'statusCode':_0x57f9b5,'error':_0x24823c(0xa6),'message':_0x5e12bb[_0x24823c(0xae)]||_0x24823c(0xaf)});switch(_0x57f9b5){case 0x190:throw new ValidationError(_0x311165);case 0x191:throw new UnauthorizedError(_0x311165);case 0x193:throw new ForbiddenError(_0x311165);case 0x194:throw new NotFoundError(_0x311165);case 0x198:throw new RequestTimeoutError(_0x311165);case 0x199:throw new ConflictError(_0x311165);default:if(_0x57f9b5>=0x1f4)throw new ServerError(_0x311165);throw new MiscellaneousError(_0x311165);}}
1
+ const a2_0x35e760=a2_0x3ccf;(function(_0x310170,_0x56d8c7){const _0x2e3588=a2_0x3ccf,_0x5d9e91=_0x310170();while(!![]){try{const _0x2a09db=parseInt(_0x2e3588(0xbb))/0x1+parseInt(_0x2e3588(0xc2))/0x2+-parseInt(_0x2e3588(0xb0))/0x3*(parseInt(_0x2e3588(0xc0))/0x4)+-parseInt(_0x2e3588(0xb3))/0x5+parseInt(_0x2e3588(0xb9))/0x6+-parseInt(_0x2e3588(0xb4))/0x7+-parseInt(_0x2e3588(0xb7))/0x8*(-parseInt(_0x2e3588(0xb1))/0x9);if(_0x2a09db===_0x56d8c7)break;else _0x5d9e91['push'](_0x5d9e91['shift']());}catch(_0x33069b){_0x5d9e91['push'](_0x5d9e91['shift']());}}}(a2_0x2810,0x4b4ba));export class ApiError extends Error{[a2_0x35e760(0xb5)];constructor(_0x5b2121,_0x2a2721){const _0x470c0b=a2_0x35e760;super(_0x5b2121['message'],_0x2a2721),this[_0x470c0b(0xbd)]=this[_0x470c0b(0xb2)][_0x470c0b(0xbd)],this['data']=_0x5b2121;}}export class ValidationError extends ApiError{constructor(_0x2dfc3f,_0x52eb04){super(_0x2dfc3f,_0x52eb04);}}export class UnauthorizedError extends ApiError{constructor(_0x1a18c6,_0x1fd789){super(_0x1a18c6,_0x1fd789);}}export class ForbiddenError extends ApiError{constructor(_0x28a30e,_0x489e93){super(_0x28a30e,_0x489e93);}}export class NotFoundError extends ApiError{constructor(_0x3e9ce3,_0x5dd1a7){super(_0x3e9ce3,_0x5dd1a7);}}export class RequestTimeoutError extends ApiError{constructor(_0x26d1f7,_0x545a71){super(_0x26d1f7,_0x545a71);}}function a2_0x3ccf(_0x4482b8,_0x123399){const _0x28100f=a2_0x2810();return a2_0x3ccf=function(_0x3ccf83,_0x1e6d70){_0x3ccf83=_0x3ccf83-0xad;let _0x30cc7f=_0x28100f[_0x3ccf83];return _0x30cc7f;},a2_0x3ccf(_0x4482b8,_0x123399);}function a2_0x2810(){const _0x148053=['constructor','2600065yqRyJu','1594453eYmMqq','data','string','1240LHEqaZ','statusCode','3250092AaktrT','Unknown\x20error','601906gxmLWl','object','name','error','Network\x20error','908876cfWiQE','MissingResponseError','90256qggFOL','errorCode','response','message','3ZDBPDm','5499iPZpNX'];a2_0x2810=function(){return _0x148053;};return a2_0x2810();}export class ConflictError extends ApiError{constructor(_0xa208a2,_0x1d8c47){super(_0xa208a2,_0x1d8c47);}}export class ServerError extends ApiError{constructor(_0x33b04b,_0x11f226){super(_0x33b04b,_0x11f226);}}export class MiscellaneousError extends ApiError{constructor(_0x5c087f,_0x3e9bd1){super(_0x5c087f,_0x3e9bd1);}}export class MissingResponseError extends Error{constructor(_0x4bee08,_0x34fc1f){const _0x3ee4de=a2_0x35e760;super(_0x4bee08,_0x34fc1f),this[_0x3ee4de(0xbd)]=_0x3ee4de(0xc1);}}export function parseErrorData(_0x48630c,_0x24fc0f){const _0x5806f4=a2_0x35e760;if(!_0x48630c)return undefined;if(typeof _0x48630c==='object'&&_0x48630c[_0x5806f4(0xb8)]&&_0x48630c[_0x5806f4(0xbe)]&&_0x48630c['message'])return{'statusCode':_0x48630c[_0x5806f4(0xb8)],'error':_0x48630c[_0x5806f4(0xbe)],'message':_0x48630c[_0x5806f4(0xaf)],'errorCode':_0x48630c['errorCode']};if(typeof _0x48630c===_0x5806f4(0xbc)&&_0x48630c[_0x5806f4(0xbe)]&&!_0x48630c['message'])return{'statusCode':_0x24fc0f['statusCode'],'error':_0x48630c[_0x5806f4(0xbe)],'message':_0x48630c[_0x5806f4(0xbe)]};if(typeof _0x48630c==='object'&&_0x48630c['error']&&_0x48630c['message'])return{'statusCode':_0x24fc0f[_0x5806f4(0xb8)],'error':_0x48630c[_0x5806f4(0xbe)],'message':_0x48630c['message'],'errorCode':_0x48630c[_0x5806f4(0xad)]};if(typeof _0x48630c===_0x5806f4(0xbc)&&_0x48630c[_0x5806f4(0xaf)])return{'statusCode':_0x24fc0f[_0x5806f4(0xb8)],'error':_0x48630c[_0x5806f4(0xaf)],'message':_0x48630c[_0x5806f4(0xaf)],'errorCode':_0x48630c[_0x5806f4(0xad)]};if(typeof _0x48630c===_0x5806f4(0xb6))return{'statusCode':_0x24fc0f['statusCode'],'error':_0x48630c,'message':_0x48630c};return undefined;}export function handleErrorResponse(_0x563603){const _0x175cbf=a2_0x35e760;if(!_0x563603[_0x175cbf(0xae)])throw new MissingResponseError(_0x563603[_0x175cbf(0xaf)]||_0x175cbf(0xbf));const {status:_0x52ebae,data:_0x15c3ac}=_0x563603['response'],_0x56b613=parseErrorData(_0x15c3ac,{'statusCode':_0x52ebae});if(!_0x56b613)throw new MiscellaneousError({'statusCode':_0x52ebae,'error':_0x175cbf(0xba),'message':_0x563603[_0x175cbf(0xaf)]||'An\x20error\x20occurred'});switch(_0x52ebae){case 0x190:throw new ValidationError(_0x56b613);case 0x191:throw new UnauthorizedError(_0x56b613);case 0x193:throw new ForbiddenError(_0x56b613);case 0x194:throw new NotFoundError(_0x56b613);case 0x198:throw new RequestTimeoutError(_0x56b613);case 0x199:throw new ConflictError(_0x56b613);default:if(_0x52ebae>=0x1f4)throw new ServerError(_0x56b613);throw new MiscellaneousError(_0x56b613);}}
@@ -1 +1 @@
1
- (function(_0x5b0291,_0x2467e7){var _0x13ca24=a3_0x1b0b,_0x12d2d9=_0x5b0291();while(!![]){try{var _0x3ee832=-parseInt(_0x13ca24(0x1dd))/0x1+parseInt(_0x13ca24(0x1d6))/0x2+-parseInt(_0x13ca24(0x1df))/0x3+parseInt(_0x13ca24(0x1da))/0x4*(-parseInt(_0x13ca24(0x1d8))/0x5)+parseInt(_0x13ca24(0x1de))/0x6*(parseInt(_0x13ca24(0x1db))/0x7)+-parseInt(_0x13ca24(0x1d7))/0x8+parseInt(_0x13ca24(0x1dc))/0x9*(parseInt(_0x13ca24(0x1d9))/0xa);if(_0x3ee832===_0x2467e7)break;else _0x12d2d9['push'](_0x12d2d9['shift']());}catch(_0x3c6413){_0x12d2d9['push'](_0x12d2d9['shift']());}}}(a3_0x567e,0x4ebe1));export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';function a3_0x1b0b(_0x4cc72b,_0x42b0ad){var _0x567e90=a3_0x567e();return a3_0x1b0b=function(_0x1b0bb4,_0xcdc2bf){_0x1b0bb4=_0x1b0bb4-0x1d6;var _0x33162c=_0x567e90[_0x1b0bb4];return _0x33162c;},a3_0x1b0b(_0x4cc72b,_0x42b0ad);}export*from'./types.js';export*from'./errors.js';function a3_0x567e(){var _0x27554b=['45izuMvK','303336dqXFku','4794MIFSzR','63663YMFaMQ','1002346lUMOvu','1249376CFOGcX','20DZScXR','347320ujWzXH','62536arKMzZ','1673KQbJLQ'];a3_0x567e=function(){return _0x27554b;};return a3_0x567e();}
1
+ (function(_0x299063,_0x4770f8){var _0x3fe5b6=a3_0x408d,_0x5e806f=_0x299063();while(!![]){try{var _0x57e8d3=-parseInt(_0x3fe5b6(0x10e))/0x1+-parseInt(_0x3fe5b6(0x111))/0x2+parseInt(_0x3fe5b6(0x110))/0x3+-parseInt(_0x3fe5b6(0x10f))/0x4*(parseInt(_0x3fe5b6(0x112))/0x5)+parseInt(_0x3fe5b6(0x113))/0x6*(-parseInt(_0x3fe5b6(0x116))/0x7)+-parseInt(_0x3fe5b6(0x114))/0x8+parseInt(_0x3fe5b6(0x115))/0x9;if(_0x57e8d3===_0x4770f8)break;else _0x5e806f['push'](_0x5e806f['shift']());}catch(_0x1f42a6){_0x5e806f['push'](_0x5e806f['shift']());}}}(a3_0x27b3,0xa7083));export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';export*from'./types.js';export*from'./errors.js';function a3_0x408d(_0x3fa733,_0x34b2da){var _0x27b3fd=a3_0x27b3();return a3_0x408d=function(_0x408d92,_0x221b57){_0x408d92=_0x408d92-0x10e;var _0x3de2f3=_0x27b3fd[_0x408d92];return _0x3de2f3;},a3_0x408d(_0x3fa733,_0x34b2da);}function a3_0x27b3(){var _0x42e58c=['8772160cTllhg','17332218owwnHs','30079IDMRFC','994215LtTHfU','1391024mYrsfE','4058970FlbNbS','148990OgXAAa','5QIwYur','114ZKfowf'];a3_0x27b3=function(){return _0x42e58c;};return a3_0x27b3();}
@@ -1 +1 @@
1
- const a4_0x99f962=a4_0x2eb5;function a4_0x2eb5(_0x22e184,_0x155324){const _0x127e89=a4_0x127e();return a4_0x2eb5=function(_0x2eb569,_0x35910e){_0x2eb569=_0x2eb569-0x11d;let _0x47fcdd=_0x127e89[_0x2eb569];return _0x47fcdd;},a4_0x2eb5(_0x22e184,_0x155324);}(function(_0x5dc7d5,_0x24caaa){const _0x197a8d=a4_0x2eb5,_0xb3fe46=_0x5dc7d5();while(!![]){try{const _0x4a6fce=parseInt(_0x197a8d(0x120))/0x1+parseInt(_0x197a8d(0x12e))/0x2*(parseInt(_0x197a8d(0x123))/0x3)+-parseInt(_0x197a8d(0x122))/0x4*(-parseInt(_0x197a8d(0x12d))/0x5)+-parseInt(_0x197a8d(0x121))/0x6+-parseInt(_0x197a8d(0x129))/0x7*(parseInt(_0x197a8d(0x12f))/0x8)+-parseInt(_0x197a8d(0x127))/0x9*(-parseInt(_0x197a8d(0x132))/0xa)+-parseInt(_0x197a8d(0x11e))/0xb;if(_0x4a6fce===_0x24caaa)break;else _0xb3fe46['push'](_0xb3fe46['shift']());}catch(_0x137a4f){_0xb3fe46['push'](_0xb3fe46['shift']());}}}(a4_0x127e,0xdddf3));import a4_0x5a7428 from'form-data';function a4_0x127e(){const _0x443f1f=['application/zip','15563690mtbVbT','/next/test-sessions/','assets','assets.zip','3798553tvzDbd','/next/test-sessions/create','1194390wmdtlS','10230768pFwLVr','2356sdeEdE','185121nJRSjj','/assets','append','post','9qtihfu','api','2618YQFgxb','data','updateTestResult','uploadTestResultAsset','4415QxVqfS','44OlzKmg','35704fVmHck','/results/'];a4_0x127e=function(){return _0x443f1f;};return a4_0x127e();}export class TestResults{[a4_0x99f962(0x128)];constructor(_0xd732bb){this['api']=_0xd732bb;}async['createTestSession'](_0x51b1c7){const _0x3a0524=a4_0x99f962,_0x8170f1=await this['api'][_0x3a0524(0x126)](_0x3a0524(0x11f),_0x51b1c7);return _0x8170f1['data'];}async[a4_0x99f962(0x12c)](_0x31655e,_0x5b0bad,_0x3d6ae3){const _0x741c21=a4_0x99f962,_0x54d193=new a4_0x5a7428();_0x54d193[_0x741c21(0x125)](_0x741c21(0x134),_0x3d6ae3,{'filename':_0x741c21(0x11d),'contentType':_0x741c21(0x131)});const _0x333694=await this[_0x741c21(0x128)][_0x741c21(0x126)](_0x741c21(0x133)+_0x31655e+_0x741c21(0x130)+_0x5b0bad+_0x741c21(0x124),_0x54d193,{'headers':{..._0x54d193['getHeaders']()}});return _0x333694[_0x741c21(0x12a)];}async[a4_0x99f962(0x12b)](_0x3c91fa,_0x59b587,_0x5cbb87){const _0x2138f1=a4_0x99f962,_0x5d648b=await this['api'][_0x2138f1(0x126)](_0x2138f1(0x133)+_0x3c91fa+_0x2138f1(0x130)+_0x59b587,_0x5cbb87);return _0x5d648b[_0x2138f1(0x12a)];}}
1
+ const a4_0x1375db=a4_0x3311;function a4_0x3311(_0x1fc5d2,_0x229435){const _0x175dde=a4_0x175d();return a4_0x3311=function(_0x33118f,_0x39968f){_0x33118f=_0x33118f-0x1d0;let _0xebbe55=_0x175dde[_0x33118f];return _0xebbe55;},a4_0x3311(_0x1fc5d2,_0x229435);}(function(_0x4c83f5,_0x55cff3){const _0x328f21=a4_0x3311,_0x405ecf=_0x4c83f5();while(!![]){try{const _0x242b59=-parseInt(_0x328f21(0x1d6))/0x1+parseInt(_0x328f21(0x1e3))/0x2+-parseInt(_0x328f21(0x1df))/0x3*(-parseInt(_0x328f21(0x1d4))/0x4)+parseInt(_0x328f21(0x1e2))/0x5*(-parseInt(_0x328f21(0x1dc))/0x6)+-parseInt(_0x328f21(0x1d0))/0x7+-parseInt(_0x328f21(0x1d8))/0x8+parseInt(_0x328f21(0x1e5))/0x9;if(_0x242b59===_0x55cff3)break;else _0x405ecf['push'](_0x405ecf['shift']());}catch(_0x5d5ea2){_0x405ecf['push'](_0x405ecf['shift']());}}}(a4_0x175d,0x6345c));import a4_0x44ffb5 from'form-data';function a4_0x175d(){const _0x4fdb6e=['data','954BzHnmT','/assets','uploadTestResultAsset','72FqVDqp','createTestSession','post','20645HPOzlN','491582xhzsYz','/next/test-sessions/create','21901383mDnisj','updateTestResult','5336198ovsNtG','/next/test-sessions/','api','append','19356jBHQop','getHeaders','414401jOysAF','assets','4444544ydsBIY','application/zip','/results/'];a4_0x175d=function(){return _0x4fdb6e;};return a4_0x175d();}export class TestResults{[a4_0x1375db(0x1d2)];constructor(_0x3c44f7){const _0x31e419=a4_0x1375db;this[_0x31e419(0x1d2)]=_0x3c44f7;}async[a4_0x1375db(0x1e0)](_0xfa8ac3){const _0x242ea1=a4_0x1375db,_0x1cd753=await this[_0x242ea1(0x1d2)][_0x242ea1(0x1e1)](_0x242ea1(0x1e4),_0xfa8ac3);return _0x1cd753[_0x242ea1(0x1db)];}async[a4_0x1375db(0x1de)](_0x58641d,_0xdaa7e0,_0xc3bd40){const _0x2f25eb=a4_0x1375db,_0x436890=new a4_0x44ffb5();_0x436890[_0x2f25eb(0x1d3)](_0x2f25eb(0x1d7),_0xc3bd40,{'filename':'assets.zip','contentType':_0x2f25eb(0x1d9)});const _0x3f0446=await this[_0x2f25eb(0x1d2)]['post']('/next/test-sessions/'+_0x58641d+_0x2f25eb(0x1da)+_0xdaa7e0+_0x2f25eb(0x1dd),_0x436890,{'headers':{..._0x436890[_0x2f25eb(0x1d5)]()}});return _0x3f0446[_0x2f25eb(0x1db)];}async[a4_0x1375db(0x1e6)](_0xd513d6,_0x2f35e4,_0x304579){const _0x43a4de=a4_0x1375db,_0x5674a3=await this[_0x43a4de(0x1d2)]['post'](_0x43a4de(0x1d1)+_0xd513d6+_0x43a4de(0x1da)+_0x2f35e4,_0x304579);return _0x5674a3[_0x43a4de(0x1db)];}}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x589137,_0x543658){var _0x4a3201=a6_0x42a0,_0x80e43c=_0x589137();while(!![]){try{var _0x152952=-parseInt(_0x4a3201(0x187))/0x1*(-parseInt(_0x4a3201(0x183))/0x2)+parseInt(_0x4a3201(0x186))/0x3*(-parseInt(_0x4a3201(0x17e))/0x4)+-parseInt(_0x4a3201(0x181))/0x5*(-parseInt(_0x4a3201(0x182))/0x6)+parseInt(_0x4a3201(0x185))/0x7+parseInt(_0x4a3201(0x180))/0x8+parseInt(_0x4a3201(0x17f))/0x9+-parseInt(_0x4a3201(0x184))/0xa;if(_0x152952===_0x543658)break;else _0x80e43c['push'](_0x80e43c['shift']());}catch(_0x3fb05b){_0x80e43c['push'](_0x80e43c['shift']());}}}(a6_0x57dd,0x3a1ff));function a6_0x42a0(_0x49fcc3,_0xb3068b){var _0x57dd52=a6_0x57dd();return a6_0x42a0=function(_0x42a035,_0x368640){_0x42a035=_0x42a035-0x17e;var _0x194d51=_0x57dd52[_0x42a035];return _0x194d51;},a6_0x42a0(_0x49fcc3,_0xb3068b);}function a6_0x57dd(){var _0x3737b5=['649103gSTLvL','5097bPNGll','15MUNbzk','788axEpoJ','3548196CkHVcr','2721560AGPlmV','4075FhnAbe','1914tRwGBI','6626iscoFB','5640660lEhBhQ'];a6_0x57dd=function(){return _0x3737b5;};return a6_0x57dd();}export{ChecklyReporter}from'./reporter.js';export{AssetCollector}from'./asset-collector.js';export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';
1
+ (function(_0x517d01,_0x5ba935){var _0x5cb378=a6_0x42ff,_0x2aafa2=_0x517d01();while(!![]){try{var _0x3b5959=-parseInt(_0x5cb378(0x1b5))/0x1+-parseInt(_0x5cb378(0x1b3))/0x2+-parseInt(_0x5cb378(0x1b7))/0x3*(parseInt(_0x5cb378(0x1b8))/0x4)+parseInt(_0x5cb378(0x1b9))/0x5*(-parseInt(_0x5cb378(0x1b6))/0x6)+parseInt(_0x5cb378(0x1bb))/0x7*(-parseInt(_0x5cb378(0x1bc))/0x8)+-parseInt(_0x5cb378(0x1ba))/0x9+parseInt(_0x5cb378(0x1b4))/0xa;if(_0x3b5959===_0x5ba935)break;else _0x2aafa2['push'](_0x2aafa2['shift']());}catch(_0x46fd05){_0x2aafa2['push'](_0x2aafa2['shift']());}}}(a6_0x3948,0xbb2bd));export{ChecklyReporter}from'./reporter.js';function a6_0x3948(){var _0x13898b=['50774470JoIDKn','1069754lWbMDL','6RhxRih','9984ZQIwwx','52Itvcis','1714970LUnIMy','10399608ncFDIJ','21kJwkgW','3621808KxnMML','682184OvAUCG'];a6_0x3948=function(){return _0x13898b;};return a6_0x3948();}export{AssetCollector}from'./asset-collector.js';function a6_0x42ff(_0x39adbf,_0xb391b8){var _0x394835=a6_0x3948();return a6_0x42ff=function(_0x42ffd6,_0x559694){_0x42ffd6=_0x42ffd6-0x1b3;var _0x452101=_0x394835[_0x42ffd6];return _0x452101;},a6_0x42ff(_0x39adbf,_0xb391b8);}export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';
package/dist/reporter.js CHANGED
@@ -1 +1 @@
1
- const a7_0x59f70a=a7_0x1110;(function(_0x56e630,_0x57a466){const _0x5ba450=a7_0x1110,_0x22ae22=_0x56e630();while(!![]){try{const _0x1851e6=parseInt(_0x5ba450(0x202))/0x1*(-parseInt(_0x5ba450(0x201))/0x2)+-parseInt(_0x5ba450(0x1cf))/0x3*(parseInt(_0x5ba450(0x19f))/0x4)+parseInt(_0x5ba450(0x1d2))/0x5*(parseInt(_0x5ba450(0x1b9))/0x6)+-parseInt(_0x5ba450(0x1f0))/0x7+parseInt(_0x5ba450(0x1dc))/0x8+-parseInt(_0x5ba450(0x1c8))/0x9+-parseInt(_0x5ba450(0x19c))/0xa*(-parseInt(_0x5ba450(0x194))/0xb);if(_0x1851e6===_0x57a466)break;else _0x22ae22['push'](_0x22ae22['shift']());}catch(_0x5cb75f){_0x22ae22['push'](_0x22ae22['shift']());}}}(a7_0x326b,0x39c93));import*as a7_0x20a9f6 from'fs';import*as a7_0x1add55 from'path';function a7_0x1110(_0x37825a,_0x1bed09){const _0x326ba9=a7_0x326b();return a7_0x1110=function(_0x111074,_0x4a542d){_0x111074=_0x111074-0x192;let _0x231226=_0x326ba9[_0x111074];return _0x231226;},a7_0x1110(_0x37825a,_0x1bed09);}import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';function a7_0x326b(){const _0x18e5ec=['status','onTestEnd','link','stat','outputPath','58449SUrlZd','GITHUB_REF_NAME','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','251365AvdDTG','join','passed','select','https://github.com/','flaky','testSession','error','Project','env','1427496OtpvzT','max','accountId','Projects','en-US','warn','test-results/playwright-test-report.json','uploadTestResultAsset','assetId','retry','then','createReadStream','substring','testCounts','testResults','createTestSession','CHECKLY_ACCOUNT_ID','local','apiKey','dryRun','1416422ROuamA','version','\x0a======================================================','onError','onBegin','test-results','cwd','GITHUB_REPOSITORY','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','testResultId','🔗\x20Test\x20session\x20URL:\x20','CHECKLY_ENV','[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','zipper','printSummary','map','48194nlAwKE','9OomvMa','checkly-report.zip','GITHUB_ACTOR','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','getTime','11pAinMC','testResultsDir','CHECKLY_API_KEY','NODE_ENV','log','entries','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','[Checkly\x20Reporter]\x20Global\x20error:','5848490owdWXJ','testSessionId','package.json','4LvtssU','outcome','https://api-test.checklyhq.com','Playwright\x20Test\x20Session:\x20','readFileSync','\x0a======================================================\x0a','getAxiosInstance','https://api-dev.checklyhq.com','PW_REPORTER','onEnd','environment','toISOString','GITHUB_SHA','collectAssets','test','\x20\x20reporter:\x20[\x0a','url','startTime','message','\x22,\x20using\x20\x22production\x22','failed','PluralRules','promises','options','development','zipPath','18LKpVKO','jsonReportPath','includes','production','unlinkSync','FAILED','createZip','projects','assetCollector','config','length','replace','existsSync','uploadResults','utf-8','2148408lvPhxA','🦝\x20Checkly\x20reporter:\x20'];a7_0x326b=function(){return _0x18e5ec;};return a7_0x326b();}import a7_0x2b7161 from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';const __filename=fileURLToPath(import.meta[a7_0x59f70a(0x1af)]),__dirname=dirname(__filename),packageJson=JSON['parse'](readFileSync(join(__dirname,'..',a7_0x59f70a(0x19e)),a7_0x59f70a(0x1c7))),pkgVersion=packageJson['version'],pluralRules=new Intl[(a7_0x59f70a(0x1b4))](a7_0x59f70a(0x1e0)),projectForms={'zero':a7_0x59f70a(0x1da),'one':a7_0x59f70a(0x1da),'two':a7_0x59f70a(0x1df),'few':a7_0x59f70a(0x1df),'many':a7_0x59f70a(0x1df),'other':a7_0x59f70a(0x1df)};function getApiUrl(_0x4a7582){const _0x10a5f4=a7_0x59f70a,_0x3dcbee={'local':'http://127.0.0.1:3000','development':_0x10a5f4(0x1a6),'staging':_0x10a5f4(0x1a1),'production':'https://api.checklyhq.com'};return _0x3dcbee[_0x4a7582];}function getEnvironment(_0x47838f){const _0x113405=a7_0x59f70a,_0x1ac4c4=_0x47838f?.[_0x113405(0x1a9)],_0x7ff0ea=process['env'][_0x113405(0x1fb)],_0x37199e=_0x1ac4c4||_0x7ff0ea||'production',_0x1547fb=[_0x113405(0x1ed),_0x113405(0x1b7),'staging',_0x113405(0x1bc)];if(!_0x1547fb[_0x113405(0x1bb)](_0x37199e))return console[_0x113405(0x1e1)](_0x113405(0x1fd)+_0x37199e+_0x113405(0x1b2)),'production';return _0x37199e;}function getDirectoryName(){const _0x2d922e=a7_0x59f70a,_0xff4474=process[_0x2d922e(0x1f6)]();let _0x5adab1=a7_0x1add55['basename'](_0xff4474);return(!_0x5adab1||_0x5adab1==='/'||_0x5adab1==='.')&&(_0x5adab1='playwright-tests'),_0x5adab1=_0x5adab1[_0x2d922e(0x1c4)](/[<>:"|?*]/g,'-'),_0x5adab1['length']>0xff&&(_0x5adab1=_0x5adab1[_0x2d922e(0x1e8)](0x0,0xff)),_0x5adab1;}export class ChecklyReporter{[a7_0x59f70a(0x1b6)];[a7_0x59f70a(0x1c1)];[a7_0x59f70a(0x1fe)];[a7_0x59f70a(0x1ea)];[a7_0x59f70a(0x1d8)];[a7_0x59f70a(0x1b0)];[a7_0x59f70a(0x1e9)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x41aec0={}){const _0x1eece8=a7_0x59f70a,_0x47bc50=getEnvironment(_0x41aec0),_0x252358=getApiUrl(_0x47bc50),_0x16dde3=process[_0x1eece8(0x1db)][_0x1eece8(0x196)]||_0x41aec0[_0x1eece8(0x1ee)],_0x4ac4b8=process[_0x1eece8(0x1db)][_0x1eece8(0x1ec)]||_0x41aec0['accountId'];this[_0x1eece8(0x1b6)]={'accountId':_0x4ac4b8,'apiKey':_0x16dde3,'outputPath':_0x41aec0[_0x1eece8(0x1ce)]??_0x1eece8(0x203),'jsonReportPath':_0x41aec0[_0x1eece8(0x1ba)]??_0x1eece8(0x1e2),'testResultsDir':_0x41aec0[_0x1eece8(0x195)]??_0x1eece8(0x1f5),'dryRun':_0x41aec0[_0x1eece8(0x1ef)]??![]},this[_0x1eece8(0x1c1)]=new AssetCollector(this[_0x1eece8(0x1b6)][_0x1eece8(0x195)]),this['zipper']=new Zipper({'outputPath':this[_0x1eece8(0x1b6)][_0x1eece8(0x1ce)]});if(!this[_0x1eece8(0x1b6)]['dryRun']&&this['options'][_0x1eece8(0x1ee)]&&this[_0x1eece8(0x1b6)][_0x1eece8(0x1de)]){const _0x3ab771=new a7_0x2b7161({'apiKey':this[_0x1eece8(0x1b6)][_0x1eece8(0x1ee)],'accountId':this[_0x1eece8(0x1b6)]['accountId'],'baseUrl':_0x252358});this[_0x1eece8(0x1ea)]=new TestResults(_0x3ab771[_0x1eece8(0x1a5)]());}}[a7_0x59f70a(0x1f4)](_0x3e8cb7,_0x3a7e2d){const _0x3675fa=a7_0x59f70a;this[_0x3675fa(0x1b0)]=new Date();if(!this['testResults'])return;try{const _0x43ff2c=getDirectoryName(),_0x14e31e=[{'name':_0x43ff2c}],_0x13b2cd=process[_0x3675fa(0x1db)]['GITHUB_REPOSITORY']?_0x3675fa(0x1d6)+process['env'][_0x3675fa(0x1f7)]:undefined,_0xb99e88=_0x13b2cd?{'repoUrl':_0x13b2cd,'commitId':process[_0x3675fa(0x1db)][_0x3675fa(0x1ab)],'branchName':process[_0x3675fa(0x1db)][_0x3675fa(0x1d0)],'commitOwner':process[_0x3675fa(0x1db)][_0x3675fa(0x204)],'commitMessage':process['env']['GITHUB_EVENT_NAME']}:undefined;this[_0x3675fa(0x1ea)][_0x3675fa(0x1eb)]({'name':_0x3675fa(0x1a2)+_0x43ff2c,'environment':process[_0x3675fa(0x1db)][_0x3675fa(0x197)]||_0x3675fa(0x1ad),'repoInfo':_0xb99e88,'startedAt':this[_0x3675fa(0x1b0)]['getTime'](),'testResults':_0x14e31e,'provider':_0x3675fa(0x1a7)})[_0x3675fa(0x1e6)](_0x486313=>{const _0x57abad=_0x3675fa;this[_0x57abad(0x1d8)]=_0x486313;})['catch'](_0x58bd68=>{const _0x2a3b9f=_0x3675fa;console['error']('[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:',_0x58bd68[_0x2a3b9f(0x1b1)]);});}catch(_0x3bbf89){console['error']('[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:',_0x3bbf89);}}[a7_0x59f70a(0x1cb)](_0xe4a4c6,_0x2747e3){const _0xe21c61=a7_0x59f70a;try{const _0x4cb088=_0x2747e3[_0xe21c61(0x1ca)]===_0xe21c61(0x1d4)||_0x2747e3[_0xe21c61(0x1e5)]===_0xe4a4c6['retries'];if(!_0x4cb088)return;const _0xca72e3=_0xe4a4c6[_0xe21c61(0x1a0)]()===_0xe21c61(0x1d7);if(_0xca72e3)this[_0xe21c61(0x1e9)][_0xe21c61(0x1d7)]++,this[_0xe21c61(0x1e9)][_0xe21c61(0x1d4)]++;else{if(_0x2747e3['status']===_0xe21c61(0x1d4))this[_0xe21c61(0x1e9)][_0xe21c61(0x1d4)]++;else _0x2747e3[_0xe21c61(0x1ca)]===_0xe21c61(0x1b3)&&this['testCounts']['failed']++;}}catch(_0x405795){console[_0xe21c61(0x1d9)](_0xe21c61(0x19a),_0x405795);}}async[a7_0x59f70a(0x1a8)](){const _0x45e28a=a7_0x59f70a;try{const _0x17e659=this[_0x45e28a(0x1b6)][_0x45e28a(0x1ba)];if(!a7_0x20a9f6[_0x45e28a(0x1c5)](_0x17e659)){console['error'](_0x45e28a(0x1f8)+_0x17e659),console[_0x45e28a(0x1d9)]('[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:'),console[_0x45e28a(0x1d9)](_0x45e28a(0x1ae)+_0x45e28a(0x1d1)+'\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a'+'\x20\x20]');return;}const _0x3be43c=a7_0x20a9f6[_0x45e28a(0x1a3)](_0x17e659,_0x45e28a(0x1c7)),_0x4fbe60=JSON['parse'](_0x3be43c),_0x29c683=await this[_0x45e28a(0x1c1)][_0x45e28a(0x1ac)](_0x4fbe60),_0x21708c=await this[_0x45e28a(0x1fe)][_0x45e28a(0x1bf)](_0x17e659,_0x29c683);if(this[_0x45e28a(0x1ea)]&&this['testSession']){await this['uploadResults'](_0x4fbe60,_0x21708c['zipPath'],_0x21708c[_0x45e28a(0x199)]);if(!this[_0x45e28a(0x1b6)][_0x45e28a(0x1ef)])try{a7_0x20a9f6[_0x45e28a(0x1bd)](_0x21708c[_0x45e28a(0x1b8)]);}catch(_0x3febb6){console[_0x45e28a(0x1e1)](_0x45e28a(0x192)+_0x3febb6);}}this['testResults']&&this[_0x45e28a(0x1d8)]?.[_0x45e28a(0x1cc)]&&this[_0x45e28a(0x1ff)](_0x4fbe60,this[_0x45e28a(0x1d8)]);}catch(_0x12d929){console[_0x45e28a(0x1d9)]('[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:',_0x12d929);}}[a7_0x59f70a(0x1ff)](_0x11a9d0,_0x276fe5){const _0x5ec8cf=a7_0x59f70a,_0x2e624a=pluralRules[_0x5ec8cf(0x1d5)](_0x11a9d0[_0x5ec8cf(0x1c2)][_0x5ec8cf(0x1c0)][_0x5ec8cf(0x1c3)]);console[_0x5ec8cf(0x198)](_0x5ec8cf(0x1a4)),console['log'](_0x5ec8cf(0x1c9)+pkgVersion),console['log']('🎭\x20Playwright:\x20'+_0x11a9d0[_0x5ec8cf(0x1c2)][_0x5ec8cf(0x1f1)]),console['log']('📔\x20'+projectForms[_0x2e624a]+':\x20'+_0x11a9d0[_0x5ec8cf(0x1c2)][_0x5ec8cf(0x1c0)][_0x5ec8cf(0x200)](({name:_0x52ccb8})=>_0x52ccb8)[_0x5ec8cf(0x1d3)](',')),console[_0x5ec8cf(0x198)](_0x5ec8cf(0x1fa)+_0x276fe5[_0x5ec8cf(0x1cc)]),console[_0x5ec8cf(0x198)](_0x5ec8cf(0x1f2));}async[a7_0x59f70a(0x1c6)](_0x447a4b,_0x297a7c,_0x38862e){const _0x3f839a=a7_0x59f70a;if(!this[_0x3f839a(0x1ea)]||!this['testSession'])return;try{const {failed:_0x2dcef8,flaky:_0x432b74}=this[_0x3f839a(0x1e9)],_0x2e8368=_0x2dcef8>0x0?_0x3f839a(0x1be):'PASSED',_0x99e3fb=_0x2dcef8===0x0&&_0x432b74>0x0,_0x5c4713=new Date(),_0x5c01a8=this['startTime']?Math[_0x3f839a(0x1dd)](0x0,_0x5c4713[_0x3f839a(0x193)]()-this[_0x3f839a(0x1b0)]['getTime']()):0x0,_0x3b77fd=(await a7_0x20a9f6[_0x3f839a(0x1b5)][_0x3f839a(0x1cd)](_0x297a7c))['size'];if(this[_0x3f839a(0x1d8)][_0x3f839a(0x1ea)]['length']>0x0){const _0x2579ec=this[_0x3f839a(0x1d8)][_0x3f839a(0x1ea)][0x0];let _0x30205b;if(_0x3b77fd>0x0)try{const _0x221e8b=a7_0x20a9f6[_0x3f839a(0x1e7)](_0x297a7c),_0x453f38=await this[_0x3f839a(0x1ea)][_0x3f839a(0x1e3)](this[_0x3f839a(0x1d8)][_0x3f839a(0x19d)],_0x2579ec[_0x3f839a(0x1f9)],_0x221e8b);_0x30205b=_0x453f38[_0x3f839a(0x1e4)];}catch(_0x5e4bb9){const _0x1ca9de=_0x5e4bb9 instanceof Error?_0x5e4bb9['message']:String(_0x5e4bb9);console[_0x3f839a(0x1d9)]('[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:',_0x1ca9de);}await this['testResults']['updateTestResult'](this['testSession'][_0x3f839a(0x19d)],_0x2579ec[_0x3f839a(0x1f9)],{'status':_0x2e8368,'assetEntries':_0x30205b?_0x38862e:undefined,'isDegraded':_0x99e3fb,'startedAt':this['startTime']?.[_0x3f839a(0x1aa)](),'stoppedAt':_0x5c4713[_0x3f839a(0x1aa)](),'responseTime':_0x5c01a8,'metadata':{'usageData':{'s3PostTotalBytes':_0x3b77fd}}});}}catch(_0x28f3a7){const _0xad2a7b=_0x28f3a7 instanceof Error?_0x28f3a7[_0x3f839a(0x1b1)]:String(_0x28f3a7);console[_0x3f839a(0x1d9)](_0x3f839a(0x1fc),_0xad2a7b);}}[a7_0x59f70a(0x1f3)](_0x431893){const _0x55268b=a7_0x59f70a;console['error'](_0x55268b(0x19b),_0x431893);}}
1
+ const a7_0x3d9455=a7_0x34c7;(function(_0x4fd62d,_0x72ce1b){const _0x5411f8=a7_0x34c7,_0x4d3ae2=_0x4fd62d();while(!![]){try{const _0x375cfb=parseInt(_0x5411f8(0x1f4))/0x1+-parseInt(_0x5411f8(0x200))/0x2*(-parseInt(_0x5411f8(0x214))/0x3)+-parseInt(_0x5411f8(0x1f8))/0x4*(-parseInt(_0x5411f8(0x1ab))/0x5)+parseInt(_0x5411f8(0x1e8))/0x6*(-parseInt(_0x5411f8(0x1aa))/0x7)+parseInt(_0x5411f8(0x1b7))/0x8*(-parseInt(_0x5411f8(0x1c0))/0x9)+parseInt(_0x5411f8(0x1e9))/0xa*(parseInt(_0x5411f8(0x1f3))/0xb)+-parseInt(_0x5411f8(0x1df))/0xc*(parseInt(_0x5411f8(0x1b1))/0xd);if(_0x375cfb===_0x72ce1b)break;else _0x4d3ae2['push'](_0x4d3ae2['shift']());}catch(_0x1b1363){_0x4d3ae2['push'](_0x4d3ae2['shift']());}}}(a7_0x2637,0x7873d));import*as a7_0x39e285 from'fs';import*as a7_0x4066ea from'path';import{AssetCollector}from'./asset-collector.js';function a7_0x34c7(_0x47d2e7,_0x3f8f27){const _0x263760=a7_0x2637();return a7_0x34c7=function(_0x34c76d,_0x19c94e){_0x34c76d=_0x34c76d-0x1a9;let _0x6f2e8e=_0x263760[_0x34c76d];return _0x6f2e8e;},a7_0x34c7(_0x47d2e7,_0x3f8f27);}import{Zipper}from'./zipper.js';import a7_0x51fdd9 from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a7_0x2637(){const _0x27d31e=['updateTestResult','169527pkEnwz','testResultsDir','21lQxmCW','371155jUbJXP','outcome','\x22,\x20using\x20\x22production\x22','options','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','development','26BQiTpX','zipPath','staging','Project','\x0a======================================================\x0a','testResults','8dmrwCV','Playwright\x20Test\x20Session:\x20','env','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','https://api.checklyhq.com','testResultId','dryRun','testCounts','test-results/playwright-test-report.json','1158093ImpQFn','production','test','join','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','uploadTestResultAsset','log','version','passed','parse','readFileSync','startTime','PASSED','cwd','length','FAILED','CHECKLY_ACCOUNT_ID','stat','package.json','warn','jsonReportPath','🦝\x20Checkly\x20reporter:\x20','📔\x20','\x20\x20reporter:\x20[\x0a','GITHUB_EVENT_NAME','flaky','zipper','CHECKLY_ENV','then','GITHUB_ACTOR','createReadStream','1661388eAQbhi','config','onBegin','checkly-report.zip','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','status','outputPath','\x20\x20]','618222syVlUG','447540MtuxFp','includes','link','[Checkly\x20Reporter]\x20Global\x20error:','printSummary','test-results','failed','substring','max','testSession','55GAlZsj','288459lTyvuJ','apiKey','assetId','accountId','4HKFUrK','Projects','https://api-dev.checklyhq.com','utf-8','onEnd','retries','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','message','22KdhOgC','testSessionId','environment','GITHUB_SHA','uploadResults','CHECKLY_API_KEY','error','[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:','toISOString','onTestEnd','projects','en-US','getTime','unlinkSync','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','GITHUB_REPOSITORY','onError','retry','PW_REPORTER'];a7_0x2637=function(){return _0x27d31e;};return a7_0x2637();}const __filename=fileURLToPath(import.meta['url']),__dirname=dirname(__filename),packageJson=JSON[a7_0x3d9455(0x1c9)](readFileSync(join(__dirname,'..',a7_0x3d9455(0x1d2)),a7_0x3d9455(0x1fb))),pkgVersion=packageJson[a7_0x3d9455(0x1c7)],pluralRules=new Intl['PluralRules'](a7_0x3d9455(0x20b)),projectForms={'zero':'Project','one':a7_0x3d9455(0x1b4),'two':a7_0x3d9455(0x1f9),'few':'Projects','many':a7_0x3d9455(0x1f9),'other':a7_0x3d9455(0x1f9)};function getApiUrl(_0x45db26){const _0x2b5d50=a7_0x3d9455,_0x1a5e1d={'local':'http://127.0.0.1:3000','development':_0x2b5d50(0x1fa),'staging':'https://api-test.checklyhq.com','production':_0x2b5d50(0x1bb)};return _0x1a5e1d[_0x45db26];}function getEnvironment(_0x33cdf2){const _0x229e68=a7_0x3d9455,_0x33dc90=_0x33cdf2?.[_0x229e68(0x202)],_0x4c5178=process[_0x229e68(0x1b9)][_0x229e68(0x1db)],_0x7dbeca=_0x33dc90||_0x4c5178||'production',_0x520974=['local',_0x229e68(0x1b0),_0x229e68(0x1b3),_0x229e68(0x1c1)];if(!_0x520974[_0x229e68(0x1ea)](_0x7dbeca))return console[_0x229e68(0x1d3)](_0x229e68(0x1e3)+_0x7dbeca+_0x229e68(0x1ad)),_0x229e68(0x1c1);return _0x7dbeca;}function getDirectoryName(){const _0x3adcea=a7_0x3d9455,_0x298af5=process[_0x3adcea(0x1cd)]();let _0x57305f=a7_0x4066ea['basename'](_0x298af5);return(!_0x57305f||_0x57305f==='/'||_0x57305f==='.')&&(_0x57305f='playwright-tests'),_0x57305f=_0x57305f['replace'](/[<>:"|?*]/g,'-'),_0x57305f[_0x3adcea(0x1ce)]>0xff&&(_0x57305f=_0x57305f[_0x3adcea(0x1f0)](0x0,0xff)),_0x57305f;}export class ChecklyReporter{[a7_0x3d9455(0x1ae)];['assetCollector'];[a7_0x3d9455(0x1da)];[a7_0x3d9455(0x1b6)];[a7_0x3d9455(0x1f2)];[a7_0x3d9455(0x1cb)];[a7_0x3d9455(0x1be)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x29a42e={}){const _0x14edc5=a7_0x3d9455,_0x14141a=getEnvironment(_0x29a42e),_0x3b450f=getApiUrl(_0x14141a),_0x2b490d=process['env'][_0x14edc5(0x205)]||_0x29a42e[_0x14edc5(0x1f5)],_0x4f4cb2=process[_0x14edc5(0x1b9)][_0x14edc5(0x1d0)]||_0x29a42e['accountId'];this[_0x14edc5(0x1ae)]={'accountId':_0x4f4cb2,'apiKey':_0x2b490d,'outputPath':_0x29a42e[_0x14edc5(0x1e6)]??_0x14edc5(0x1e2),'jsonReportPath':_0x29a42e['jsonReportPath']??_0x14edc5(0x1bf),'testResultsDir':_0x29a42e[_0x14edc5(0x1a9)]??_0x14edc5(0x1ee),'dryRun':_0x29a42e[_0x14edc5(0x1bd)]??![]},this['assetCollector']=new AssetCollector(this['options'][_0x14edc5(0x1a9)]),this[_0x14edc5(0x1da)]=new Zipper({'outputPath':this[_0x14edc5(0x1ae)]['outputPath']});if(!this[_0x14edc5(0x1ae)][_0x14edc5(0x1bd)]&&this[_0x14edc5(0x1ae)][_0x14edc5(0x1f5)]&&this[_0x14edc5(0x1ae)][_0x14edc5(0x1f7)]){const _0x46caf5=new a7_0x51fdd9({'apiKey':this[_0x14edc5(0x1ae)][_0x14edc5(0x1f5)],'accountId':this[_0x14edc5(0x1ae)][_0x14edc5(0x1f7)],'baseUrl':_0x3b450f});this[_0x14edc5(0x1b6)]=new TestResults(_0x46caf5['getAxiosInstance']());}}[a7_0x3d9455(0x1e1)](_0x5cbf9a,_0x5b964d){const _0xffbb8f=a7_0x3d9455;this[_0xffbb8f(0x1cb)]=new Date();if(!this['testResults'])return;try{const _0x49f7a3=getDirectoryName(),_0x20602f=[{'name':_0x49f7a3}],_0x307ab8=process[_0xffbb8f(0x1b9)][_0xffbb8f(0x20f)]?'https://github.com/'+process[_0xffbb8f(0x1b9)][_0xffbb8f(0x20f)]:undefined,_0x19035c=_0x307ab8?{'repoUrl':_0x307ab8,'commitId':process[_0xffbb8f(0x1b9)][_0xffbb8f(0x203)],'branchName':process[_0xffbb8f(0x1b9)]['GITHUB_REF_NAME'],'commitOwner':process[_0xffbb8f(0x1b9)][_0xffbb8f(0x1dd)],'commitMessage':process[_0xffbb8f(0x1b9)][_0xffbb8f(0x1d8)]}:undefined;this['testResults']['createTestSession']({'name':_0xffbb8f(0x1b8)+_0x49f7a3,'environment':process['env']['NODE_ENV']||_0xffbb8f(0x1c2),'repoInfo':_0x19035c,'startedAt':this[_0xffbb8f(0x1cb)][_0xffbb8f(0x20c)](),'testResults':_0x20602f,'provider':_0xffbb8f(0x212)})[_0xffbb8f(0x1dc)](_0x3d61a6=>{const _0x32a2ca=_0xffbb8f;this[_0x32a2ca(0x1f2)]=_0x3d61a6;})['catch'](_0x2918d3=>{const _0x56601e=_0xffbb8f;console[_0x56601e(0x206)](_0x56601e(0x1c4),_0x2918d3['message']);});}catch(_0x331382){console[_0xffbb8f(0x206)]('[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:',_0x331382);}}[a7_0x3d9455(0x209)](_0x4b0fbe,_0x125684){const _0x10da5d=a7_0x3d9455;try{const _0x3de55a=_0x125684[_0x10da5d(0x1e5)]===_0x10da5d(0x1c8)||_0x125684[_0x10da5d(0x211)]===_0x4b0fbe[_0x10da5d(0x1fd)];if(!_0x3de55a)return;const _0xf2d7ac=_0x4b0fbe[_0x10da5d(0x1ac)]()==='flaky';if(_0xf2d7ac)this[_0x10da5d(0x1be)][_0x10da5d(0x1d9)]++,this[_0x10da5d(0x1be)][_0x10da5d(0x1c8)]++;else{if(_0x125684[_0x10da5d(0x1e5)]===_0x10da5d(0x1c8))this['testCounts'][_0x10da5d(0x1c8)]++;else _0x125684[_0x10da5d(0x1e5)]===_0x10da5d(0x1ef)&&this[_0x10da5d(0x1be)][_0x10da5d(0x1ef)]++;}}catch(_0x377454){console['error'](_0x10da5d(0x1fe),_0x377454);}}async[a7_0x3d9455(0x1fc)](){const _0x2a81ea=a7_0x3d9455;try{const _0x32dad2=this[_0x2a81ea(0x1ae)][_0x2a81ea(0x1d4)];if(!a7_0x39e285['existsSync'](_0x32dad2)){console[_0x2a81ea(0x206)](_0x2a81ea(0x20e)+_0x32dad2),console[_0x2a81ea(0x206)]('[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:'),console['error'](_0x2a81ea(0x1d7)+_0x2a81ea(0x1ba)+_0x2a81ea(0x1af)+_0x2a81ea(0x1e7));return;}const _0x19222c=a7_0x39e285[_0x2a81ea(0x1ca)](_0x32dad2,'utf-8'),_0x141d44=JSON['parse'](_0x19222c),_0x17b24c=await this['assetCollector']['collectAssets'](_0x141d44),_0x288251=await this[_0x2a81ea(0x1da)]['createZip'](_0x32dad2,_0x17b24c);if(this[_0x2a81ea(0x1b6)]&&this[_0x2a81ea(0x1f2)]){await this[_0x2a81ea(0x204)](_0x141d44,_0x288251[_0x2a81ea(0x1b2)],_0x288251['entries']);if(!this[_0x2a81ea(0x1ae)][_0x2a81ea(0x1bd)])try{a7_0x39e285[_0x2a81ea(0x20d)](_0x288251[_0x2a81ea(0x1b2)]);}catch(_0x3032e8){console[_0x2a81ea(0x1d3)](_0x2a81ea(0x1e4)+_0x3032e8);}}this['testResults']&&this[_0x2a81ea(0x1f2)]?.[_0x2a81ea(0x1eb)]&&this[_0x2a81ea(0x1ed)](_0x141d44,this[_0x2a81ea(0x1f2)]);}catch(_0x34b3fe){console[_0x2a81ea(0x206)]('[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:',_0x34b3fe);}}[a7_0x3d9455(0x1ed)](_0x5f05be,_0x4326b9){const _0x4059d4=a7_0x3d9455,_0x9c1507=pluralRules['select'](_0x5f05be['config'][_0x4059d4(0x20a)][_0x4059d4(0x1ce)]);console['log'](_0x4059d4(0x1b5)),console[_0x4059d4(0x1c6)](_0x4059d4(0x1d5)+pkgVersion),console['log']('🎭\x20Playwright:\x20'+_0x5f05be[_0x4059d4(0x1e0)][_0x4059d4(0x1c7)]),console[_0x4059d4(0x1c6)](_0x4059d4(0x1d6)+projectForms[_0x9c1507]+':\x20'+_0x5f05be[_0x4059d4(0x1e0)][_0x4059d4(0x20a)]['map'](({name:_0x7b2b3})=>_0x7b2b3)[_0x4059d4(0x1c3)](',')),console[_0x4059d4(0x1c6)]('🔗\x20Test\x20session\x20URL:\x20'+_0x4326b9[_0x4059d4(0x1eb)]),console[_0x4059d4(0x1c6)]('\x0a======================================================');}async[a7_0x3d9455(0x204)](_0x589e1b,_0x4276d1,_0x3e79d1){const _0x408106=a7_0x3d9455;if(!this['testResults']||!this[_0x408106(0x1f2)])return;try{const {failed:_0x3be0c2,flaky:_0x18951f}=this[_0x408106(0x1be)],_0x97f312=_0x3be0c2>0x0?_0x408106(0x1cf):_0x408106(0x1cc),_0x2907c6=_0x3be0c2===0x0&&_0x18951f>0x0,_0x33c78e=new Date(),_0x346a08=this[_0x408106(0x1cb)]?Math[_0x408106(0x1f1)](0x0,_0x33c78e[_0x408106(0x20c)]()-this[_0x408106(0x1cb)][_0x408106(0x20c)]()):0x0,_0x586ac7=(await a7_0x39e285['promises'][_0x408106(0x1d1)](_0x4276d1))['size'];if(this[_0x408106(0x1f2)]['testResults'][_0x408106(0x1ce)]>0x0){const _0x40dc28=this[_0x408106(0x1f2)][_0x408106(0x1b6)][0x0];let _0x3d966b;if(_0x586ac7>0x0)try{const _0x33f37e=a7_0x39e285[_0x408106(0x1de)](_0x4276d1),_0x34e6bd=await this['testResults'][_0x408106(0x1c5)](this['testSession'][_0x408106(0x201)],_0x40dc28[_0x408106(0x1bc)],_0x33f37e);_0x3d966b=_0x34e6bd[_0x408106(0x1f6)];}catch(_0x30d1cd){const _0x3dd9c1=_0x30d1cd instanceof Error?_0x30d1cd[_0x408106(0x1ff)]:String(_0x30d1cd);console['error'](_0x408106(0x207),_0x3dd9c1);}await this[_0x408106(0x1b6)][_0x408106(0x213)](this[_0x408106(0x1f2)][_0x408106(0x201)],_0x40dc28[_0x408106(0x1bc)],{'status':_0x97f312,'assetEntries':_0x3d966b?_0x3e79d1:undefined,'isDegraded':_0x2907c6,'startedAt':this[_0x408106(0x1cb)]?.[_0x408106(0x208)](),'stoppedAt':_0x33c78e[_0x408106(0x208)](),'responseTime':_0x346a08,'metadata':{'usageData':{'s3PostTotalBytes':_0x586ac7}}});}}catch(_0x7a76b0){const _0x1cd1c9=_0x7a76b0 instanceof Error?_0x7a76b0[_0x408106(0x1ff)]:String(_0x7a76b0);console['error']('[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:',_0x1cd1c9);}}[a7_0x3d9455(0x210)](_0x33f3dc){const _0x5cc44a=a7_0x3d9455;console[_0x5cc44a(0x206)](_0x5cc44a(0x1ec),_0x33f3dc);}}
package/dist/zipper.js CHANGED
@@ -1 +1 @@
1
- const a9_0x2b7114=a9_0x33d0;function a9_0x33d0(_0x473665,_0x79480c){const _0x408210=a9_0x4082();return a9_0x33d0=function(_0x33d018,_0x933ac8){_0x33d018=_0x33d018-0x1c9;let _0x5eeeac=_0x408210[_0x33d018];return _0x5eeeac;},a9_0x33d0(_0x473665,_0x79480c);}(function(_0x4a07d0,_0x38ee3a){const _0x4491eb=a9_0x33d0,_0x1ead4f=_0x4a07d0();while(!![]){try{const _0x2ac1b3=-parseInt(_0x4491eb(0x1d1))/0x1*(parseInt(_0x4491eb(0x1da))/0x2)+-parseInt(_0x4491eb(0x1f5))/0x3*(parseInt(_0x4491eb(0x1e6))/0x4)+-parseInt(_0x4491eb(0x1d8))/0x5*(parseInt(_0x4491eb(0x1fe))/0x6)+-parseInt(_0x4491eb(0x1ee))/0x7+-parseInt(_0x4491eb(0x1e0))/0x8*(parseInt(_0x4491eb(0x1d5))/0x9)+-parseInt(_0x4491eb(0x1f7))/0xa*(parseInt(_0x4491eb(0x1f0))/0xb)+-parseInt(_0x4491eb(0x1e9))/0xc*(-parseInt(_0x4491eb(0x1d6))/0xd);if(_0x2ac1b3===_0x38ee3a)break;else _0x1ead4f['push'](_0x1ead4f['shift']());}catch(_0x45e815){_0x1ead4f['push'](_0x1ead4f['shift']());}}}(a9_0x4082,0xe9788));import*as a9_0x210cab from'fs';import*as a9_0x531dd8 from'path';import*as a9_0x173ac5 from'os';import{ZipArchive}from'archiver';function a9_0x4082(){const _0x896d0b=['error','utf-8','tmpdir','lastIndexOf','createZip','108weUDLx','replace','push','57780lpCOtZ','now','playwright-test-report-','substring','_offsets','62986pQoqLG','archivePath','11xwaKee','output/playwright-test-report.json','normalizeAttachmentPath','transformAttachmentPaths','transformJsonReport','105843TLBvVn','file','18620230aQkGeX','pointer','close','Report\x20file\x20not\x20found:\x20','screenshots/','writeFileSync','forEach','6DEZRGS','finalize','indexOf','attachments','sourcePath','contents','__screenshots__/','-snapshots/','path','isArray','.json','1621MUXpJg','Asset\x20file\x20not\x20found:\x20','existsSync','parse','261PnqcNT','19773htTSjv','createWriteStream','5665045lbpHsH','join','2230LOBqyY','length','outputPath','string','values','warn','166424OeFgyi'];a9_0x4082=function(){return _0x896d0b;};return a9_0x4082();}export class Zipper{[a9_0x2b7114(0x1dc)];constructor(_0x5097b1){const _0x179d09=a9_0x2b7114;this['outputPath']=_0x5097b1[_0x179d09(0x1dc)];}async[a9_0x2b7114(0x1e5)](_0x41e9a9,_0x37e059){const _0xe2f2b=[];return new Promise((_0x3bc307,_0x3a5103)=>{const _0x4268b2=a9_0x33d0;try{const _0x4281de=a9_0x210cab[_0x4268b2(0x1d7)](this[_0x4268b2(0x1dc)]),_0x18df51=new ZipArchive({'zlib':{'level':0x0}});_0x18df51['on']('entry',_0xeb6589=>{const _0x2d8911=_0x4268b2,_0x30720b=_0xeb6589['name'][_0x2d8911(0x1e7)](/\\/g,'/'),_0x58c275=_0xeb6589[_0x2d8911(0x1ed)]?.[_0x2d8911(0x1cb)]??0x0,_0x5cf855=_0xeb6589[_0x2d8911(0x1ed)]?.[_0x2d8911(0x1cb)]+(_0xeb6589['csize']??0x0)-0x1;_0xe2f2b[_0x2d8911(0x1e8)]({'name':_0x30720b,'start':_0x58c275,'end':_0x5cf855});}),_0x4281de['on'](_0x4268b2(0x1f9),()=>{const _0x29c491=_0x4268b2,_0x51966e=_0x18df51[_0x29c491(0x1f8)]();_0x3bc307({'zipPath':this[_0x29c491(0x1dc)],'size':_0x51966e,'entryCount':_0xe2f2b[_0x29c491(0x1db)],'entries':_0xe2f2b});}),_0x18df51['on'](_0x4268b2(0x1e1),_0x2bd253=>{_0x3a5103(_0x2bd253);}),_0x4281de['on']('error',_0xdb8dab=>{_0x3a5103(_0xdb8dab);}),_0x18df51['pipe'](_0x4281de);if(!a9_0x210cab[_0x4268b2(0x1d3)](_0x41e9a9)){_0x3a5103(new Error(_0x4268b2(0x1fa)+_0x41e9a9));return;}const _0xa88159=this[_0x4268b2(0x1f4)](_0x41e9a9);_0x18df51[_0x4268b2(0x1f6)](_0xa88159,{'name':_0x4268b2(0x1f1)});for(const _0x458a00 of _0x37e059){if(!a9_0x210cab['existsSync'](_0x458a00[_0x4268b2(0x1ca)])){_0x3a5103(new Error(_0x4268b2(0x1d2)+_0x458a00[_0x4268b2(0x1ca)]));return;}_0x18df51['file'](_0x458a00[_0x4268b2(0x1ca)],{'name':_0x458a00[_0x4268b2(0x1ef)]});}_0x18df51[_0x4268b2(0x1ff)]();}catch(_0x59f170){_0x3a5103(_0x59f170);}});}[a9_0x2b7114(0x1f4)](_0x277e9c){const _0x1a803f=a9_0x2b7114,_0x588f78=a9_0x210cab['readFileSync'](_0x277e9c,_0x1a803f(0x1e2)),_0x59e1ec=JSON[_0x1a803f(0x1d4)](_0x588f78);this[_0x1a803f(0x1f3)](_0x59e1ec);const _0x17291a=a9_0x531dd8[_0x1a803f(0x1d9)](a9_0x173ac5[_0x1a803f(0x1e3)](),_0x1a803f(0x1eb)+Date[_0x1a803f(0x1ea)]()+_0x1a803f(0x1d0));return a9_0x210cab[_0x1a803f(0x1fc)](_0x17291a,JSON['stringify'](_0x59e1ec,null,0x2)),_0x17291a;}['transformAttachmentPaths'](_0x337c5d){const _0x30ebd8=a9_0x2b7114;if(typeof _0x337c5d!=='object'||_0x337c5d===null)return;if(Array['isArray'](_0x337c5d)){_0x337c5d[_0x30ebd8(0x1fd)](_0x561b92=>this['transformAttachmentPaths'](_0x561b92));return;}_0x337c5d[_0x30ebd8(0x1c9)]&&Array[_0x30ebd8(0x1cf)](_0x337c5d['attachments'])&&_0x337c5d[_0x30ebd8(0x1c9)][_0x30ebd8(0x1fd)](_0x5bf381=>{const _0x58868c=_0x30ebd8;_0x5bf381[_0x58868c(0x1ce)]&&typeof _0x5bf381['path']===_0x58868c(0x1dd)&&(_0x5bf381[_0x58868c(0x1ce)]=this[_0x58868c(0x1f2)](_0x5bf381[_0x58868c(0x1ce)]));}),Object[_0x30ebd8(0x1de)](_0x337c5d)[_0x30ebd8(0x1fd)](_0x314306=>this[_0x30ebd8(0x1f3)](_0x314306));}[a9_0x2b7114(0x1f2)](_0x4607ee){const _0x320676=a9_0x2b7114,_0x31725d=_0x4607ee[_0x320676(0x1e7)](/\\/g,'/'),_0x1fdd36=_0x31725d[_0x320676(0x200)]('test-results/');if(_0x1fdd36!==-0x1)return _0x31725d['substring'](_0x1fdd36);const _0x1c7e53=_0x31725d[_0x320676(0x200)](_0x320676(0x1cd));if(_0x1c7e53!==-0x1){const _0x2f5511=_0x31725d[_0x320676(0x1ec)](0x0,_0x1c7e53),_0xd98156=_0x2f5511[_0x320676(0x1e4)]('/'),_0x1b73c5=_0xd98156!==-0x1?_0xd98156+0x1:0x0;return _0x31725d[_0x320676(0x1ec)](_0x1b73c5);}const _0x2e2faf=[_0x320676(0x1cc),'__snapshots__/',_0x320676(0x1fb),'snapshots/'];for(const _0x59ba9d of _0x2e2faf){const _0x107037=_0x31725d['indexOf'](_0x59ba9d);if(_0x107037!==-0x1)return _0x31725d[_0x320676(0x1ec)](_0x107037);}return console[_0x320676(0x1df)]('[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20'+_0x4607ee),_0x4607ee;}}
1
+ const a9_0x43d28b=a9_0x16a0;function a9_0x16a0(_0x5d4079,_0x21bec2){const _0xe61b65=a9_0xe61b();return a9_0x16a0=function(_0x16a0d8,_0x267f19){_0x16a0d8=_0x16a0d8-0x165;let _0x3379e1=_0xe61b65[_0x16a0d8];return _0x3379e1;},a9_0x16a0(_0x5d4079,_0x21bec2);}(function(_0x27a7a2,_0x8f7e01){const _0x988db7=a9_0x16a0,_0x58b7ea=_0x27a7a2();while(!![]){try{const _0x422096=parseInt(_0x988db7(0x16f))/0x1*(parseInt(_0x988db7(0x178))/0x2)+parseInt(_0x988db7(0x175))/0x3*(parseInt(_0x988db7(0x187))/0x4)+-parseInt(_0x988db7(0x177))/0x5+-parseInt(_0x988db7(0x167))/0x6*(-parseInt(_0x988db7(0x17f))/0x7)+-parseInt(_0x988db7(0x17c))/0x8+-parseInt(_0x988db7(0x18c))/0x9*(-parseInt(_0x988db7(0x197))/0xa)+-parseInt(_0x988db7(0x17b))/0xb*(parseInt(_0x988db7(0x169))/0xc);if(_0x422096===_0x8f7e01)break;else _0x58b7ea['push'](_0x58b7ea['shift']());}catch(_0x5a9e29){_0x58b7ea['push'](_0x58b7ea['shift']());}}}(a9_0xe61b,0x7fc0d));import*as a9_0x433878 from'fs';import*as a9_0x383a98 from'path';import*as a9_0xdb0610 from'os';import{ZipArchive}from'archiver';function a9_0xe61b(){const _0x123fe2=['sourcePath','createZip','indexOf','contents','108gAxZgT','_offsets','12RKFSDn','Report\x20file\x20not\x20found:\x20','finalize','isArray','test-results/','parse','9111bkmSqR','transformAttachmentPaths','pipe','name','push','attachments','2793whyxxg','path','1817835LAlFbV','156xRnGpG','output/playwright-test-report.json','join','11771639FpSqvL','6285856qzYQdq','error','close','353857RdKkIL','existsSync','playwright-test-report-','stringify','__snapshots__/','utf-8','lastIndexOf','file','3748tFWGKQ','now','__screenshots__/','forEach','replace','160587ZObwPa','Asset\x20file\x20not\x20found:\x20','normalizeAttachmentPath','substring','outputPath','transformJsonReport','values','archivePath','object','warn','snapshots/','140gtvhCe','string','screenshots/','createWriteStream'];a9_0xe61b=function(){return _0x123fe2;};return a9_0xe61b();}export class Zipper{[a9_0x43d28b(0x190)];constructor(_0x2db449){const _0x3722d0=a9_0x43d28b;this[_0x3722d0(0x190)]=_0x2db449[_0x3722d0(0x190)];}async[a9_0x43d28b(0x19c)](_0x3193a1,_0x11c37f){const _0x4e0b21=[];return new Promise((_0x3a08c1,_0x14f1d3)=>{const _0x4eb8ed=a9_0x16a0;try{const _0x1f5468=a9_0x433878[_0x4eb8ed(0x19a)](this[_0x4eb8ed(0x190)]),_0x2f5db0=new ZipArchive({'zlib':{'level':0x0}});_0x2f5db0['on']('entry',_0x5a809c=>{const _0x55ed8f=_0x4eb8ed,_0x59660f=_0x5a809c[_0x55ed8f(0x172)][_0x55ed8f(0x18b)](/\\/g,'/'),_0x198a00=_0x5a809c[_0x55ed8f(0x168)]?.['contents']??0x0,_0x5cd36f=_0x5a809c[_0x55ed8f(0x168)]?.[_0x55ed8f(0x166)]+(_0x5a809c['csize']??0x0)-0x1;_0x4e0b21[_0x55ed8f(0x173)]({'name':_0x59660f,'start':_0x198a00,'end':_0x5cd36f});}),_0x1f5468['on'](_0x4eb8ed(0x17e),()=>{const _0x4d13c3=_0x2f5db0['pointer']();_0x3a08c1({'zipPath':this['outputPath'],'size':_0x4d13c3,'entryCount':_0x4e0b21['length'],'entries':_0x4e0b21});}),_0x2f5db0['on'](_0x4eb8ed(0x17d),_0x120bb4=>{_0x14f1d3(_0x120bb4);}),_0x1f5468['on'](_0x4eb8ed(0x17d),_0x3d298b=>{_0x14f1d3(_0x3d298b);}),_0x2f5db0[_0x4eb8ed(0x171)](_0x1f5468);if(!a9_0x433878[_0x4eb8ed(0x180)](_0x3193a1)){_0x14f1d3(new Error(_0x4eb8ed(0x16a)+_0x3193a1));return;}const _0x5b77f5=this[_0x4eb8ed(0x191)](_0x3193a1);_0x2f5db0['file'](_0x5b77f5,{'name':_0x4eb8ed(0x179)});for(const _0x2c035c of _0x11c37f){if(!a9_0x433878['existsSync'](_0x2c035c[_0x4eb8ed(0x19b)])){_0x14f1d3(new Error(_0x4eb8ed(0x18d)+_0x2c035c['sourcePath']));return;}_0x2f5db0[_0x4eb8ed(0x186)](_0x2c035c[_0x4eb8ed(0x19b)],{'name':_0x2c035c[_0x4eb8ed(0x193)]});}_0x2f5db0[_0x4eb8ed(0x16b)]();}catch(_0x2da9b5){_0x14f1d3(_0x2da9b5);}});}[a9_0x43d28b(0x191)](_0xe036ae){const _0x47cc89=a9_0x43d28b,_0x5699a3=a9_0x433878['readFileSync'](_0xe036ae,_0x47cc89(0x184)),_0x22e2d9=JSON[_0x47cc89(0x16e)](_0x5699a3);this['transformAttachmentPaths'](_0x22e2d9);const _0x4dc54a=a9_0x383a98[_0x47cc89(0x17a)](a9_0xdb0610['tmpdir'](),_0x47cc89(0x181)+Date[_0x47cc89(0x188)]()+'.json');return a9_0x433878['writeFileSync'](_0x4dc54a,JSON[_0x47cc89(0x182)](_0x22e2d9,null,0x2)),_0x4dc54a;}[a9_0x43d28b(0x170)](_0x8c0ef4){const _0x52e796=a9_0x43d28b;if(typeof _0x8c0ef4!==_0x52e796(0x194)||_0x8c0ef4===null)return;if(Array[_0x52e796(0x16c)](_0x8c0ef4)){_0x8c0ef4[_0x52e796(0x18a)](_0x1758ee=>this[_0x52e796(0x170)](_0x1758ee));return;}_0x8c0ef4[_0x52e796(0x174)]&&Array[_0x52e796(0x16c)](_0x8c0ef4[_0x52e796(0x174)])&&_0x8c0ef4[_0x52e796(0x174)]['forEach'](_0xf0de80=>{const _0x3e0081=_0x52e796;_0xf0de80['path']&&typeof _0xf0de80[_0x3e0081(0x176)]===_0x3e0081(0x198)&&(_0xf0de80['path']=this['normalizeAttachmentPath'](_0xf0de80['path']));}),Object[_0x52e796(0x192)](_0x8c0ef4)[_0x52e796(0x18a)](_0x3e04a6=>this[_0x52e796(0x170)](_0x3e04a6));}[a9_0x43d28b(0x18e)](_0x448ca3){const _0x5988ef=a9_0x43d28b,_0x550715=_0x448ca3['replace'](/\\/g,'/'),_0x536387=_0x550715[_0x5988ef(0x165)](_0x5988ef(0x16d));if(_0x536387!==-0x1)return _0x550715[_0x5988ef(0x18f)](_0x536387);const _0x23a03e=_0x550715[_0x5988ef(0x165)]('-snapshots/');if(_0x23a03e!==-0x1){const _0x4388fd=_0x550715[_0x5988ef(0x18f)](0x0,_0x23a03e),_0x3c654a=_0x4388fd[_0x5988ef(0x185)]('/'),_0xca75e5=_0x3c654a!==-0x1?_0x3c654a+0x1:0x0;return _0x550715[_0x5988ef(0x18f)](_0xca75e5);}const _0x3ddb38=[_0x5988ef(0x189),_0x5988ef(0x183),_0x5988ef(0x199),_0x5988ef(0x196)];for(const _0x4237e2 of _0x3ddb38){const _0x5eae79=_0x550715[_0x5988ef(0x165)](_0x4237e2);if(_0x5eae79!==-0x1)return _0x550715[_0x5988ef(0x18f)](_0x5eae79);}return console[_0x5988ef(0x195)]('[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20'+_0x448ca3),_0x448ca3;}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkly/playwright-reporter",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
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",
@@ -9,6 +9,10 @@
9
9
  "dist",
10
10
  "README.md"
11
11
  ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/checkly/checkly-playwright-reporter-changelog.git"
15
+ },
12
16
  "scripts": {
13
17
  "build": "tsc && npx --yes javascript-obfuscator raw-dist --output dist",
14
18
  "test": "vitest run",