@checkly/playwright-reporter 0.0.7-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/README.md +1 -1
- 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/README.md
CHANGED
|
@@ -75,7 +75,7 @@ Running 5 tests using 5 workers
|
|
|
75
75
|
|
|
76
76
|
======================================================
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
🦝 Checkly reporter: 0.1.0
|
|
79
79
|
🎭 Playwright: 1.56.0
|
|
80
80
|
📔 Project: chromium
|
|
81
81
|
🔗 Test session URL: https://chkly.link/l/XSX35
|
package/dist/asset-collector.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
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
|
-
|
|
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
|
-
(function(
|
|
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
|
-
const a7_0x19f2cc=a7_0x47d5;(function(_0x30d24c,_0x23a8c8){const _0x1740b2=a7_0x47d5,_0xf929d0=_0x30d24c();while(!![]){try{const _0x1b715a=parseInt(_0x1740b2(0x226))/0x1+parseInt(_0x1740b2(0x20f))/0x2+parseInt(_0x1740b2(0x21b))/0x3*(-parseInt(_0x1740b2(0x227))/0x4)+parseInt(_0x1740b2(0x240))/0x5+parseInt(_0x1740b2(0x1ee))/0x6*(parseInt(_0x1740b2(0x237))/0x7)+parseInt(_0x1740b2(0x241))/0x8+-parseInt(_0x1740b2(0x1e0))/0x9*(parseInt(_0x1740b2(0x231))/0xa);if(_0x1b715a===_0x23a8c8)break;else _0xf929d0['push'](_0xf929d0['shift']());}catch(_0x53043a){_0xf929d0['push'](_0xf929d0['shift']());}}}(a7_0x7279,0xcecb6));import*as a7_0x327c90 from'fs';import*as a7_0x534a16 from'path';import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0x555d9d from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';function a7_0x47d5(_0x586868,_0x407637){const _0x727992=a7_0x7279();return a7_0x47d5=function(_0x47d50b,_0x25719e){_0x47d50b=_0x47d50b-0x1da;let _0x3211e0=_0x727992[_0x47d50b];return _0x3211e0;},a7_0x47d5(_0x586868,_0x407637);}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';const __filename=fileURLToPath(import.meta[a7_0x19f2cc(0x20d)]),__dirname=dirname(__filename),packageJson=JSON['parse'](readFileSync(join(__dirname,'..',a7_0x19f2cc(0x23c)),a7_0x19f2cc(0x216))),pkgVersion=packageJson[a7_0x19f2cc(0x21d)],pluralRules=new Intl[(a7_0x19f2cc(0x22d))]('en-US'),projectForms={'zero':a7_0x19f2cc(0x234),'one':a7_0x19f2cc(0x234),'two':a7_0x19f2cc(0x1ff),'few':a7_0x19f2cc(0x1ff),'many':a7_0x19f2cc(0x1ff),'other':a7_0x19f2cc(0x1ff)};function getApiUrl(_0x27d8c5){const _0x54e948=a7_0x19f2cc,_0x54226a={'local':'http://127.0.0.1:3000','development':_0x54e948(0x217),'staging':_0x54e948(0x1f6),'production':'https://api.checklyhq.com'};return _0x54226a[_0x27d8c5];}function getEnvironment(_0x1fb968){const _0x285eb5=a7_0x19f2cc,_0x26e8f7=_0x1fb968?.[_0x285eb5(0x1de)],_0x5c6380=process[_0x285eb5(0x203)][_0x285eb5(0x1dc)],_0xde5e0e=_0x26e8f7||_0x5c6380||_0x285eb5(0x20e),_0x4bb11e=['local',_0x285eb5(0x23d),_0x285eb5(0x1e1),'production'];if(!_0x4bb11e[_0x285eb5(0x221)](_0xde5e0e))return console[_0x285eb5(0x236)](_0x285eb5(0x22e)+_0xde5e0e+'\x22,\x20using\x20\x22production\x22'),_0x285eb5(0x20e);return _0xde5e0e;}function getDirectoryName(){const _0x922559=a7_0x19f2cc,_0x37c0e8=process['cwd']();let _0x97ddb7=a7_0x534a16['basename'](_0x37c0e8);return(!_0x97ddb7||_0x97ddb7==='/'||_0x97ddb7==='.')&&(_0x97ddb7=_0x922559(0x249)),_0x97ddb7=_0x97ddb7[_0x922559(0x1f7)](/[<>:"|?*]/g,'-'),_0x97ddb7[_0x922559(0x21c)]>0xff&&(_0x97ddb7=_0x97ddb7[_0x922559(0x222)](0x0,0xff)),_0x97ddb7;}function a7_0x7279(){const _0x34f59b=['options','checkly-report.zip','statSync','Projects','🎭\x20Playwright:\x20','testSession','zipPath','env','testCounts','retry','[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:','link','\x0a======================================================\x0a','PASSED','createZip','🔗\x20Test\x20session\x20URL:\x20','base64','url','production','1178164CqPNwx','passed','size','toString','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','concat','failed','utf-8','https://api-dev.checklyhq.com','retries','convertFileToBase64Stream','collectAssets','33wAaMca','length','version','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','outputPath','GITHUB_REPOSITORY','includes','substring','FAILED','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','GITHUB_ACTOR','916439MjimBz','110524MPoxKP','PW_REPORTER','catch','log','📦\x20Checkly\x20Playwright\x20reporter:\x20','[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:','PluralRules','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','startTime','17481180FLaEUm','📔\x20','dryRun','Project','onError','warn','938yFHaTI','printSummary','CHECKLY_ACCOUNT_ID','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','onEnd','package.json','development','projects','[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:','6026050iMGBwc','8505584yWxkJP','parse','join','getTime','floor','assetCollector','testResultId','onBegin','playwright-tests','\x20\x20]','GITHUB_REF_NAME','[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:','entries','CHECKLY_ENV','config','environment','map','18GsetDD','staging','test-results','CHECKLY_API_KEY','select','\x0a🔗\x20View\x20test\x20session:\x20','end','uploadResults','jsonReportPath','error','unlinkSync','testResultsDir','flaky','test','39102HOLPjs','createTestSession','GITHUB_SHA','NODE_ENV','Playwright\x20Test\x20Session:\x20','subarray','testResults','message','https://api-test.checklyhq.com','replace','zipper','apiKey','toISOString','accountId'];a7_0x7279=function(){return _0x34f59b;};return a7_0x7279();}export class ChecklyReporter{[a7_0x19f2cc(0x1fc)];[a7_0x19f2cc(0x246)];[a7_0x19f2cc(0x1f8)];['testResults'];[a7_0x19f2cc(0x201)];['startTime'];[a7_0x19f2cc(0x204)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0xd5f1a1={}){const _0x3d32fe=a7_0x19f2cc,_0x149c3d=getEnvironment(_0xd5f1a1),_0x2359be=getApiUrl(_0x149c3d),_0x206cc2=process[_0x3d32fe(0x203)][_0x3d32fe(0x1e3)]||_0xd5f1a1[_0x3d32fe(0x1f9)],_0x2468f3=process['env'][_0x3d32fe(0x239)]||_0xd5f1a1[_0x3d32fe(0x1fb)];this['options']={'accountId':_0x2468f3,'apiKey':_0x206cc2,'outputPath':_0xd5f1a1[_0x3d32fe(0x21f)]??_0x3d32fe(0x1fd),'jsonReportPath':_0xd5f1a1[_0x3d32fe(0x1e8)]??'test-results/playwright-test-report.json','testResultsDir':_0xd5f1a1[_0x3d32fe(0x1eb)]??_0x3d32fe(0x1e2),'dryRun':_0xd5f1a1[_0x3d32fe(0x233)]??![]},this[_0x3d32fe(0x246)]=new AssetCollector(this[_0x3d32fe(0x1fc)]['testResultsDir']),this[_0x3d32fe(0x1f8)]=new Zipper({'outputPath':this[_0x3d32fe(0x1fc)][_0x3d32fe(0x21f)]});if(!this[_0x3d32fe(0x1fc)]['dryRun']&&this[_0x3d32fe(0x1fc)][_0x3d32fe(0x1f9)]&&this[_0x3d32fe(0x1fc)]['accountId']){const _0x3bf654=new a7_0x555d9d({'apiKey':this[_0x3d32fe(0x1fc)][_0x3d32fe(0x1f9)],'accountId':this[_0x3d32fe(0x1fc)][_0x3d32fe(0x1fb)],'baseUrl':_0x2359be});this[_0x3d32fe(0x1f4)]=new TestResults(_0x3bf654['getAxiosInstance']());}}[a7_0x19f2cc(0x248)](_0x4f5680,_0x4f9656){const _0x3fcf48=a7_0x19f2cc;this[_0x3fcf48(0x230)]=new Date();if(!this[_0x3fcf48(0x1f4)])return;try{const _0x47c93f=getDirectoryName(),_0x3020e2=[{'name':_0x47c93f}],_0x54034b=process[_0x3fcf48(0x203)][_0x3fcf48(0x220)]?'https://github.com/'+process[_0x3fcf48(0x203)]['GITHUB_REPOSITORY']:undefined,_0x4a36a6=_0x54034b?{'repoUrl':_0x54034b,'commitId':process[_0x3fcf48(0x203)][_0x3fcf48(0x1f0)],'branchName':process[_0x3fcf48(0x203)][_0x3fcf48(0x24b)],'commitOwner':process[_0x3fcf48(0x203)][_0x3fcf48(0x225)],'commitMessage':process[_0x3fcf48(0x203)]['GITHUB_EVENT_NAME']}:undefined;this[_0x3fcf48(0x1f4)][_0x3fcf48(0x1ef)]({'name':_0x3fcf48(0x1f2)+_0x47c93f,'environment':process[_0x3fcf48(0x203)][_0x3fcf48(0x1f1)]||_0x3fcf48(0x1ed),'repoInfo':_0x4a36a6,'startedAt':this['startTime'][_0x3fcf48(0x244)](),'testResults':_0x3020e2,'provider':_0x3fcf48(0x228)})['then'](_0x591a9a=>{const _0x4d6484=_0x3fcf48;this[_0x4d6484(0x201)]=_0x591a9a,_0x591a9a[_0x4d6484(0x207)]&&console[_0x4d6484(0x22a)](_0x4d6484(0x1e5)+_0x591a9a['link']+'\x0a');})[_0x3fcf48(0x229)](_0x31ef3d=>{const _0xb81ca9=_0x3fcf48;console[_0xb81ca9(0x1e9)](_0xb81ca9(0x21e),_0x31ef3d[_0xb81ca9(0x1f5)]);});}catch(_0x143d86){console[_0x3fcf48(0x1e9)](_0x3fcf48(0x1da),_0x143d86);}}['onTestEnd'](_0x41c2d9,_0x38833e){const _0x704c9c=a7_0x19f2cc;try{const _0x698348=_0x38833e['status']===_0x704c9c(0x210)||_0x38833e[_0x704c9c(0x205)]===_0x41c2d9[_0x704c9c(0x218)];if(!_0x698348)return;const _0x321ced=_0x41c2d9['outcome']()===_0x704c9c(0x1ec);if(_0x321ced)this[_0x704c9c(0x204)][_0x704c9c(0x1ec)]++,this['testCounts'][_0x704c9c(0x210)]++;else{if(_0x38833e['status']===_0x704c9c(0x210))this[_0x704c9c(0x204)][_0x704c9c(0x210)]++;else _0x38833e['status']==='failed'&&this[_0x704c9c(0x204)][_0x704c9c(0x215)]++;}}catch(_0x384518){console[_0x704c9c(0x1e9)](_0x704c9c(0x22f),_0x384518);}}async[a7_0x19f2cc(0x23b)](){const _0x1e4352=a7_0x19f2cc;try{const _0xf4254b=this[_0x1e4352(0x1fc)]['jsonReportPath'];if(!a7_0x327c90['existsSync'](_0xf4254b)){console[_0x1e4352(0x1e9)](_0x1e4352(0x23a)+_0xf4254b),console[_0x1e4352(0x1e9)](_0x1e4352(0x23f)),console['error']('\x20\x20reporter:\x20[\x0a'+_0x1e4352(0x224)+_0x1e4352(0x213)+_0x1e4352(0x24a));return;}const _0x3057a5=a7_0x327c90['readFileSync'](_0xf4254b,_0x1e4352(0x216)),_0x441bf3=JSON[_0x1e4352(0x242)](_0x3057a5),_0x2efc7f=await this[_0x1e4352(0x246)][_0x1e4352(0x21a)](_0x441bf3),_0x549ed3=await this[_0x1e4352(0x1f8)][_0x1e4352(0x20a)](_0xf4254b,_0x2efc7f);if(this[_0x1e4352(0x1f4)]&&this[_0x1e4352(0x201)]){await this[_0x1e4352(0x1e7)](_0x441bf3,_0x549ed3[_0x1e4352(0x202)],_0x549ed3[_0x1e4352(0x1db)]);if(!this[_0x1e4352(0x1fc)][_0x1e4352(0x233)])try{a7_0x327c90[_0x1e4352(0x1ea)](_0x549ed3[_0x1e4352(0x202)]);}catch(_0x153224){console[_0x1e4352(0x236)]('[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20'+_0x153224);}}this[_0x1e4352(0x1f4)]&&this[_0x1e4352(0x201)]?.[_0x1e4352(0x207)]&&this[_0x1e4352(0x238)](_0x441bf3,this[_0x1e4352(0x201)]);}catch(_0x4e035e){console[_0x1e4352(0x1e9)](_0x1e4352(0x22c),_0x4e035e);}}['printSummary'](_0x10494e,_0x1df659){const _0x51202a=a7_0x19f2cc,_0x5bfda8=pluralRules[_0x51202a(0x1e4)](_0x10494e[_0x51202a(0x1dd)][_0x51202a(0x23e)][_0x51202a(0x21c)]);console[_0x51202a(0x22a)](_0x51202a(0x208)),console[_0x51202a(0x22a)](_0x51202a(0x22b)+pkgVersion),console['log'](_0x51202a(0x200)+_0x10494e[_0x51202a(0x1dd)][_0x51202a(0x21d)]),console[_0x51202a(0x22a)](_0x51202a(0x232)+projectForms[_0x5bfda8]+':\x20'+_0x10494e[_0x51202a(0x1dd)][_0x51202a(0x23e)][_0x51202a(0x1df)](({name:_0x406f00})=>_0x406f00)[_0x51202a(0x243)](',')),console[_0x51202a(0x22a)](_0x51202a(0x20b)+_0x1df659[_0x51202a(0x207)]),console[_0x51202a(0x22a)]('\x0a======================================================');}async[a7_0x19f2cc(0x219)](_0x130cb0){return new Promise((_0x3d0d1f,_0x3b845a)=>{const _0x269602=a7_0x47d5,_0x2e7188=[];let _0x2f0d59=Buffer['alloc'](0x0);const _0x1336c4=a7_0x327c90['createReadStream'](_0x130cb0,{'highWaterMark':0x400*0x400*0x3});_0x1336c4['on']('data',_0x3bf33b=>{const _0x4c8689=a7_0x47d5,_0x4bf7a1=Buffer['isBuffer'](_0x3bf33b)?_0x3bf33b:Buffer['from'](_0x3bf33b),_0x16e39a=Buffer[_0x4c8689(0x214)]([_0x2f0d59,_0x4bf7a1]),_0x467ecc=Math[_0x4c8689(0x245)](_0x16e39a[_0x4c8689(0x21c)]/0x3)*0x3;if(_0x467ecc>0x0){const _0x658bf4=_0x16e39a[_0x4c8689(0x1f3)](0x0,_0x467ecc);_0x2e7188['push'](_0x658bf4['toString'](_0x4c8689(0x20c))),_0x2f0d59=_0x16e39a[_0x4c8689(0x1f3)](_0x467ecc);}else _0x2f0d59=_0x16e39a;}),_0x1336c4['on'](_0x269602(0x1e6),()=>{const _0x2a3320=_0x269602;_0x2f0d59[_0x2a3320(0x21c)]>0x0&&_0x2e7188['push'](_0x2f0d59[_0x2a3320(0x212)](_0x2a3320(0x20c))),_0x3d0d1f(_0x2e7188[_0x2a3320(0x243)](''));}),_0x1336c4['on'](_0x269602(0x1e9),_0x55a93a=>{_0x3b845a(_0x55a93a);});});}async[a7_0x19f2cc(0x1e7)](_0x541cb8,_0x15af32,_0x501f49){const _0x44a3ae=a7_0x19f2cc;if(!this['testResults']||!this[_0x44a3ae(0x201)])return;try{const {failed:_0x52050d,flaky:_0x86cdcc}=this['testCounts'],_0x322d4d=_0x52050d>0x0?_0x44a3ae(0x223):_0x44a3ae(0x209),_0xd0e25=_0x52050d===0x0&&_0x86cdcc>0x0,_0x1809f0=new Date(),_0x29dbff=this[_0x44a3ae(0x230)]?Math['max'](0x0,_0x1809f0[_0x44a3ae(0x244)]()-this[_0x44a3ae(0x230)][_0x44a3ae(0x244)]()):0x0,_0xe36782=await this[_0x44a3ae(0x219)](_0x15af32),_0x3a44da=a7_0x327c90[_0x44a3ae(0x1fe)](_0x15af32)[_0x44a3ae(0x211)];if(this['testSession'][_0x44a3ae(0x1f4)][_0x44a3ae(0x21c)]>0x0){const _0x32806d=this[_0x44a3ae(0x201)][_0x44a3ae(0x1f4)][0x0];await this[_0x44a3ae(0x1f4)]['updateTestResult'](this[_0x44a3ae(0x201)]['testSessionId'],_0x32806d[_0x44a3ae(0x247)],{'status':_0x322d4d,'isDegraded':_0xd0e25,'startedAt':this['startTime']?.[_0x44a3ae(0x1fa)](),'stoppedAt':_0x1809f0[_0x44a3ae(0x1fa)](),'responseTime':_0x29dbff,'assets':{'assetsZip':_0xe36782,'entries':_0x501f49},'metadata':{'usageData':{'s3PostTotalBytes':_0x3a44da}}});}}catch(_0xdd7c09){const _0x8c0500=_0xdd7c09 instanceof Error?_0xdd7c09['message']:String(_0xdd7c09);console[_0x44a3ae(0x1e9)](_0x44a3ae(0x206),_0x8c0500);}}[a7_0x19f2cc(0x235)](_0x2ff086){console['error']('[Checkly\x20Reporter]\x20Global\x20error:',_0x2ff086);}}
|
|
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",
|