@checkly/playwright-reporter 0.0.8-alpha → 0.0.9-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asset-collector.js +1 -1
- package/dist/clients/checkly-client.js +1 -1
- package/dist/clients/errors.js +1 -1
- package/dist/clients/index.js +1 -1
- package/dist/clients/test-results.js +1 -1
- package/dist/index.js +1 -1
- package/dist/reporter.js +1 -1
- package/dist/zipper.js +1 -1
- package/package.json +3 -2
package/dist/asset-collector.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x10a0bc=a0_0x4406;(function(_0x58e8f2,_0x5f457c){const _0x33690a=a0_0x4406,_0x37cded=_0x58e8f2();while(!![]){try{const _0x1d2300=parseInt(_0x33690a(0xee))/0x1+parseInt(_0x33690a(0xc0))/0x2*(parseInt(_0x33690a(0xec))/0x3)+parseInt(_0x33690a(0xbe))/0x4+-parseInt(_0x33690a(0xd7))/0x5*(parseInt(_0x33690a(0xd1))/0x6)+parseInt(_0x33690a(0xef))/0x7*(parseInt(_0x33690a(0xcb))/0x8)+-parseInt(_0x33690a(0xd9))/0x9*(-parseInt(_0x33690a(0xea))/0xa)+-parseInt(_0x33690a(0xcf))/0xb;if(_0x1d2300===_0x5f457c)break;else _0x37cded['push'](_0x37cded['shift']());}catch(_0xff5db2){_0x37cded['push'](_0x37cded['shift']());}}}(a0_0x3ea4,0x737fd));import*as a0_0xfe045d from'fs';import*as a0_0x5d5350 from'path';function a0_0x3ea4(){const _0xd85f59=['.png','.txt','3217220CKRreb','readdirSync','36MwcEYI','.json','.jpg','basename','video/webm','createAsset','push','.webm','name','.svg','collectAssetsRecursive','application/json','.mp4','video/x-msvideo','image/png','getVideoContentType','application/zip','1147640nhhLtv','join','4731eDdLwv','testResultsDir','368424iWYGzM','161hXCFVP','split','includes','collectAssets','.zip','existsSync','.avi','video','307036wxOjyk','text/plain','1160kyFeeS','sep','application/octet-stream','trace','toLowerCase','image/gif','extname','determineAssetType','image/bmp','shouldSkipFile','getImageContentType','254456fmaJYM','attachment','isFile','isDirectory','15773241VgMDLe','test','6ebqLBD','.log','video/quicktime','video/mp4'];a0_0x3ea4=function(){return _0xd85f59;};return a0_0x3ea4();}function a0_0x4406(_0xad25a7,_0x48b9ce){const _0x3ea4c3=a0_0x3ea4();return a0_0x4406=function(_0x4406a9,_0x1cac92){_0x4406a9=_0x4406a9-0xba;let _0x4850c9=_0x3ea4c3[_0x4406a9];return _0x4850c9;},a0_0x4406(_0xad25a7,_0x48b9ce);}export class AssetCollector{[a0_0x10a0bc(0xed)];constructor(_0x2ccdf3){const _0x4d362b=a0_0x10a0bc;this[_0x4d362b(0xed)]=_0x2ccdf3;}async[a0_0x10a0bc(0xf2)](_0x3bee90){const _0x32759b=a0_0x10a0bc,_0x3259be=[],_0x16f75d=new Set();if(!a0_0xfe045d[_0x32759b(0xbb)](this['testResultsDir']))return _0x3259be;return await this['collectAssetsRecursive'](this['testResultsDir'],'',_0x3259be,_0x16f75d),_0x3259be;}async[a0_0x10a0bc(0xe3)](_0x3bfeba,_0x16638b,_0x33f37d,_0x3b840f){const _0x4d644e=a0_0x10a0bc;let _0x168730;try{_0x168730=a0_0xfe045d[_0x4d644e(0xd8)](_0x3bfeba,{'withFileTypes':!![]});}catch{return;}const _0x57f8e4=a0_0x5d5350[_0x4d644e(0xdc)](a0_0x5d5350['resolve'](this['testResultsDir']));for(const _0xa91db8 of _0x168730){const _0x2771b9=a0_0x5d5350['join'](_0x3bfeba,_0xa91db8[_0x4d644e(0xe1)]),_0xa52f4d=a0_0x5d5350['relative'](this[_0x4d644e(0xed)],_0x2771b9),_0x4b7d93=a0_0x5d5350[_0x4d644e(0xeb)](_0x57f8e4,_0xa52f4d);if(this[_0x4d644e(0xc9)](_0xa91db8[_0x4d644e(0xe1)]))continue;if(_0xa91db8[_0x4d644e(0xce)]())await this[_0x4d644e(0xe3)](_0x2771b9,_0x4b7d93,_0x33f37d,_0x3b840f);else{if(_0xa91db8[_0x4d644e(0xcd)]()){if(!_0x3b840f['has'](_0x2771b9)){const _0x2e8038=this[_0x4d644e(0xde)](_0x2771b9,_0x4b7d93);_0x33f37d[_0x4d644e(0xdf)](_0x2e8038),_0x3b840f['add'](_0x2771b9);}}}}}[a0_0x10a0bc(0xc9)](_0x1dd695){const _0x48725b=a0_0x10a0bc,_0x37a754=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x37a754['some'](_0x33ed8b=>_0x33ed8b[_0x48725b(0xd0)](_0x1dd695));}[a0_0x10a0bc(0xde)](_0x46d1d2,_0x155ecf){const _0x33d45f=a0_0x10a0bc,_0x33baa3=a0_0x5d5350[_0x33d45f(0xc6)](_0x46d1d2)[_0x33d45f(0xc4)](),{type:_0xe8282b,contentType:_0x4c3946}=this[_0x33d45f(0xc7)](_0x33baa3),_0x118bd2=_0x155ecf[_0x33d45f(0xf0)](a0_0x5d5350[_0x33d45f(0xc1)])[_0x33d45f(0xeb)]('/');return{'sourcePath':_0x46d1d2,'archivePath':_0x118bd2,'type':_0xe8282b,'contentType':_0x4c3946};}[a0_0x10a0bc(0xc7)](_0x41761f){const _0x2ba793=a0_0x10a0bc;if([_0x2ba793(0xd5),_0x2ba793(0xdb),'.jpeg','.gif','.bmp',_0x2ba793(0xe2)]['includes'](_0x41761f))return{'type':'screenshot','contentType':this['getImageContentType'](_0x41761f)};if([_0x2ba793(0xe0),_0x2ba793(0xe5),_0x2ba793(0xbc),'.mov'][_0x2ba793(0xf1)](_0x41761f))return{'type':_0x2ba793(0xbd),'contentType':this[_0x2ba793(0xe8)](_0x41761f)};if(_0x41761f===_0x2ba793(0xba))return{'type':_0x2ba793(0xc3),'contentType':_0x2ba793(0xe9)};if(_0x41761f==='.html'||_0x41761f==='.htm')return{'type':_0x2ba793(0xcc),'contentType':'text/html'};if(_0x41761f===_0x2ba793(0xda))return{'type':'attachment','contentType':_0x2ba793(0xe4)};if(_0x41761f===_0x2ba793(0xd6)||_0x41761f===_0x2ba793(0xd2))return{'type':_0x2ba793(0xcc),'contentType':_0x2ba793(0xbf)};return{'type':'other','contentType':_0x2ba793(0xc2)};}[a0_0x10a0bc(0xca)](_0x29f2db){const _0x367bb2=a0_0x10a0bc,_0x2864ff={'.png':_0x367bb2(0xe7),'.jpg':'image/jpeg','.jpeg':'image/jpeg','.gif':_0x367bb2(0xc5),'.bmp':_0x367bb2(0xc8),'.svg':'image/svg+xml'};return _0x2864ff[_0x29f2db]||_0x367bb2(0xe7);}['getVideoContentType'](_0x29caae){const _0x319729=a0_0x10a0bc,_0x575475={'.webm':_0x319729(0xdd),'.mp4':_0x319729(0xd4),'.avi':_0x319729(0xe6),'.mov':_0x319729(0xd3)};return _0x575475[_0x29caae]||'video/webm';}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a1_0x56136d=a1_0x1b9b;(function(_0x40c655,_0xe109ea){var _0x528a83=a1_0x1b9b,_0x1591ab=_0x40c655();while(!![]){try{var _0x4bd5cd=-parseInt(_0x528a83(0xf3))/0x1+-parseInt(_0x528a83(0xfe))/0x2*(parseInt(_0x528a83(0xf6))/0x3)+parseInt(_0x528a83(0xf9))/0x4+parseInt(_0x528a83(0xf5))/0x5+-parseInt(_0x528a83(0x100))/0x6*(-parseInt(_0x528a83(0xfa))/0x7)+-parseInt(_0x528a83(0x105))/0x8*(-parseInt(_0x528a83(0x103))/0x9)+parseInt(_0x528a83(0xfc))/0xa*(-parseInt(_0x528a83(0xf8))/0xb);if(_0x4bd5cd===_0xe109ea)break;else _0x1591ab['push'](_0x1591ab['shift']());}catch(_0x11c43d){_0x1591ab['push'](_0x1591ab['shift']());}}}(a1_0x4029,0x1be68));function a1_0x4029(){var _0x21acea=['2733368QUZQHh','701380tSzxVM','57176GiVLXy','headers','10IzxeDm','apiKey','16iwiXUF','interceptors','12kMqXdy','response','use','1396449uUgoax','accountId','8PxMzLv','getAxiosInstance','api','baseUrl','User-Agent','x-checkly-account','112646fcqFLE','0.1.0','846060qHMPLs','15240CvVexW','@checkly/playwright-reporter/'];a1_0x4029=function(){return _0x21acea;};return a1_0x4029();}import a1_0x5aad34 from'axios';function a1_0x1b9b(_0x496451,_0x58f2de){var _0x402910=a1_0x4029();return a1_0x1b9b=function(_0x1b9b37,_0x50f828){_0x1b9b37=_0x1b9b37-0xf3;var _0x2254a5=_0x402910[_0x1b9b37];return _0x2254a5;},a1_0x1b9b(_0x496451,_0x58f2de);}import{handleErrorResponse}from'./errors.js';function getVersion(){var _0x3c67dd=a1_0x1b9b;return _0x3c67dd(0xf4);}export function createRequestInterceptor(_0x35e2f0,_0x251882){return _0x1ae61d=>{var _0x1bf38b=a1_0x1b9b;return _0x1ae61d[_0x1bf38b(0xfb)]&&(_0x1ae61d['headers']['Authorization']='Bearer\x20'+_0x35e2f0,_0x1ae61d[_0x1bf38b(0xfb)][_0x1bf38b(0x10a)]=_0x251882,_0x1ae61d[_0x1bf38b(0xfb)][_0x1bf38b(0x109)]=_0x1bf38b(0xf7)+getVersion()),_0x1ae61d;};}export function createResponseErrorInterceptor(){return _0x10276a=>{handleErrorResponse(_0x10276a);};}export default class ChecklyClient{['apiKey'];[a1_0x56136d(0x108)];['accountId'];['api'];constructor(_0x5d0db2){var _0x277c36=a1_0x56136d;this[_0x277c36(0x104)]=_0x5d0db2[_0x277c36(0x104)],this['apiKey']=_0x5d0db2['apiKey'],this[_0x277c36(0x108)]=_0x5d0db2[_0x277c36(0x108)],this[_0x277c36(0x107)]=a1_0x5aad34['create']({'baseURL':this[_0x277c36(0x108)],'timeout':0x1d4c0,'maxContentLength':Infinity,'maxBodyLength':Infinity}),this[_0x277c36(0x107)][_0x277c36(0xff)]['request'][_0x277c36(0x102)](createRequestInterceptor(this[_0x277c36(0xfd)],this[_0x277c36(0x104)])),this[_0x277c36(0x107)][_0x277c36(0xff)][_0x277c36(0x101)][_0x277c36(0x102)](_0x12fc4a=>_0x12fc4a,createResponseErrorInterceptor());}[a1_0x56136d(0x106)](){var _0x301c62=a1_0x56136d;return this[_0x301c62(0x107)];}}
|
package/dist/clients/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x28ec(){const _0x3943a2=['1437hcLfdG','name','18HGJddz','2EsUMaO','788785Wzbone','error','object','statusCode','data','39071EbOrto','1678070QuYEsd','11ZebJLk','1883FAzdAF','MissingResponseError','2574488ImyXDz','1518AKhGKt','2836UQEXDO','An\x20error\x20occurred','3409836xuRVoO','Network\x20error','errorCode','response','Unknown\x20error','message'];a2_0x28ec=function(){return _0x3943a2;};return a2_0x28ec();}const a2_0x2e8539=a2_0x571e;(function(_0xac3582,_0x4e73d4){const _0x580166=a2_0x571e,_0x4b42b3=_0xac3582();while(!![]){try{const _0x1882e8=-parseInt(_0x580166(0x101))/0x1*(-parseInt(_0x580166(0xfb))/0x2)+-parseInt(_0x580166(0x110))/0x3*(-parseInt(_0x580166(0x108))/0x4)+parseInt(_0x580166(0xfc))/0x5+-parseInt(_0x580166(0x107))/0x6*(parseInt(_0x580166(0x104))/0x7)+parseInt(_0x580166(0x106))/0x8+parseInt(_0x580166(0xfa))/0x9*(-parseInt(_0x580166(0x102))/0xa)+-parseInt(_0x580166(0x103))/0xb*(parseInt(_0x580166(0x10a))/0xc);if(_0x1882e8===_0x4e73d4)break;else _0x4b42b3['push'](_0x4b42b3['shift']());}catch(_0x5b553d){_0x4b42b3['push'](_0x4b42b3['shift']());}}}(a2_0x28ec,0x299ba));export class ApiError extends Error{[a2_0x2e8539(0x100)];constructor(_0x559619,_0x4dbcee){const _0x4c2925=a2_0x2e8539;super(_0x559619[_0x4c2925(0x10f)],_0x4dbcee),this['name']=this['constructor']['name'],this[_0x4c2925(0x100)]=_0x559619;}}export class ValidationError extends ApiError{constructor(_0x2b57b5,_0x1101fb){super(_0x2b57b5,_0x1101fb);}}export class UnauthorizedError extends ApiError{constructor(_0x5b26b5,_0x53a680){super(_0x5b26b5,_0x53a680);}}export class ForbiddenError extends ApiError{constructor(_0x20a166,_0x9bcfba){super(_0x20a166,_0x9bcfba);}}export class NotFoundError extends ApiError{constructor(_0x2d70f9,_0x6cdc45){super(_0x2d70f9,_0x6cdc45);}}export class RequestTimeoutError extends ApiError{constructor(_0x3def59,_0x41acfd){super(_0x3def59,_0x41acfd);}}export class ConflictError extends ApiError{constructor(_0x33095b,_0x5b6317){super(_0x33095b,_0x5b6317);}}export class ServerError extends ApiError{constructor(_0x428b68,_0x8b9b3e){super(_0x428b68,_0x8b9b3e);}}export class MiscellaneousError extends ApiError{constructor(_0x5b7b95,_0x1a7d1a){super(_0x5b7b95,_0x1a7d1a);}}export class MissingResponseError extends Error{constructor(_0x13d65f,_0x359ff9){const _0xcc75d=a2_0x2e8539;super(_0x13d65f,_0x359ff9),this[_0xcc75d(0xf9)]=_0xcc75d(0x105);}}function a2_0x571e(_0xaa140b,_0x53a270){const _0x28ec38=a2_0x28ec();return a2_0x571e=function(_0x571eb6,_0x36a1b1){_0x571eb6=_0x571eb6-0xf9;let _0x4b3021=_0x28ec38[_0x571eb6];return _0x4b3021;},a2_0x571e(_0xaa140b,_0x53a270);}export function parseErrorData(_0x196751,_0x1bdde3){const _0x508c18=a2_0x2e8539;if(!_0x196751)return undefined;if(typeof _0x196751===_0x508c18(0xfe)&&_0x196751[_0x508c18(0xff)]&&_0x196751[_0x508c18(0xfd)]&&_0x196751[_0x508c18(0x10f)])return{'statusCode':_0x196751['statusCode'],'error':_0x196751['error'],'message':_0x196751['message'],'errorCode':_0x196751[_0x508c18(0x10c)]};if(typeof _0x196751===_0x508c18(0xfe)&&_0x196751[_0x508c18(0xfd)]&&!_0x196751[_0x508c18(0x10f)])return{'statusCode':_0x1bdde3['statusCode'],'error':_0x196751[_0x508c18(0xfd)],'message':_0x196751[_0x508c18(0xfd)]};if(typeof _0x196751==='object'&&_0x196751[_0x508c18(0xfd)]&&_0x196751[_0x508c18(0x10f)])return{'statusCode':_0x1bdde3[_0x508c18(0xff)],'error':_0x196751[_0x508c18(0xfd)],'message':_0x196751[_0x508c18(0x10f)],'errorCode':_0x196751[_0x508c18(0x10c)]};if(typeof _0x196751===_0x508c18(0xfe)&&_0x196751['message'])return{'statusCode':_0x1bdde3[_0x508c18(0xff)],'error':_0x196751[_0x508c18(0x10f)],'message':_0x196751[_0x508c18(0x10f)],'errorCode':_0x196751['errorCode']};if(typeof _0x196751==='string')return{'statusCode':_0x1bdde3[_0x508c18(0xff)],'error':_0x196751,'message':_0x196751};return undefined;}export function handleErrorResponse(_0x4d79ef){const _0x560fd8=a2_0x2e8539;if(!_0x4d79ef[_0x560fd8(0x10d)])throw new MissingResponseError(_0x4d79ef['message']||_0x560fd8(0x10b));const {status:_0x484f47,data:_0x222dfb}=_0x4d79ef['response'],_0x939402=parseErrorData(_0x222dfb,{'statusCode':_0x484f47});if(!_0x939402)throw new MiscellaneousError({'statusCode':_0x484f47,'error':_0x560fd8(0x10e),'message':_0x4d79ef[_0x560fd8(0x10f)]||_0x560fd8(0x109)});switch(_0x484f47){case 0x190:throw new ValidationError(_0x939402);case 0x191:throw new UnauthorizedError(_0x939402);case 0x193:throw new ForbiddenError(_0x939402);case 0x194:throw new NotFoundError(_0x939402);case 0x198:throw new RequestTimeoutError(_0x939402);case 0x199:throw new ConflictError(_0x939402);default:if(_0x484f47>=0x1f4)throw new ServerError(_0x939402);throw new MiscellaneousError(_0x939402);}}
|
package/dist/clients/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b76f9,_0x5ac9cb){var _0xaf7ce6=a3_0xa4df,_0x2ca757=_0x2b76f9();while(!![]){try{var _0x224c80=-parseInt(_0xaf7ce6(0x7d))/0x1+-parseInt(_0xaf7ce6(0x86))/0x2+-parseInt(_0xaf7ce6(0x81))/0x3+parseInt(_0xaf7ce6(0x84))/0x4+parseInt(_0xaf7ce6(0x83))/0x5*(parseInt(_0xaf7ce6(0x80))/0x6)+parseInt(_0xaf7ce6(0x7e))/0x7*(parseInt(_0xaf7ce6(0x85))/0x8)+parseInt(_0xaf7ce6(0x82))/0x9*(parseInt(_0xaf7ce6(0x7f))/0xa);if(_0x224c80===_0x5ac9cb)break;else _0x2ca757['push'](_0x2ca757['shift']());}catch(_0x26261e){_0x2ca757['push'](_0x2ca757['shift']());}}}(a3_0x3104,0xf1346));export{default as ChecklyClient}from'./checkly-client.js';function a3_0xa4df(_0x295fd8,_0x4c82f6){var _0x3104d0=a3_0x3104();return a3_0xa4df=function(_0xa4df4d,_0x25ff66){_0xa4df4d=_0xa4df4d-0x7d;var _0x52fdd6=_0x3104d0[_0xa4df4d];return _0x52fdd6;},a3_0xa4df(_0x295fd8,_0x4c82f6);}function a3_0x3104(){var _0x1915a5=['4610530kTdkqJ','12gatNSd','942873Uklxml','9veTRgd','2050910IKcgyc','5715300FcfMSK','632dgsKJZ','902602BayeYe','1535193VStCVs','51261foAXiN'];a3_0x3104=function(){return _0x1915a5;};return a3_0x3104();}export{TestResults}from'./test-results.js';export*from'./types.js';export*from'./errors.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x5b947a=a4_0xc66f;(function(_0x35f300,_0x574704){const _0x38112a=a4_0xc66f,_0x15d596=_0x35f300();while(!![]){try{const _0x322ffb=parseInt(_0x38112a(0xcd))/0x1+-parseInt(_0x38112a(0xbe))/0x2*(parseInt(_0x38112a(0xb9))/0x3)+-parseInt(_0x38112a(0xc8))/0x4*(parseInt(_0x38112a(0xbd))/0x5)+-parseInt(_0x38112a(0xc9))/0x6+parseInt(_0x38112a(0xcc))/0x7+-parseInt(_0x38112a(0xc5))/0x8*(parseInt(_0x38112a(0xc4))/0x9)+parseInt(_0x38112a(0xca))/0xa;if(_0x322ffb===_0x574704)break;else _0x15d596['push'](_0x15d596['shift']());}catch(_0x301caa){_0x15d596['push'](_0x15d596['shift']());}}}(a4_0x189b,0x187d7));function a4_0xc66f(_0x47c41c,_0x407b61){const _0x189b14=a4_0x189b();return a4_0xc66f=function(_0xc66f93,_0x5e8b79){_0xc66f93=_0xc66f93-0xb9;let _0x18de9c=_0x189b14[_0xc66f93];return _0x18de9c;},a4_0xc66f(_0x47c41c,_0x407b61);}import a4_0x2aed34 from'form-data';function a4_0x189b(){const _0x46d995=['getHeaders','post','/next/test-sessions/','updateTestResult','uploadTestResultAsset','206595SBNHhY','24fNtfTG','application/zip','/results/','4SBDUNU','300198YwoxyP','2564190xcsFOk','/next/test-sessions/create','540295cXiMYR','67416viqmty','data','57231RXHNSv','api','/assets','assets','336745IYTeCo','12rbrptx'];a4_0x189b=function(){return _0x46d995;};return a4_0x189b();}export class TestResults{['api'];constructor(_0x35863c){const _0xe6d818=a4_0xc66f;this[_0xe6d818(0xba)]=_0x35863c;}async['createTestSession'](_0x1f6fae){const _0x5bfef3=a4_0xc66f,_0xf32228=await this['api']['post'](_0x5bfef3(0xcb),_0x1f6fae);return _0xf32228['data'];}async[a4_0x5b947a(0xc3)](_0x5d998f,_0x23747f,_0x33352a){const _0x17dc7f=a4_0x5b947a,_0x2fa858=new a4_0x2aed34();_0x2fa858['append'](_0x17dc7f(0xbc),_0x33352a,{'filename':'assets.zip','contentType':_0x17dc7f(0xc6)});const _0x18e509=await this[_0x17dc7f(0xba)][_0x17dc7f(0xc0)](_0x17dc7f(0xc1)+_0x5d998f+_0x17dc7f(0xc7)+_0x23747f+_0x17dc7f(0xbb),_0x2fa858,{'headers':{..._0x2fa858[_0x17dc7f(0xbf)]()}});return _0x18e509['data'];}async[a4_0x5b947a(0xc2)](_0x97a024,_0x6a97b5,_0x13823c){const _0x2cffb0=a4_0x5b947a,_0x3b6399=await this[_0x2cffb0(0xba)][_0x2cffb0(0xc0)]('/next/test-sessions/'+_0x97a024+_0x2cffb0(0xc7)+_0x6a97b5,_0x13823c);return _0x3b6399[_0x2cffb0(0xce)];}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2081b0,_0x2436e0){var _0x32d8fe=a6_0x49cd,_0x2040fd=_0x2081b0();while(!![]){try{var _0x116f88=-parseInt(_0x32d8fe(0xf3))/0x1*(-parseInt(_0x32d8fe(0xf7))/0x2)+-parseInt(_0x32d8fe(0xfc))/0x3*(-parseInt(_0x32d8fe(0xfa))/0x4)+-parseInt(_0x32d8fe(0xf6))/0x5*(-parseInt(_0x32d8fe(0xfd))/0x6)+parseInt(_0x32d8fe(0xf4))/0x7+parseInt(_0x32d8fe(0xfb))/0x8+-parseInt(_0x32d8fe(0xf9))/0x9*(parseInt(_0x32d8fe(0xf8))/0xa)+-parseInt(_0x32d8fe(0xf5))/0xb;if(_0x116f88===_0x2436e0)break;else _0x2040fd['push'](_0x2040fd['shift']());}catch(_0x42c229){_0x2040fd['push'](_0x2040fd['shift']());}}}(a6_0x24eb,0x9c1b8));export{ChecklyReporter}from'./reporter.js';export{AssetCollector}from'./asset-collector.js';function a6_0x24eb(){var _0x392181=['7863464ejXwRd','29401350xjQyHs','10XJoszs','1231472XPQLuk','694990yfySPQ','72QEmpxD','118828FXglqZ','2952216VbNghB','111cLvxtq','1982952PJIkyM','1snHtmI'];a6_0x24eb=function(){return _0x392181;};return a6_0x24eb();}export{Zipper}from'./zipper.js';function a6_0x49cd(_0x57f9a8,_0x16b1c4){var _0x24eba9=a6_0x24eb();return a6_0x49cd=function(_0x49cdd8,_0x56ce5d){_0x49cdd8=_0x49cdd8-0xf3;var _0x47e83c=_0x24eba9[_0x49cdd8];return _0x47e83c;},a6_0x49cd(_0x57f9a8,_0x16b1c4);}export{ChecklyReporter as default}from'./reporter.js';
|
package/dist/reporter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a7_0x2205(_0x49814e,_0x29a0a7){const _0x18415d=a7_0x1841();return a7_0x2205=function(_0x220581,_0x2bd5a0){_0x220581=_0x220581-0x1c1;let _0x4f9ece=_0x18415d[_0x220581];return _0x4f9ece;},a7_0x2205(_0x49814e,_0x29a0a7);}const a7_0x5542e2=a7_0x2205;(function(_0x25f7b3,_0xde9ab3){const _0x28e19f=a7_0x2205,_0x1e003a=_0x25f7b3();while(!![]){try{const _0xf2061c=parseInt(_0x28e19f(0x1d5))/0x1+parseInt(_0x28e19f(0x22e))/0x2*(parseInt(_0x28e19f(0x1fe))/0x3)+parseInt(_0x28e19f(0x1e2))/0x4+parseInt(_0x28e19f(0x1f8))/0x5+parseInt(_0x28e19f(0x1db))/0x6+parseInt(_0x28e19f(0x201))/0x7*(parseInt(_0x28e19f(0x1f7))/0x8)+parseInt(_0x28e19f(0x222))/0x9*(-parseInt(_0x28e19f(0x1e0))/0xa);if(_0xf2061c===_0xde9ab3)break;else _0x1e003a['push'](_0x1e003a['shift']());}catch(_0x35a1f5){_0x1e003a['push'](_0x1e003a['shift']());}}}(a7_0x1841,0x94a0f));import*as a7_0x2bdc23 from'fs';import*as a7_0x316ced from'path';import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0x5bfcc4 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_0x1841(){const _0x578437=['dryRun','GITHUB_REPOSITORY','passed','test-results/playwright-test-report.json','length','18JjXCad','join','floor','log','assetCollector','base64','substring','outcome','production','🦝\x20Checkly\x20reporter:\x20','parse','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','flaky','entries','package.json','[Checkly\x20Reporter]\x20Global\x20error:','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','outputPath','max','retries','status','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','\x20\x20reporter:\x20[\x0a','zipPath','apiKey','statSync','readFileSync','684459EtgBwl','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:','CHECKLY_ENV','zipper','from','6065154CIEplA','includes','PW_REPORTER','testResults','getTime','140dWduWf','PluralRules','4690540hvrTYv','GITHUB_REF_NAME','📔\x20','alloc','accountId','catch','createZip','createReadStream','concat','map','url','\x0a🔗\x20View\x20test\x20session:\x20','config','Projects','data','subarray','error','CHECKLY_API_KEY','cwd','onError','retry','481064UtxWLn','5086160wBBazo','warn','test','basename','testSessionId','replace','283593JDUFcc','FAILED','checkly-report.zip','77RKZHQX','existsSync','toString','env','version','startTime','then','testCounts','environment','\x0a======================================================','isBuffer','link','uploadResults','Project','http://127.0.0.1:3000','push','testSession','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','onEnd','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','🔗\x20Test\x20session\x20URL:\x20','🎭\x20Playwright:\x20','convertFileToBase64Stream','printSummary','failed','message','testResultId','projects','select','GITHUB_SHA','toISOString','test-results','https://api.checklyhq.com','3078414lSwGzG','options','en-US','local','onBegin','Playwright\x20Test\x20Session:\x20','end'];a7_0x1841=function(){return _0x578437;};return a7_0x1841();}const __filename=fileURLToPath(import.meta[a7_0x5542e2(0x1ec)]),__dirname=dirname(__filename),packageJson=JSON[a7_0x5542e2(0x1c4)](readFileSync(join(__dirname,'..',a7_0x5542e2(0x1c8)),'utf-8')),pkgVersion=packageJson['version'],pluralRules=new Intl[(a7_0x5542e2(0x1e1))](a7_0x5542e2(0x224)),projectForms={'zero':'Project','one':a7_0x5542e2(0x20e),'two':'Projects','few':a7_0x5542e2(0x1ef),'many':a7_0x5542e2(0x1ef),'other':a7_0x5542e2(0x1ef)};function getApiUrl(_0x8aa8c7){const _0x2a257f=a7_0x5542e2,_0x3a8e08={'local':_0x2a257f(0x20f),'development':'https://api-dev.checklyhq.com','staging':'https://api-test.checklyhq.com','production':_0x2a257f(0x221)};return _0x3a8e08[_0x8aa8c7];}function getEnvironment(_0x152daa){const _0x3d9607=a7_0x5542e2,_0xcf63d6=_0x152daa?.[_0x3d9607(0x209)],_0x3230e3=process[_0x3d9607(0x204)][_0x3d9607(0x1d8)],_0x4e58c9=_0xcf63d6||_0x3230e3||_0x3d9607(0x1c2),_0x230f85=[_0x3d9607(0x225),'development','staging',_0x3d9607(0x1c2)];if(!_0x230f85[_0x3d9607(0x1dc)](_0x4e58c9))return console['warn'](_0x3d9607(0x1cf)+_0x4e58c9+'\x22,\x20using\x20\x22production\x22'),_0x3d9607(0x1c2);return _0x4e58c9;}function getDirectoryName(){const _0x4a69d1=a7_0x5542e2,_0x202ed6=process[_0x4a69d1(0x1f4)]();let _0x3d62f1=a7_0x316ced[_0x4a69d1(0x1fb)](_0x202ed6);return(!_0x3d62f1||_0x3d62f1==='/'||_0x3d62f1==='.')&&(_0x3d62f1='playwright-tests'),_0x3d62f1=_0x3d62f1[_0x4a69d1(0x1fd)](/[<>:"|?*]/g,'-'),_0x3d62f1[_0x4a69d1(0x22d)]>0xff&&(_0x3d62f1=_0x3d62f1[_0x4a69d1(0x234)](0x0,0xff)),_0x3d62f1;}export class ChecklyReporter{['options'];['assetCollector'];[a7_0x5542e2(0x1d9)];[a7_0x5542e2(0x1de)];[a7_0x5542e2(0x211)];[a7_0x5542e2(0x206)];[a7_0x5542e2(0x208)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x4485cf={}){const _0x24e61a=a7_0x5542e2,_0x18c558=getEnvironment(_0x4485cf),_0xc55136=getApiUrl(_0x18c558),_0x18123b=process[_0x24e61a(0x204)][_0x24e61a(0x1f3)]||_0x4485cf[_0x24e61a(0x1d2)],_0x11c506=process[_0x24e61a(0x204)]['CHECKLY_ACCOUNT_ID']||_0x4485cf[_0x24e61a(0x1e6)];this[_0x24e61a(0x223)]={'accountId':_0x11c506,'apiKey':_0x18123b,'outputPath':_0x4485cf[_0x24e61a(0x1cb)]??_0x24e61a(0x200),'jsonReportPath':_0x4485cf['jsonReportPath']??_0x24e61a(0x22c),'testResultsDir':_0x4485cf['testResultsDir']??_0x24e61a(0x220),'dryRun':_0x4485cf['dryRun']??![]},this['assetCollector']=new AssetCollector(this[_0x24e61a(0x223)]['testResultsDir']),this[_0x24e61a(0x1d9)]=new Zipper({'outputPath':this[_0x24e61a(0x223)][_0x24e61a(0x1cb)]});if(!this[_0x24e61a(0x223)][_0x24e61a(0x229)]&&this[_0x24e61a(0x223)][_0x24e61a(0x1d2)]&&this[_0x24e61a(0x223)][_0x24e61a(0x1e6)]){const _0x41e73b=new a7_0x5bfcc4({'apiKey':this[_0x24e61a(0x223)]['apiKey'],'accountId':this['options'][_0x24e61a(0x1e6)],'baseUrl':_0xc55136});this[_0x24e61a(0x1de)]=new TestResults(_0x41e73b['getAxiosInstance']());}}[a7_0x5542e2(0x226)](_0x4aed5d,_0x5cf9c3){const _0x587dc9=a7_0x5542e2;this[_0x587dc9(0x206)]=new Date();if(!this['testResults'])return;try{const _0x5ab2fb=getDirectoryName(),_0x2cbf30=[{'name':_0x5ab2fb}],_0x284d46=process[_0x587dc9(0x204)][_0x587dc9(0x22a)]?'https://github.com/'+process[_0x587dc9(0x204)][_0x587dc9(0x22a)]:undefined,_0x3f4d75=_0x284d46?{'repoUrl':_0x284d46,'commitId':process[_0x587dc9(0x204)][_0x587dc9(0x21e)],'branchName':process['env'][_0x587dc9(0x1e3)],'commitOwner':process[_0x587dc9(0x204)]['GITHUB_ACTOR'],'commitMessage':process[_0x587dc9(0x204)]['GITHUB_EVENT_NAME']}:undefined;this[_0x587dc9(0x1de)]['createTestSession']({'name':_0x587dc9(0x227)+_0x5ab2fb,'environment':process['env']['NODE_ENV']||_0x587dc9(0x1fa),'repoInfo':_0x3f4d75,'startedAt':this[_0x587dc9(0x206)][_0x587dc9(0x1df)](),'testResults':_0x2cbf30,'provider':_0x587dc9(0x1dd)})[_0x587dc9(0x207)](_0x1c1d9b=>{const _0x5d61b7=_0x587dc9;this[_0x5d61b7(0x211)]=_0x1c1d9b,_0x1c1d9b['link']&&console[_0x5d61b7(0x231)](_0x5d61b7(0x1ed)+_0x1c1d9b['link']+'\x0a');})[_0x587dc9(0x1e7)](_0xa70ffd=>{const _0x49ed7d=_0x587dc9;console[_0x49ed7d(0x1f2)](_0x49ed7d(0x1c5),_0xa70ffd[_0x49ed7d(0x21a)]);});}catch(_0x17273e){console[_0x587dc9(0x1f2)](_0x587dc9(0x1d7),_0x17273e);}}['onTestEnd'](_0x464b5f,_0x24f46c){const _0xe570b3=a7_0x5542e2;try{const _0x343366=_0x24f46c[_0xe570b3(0x1ce)]==='passed'||_0x24f46c[_0xe570b3(0x1f6)]===_0x464b5f[_0xe570b3(0x1cd)];if(!_0x343366)return;const _0x511ac8=_0x464b5f[_0xe570b3(0x1c1)]()===_0xe570b3(0x1c6);if(_0x511ac8)this[_0xe570b3(0x208)][_0xe570b3(0x1c6)]++,this[_0xe570b3(0x208)][_0xe570b3(0x22b)]++;else{if(_0x24f46c[_0xe570b3(0x1ce)]===_0xe570b3(0x22b))this[_0xe570b3(0x208)]['passed']++;else _0x24f46c[_0xe570b3(0x1ce)]===_0xe570b3(0x219)&&this[_0xe570b3(0x208)][_0xe570b3(0x219)]++;}}catch(_0x4f9a60){console[_0xe570b3(0x1f2)](_0xe570b3(0x212),_0x4f9a60);}}async[a7_0x5542e2(0x213)](){const _0x3a0183=a7_0x5542e2;try{const _0x53ca38=this[_0x3a0183(0x223)]['jsonReportPath'];if(!a7_0x2bdc23[_0x3a0183(0x202)](_0x53ca38)){console['error'](_0x3a0183(0x1ca)+_0x53ca38),console[_0x3a0183(0x1f2)]('[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:'),console[_0x3a0183(0x1f2)](_0x3a0183(0x1d0)+_0x3a0183(0x214)+'\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a'+'\x20\x20]');return;}const _0x345deb=a7_0x2bdc23[_0x3a0183(0x1d4)](_0x53ca38,'utf-8'),_0x17a33a=JSON[_0x3a0183(0x1c4)](_0x345deb),_0x3cd0bc=await this[_0x3a0183(0x232)]['collectAssets'](_0x17a33a),_0xd4893c=await this['zipper'][_0x3a0183(0x1e8)](_0x53ca38,_0x3cd0bc);if(this[_0x3a0183(0x1de)]&&this[_0x3a0183(0x211)]){await this[_0x3a0183(0x20d)](_0x17a33a,_0xd4893c[_0x3a0183(0x1d1)],_0xd4893c[_0x3a0183(0x1c7)]);if(!this[_0x3a0183(0x223)][_0x3a0183(0x229)])try{a7_0x2bdc23['unlinkSync'](_0xd4893c[_0x3a0183(0x1d1)]);}catch(_0x3d579d){console[_0x3a0183(0x1f9)](_0x3a0183(0x1d6)+_0x3d579d);}}this[_0x3a0183(0x1de)]&&this[_0x3a0183(0x211)]?.[_0x3a0183(0x20c)]&&this['printSummary'](_0x17a33a,this[_0x3a0183(0x211)]);}catch(_0xb983ff){console[_0x3a0183(0x1f2)]('[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:',_0xb983ff);}}[a7_0x5542e2(0x218)](_0x6dcb0e,_0x36c46b){const _0x5b262b=a7_0x5542e2,_0x8f6895=pluralRules[_0x5b262b(0x21d)](_0x6dcb0e[_0x5b262b(0x1ee)][_0x5b262b(0x21c)][_0x5b262b(0x22d)]);console[_0x5b262b(0x231)]('\x0a======================================================\x0a'),console[_0x5b262b(0x231)](_0x5b262b(0x1c3)+pkgVersion),console[_0x5b262b(0x231)](_0x5b262b(0x216)+_0x6dcb0e[_0x5b262b(0x1ee)][_0x5b262b(0x205)]),console['log'](_0x5b262b(0x1e4)+projectForms[_0x8f6895]+':\x20'+_0x6dcb0e['config'][_0x5b262b(0x21c)][_0x5b262b(0x1eb)](({name:_0x157331})=>_0x157331)[_0x5b262b(0x22f)](',')),console[_0x5b262b(0x231)](_0x5b262b(0x215)+_0x36c46b[_0x5b262b(0x20c)]),console[_0x5b262b(0x231)](_0x5b262b(0x20a));}async['convertFileToBase64Stream'](_0x4025cc){return new Promise((_0x13ae61,_0x2bd968)=>{const _0x46fe3f=a7_0x2205,_0x1af79f=[];let _0x38dd35=Buffer[_0x46fe3f(0x1e5)](0x0);const _0x5b7ea9=a7_0x2bdc23[_0x46fe3f(0x1e9)](_0x4025cc,{'highWaterMark':0x400*0x400*0x3});_0x5b7ea9['on'](_0x46fe3f(0x1f0),_0x3085c6=>{const _0x3d1ad1=_0x46fe3f,_0x43a8db=Buffer[_0x3d1ad1(0x20b)](_0x3085c6)?_0x3085c6:Buffer[_0x3d1ad1(0x1da)](_0x3085c6),_0x31fbfb=Buffer[_0x3d1ad1(0x1ea)]([_0x38dd35,_0x43a8db]),_0x116d87=Math[_0x3d1ad1(0x230)](_0x31fbfb[_0x3d1ad1(0x22d)]/0x3)*0x3;if(_0x116d87>0x0){const _0x535386=_0x31fbfb[_0x3d1ad1(0x1f1)](0x0,_0x116d87);_0x1af79f[_0x3d1ad1(0x210)](_0x535386[_0x3d1ad1(0x203)]('base64')),_0x38dd35=_0x31fbfb[_0x3d1ad1(0x1f1)](_0x116d87);}else _0x38dd35=_0x31fbfb;}),_0x5b7ea9['on'](_0x46fe3f(0x228),()=>{const _0x8096d1=_0x46fe3f;_0x38dd35[_0x8096d1(0x22d)]>0x0&&_0x1af79f[_0x8096d1(0x210)](_0x38dd35[_0x8096d1(0x203)](_0x8096d1(0x233))),_0x13ae61(_0x1af79f[_0x8096d1(0x22f)](''));}),_0x5b7ea9['on'](_0x46fe3f(0x1f2),_0x56b5ec=>{_0x2bd968(_0x56b5ec);});});}async[a7_0x5542e2(0x20d)](_0x2a3ae3,_0x2c1930,_0x1ccf1f){const _0x37a05a=a7_0x5542e2;if(!this['testResults']||!this[_0x37a05a(0x211)])return;try{const {failed:_0x20dc10,flaky:_0x3a68ba}=this[_0x37a05a(0x208)],_0x5bdc19=_0x20dc10>0x0?_0x37a05a(0x1ff):'PASSED',_0x5010a0=_0x20dc10===0x0&&_0x3a68ba>0x0,_0xb442ae=new Date(),_0x392e3c=this['startTime']?Math[_0x37a05a(0x1cc)](0x0,_0xb442ae['getTime']()-this[_0x37a05a(0x206)][_0x37a05a(0x1df)]()):0x0,_0x52d248=await this[_0x37a05a(0x217)](_0x2c1930),_0x699aa9=a7_0x2bdc23[_0x37a05a(0x1d3)](_0x2c1930)['size'];if(this['testSession']['testResults'][_0x37a05a(0x22d)]>0x0){const _0x5b2ee0=this['testSession'][_0x37a05a(0x1de)][0x0];await this['testResults']['updateTestResult'](this['testSession'][_0x37a05a(0x1fc)],_0x5b2ee0[_0x37a05a(0x21b)],{'status':_0x5bdc19,'isDegraded':_0x5010a0,'startedAt':this['startTime']?.[_0x37a05a(0x21f)](),'stoppedAt':_0xb442ae['toISOString'](),'responseTime':_0x392e3c,'assets':{'assetsZip':_0x52d248,'entries':_0x1ccf1f},'metadata':{'usageData':{'s3PostTotalBytes':_0x699aa9}}});}}catch(_0x87d33b){const _0x39ca28=_0x87d33b instanceof Error?_0x87d33b[_0x37a05a(0x21a)]:String(_0x87d33b);console['error']('[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:',_0x39ca28);}}[a7_0x5542e2(0x1f5)](_0x2e0a9f){const _0x54c1be=a7_0x5542e2;console[_0x54c1be(0x1f2)](_0x54c1be(0x1c9),_0x2e0a9f);}}
|
|
1
|
+
const a7_0xa65010=a7_0x352e;(function(_0x141f61,_0x1ec869){const _0x88a6df=a7_0x352e,_0xbef10e=_0x141f61();while(!![]){try{const _0x531a1e=-parseInt(_0x88a6df(0xcb))/0x1+parseInt(_0x88a6df(0x116))/0x2*(parseInt(_0x88a6df(0x12c))/0x3)+-parseInt(_0x88a6df(0x124))/0x4+parseInt(_0x88a6df(0x11f))/0x5+-parseInt(_0x88a6df(0xd6))/0x6*(parseInt(_0x88a6df(0xbe))/0x7)+-parseInt(_0x88a6df(0x104))/0x8+parseInt(_0x88a6df(0xef))/0x9;if(_0x531a1e===_0x1ec869)break;else _0xbef10e['push'](_0xbef10e['shift']());}catch(_0x297fcd){_0xbef10e['push'](_0xbef10e['shift']());}}}(a7_0x9dca,0xc9c27));import*as a7_0x22a3fb from'fs';import*as a7_0x108362 from'path';import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0x4a7a90 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_0xa65010(0x12d)]),__dirname=dirname(__filename),packageJson=JSON[a7_0xa65010(0x108)](readFileSync(join(__dirname,'..',a7_0xa65010(0xed)),a7_0xa65010(0x10f))),pkgVersion=packageJson[a7_0xa65010(0xc3)],pluralRules=new Intl['PluralRules'](a7_0xa65010(0x120)),projectForms={'zero':a7_0xa65010(0xca),'one':a7_0xa65010(0xca),'two':a7_0xa65010(0xec),'few':'Projects','many':a7_0xa65010(0xec),'other':a7_0xa65010(0xec)};function a7_0x352e(_0x5d4504,_0x25403c){const _0x9dca07=a7_0x9dca();return a7_0x352e=function(_0x352e6c,_0x55aa93){_0x352e6c=_0x352e6c-0xbe;let _0x442744=_0x9dca07[_0x352e6c];return _0x442744;},a7_0x352e(_0x5d4504,_0x25403c);}function getApiUrl(_0xbe7001){const _0x543242=a7_0xa65010,_0x4455ca={'local':_0x543242(0xe7),'development':_0x543242(0x10d),'staging':_0x543242(0xe6),'production':_0x543242(0x12f)};return _0x4455ca[_0xbe7001];}function getEnvironment(_0x33bd8e){const _0x505b98=a7_0xa65010,_0x57465b=_0x33bd8e?.[_0x505b98(0x11e)],_0x15d067=process[_0x505b98(0xe4)][_0x505b98(0x100)],_0x565372=_0x57465b||_0x15d067||_0x505b98(0xf9),_0x5bb328=[_0x505b98(0xdd),_0x505b98(0x12b),_0x505b98(0x129),_0x505b98(0xf9)];if(!_0x5bb328['includes'](_0x565372))return console['warn'](_0x505b98(0x106)+_0x565372+'\x22,\x20using\x20\x22production\x22'),_0x505b98(0xf9);return _0x565372;}function getDirectoryName(){const _0x1c3473=a7_0xa65010,_0x39e05b=process[_0x1c3473(0x112)]();let _0x24483b=a7_0x108362['basename'](_0x39e05b);return(!_0x24483b||_0x24483b==='/'||_0x24483b==='.')&&(_0x24483b=_0x1c3473(0xd7)),_0x24483b=_0x24483b['replace'](/[<>:"|?*]/g,'-'),_0x24483b[_0x1c3473(0xf3)]>0xff&&(_0x24483b=_0x24483b[_0x1c3473(0xd5)](0x0,0xff)),_0x24483b;}export class ChecklyReporter{['options'];[a7_0xa65010(0xd8)];[a7_0xa65010(0x125)];['testResults'];[a7_0xa65010(0x117)];[a7_0xa65010(0xe2)];['testCounts']={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x4e64c0={}){const _0x3bfded=a7_0xa65010,_0x301a06=getEnvironment(_0x4e64c0),_0x58823e=getApiUrl(_0x301a06),_0x1bc41e=process[_0x3bfded(0xe4)][_0x3bfded(0xce)]||_0x4e64c0[_0x3bfded(0xcd)],_0x182a6f=process[_0x3bfded(0xe4)][_0x3bfded(0x10b)]||_0x4e64c0[_0x3bfded(0xd9)];this[_0x3bfded(0x123)]={'accountId':_0x182a6f,'apiKey':_0x1bc41e,'outputPath':_0x4e64c0[_0x3bfded(0xf8)]??'checkly-report.zip','jsonReportPath':_0x4e64c0[_0x3bfded(0xe0)]??'test-results/playwright-test-report.json','testResultsDir':_0x4e64c0['testResultsDir']??_0x3bfded(0xf7),'dryRun':_0x4e64c0[_0x3bfded(0x102)]??![]},this[_0x3bfded(0xd8)]=new AssetCollector(this[_0x3bfded(0x123)][_0x3bfded(0x105)]),this['zipper']=new Zipper({'outputPath':this['options'][_0x3bfded(0xf8)]});if(!this[_0x3bfded(0x123)][_0x3bfded(0x102)]&&this[_0x3bfded(0x123)][_0x3bfded(0xcd)]&&this[_0x3bfded(0x123)]['accountId']){const _0x20a6a4=new a7_0x4a7a90({'apiKey':this['options'][_0x3bfded(0xcd)],'accountId':this[_0x3bfded(0x123)][_0x3bfded(0xd9)],'baseUrl':_0x58823e});this[_0x3bfded(0x10a)]=new TestResults(_0x20a6a4['getAxiosInstance']());}}[a7_0xa65010(0x10c)](_0x4cafcf,_0x38259a){const _0x2633a8=a7_0xa65010;this[_0x2633a8(0xe2)]=new Date();if(!this[_0x2633a8(0x10a)])return;try{const _0x69ab34=getDirectoryName(),_0xdf33d9=[{'name':_0x69ab34}],_0x29eb91=process[_0x2633a8(0xe4)][_0x2633a8(0xc4)]?_0x2633a8(0xd4)+process[_0x2633a8(0xe4)][_0x2633a8(0xc4)]:undefined,_0x4a9780=_0x29eb91?{'repoUrl':_0x29eb91,'commitId':process[_0x2633a8(0xe4)]['GITHUB_SHA'],'branchName':process[_0x2633a8(0xe4)][_0x2633a8(0xc6)],'commitOwner':process[_0x2633a8(0xe4)][_0x2633a8(0x11b)],'commitMessage':process['env'][_0x2633a8(0xfd)]}:undefined;this[_0x2633a8(0x10a)][_0x2633a8(0xde)]({'name':_0x2633a8(0xf4)+_0x69ab34,'environment':process[_0x2633a8(0xe4)][_0x2633a8(0xc5)]||_0x2633a8(0xd1),'repoInfo':_0x4a9780,'startedAt':this['startTime'][_0x2633a8(0xf1)](),'testResults':_0xdf33d9,'provider':_0x2633a8(0xea)})[_0x2633a8(0xfa)](_0x8ba7c4=>{const _0x1457c1=_0x2633a8;this[_0x1457c1(0x117)]=_0x8ba7c4,_0x8ba7c4['link']&&console[_0x1457c1(0xe1)](_0x1457c1(0x119)+_0x8ba7c4['link']+'\x0a');})[_0x2633a8(0xdf)](_0x2d2b70=>{const _0x46bf5f=_0x2633a8;console[_0x46bf5f(0xf2)](_0x46bf5f(0x111),_0x2d2b70[_0x46bf5f(0xd3)]);});}catch(_0x1f0e91){console['error'](_0x2633a8(0xee),_0x1f0e91);}}[a7_0xa65010(0xfb)](_0x24dd03,_0x28c8a7){const _0xcac520=a7_0xa65010;try{const _0x186ae7=_0x28c8a7[_0xcac520(0x122)]==='passed'||_0x28c8a7['retry']===_0x24dd03[_0xcac520(0xc9)];if(!_0x186ae7)return;const _0x4cb868=_0x24dd03[_0xcac520(0xe8)]()===_0xcac520(0x126);if(_0x4cb868)this['testCounts'][_0xcac520(0x126)]++,this[_0xcac520(0xdc)][_0xcac520(0xc7)]++;else{if(_0x28c8a7[_0xcac520(0x122)]===_0xcac520(0xc7))this[_0xcac520(0xdc)][_0xcac520(0xc7)]++;else _0x28c8a7[_0xcac520(0x122)]===_0xcac520(0xcf)&&this['testCounts'][_0xcac520(0xcf)]++;}}catch(_0x4c9cbc){console[_0xcac520(0xf2)]('[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:',_0x4c9cbc);}}async[a7_0xa65010(0xda)](){const _0xab0495=a7_0xa65010;try{const _0x3d76e2=this[_0xab0495(0x123)][_0xab0495(0xe0)];if(!a7_0x22a3fb['existsSync'](_0x3d76e2)){console['error']('[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20'+_0x3d76e2),console['error'](_0xab0495(0x128)),console[_0xab0495(0xf2)](_0xab0495(0xc8)+_0xab0495(0xc2)+_0xab0495(0xeb)+'\x20\x20]');return;}const _0x53769b=a7_0x22a3fb[_0xab0495(0xbf)](_0x3d76e2,_0xab0495(0x10f)),_0x516b35=JSON[_0xab0495(0x108)](_0x53769b),_0x2b7911=await this[_0xab0495(0xd8)]['collectAssets'](_0x516b35),_0x37da75=await this['zipper'][_0xab0495(0x12a)](_0x3d76e2,_0x2b7911);if(this[_0xab0495(0x10a)]&&this[_0xab0495(0x117)]){await this[_0xab0495(0xdb)](_0x516b35,_0x37da75[_0xab0495(0xc1)],_0x37da75[_0xab0495(0xe9)]);if(!this[_0xab0495(0x123)][_0xab0495(0x102)])try{a7_0x22a3fb[_0xab0495(0x11d)](_0x37da75[_0xab0495(0xc1)]);}catch(_0x4e1427){console[_0xab0495(0x127)](_0xab0495(0xd2)+_0x4e1427);}}this[_0xab0495(0x10a)]&&this[_0xab0495(0x117)]?.[_0xab0495(0xd0)]&&this['printSummary'](_0x516b35,this[_0xab0495(0x117)]);}catch(_0x56f236){console[_0xab0495(0xf2)](_0xab0495(0x110),_0x56f236);}}[a7_0xa65010(0xfc)](_0x55fe98,_0x16eef9){const _0xa8b4af=a7_0xa65010,_0x4273da=pluralRules[_0xa8b4af(0x114)](_0x55fe98[_0xa8b4af(0xf5)][_0xa8b4af(0xc0)]['length']);console['log'](_0xa8b4af(0xff)),console[_0xa8b4af(0xe1)](_0xa8b4af(0xe5)+pkgVersion),console['log'](_0xa8b4af(0x109)+_0x55fe98[_0xa8b4af(0xf5)][_0xa8b4af(0xc3)]),console['log'](_0xa8b4af(0xfe)+projectForms[_0x4273da]+':\x20'+_0x55fe98[_0xa8b4af(0xf5)][_0xa8b4af(0xc0)][_0xa8b4af(0xf0)](({name:_0x591ae7})=>_0x591ae7)[_0xa8b4af(0x101)](',')),console[_0xa8b4af(0xe1)](_0xa8b4af(0x118)+_0x16eef9['link']),console[_0xa8b4af(0xe1)]('\x0a======================================================');}async[a7_0xa65010(0xdb)](_0x1f68f3,_0x23fd81,_0x20420d){const _0x485970=a7_0xa65010;if(!this[_0x485970(0x10a)]||!this[_0x485970(0x117)])return;try{const {failed:_0x4577c7,flaky:_0xcc27d8}=this['testCounts'],_0xae3b2e=_0x4577c7>0x0?_0x485970(0x11a):_0x485970(0xe3),_0x259f89=_0x4577c7===0x0&&_0xcc27d8>0x0,_0x2d50de=new Date(),_0x1fa993=this[_0x485970(0xe2)]?Math[_0x485970(0xf6)](0x0,_0x2d50de[_0x485970(0xf1)]()-this[_0x485970(0xe2)][_0x485970(0xf1)]()):0x0,_0x42c29c=(await a7_0x22a3fb[_0x485970(0x103)]['stat'](_0x23fd81))['size'];if(this[_0x485970(0x117)]['testResults'][_0x485970(0xf3)]>0x0){const _0x5e23e6=this[_0x485970(0x117)][_0x485970(0x10a)][0x0];let _0x2b2eb2;if(_0x42c29c>0x0)try{const _0x58ab52=a7_0x22a3fb[_0x485970(0x121)](_0x23fd81),_0x332446=await this[_0x485970(0x10a)][_0x485970(0x113)](this[_0x485970(0x117)][_0x485970(0x11c)],_0x5e23e6['testResultId'],_0x58ab52);_0x2b2eb2=_0x332446['assetId'];}catch(_0x1865c2){const _0x56e8a8=_0x1865c2 instanceof Error?_0x1865c2[_0x485970(0xd3)]:String(_0x1865c2);console[_0x485970(0xf2)](_0x485970(0x12e),_0x56e8a8);}await this[_0x485970(0x10a)][_0x485970(0x115)](this['testSession']['testSessionId'],_0x5e23e6['testResultId'],{'status':_0xae3b2e,'assetEntries':_0x2b2eb2?_0x20420d:undefined,'isDegraded':_0x259f89,'startedAt':this[_0x485970(0xe2)]?.[_0x485970(0xcc)](),'stoppedAt':_0x2d50de[_0x485970(0xcc)](),'responseTime':_0x1fa993,'metadata':{'usageData':{'s3PostTotalBytes':_0x42c29c}}});}}catch(_0x4108d8){const _0x2c2ee7=_0x4108d8 instanceof Error?_0x4108d8[_0x485970(0xd3)]:String(_0x4108d8);console[_0x485970(0xf2)](_0x485970(0x107),_0x2c2ee7);}}['onError'](_0x196a1d){const _0x217f33=a7_0xa65010;console[_0x217f33(0xf2)](_0x217f33(0x10e),_0x196a1d);}}function a7_0x9dca(){const _0x44346e=['apiKey','CHECKLY_API_KEY','failed','link','test','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','message','https://github.com/','substring','3938406ENhArR','playwright-tests','assetCollector','accountId','onEnd','uploadResults','testCounts','local','createTestSession','catch','jsonReportPath','log','startTime','PASSED','env','🦝\x20Checkly\x20reporter:\x20','https://api-test.checklyhq.com','http://127.0.0.1:3000','outcome','entries','PW_REPORTER','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','Projects','package.json','[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:','29343195QwQQWU','map','getTime','error','length','Playwright\x20Test\x20Session:\x20','config','max','test-results','outputPath','production','then','onTestEnd','printSummary','GITHUB_EVENT_NAME','📔\x20','\x0a======================================================\x0a','CHECKLY_ENV','join','dryRun','promises','11452320hagLqI','testResultsDir','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:','parse','🎭\x20Playwright:\x20','testResults','CHECKLY_ACCOUNT_ID','onBegin','https://api-dev.checklyhq.com','[Checkly\x20Reporter]\x20Global\x20error:','utf-8','[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','cwd','uploadTestResultAsset','select','updateTestResult','94066VOnbNk','testSession','🔗\x20Test\x20session\x20URL:\x20','\x0a🔗\x20View\x20test\x20session:\x20','FAILED','GITHUB_ACTOR','testSessionId','unlinkSync','environment','6549645Qssvlq','en-US','createReadStream','status','options','2153608qPndOc','zipper','flaky','warn','[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:','staging','createZip','development','24OUnkeZ','url','[Checkly\x20Reporter]\x20Asset\x20upload\x20failed:','https://api.checklyhq.com','14NRuYCT','readFileSync','projects','zipPath','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','version','GITHUB_REPOSITORY','NODE_ENV','GITHUB_REF_NAME','passed','\x20\x20reporter:\x20[\x0a','retries','Project','837397SuZgXO','toISOString'];a7_0x9dca=function(){return _0x44346e;};return a7_0x9dca();}
|
package/dist/zipper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0x455b(_0x5d0a4a,_0x53acec){const _0xc42d5=a9_0xc42d();return a9_0x455b=function(_0x455b16,_0x23e409){_0x455b16=_0x455b16-0x9c;let _0x27701b=_0xc42d5[_0x455b16];return _0x27701b;},a9_0x455b(_0x5d0a4a,_0x53acec);}const a9_0x2c3602=a9_0x455b;(function(_0x596530,_0x5d801f){const _0x1ef94e=a9_0x455b,_0x25569c=_0x596530();while(!![]){try{const _0x4525a2=parseInt(_0x1ef94e(0xa5))/0x1+-parseInt(_0x1ef94e(0xb4))/0x2+-parseInt(_0x1ef94e(0xae))/0x3+-parseInt(_0x1ef94e(0xb2))/0x4+-parseInt(_0x1ef94e(0xc1))/0x5+parseInt(_0x1ef94e(0xc2))/0x6*(parseInt(_0x1ef94e(0xb5))/0x7)+-parseInt(_0x1ef94e(0xa1))/0x8*(-parseInt(_0x1ef94e(0xc0))/0x9);if(_0x4525a2===_0x5d801f)break;else _0x25569c['push'](_0x25569c['shift']());}catch(_0x14f9a6){_0x25569c['push'](_0x25569c['shift']());}}}(a9_0xc42d,0x80f9e));import*as a9_0x546997 from'fs';function a9_0xc42d(){const _0x476024=['length','push','archivePath','writeFileSync','existsSync','entry','2721975NjwCUl','pointer','output/playwright-test-report.json','warn','3036980XPQmJA','Asset\x20file\x20not\x20found:\x20','429704ZQpTdp','7qtOWLX','name','string','object','parse','pipe','substring','file','test-results','normalizeAttachmentPath','forEach','27CcFRZK','1292005xBqiwE','454926DnFGne','createWriteStream','attachments','playwright-test-report-','finalize','utf-8','isArray','path','transformAttachmentPaths','tmpdir','readFileSync','sourcePath','values','error','now','outputPath','join','csize','contents','_offsets','[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20','replace','6415048taWURh','transformJsonReport','createZip','.json','186645EQpHzC','Report\x20file\x20not\x20found:\x20','stringify'];a9_0xc42d=function(){return _0x476024;};return a9_0xc42d();}import*as a9_0x1f7868 from'path';import*as a9_0x3012e5 from'os';import{ZipArchive}from'archiver';export class Zipper{[a9_0x2c3602(0xd1)];constructor(_0x145f6c){const _0x416cc9=a9_0x2c3602;this[_0x416cc9(0xd1)]=_0x145f6c['outputPath'];}async[a9_0x2c3602(0xa3)](_0x10fe63,_0x5e544d){const _0x1cdb85=[];return new Promise((_0x4e55a5,_0x50f997)=>{const _0x1b4f1f=a9_0x455b;try{const _0x561cc3=a9_0x546997[_0x1b4f1f(0xc3)](this[_0x1b4f1f(0xd1)]),_0x177dc0=new ZipArchive({'zlib':{'level':0x0}});_0x177dc0['on'](_0x1b4f1f(0xad),_0x31c851=>{const _0x41d9e8=_0x1b4f1f,_0x54021e=_0x31c851[_0x41d9e8(0xb6)]['replace'](/\\/g,'/'),_0x3987c6=_0x31c851[_0x41d9e8(0x9e)]?.[_0x41d9e8(0x9d)]??0x0,_0x27baef=_0x31c851[_0x41d9e8(0x9e)]?.['contents']+(_0x31c851[_0x41d9e8(0x9c)]??0x0)-0x1;_0x1cdb85[_0x41d9e8(0xa9)]({'name':_0x54021e,'start':_0x3987c6,'end':_0x27baef});}),_0x561cc3['on']('close',()=>{const _0x443fd7=_0x1b4f1f,_0x1e30eb=_0x177dc0[_0x443fd7(0xaf)]();_0x4e55a5({'zipPath':this[_0x443fd7(0xd1)],'size':_0x1e30eb,'entryCount':_0x1cdb85[_0x443fd7(0xa8)],'entries':_0x1cdb85});}),_0x177dc0['on'](_0x1b4f1f(0xcf),_0x5dc9a1=>{_0x50f997(_0x5dc9a1);}),_0x561cc3['on'](_0x1b4f1f(0xcf),_0x5b98d4=>{_0x50f997(_0x5b98d4);}),_0x177dc0[_0x1b4f1f(0xba)](_0x561cc3);if(!a9_0x546997[_0x1b4f1f(0xac)](_0x10fe63)){_0x50f997(new Error(_0x1b4f1f(0xa6)+_0x10fe63));return;}const _0x307518=this[_0x1b4f1f(0xa2)](_0x10fe63);_0x177dc0[_0x1b4f1f(0xbc)](_0x307518,{'name':_0x1b4f1f(0xb0)});for(const _0x18ad22 of _0x5e544d){if(!a9_0x546997[_0x1b4f1f(0xac)](_0x18ad22[_0x1b4f1f(0xcd)])){_0x50f997(new Error(_0x1b4f1f(0xb3)+_0x18ad22[_0x1b4f1f(0xcd)]));return;}_0x177dc0['file'](_0x18ad22[_0x1b4f1f(0xcd)],{'name':_0x18ad22[_0x1b4f1f(0xaa)]});}_0x177dc0[_0x1b4f1f(0xc6)]();}catch(_0x45a111){_0x50f997(_0x45a111);}});}[a9_0x2c3602(0xa2)](_0xcba830){const _0x3035cc=a9_0x2c3602,_0x276e23=a9_0x546997[_0x3035cc(0xcc)](_0xcba830,_0x3035cc(0xc7)),_0x2fa9ec=JSON[_0x3035cc(0xb9)](_0x276e23);this[_0x3035cc(0xca)](_0x2fa9ec);const _0x2cbfb2=a9_0x1f7868[_0x3035cc(0xd2)](a9_0x3012e5[_0x3035cc(0xcb)](),_0x3035cc(0xc5)+Date[_0x3035cc(0xd0)]()+_0x3035cc(0xa4));return a9_0x546997[_0x3035cc(0xab)](_0x2cbfb2,JSON[_0x3035cc(0xa7)](_0x2fa9ec,null,0x2)),_0x2cbfb2;}[a9_0x2c3602(0xca)](_0x4941a4){const _0x47995b=a9_0x2c3602;if(typeof _0x4941a4!==_0x47995b(0xb8)||_0x4941a4===null)return;if(Array[_0x47995b(0xc8)](_0x4941a4)){_0x4941a4[_0x47995b(0xbf)](_0x546538=>this[_0x47995b(0xca)](_0x546538));return;}_0x4941a4[_0x47995b(0xc4)]&&Array['isArray'](_0x4941a4[_0x47995b(0xc4)])&&_0x4941a4['attachments'][_0x47995b(0xbf)](_0x3508d4=>{const _0x170444=_0x47995b;_0x3508d4[_0x170444(0xc9)]&&typeof _0x3508d4['path']===_0x170444(0xb7)&&(_0x3508d4[_0x170444(0xc9)]=this[_0x170444(0xbe)](_0x3508d4[_0x170444(0xc9)]));}),Object[_0x47995b(0xce)](_0x4941a4)[_0x47995b(0xbf)](_0xff9aff=>this['transformAttachmentPaths'](_0xff9aff));}[a9_0x2c3602(0xbe)](_0x32fa6a){const _0x39a947=a9_0x2c3602,_0x1008dc=_0x32fa6a['indexOf'](_0x39a947(0xbd));if(_0x1008dc!==-0x1)return _0x32fa6a[_0x39a947(0xbb)](_0x1008dc)[_0x39a947(0xa0)](/\\/g,'/');return console[_0x39a947(0xb1)](_0x39a947(0x9f)+_0x32fa6a),_0x32fa6a;}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkly/playwright-reporter",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9-alpha",
|
|
4
4
|
"description": "Playwright reporter that generates ZIP archives containing JSON reports and test assets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"archiver": "git+ssh://git@github.com:checkly/node-archiver.git",
|
|
40
|
-
"axios": "^1.12.2"
|
|
40
|
+
"axios": "^1.12.2",
|
|
41
|
+
"form-data": "^4.0.4"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@playwright/test": "^1.56.0",
|