@checksum-ai/runtime 4.1.0-beta → 4.1.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +1 -1
- package/checksum-progress-reporter.js +1 -0
- package/checksum-root/playwright.config.ts +6 -3
- package/checksumlib.js +47 -47
- package/cli.js +295 -279
- package/index.d.ts +4 -0
- package/package.json +9 -5
- package/test-run-monitor.js +1 -1
- package/.gitignore +0 -1
- package/checksum-root/example.checksum.spec.ts +0 -15
- package/checksum-root/github-actions.example.yml +0 -55
- package/vtg-build/asset-manifest.json +0 -13
- package/vtg-build/index.html +0 -1
- package/vtg-build/manifest.json +0 -25
- package/vtg-build/robots.txt +0 -3
- package/vtg-build/static/css/main.feaf2948.css +0 -2
- package/vtg-build/static/css/main.feaf2948.css.map +0 -1
- package/vtg-pw-bridge-runner.js +0 -2421
package/index.d.ts
CHANGED
|
@@ -223,6 +223,10 @@ export type RuntimeOptions = {
|
|
|
223
223
|
* Save reports on checksum hosting servers
|
|
224
224
|
*/
|
|
225
225
|
hostReports?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Create a PR with healed tests. Only relevant when in Heal mode.
|
|
228
|
+
*/
|
|
229
|
+
autoHealPRs?: boolean;
|
|
226
230
|
/**
|
|
227
231
|
* Delay in ms between consecutive actions (e.g. click→click).
|
|
228
232
|
* Prevents race conditions where onclick handlers aren't registered yet.
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checksum-ai/runtime",
|
|
3
|
-
"version": "4.1.0-beta",
|
|
4
3
|
"description": "Checksum.ai test runtime",
|
|
5
4
|
"main": "index.js",
|
|
6
5
|
"dependencies": {
|
|
@@ -12,7 +11,6 @@
|
|
|
12
11
|
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
13
12
|
"rrweb": "2.0.0-alpha.18",
|
|
14
13
|
"ts-node": "^10.9.1",
|
|
15
|
-
"@monaco-editor/react": "^4.6.0",
|
|
16
14
|
"sucrase": "^3.35.1",
|
|
17
15
|
"sharp": "^0.33.5",
|
|
18
16
|
"newrelic": "^13.12.0",
|
|
@@ -20,7 +18,8 @@
|
|
|
20
18
|
},
|
|
21
19
|
"repository": {
|
|
22
20
|
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/checksum-ai/checksum-ai-
|
|
21
|
+
"url": "git+https://github.com/checksum-ai/checksum-ai-monorepo.git",
|
|
22
|
+
"directory": "packages/runtime"
|
|
24
23
|
},
|
|
25
24
|
"keywords": [
|
|
26
25
|
"checksum",
|
|
@@ -36,8 +35,13 @@
|
|
|
36
35
|
],
|
|
37
36
|
"author": "checksum.ai",
|
|
38
37
|
"license": "ISC",
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"registry": "https://registry.npmjs.org/",
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
39
42
|
"bugs": {
|
|
40
|
-
"url": "https://github.com/checksum-ai/checksum-ai-
|
|
43
|
+
"url": "https://github.com/checksum-ai/checksum-ai-monorepo/issues"
|
|
41
44
|
},
|
|
42
|
-
"homepage": "https://github.com/checksum-ai/checksum-ai-runtime#readme"
|
|
45
|
+
"homepage": "https://github.com/checksum-ai/checksum-ai-monorepo/tree/main/packages/runtime#readme",
|
|
46
|
+
"version": "4.1.1-beta.2"
|
|
43
47
|
}
|
package/test-run-monitor.js
CHANGED
|
@@ -447,7 +447,7 @@ Additional information: BADCLIENT: Bad error code, ${T} not found in range ${l}.
|
|
|
447
447
|
`+Oe.map(xWe).join(`
|
|
448
448
|
`):" "+xWe(Oe[0]):"as no adapter specified";throw new ts("There is no suitable adapter to dispatch the request "+nt,"ERR_NOT_SUPPORT")}return ne}t(Swt,"getAdapter");var yee={getAdapter:Swt,adapters:Hbe};function Gbe(E){if(E.cancelToken&&E.cancelToken.throwIfRequested(),E.signal&&E.signal.aborted)throw new j1(null,E)}t(Gbe,"throwIfCancellationRequested");function vee(E){return Gbe(E),E.headers=Ip.from(E.headers),E.data=BJ.call(E,E.transformRequest),["post","put","patch"].indexOf(E.method)!==-1&&E.headers.setContentType("application/x-www-form-urlencoded",!1),yee.getAdapter(E.adapter||j5.adapter,E)(E).then(t(function(J){return Gbe(E),J.data=BJ.call(E,E.transformResponse,J),J.headers=Ip.from(J.headers),J},"onAdapterResolution"),t(function(J){return JJ(J)||(Gbe(E),J&&J.response&&(J.response.data=BJ.call(E,E.transformResponse,J.response),J.response.headers=Ip.from(J.response.headers))),Promise.reject(J)},"onAdapterRejection"))}t(vee,"dispatchRequest");var bee={};["object","boolean","number","function","string","symbol"].forEach((E,C)=>{bee[E]=t(function(J){return typeof J===E||"a"+(C<1?"n ":" ")+E},"validator")});var SWe={};bee.transitional=t(function(C,F,J){function ne(he,Oe){return"[Axios v"+jN+"] Transitional option '"+he+"'"+Oe+(J?". "+J:"")}return t(ne,"formatMessage"),(he,Oe,nt)=>{if(C===!1)throw new ts(ne(Oe," has been removed"+(F?" in "+F:"")),ts.ERR_DEPRECATED);return F&&!SWe[Oe]&&(SWe[Oe]=!0,console.warn(ne(Oe," has been deprecated since v"+F+" and will be removed in the near future"))),C?C(he,Oe,nt):!0}},"transitional");bee.spelling=t(function(C){return(F,J)=>(console.warn(`${J} is likely a misspelling of ${C}`),!0)},"spelling");function Twt(E,C,F){if(typeof E!="object")throw new ts("options must be an object",ts.ERR_BAD_OPTION_VALUE);let J=Object.keys(E),ne=J.length;for(;ne-- >0;){let he=J[ne],Oe=C[he];if(Oe){let nt=E[he],At=nt===void 0||Oe(nt,he,E);if(At!==!0)throw new ts("option "+he+" must be "+At,ts.ERR_BAD_OPTION_VALUE);continue}if(F!==!0)throw new ts("Unknown option "+he,ts.ERR_BAD_OPTION)}}t(Twt,"assertOptions");var GJ={assertOptions:Twt,validators:bee};var Sx=GJ.validators,$be=class $be{constructor(C){this.defaults=C||{},this.interceptors={request:new Z1e,response:new Z1e}}async request(C,F){try{return await this._request(C,F)}catch(J){if(J instanceof Error){let ne={};Error.captureStackTrace?Error.captureStackTrace(ne):ne=new Error;let he=ne.stack?ne.stack.replace(/^.+\n/,""):"";try{J.stack?he&&!String(J.stack).endsWith(he.replace(/^.+\n.+\n/,""))&&(J.stack+=`
|
|
449
449
|
`+he):J.stack=he}catch{}}throw J}}_request(C,F){typeof C=="string"?(F=F||{},F.url=C):F=C||{},F=nS(this.defaults,F);let{transitional:J,paramsSerializer:ne,headers:he}=F;J!==void 0&&GJ.assertOptions(J,{silentJSONParsing:Sx.transitional(Sx.boolean),forcedJSONParsing:Sx.transitional(Sx.boolean),clarifyTimeoutError:Sx.transitional(Sx.boolean),legacyInterceptorReqResOrdering:Sx.transitional(Sx.boolean)},!1),ne!=null&&(zr.isFunction(ne)?F.paramsSerializer={serialize:ne}:GJ.assertOptions(ne,{encode:Sx.function,serialize:Sx.function},!0)),F.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?F.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:F.allowAbsoluteUrls=!0),GJ.assertOptions(F,{baseUrl:Sx.spelling("baseURL"),withXsrfToken:Sx.spelling("withXSRFToken")},!0),F.method=(F.method||this.defaults.method||"get").toLowerCase();let Oe=he&&zr.merge(he.common,he[F.method]);he&&zr.forEach(["delete","get","head","post","put","patch","common"],vt=>{delete he[vt]}),F.headers=Ip.concat(Oe,he);let nt=[],At=!0;this.interceptors.request.forEach(t(function(ht){if(typeof ht.runWhen=="function"&&ht.runWhen(F)===!1)return;At=At&&ht.synchronous;let Jn=F.transitional||FD;Jn&&Jn.legacyInterceptorReqResOrdering?nt.unshift(ht.fulfilled,ht.rejected):nt.push(ht.fulfilled,ht.rejected)},"unshiftRequestInterceptors"));let Mt=[];this.interceptors.response.forEach(t(function(ht){Mt.push(ht.fulfilled,ht.rejected)},"pushResponseInterceptors"));let Dt,Xr=0,Ee;if(!At){let vt=[vee.bind(this),void 0];for(vt.unshift(...nt),vt.push(...Mt),Ee=vt.length,Dt=Promise.resolve(F);Xr<Ee;)Dt=Dt.then(vt[Xr++],vt[Xr++]);return Dt}Ee=nt.length;let si=F;for(;Xr<Ee;){let vt=nt[Xr++],ht=nt[Xr++];try{si=vt(si)}catch(Jn){ht.call(this,Jn);break}}try{Dt=vee.call(this,si)}catch(vt){return Promise.reject(vt)}for(Xr=0,Ee=Mt.length;Xr<Ee;)Dt=Dt.then(Mt[Xr++],Mt[Xr++]);return Dt}getUri(C){C=nS(this.defaults,C);let F=FN(C.baseURL,C.url,C.allowAbsoluteUrls);return ON(F,C.params,C.paramsSerializer)}};t($be,"Axios");var V5=$be;zr.forEach(["delete","get","head","options"],t(function(C){V5.prototype[C]=function(F,J){return this.request(nS(J||{},{method:C,url:F,data:(J||{}).data}))}},"forEachMethodNoData"));zr.forEach(["post","put","patch"],t(function(C){function F(J){return t(function(he,Oe,nt){return this.request(nS(nt||{},{method:C,headers:J?{"Content-Type":"multipart/form-data"}:{},url:he,data:Oe}))},"httpMethod")}t(F,"generateHTTPMethod"),V5.prototype[C]=F(),V5.prototype[C+"Form"]=F(!0)},"forEachMethodWithData"));var $J=V5;var xee=class xee{constructor(C){if(typeof C!="function")throw new TypeError("executor must be a function.");let F;this.promise=new Promise(t(function(he){F=he},"promiseExecutor"));let J=this;this.promise.then(ne=>{if(!J._listeners)return;let he=J._listeners.length;for(;he-- >0;)J._listeners[he](ne);J._listeners=null}),this.promise.then=ne=>{let he,Oe=new Promise(nt=>{J.subscribe(nt),he=nt}).then(ne);return Oe.cancel=t(function(){J.unsubscribe(he)},"reject"),Oe},C(t(function(he,Oe,nt){J.reason||(J.reason=new j1(he,Oe,nt),F(J.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(C){if(this.reason){C(this.reason);return}this._listeners?this._listeners.push(C):this._listeners=[C]}unsubscribe(C){if(!this._listeners)return;let F=this._listeners.indexOf(C);F!==-1&&this._listeners.splice(F,1)}toAbortSignal(){let C=new AbortController,F=t(J=>{C.abort(J)},"abort");return this.subscribe(F),C.signal.unsubscribe=()=>this.unsubscribe(F),C.signal}static source(){let C;return{token:new xee(t(function(ne){C=ne},"executor")),cancel:C}}};t(xee,"CancelToken");var Xbe=xee,TWe=Xbe;function Qbe(E){return t(function(F){return E.apply(null,F)},"wrap")}t(Qbe,"spread");function Ybe(E){return zr.isObject(E)&&E.isAxiosError===!0}t(Ybe,"isAxiosError");var Kbe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Kbe).forEach(([E,C])=>{Kbe[C]=E});var kWe=Kbe;function CWe(E){let C=new $J(E),F=AJ($J.prototype.request,C);return zr.extend(F,$J.prototype,C,{allOwnKeys:!0}),zr.extend(F,C,null,{allOwnKeys:!0}),F.create=t(function(ne){return CWe(nS(E,ne))},"create"),F}t(CWe,"createInstance");var nm=CWe(j5);nm.Axios=$J;nm.CanceledError=j1;nm.CancelToken=TWe;nm.isCancel=JJ;nm.VERSION=jN;nm.toFormData=OD;nm.AxiosError=ts;nm.Cancel=nm.CanceledError;nm.all=t(function(C){return Promise.all(C)},"all");nm.spread=Qbe;nm.isAxiosError=Ybe;nm.mergeConfig=nS;nm.AxiosHeaders=Ip;nm.formToJSON=E=>lee(zr.isHTMLForm(E)?new FormData(E):E);nm.getAdapter=yee.getAdapter;nm.HttpStatusCode=kWe;nm.default=nm;var See=nm;var{Axios:sIt,AxiosError:oIt,CanceledError:cIt,isCancel:lIt,CancelToken:uIt,VERSION:_It,all:fIt,Cancel:pIt,isAxiosError:dIt,spread:mIt,toFormData:gIt,AxiosHeaders:hIt,HttpStatusCode:yIt,formToJSON:vIt,getAdapter:bIt,mergeConfig:xIt}=See;var kee=require("fs");var Zbe=class Zbe{constructor(C,F,J,ne,he=!1,Oe={start:t(nt=>{},"start"),complete:t(nt=>{},"complete"),error:t((nt,At)=>{},"error")}){this.apiBaseURL=C;this.apiKey=F;this.uploadTimeout=J;this.makeGetUploadUrlAPIPath=ne;this.isolationMode=he;this.reporter=Oe}async uploadAsset(C){if(C.uploadStarted=!0,this.isolationMode){C.lastProgress=Date.now(),C.loadedBytes=0,C.sizeBytes=100,C.response=new Promise(J=>{setTimeout(()=>{C.complete=!0,C.lastProgress=Date.now(),C.loadedBytes=100,J({statusCode:200,ok:!0,body:"OK"})},10)});return}let{path:F}=C.info;try{let ne=(0,kee.statSync)(F).size;if(C.sizeBytes=ne,C.loadedBytes=0,C.lastProgress=Date.now(),this.reporter.start(F),await this.getSignedURLForUpload(C),!C.uploadURL){C.error=!0;return}let he=(0,kee.createReadStream)(F),Oe=await See.put(C.uploadURL,he,{headers:{"Content-Type":YBe[C.info.type]??""},maxBodyLength:1/0,maxContentLength:1/0,onUploadProgress:t(nt=>{C.lastProgress=nt.loaded>C.loadedBytes?Date.now():C.lastProgress,C.loadedBytes=nt.loaded,C.sizeBytes=nt.total??ne},"onUploadProgress"),timeout:this.uploadTimeout??void 0});if(Oe.status!==200)throw new Error(`Upload failed with status ${Oe.status}`);this.reporter.complete(F),C.complete=!0,C.response=Oe.data}catch(J){this.reporter.error(F,J),C.error=!0}}async getSignedURLForUpload(C){try{let F=JSON.stringify(C.info),J=`${this.apiBaseURL}/${this.makeGetUploadUrlAPIPath(C)}`,ne={Accept:"application/json","Content-Type":"application/json",ChecksumAppCode:this.apiKey},he=await fetch(J,{method:"POST",headers:ne,body:F}),{url:Oe}=await he.json();C.uploadURL=Oe}catch(F){return this.reporter.error(C.info.path,"Error getting signed URL for artifact"+String(F)),null}}};t(Zbe,"TestAssetUploader");var Tee=Zbe;var txe=class txe{constructor(){}sendToCLI(...C){console.log(`{trm}${C.map(F=>F.toString()).join(`,
|
|
450
|
-
`)}{/trm}`)}event(C,F){return new Promise(J=>{let ne=F?`${C}=${F}`:C;setTimeout(()=>{this.sendToCLI(`monitor:${ne}`),J(!0)},100)})}trace(C,F){let J=F?`${C}=${JSON.stringify(F)}`:C;setTimeout(()=>{this.sendToCLI(`trace:${J}`)},100)}log(C){return this.event("log",C)}debug(...C){this.sendToCLI(C)}};t(txe,"CLIChannel");var exe=txe,rxe=class rxe{constructor(C,F=!1){this.config=C;this.isolationMode=F;this.MAX_UPLOADS=15;this.MONITOR_INTERVAL=2500;this.UPLOAD_TIMEOUT=10*60*1e3;this.UPLOAD_STALL_TIMEOUT=3*60*60*1e3;this.WATCH_TIMEOUT=2*60*1e3;this.assets=[];this.watchAssets=[];this.processingPaths=new Set;this.reportComplete=!1;this.processingInProgress=!1;this.pwTestIdToChecksumTestId={};this.checksumTestIdToUsingPlaceholder={};this.channel=new exe,this.testAssetUploader=new Tee(C.apiURL,C.apiKey,this.UPLOAD_TIMEOUT,()=>`client-api/test-runs/${this.config.sessionId}/get-upload-url`,this.isolationMode,{start:t(J=>this.channel.trace("Upload Start",{filename:J}),"start"),complete:t(J=>{if(!this.reportAsset||J!==this.reportAsset.info.path)try{(0,_d.unlinkSync)(J),this.channel.debug(`[TestAssetUploader] Deleted file after successful upload: ${J}`)}catch(ne){this.channel.debug(`[TestAssetUploader] Failed to delete file after upload: ${J}`,ne)}this.channel.trace("Upload Complete",{filename:J})},"complete"),error:t((J,ne)=>this.channel.trace("Upload Failed",{filename:J,error:ne}),"error")}),setInterval(this.monitorUploads.bind(this),this.MONITOR_INTERVAL),this.listenForMessages(),this.startServer()}listenForMessages(){process.stdin.on("data",async C=>{let F=C.toString().trim();if(!F.startsWith("cli:"))return;let[J,ne]=F.substring(4).split("=");switch(this.channel.debug("Received message from CLI "+J+" "+ne),J){case"report":if(this.testRunEndTime=Date.now(),ne!=="false")try{let he=Buffer.from(ne,"base64").toString("utf-8"),Oe=JSON.parse(he);await this.handleReport(Oe)}catch(he){this.channel.debug("Error JSON parsing report payload, continue without report. Error: "+this.stringify(he)),this.reportComplete=!0}else this.reportComplete=!0;this.monitorUploadsCompletion();break;case"shutdown":this.shutdown();break}})}async readMetadataFile(C){try{let F=await(0,DWe.readFile)(C,"utf-8");return JSON.parse(F)}catch(F){return this.channel.trace("Runtime Error",`Error reading checksum metadata file ${C}: ${F.message}`),{}}}async serveReport(C){try{let F=(0,B1.dirname)(C);await this.channel.log("Serving report in browser: "+F);let J=LZ.isRepoMode?`yarn playwright show-report ${F}`:`npx playwright show-report ${F}`,ne=(0,wWe.execSync)(J,{encoding:"utf8",stdio:"pipe"});await this.channel.log("Success: Report opened in browser")}catch(F){await this.channel.log(`Error serving report in browser: ${F.message}`),F.stderr&&await this.channel.log(F.stderr.toString())}}async handleReport(C){let{reportPath:F,pathToChecksumMetadata:J,didFail:ne,openReportCriteria:he,checksumRoot:Oe,projectRoot:nt,isUploadReport:At}=C;this.channel.debug(`Handling report ${this.isolationMode?"(isolation mode)":""}`+F),this.uploadReportData((0,B1.dirname)(F),At);try{let Mt=await this.readMetadataFile(J),Dt=new HZ(F,this.config.sessionId,this.pwTestIdToChecksumTestId,Mt,{hosted:!this.isolationMode},this.channel,Oe,nt,this.checksumTestIdToUsingPlaceholder);try{this.reportAsset=this.initAsset({type:"report",path:void 0}),await Dt.process(),this.reportAsset.info.path=Dt.getProcessedFilePath(),this.uploadAsset(this.reportAsset)}catch(Ee){this.channel.debug("Error processing report, "+Ee.message),this.reportAsset.error=!0}this.stats=Dt.getReportsStats(),this.channel.debug("Checking watch assets");let Xr=this.watchAssets.filter(Ee=>!(Ee.type!=="trace"||Dt.testHasTrace(Ee.testId,Ee.project)));Xr.length>0&&(this.channel.debug("Removed watch assets - "),this.channel.debug(JSON.stringify(Xr.map(Ee=>Ee.path)))),this.watchAssets=this.watchAssets.filter(Ee=>Ee.type!=="trace"||Dt.testHasTrace(Ee.testId,Ee.project))}catch(Mt){this.channel.debug("Error processing report, "+this.stringify(Mt)),this.reportAsset.error=!0}finally{if((he==="always"||he==="on-failure"&&ne)&&await this.serveReport(F),J&&(0,_d.existsSync)(J))try{(0,_d.unlinkSync)(J)}catch(Dt){console.error(`Error deleting checksum metadata file ${J}: ${Dt.message}`)}}}async uploadReportData(C,F){let J=(0,B1.join)(C,"data");try{let ne=(0,_d.readdirSync)(J),he=F?[".webm"]:[".zip",".webm"],Oe=ne.filter(nt=>!he.includes((0,B1.extname)(nt)));this.channel.debug("Preparing to upload report data files,"+Oe);for(let nt of Oe)this.channel.debug("Uploading report data file,"+nt),this.addAsset({type:"report-data-file",fileName:nt,path:`${J}/${nt}`})}catch(ne){this.channel.debug(`Error reading/adding report data files from dir ${J}`+ne.message)}}shutdown(){this.channel.debug("Received shutdown message from CLI"),this.server.close(),process.exit(0)}async monitorUploadsCompletion(){var C;if(!this.reportComplete&&this.reportAsset&&(this.reportAsset.complete||this.reportAsset.error)){this.reportComplete=!0;let F="";try{let J=JSON.stringify(this.stats),ne=`checksum-stats-${(0,H5.randomBytes)(8).toString("hex")}.json`;F=(0,B1.join)((0,IWe.tmpdir)(),ne),(0,_d.writeFileSync)(F,J,"utf-8"),this.channel.debug(`Stats written to temporary file: ${F}`)}catch(J){this.channel.debug("Error writing stats to file"),this.channel.log(`[monitorUploadsCompletion] Error writing stats to file: ${J.message}`)}this.channel.event("report-complete",`${(C=this.reportAsset)!=null&&C.complete?"true":"false"}:${F}`)}if(!this.processingInProgress&&this.reportComplete&&(this.assets.filter(F=>F.complete||F.error).length===this.assets.length||this.isUploadStalled())&&(this.watchAssets.length===0||this.testRunEndTime&&Date.now()-this.testRunEndTime>this.WATCH_TIMEOUT)){let F=this.assets.find(ne=>ne.error)?"uploads-complete-with-errors":"uploads-complete",J=F==="uploads-complete"?{}:{uploadErrors:this.assets.filter(ne=>ne.error).map(ne=>{try{return JSON.stringify(ne)}catch{return ne.info.path}}),watchAssets:this.watchAssets,testRunEndTime:this.testRunEndTime,now:Date.now()};this.cleanUp(),this.channel.event(F,JSON.stringify(J));return}await Ave(1e3),this.monitorUploadsCompletion()}cleanUp(){let C;for(let F of this.assets)if(F.info.type==="rrweb-recording"){C=(0,B1.dirname)(F.info.path);break}C&&(0,_d.rmdirSync)(C,{recursive:!0})}isUploadStalled(){let C=this.assets.reduce((F,J)=>Math.max(F,J.lastProgress??0),0)-Date.now()>this.UPLOAD_STALL_TIMEOUT;return C&&this.channel.log("Uploads are stalled"),C}async startServer(){let C=await this.acquirePortNumber();this.channel.event("port",C.toString()),this.server=(0,AWe.createServer)((F,J)=>{let ne=t(Oe=>{J.writeHead(400,{"Content-Type":"text/plain"}),J.end(Oe)},"returnErrorWithMessage");if(F.method!=="POST"){J.writeHead(404,{"Content-Type":"text/plain"}),J.end("Method not allowed");return}let he="";F.on("data",Oe=>{he+=Oe.toString()}),F.on("end",()=>{let Oe;try{Oe=JSON.parse(he)}catch{return ne("Invalid body")}let{type:nt,payload:At,watch:Mt}=Oe;switch(this.channel.debug(`Server received message, ${nt}, ${this.stringify(At)}`),nt){case"asset":if(!At.path||!At.type)return ne("Missing arguments");Mt?this.watchAsset(At):this.processAsset(At);break;case"testInfo":if(!At.pwTestId||!At.checksumTestId)return ne("Missing arguments");this.pwTestIdToChecksumTestId[At.pwTestId]=At.checksumTestId,At.usingChecksumTestIdPlaceholder!==void 0&&(this.checksumTestIdToUsingPlaceholder[At.checksumTestId]=At.usingChecksumTestIdPlaceholder);break;case"checksumTestMetadata":let Dt=At;if(!Dt.checksumTestId||!At.data)return ne("Missing arguments");this.channel.event("checksumTestMetadata",JSON.stringify({...Dt}));break;case"testStats":break;case"playwrightConfig":this.channel.event("playwrightConfig",JSON.stringify(At));break;default:return ne("Invalid message type")}J.writeHead(200,{"Content-Type":"text/plain"}),J.end("OK")})}),this.server.listen(C)}stringify(C){try{return JSON.stringify(C)}catch{return"message"in C?C.message:C}}monitorUploads(){let{totalSizeBytes:C,totalUploadedBytes:F}=this.calculateUploadProgress();if(C>0&&!this.isolationMode){let he=(F/C*100).toFixed(2);this.channel.event("upload-progress",he)}let J=this.assets.filter(he=>!he.uploadStarted);if(J.length===0)return;let ne=t(()=>this.assets.filter(he=>he.uploadStarted&&!he.complete&&!he.error).length,"getNumOfActiveUploads");if(!(ne()>=this.MAX_UPLOADS))for(;J.length>0&&ne()<this.MAX_UPLOADS;){let he=J.pop();this.uploadAsset(he)}}calculateUploadProgress(){let C=this.assets.reduce((J,{sizeBytes:ne})=>J+(ne??0),0),F=Math.min(C,this.assets.reduce((J,{loadedBytes:ne})=>J+(ne??0),0));return{totalSizeBytes:C,totalUploadedBytes:F}}getUploadLogMessage(C){switch(C.info.type){case"report":return"Uploading report";case"har":return`Uploading har file for test ${C.info.testId}`;case"trace":return`Uploading trace file for test ${C.info.testId}`;case"esra":return`Uploading metadata file for test ${C.info.testId}`;case"test-files":return`Uploading auto-healed test code for file ${C.info.path}`}}async uploadAsset(C){try{C.uploadStarted=!0;let F=this.getUploadLogMessage(C);F&&!this.isolationMode&&this.channel.event("log",F),await this.testAssetUploader.uploadAsset(C)}catch(F){C.error=!0,this.channel.debug("Error uploading asset"+this.stringify(F)),this.channel.trace("Upload Failed",{asset:C.info.fileName,error:String(F)})}}async getSignedURLForUpload(C){try{let{apiKey:F,sessionId:J,apiURL:ne}=this.config,he=C.info,Oe=await fetch(`${ne}/client-api/test-runs/${J}/get-upload-url`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",ChecksumAppCode:F},body:JSON.stringify(he)}),{url:nt}=await Oe.json();C.uploadURL=nt}catch(F){return this.channel.debug("Error getting signed URL for artifact"+this.stringify(F)),null}}watchAsset(C){if(this.watchAssets.some(J=>J.path===C.path)){this.channel.debug(`Already watching file ${C.path}, skipping duplicate`);return}this.channel.debug("Watching file "+C.path),this.watchAssets.push({...C,addedAt:Date.now()});let F=t(async()=>{await this.waitForFileComplete(C.path)&&(this.processAsset(C),this.watchAssets=this.watchAssets.filter(ne=>ne.path!==C.path))},"waitForCompletion");if((0,_d.existsSync)(C.path))F();else{let J=(0,B1.dirname)(C.path),ne=(0,B1.basename)(C.path),he=!1,Oe=(0,_d.watch)(J,async(nt,At)=>{if(!(At!==ne||he))try{this.channel.debug("Watched file changed "+C.path),he=!0,await F()}finally{Oe.close()}})}}waitForFileComplete(C,F=1e3,J=6e4,ne=1){return new Promise(he=>{let Oe=Date.now(),nt=0,At=t(()=>{if(!(0,_d.existsSync)(C))return this.channel.debug(`Asset required for upload doesn't exist anymore ${C}`),he(!1);let Mt=(0,_d.statSync)(C).size;if(Mt===nt){if(ne>0){this.channel.debug(`File size has not changed, verifying stabilization, ${C}, size: ${Mt}, equalSizeValidationCountLeft: ${ne}`),ne--,setTimeout(At,F);return}return this.channel.debug(`File size has not changed, stabilization verified, ${C}, size: ${Mt}`),he(!0)}if(this.channel.debug(`File size changed, waiting for stabilization, ${C}, previous size: ${nt}, current size: ${Mt}`),Date.now()-Oe>J)return this.channel.debug(`Asset required for upload is taking over ${J} ms to write to disk ${C}`),he(!0);nt=Mt,setTimeout(At,F)},"checkFile");At()})}processAsset(C){switch(C.type){case"trace":return this.processTrace(C.path,C.testId);case"har":return this.processHar(C.path,C.testId);case"rrweb-recording":case"esra":case"test-files":return this.addAsset(C)}}async processHar(C,F){}calculateSha1(C){let F=(0,H5.createHash)("sha1");return F.update(C),F.digest("hex")}async calculateFileSha1Streaming(C){let F=(0,H5.createHash)("sha1"),J=(0,_d.createReadStream)(C);return await(0,PWe.pipeline)(J,F),F.digest("hex")}async processTrace(C,F){if(this.processingPaths.has(C)){this.channel.debug(`Trace file ${C} already being processed, skipping`);return}this.processingPaths.add(C);try{this.processingInProgress=!0,await Ave(1e3);let J=C;if(!this.isolationMode){this.channel.debug(`Preparing trace for upload (testId: ${F})...`),J=C.replace(".zip",".actual.zip"),(0,_d.renameSync)(C,J);let Oe="checksum-playwright-trace:"+Date.now().toString()+(0,H5.randomBytes)(1024).toString("hex");(0,_d.writeFileSync)(C,Oe)}let he=await t(async()=>await this.calculateFileSha1Streaming(C)+(0,B1.extname)(C),"makePlaywrightHTMLReporterName")();this.channel.debug(`Trace file for test ${F} has been manipulated with file name ${he}, sending for upload...`),this.addAsset({type:"report-data-file",path:J,testId:F,fileName:he})}catch(J){let ne=String(J);this.channel.debug("Error processing trace file"+ne),this.channel.trace("Trace Processing Error",{error:ne})}finally{this.processingPaths.delete(C),this.processingInProgress=!1}}addAsset(C){this.channel.debug("Adding file "+C.path);let F=this.initAsset(C);return this.assets.push(F),F}initAsset(C){return{complete:!1,error:!1,response:void 0,info:C,removeAfterUpload:C.type==="rrweb-recording"}}async acquirePortNumber(){return await new Promise((C,F)=>{let J=NWe.createServer();J.unref(),J.on("error",F),J.listen(0,()=>{let ne=J.address().port;J.close(()=>{C(ne)})})})}};t(rxe,"TestRunMonitor");var Cee=rxe,OWe;try{OWe=JSON.parse(process.argv[2])}catch(E){console.log("Error starting test run monitor",E),process.exit(1)}var EWe;new Cee(OWe,((EWe=process.argv)==null?void 0:EWe[3])==="isolated");0&&(module.exports={TestRunMonitor});
|
|
450
|
+
`)}{/trm}`)}event(C,F){return new Promise(J=>{let ne=F?`${C}=${F}`:C;setTimeout(()=>{this.sendToCLI(`monitor:${ne}`),J(!0)},100)})}trace(C,F){let J=F?`${C}=${JSON.stringify(F)}`:C;setTimeout(()=>{this.sendToCLI(`trace:${J}`)},100)}log(C){return this.event("log",C)}debug(...C){this.sendToCLI(C)}};t(txe,"CLIChannel");var exe=txe,rxe=class rxe{constructor(C,F=!1){this.config=C;this.isolationMode=F;this.MAX_UPLOADS=15;this.MONITOR_INTERVAL=2500;this.UPLOAD_TIMEOUT=10*60*1e3;this.UPLOAD_STALL_TIMEOUT=3*60*60*1e3;this.WATCH_TIMEOUT=2*60*1e3;this.assets=[];this.watchAssets=[];this.processingPaths=new Set;this.reportComplete=!1;this.processingInProgress=!1;this.pwTestIdToChecksumTestId={};this.checksumTestIdToUsingPlaceholder={};this.progressFlushInFlight=!1;this.channel=new exe,this.testAssetUploader=new Tee(C.apiURL,C.apiKey,this.UPLOAD_TIMEOUT,()=>`client-api/test-runs/${this.config.sessionId}/get-upload-url`,this.isolationMode,{start:t(J=>this.channel.trace("Upload Start",{filename:J}),"start"),complete:t(J=>{if(!this.reportAsset||J!==this.reportAsset.info.path)try{(0,_d.unlinkSync)(J),this.channel.debug(`[TestAssetUploader] Deleted file after successful upload: ${J}`)}catch(ne){this.channel.debug(`[TestAssetUploader] Failed to delete file after upload: ${J}`,ne)}this.channel.trace("Upload Complete",{filename:J})},"complete"),error:t((J,ne)=>this.channel.trace("Upload Failed",{filename:J,error:ne}),"error")}),setInterval(this.monitorUploads.bind(this),this.MONITOR_INTERVAL),this.listenForMessages(),this.startServer()}listenForMessages(){process.stdin.on("data",async C=>{let F=C.toString().trim();if(!F.startsWith("cli:"))return;let[J,ne]=F.substring(4).split("=");switch(this.channel.debug("Received message from CLI "+J+" "+ne),J){case"report":if(this.testRunEndTime=Date.now(),ne!=="false")try{let he=Buffer.from(ne,"base64").toString("utf-8"),Oe=JSON.parse(he);await this.handleReport(Oe)}catch(he){this.channel.debug("Error JSON parsing report payload, continue without report. Error: "+this.stringify(he)),this.reportComplete=!0}else this.reportComplete=!0;this.monitorUploadsCompletion();break;case"shutdown":this.shutdown();break}})}async readMetadataFile(C){try{let F=await(0,DWe.readFile)(C,"utf-8");return JSON.parse(F)}catch(F){return this.channel.trace("Runtime Error",`Error reading checksum metadata file ${C}: ${F.message}`),{}}}async serveReport(C){try{let F=(0,B1.dirname)(C);await this.channel.log("Serving report in browser: "+F);let J=LZ.isRepoMode?`yarn playwright show-report ${F}`:`npx playwright show-report ${F}`,ne=(0,wWe.execSync)(J,{encoding:"utf8",stdio:"pipe"});await this.channel.log("Success: Report opened in browser")}catch(F){await this.channel.log(`Error serving report in browser: ${F.message}`),F.stderr&&await this.channel.log(F.stderr.toString())}}async handleReport(C){let{reportPath:F,pathToChecksumMetadata:J,didFail:ne,openReportCriteria:he,checksumRoot:Oe,projectRoot:nt,isUploadReport:At}=C;this.channel.debug(`Handling report ${this.isolationMode?"(isolation mode)":""}`+F),this.uploadReportData((0,B1.dirname)(F),At);try{let Mt=await this.readMetadataFile(J),Dt=new HZ(F,this.config.sessionId,this.pwTestIdToChecksumTestId,Mt,{hosted:!this.isolationMode},this.channel,Oe,nt,this.checksumTestIdToUsingPlaceholder);try{this.reportAsset=this.initAsset({type:"report",path:void 0}),await Dt.process(),this.reportAsset.info.path=Dt.getProcessedFilePath(),this.uploadAsset(this.reportAsset)}catch(Ee){this.channel.debug("Error processing report, "+Ee.message),this.reportAsset.error=!0}this.stats=Dt.getReportsStats(),this.channel.debug("Checking watch assets");let Xr=this.watchAssets.filter(Ee=>!(Ee.type!=="trace"||Dt.testHasTrace(Ee.testId,Ee.project)));Xr.length>0&&(this.channel.debug("Removed watch assets - "),this.channel.debug(JSON.stringify(Xr.map(Ee=>Ee.path)))),this.watchAssets=this.watchAssets.filter(Ee=>Ee.type!=="trace"||Dt.testHasTrace(Ee.testId,Ee.project))}catch(Mt){this.channel.debug("Error processing report, "+this.stringify(Mt)),this.reportAsset.error=!0}finally{if((he==="always"||he==="on-failure"&&ne)&&await this.serveReport(F),J&&(0,_d.existsSync)(J))try{(0,_d.unlinkSync)(J)}catch(Dt){console.error(`Error deleting checksum metadata file ${J}: ${Dt.message}`)}}}async uploadReportData(C,F){let J=(0,B1.join)(C,"data");try{let ne=(0,_d.readdirSync)(J),he=F?[".webm"]:[".zip",".webm"],Oe=ne.filter(nt=>!he.includes((0,B1.extname)(nt)));this.channel.debug("Preparing to upload report data files,"+Oe);for(let nt of Oe)this.channel.debug("Uploading report data file,"+nt),this.addAsset({type:"report-data-file",fileName:nt,path:`${J}/${nt}`})}catch(ne){this.channel.debug(`Error reading/adding report data files from dir ${J}`+ne.message)}}shutdown(){this.channel.debug("Received shutdown message from CLI"),this.server.close(),process.exit(0)}async monitorUploadsCompletion(){var C;if(!this.reportComplete&&this.reportAsset&&(this.reportAsset.complete||this.reportAsset.error)){this.reportComplete=!0;let F="";try{let J=JSON.stringify(this.stats),ne=`checksum-stats-${(0,H5.randomBytes)(8).toString("hex")}.json`;F=(0,B1.join)((0,IWe.tmpdir)(),ne),(0,_d.writeFileSync)(F,J,"utf-8"),this.channel.debug(`Stats written to temporary file: ${F}`)}catch(J){this.channel.debug("Error writing stats to file"),this.channel.log(`[monitorUploadsCompletion] Error writing stats to file: ${J.message}`)}this.channel.event("report-complete",`${(C=this.reportAsset)!=null&&C.complete?"true":"false"}:${F}`)}if(!this.processingInProgress&&this.reportComplete&&(this.assets.filter(F=>F.complete||F.error).length===this.assets.length||this.isUploadStalled())&&(this.watchAssets.length===0||this.testRunEndTime&&Date.now()-this.testRunEndTime>this.WATCH_TIMEOUT)){let F=this.assets.find(ne=>ne.error)?"uploads-complete-with-errors":"uploads-complete",J=F==="uploads-complete"?{}:{uploadErrors:this.assets.filter(ne=>ne.error).map(ne=>{try{return JSON.stringify(ne)}catch{return ne.info.path}}),watchAssets:this.watchAssets,testRunEndTime:this.testRunEndTime,now:Date.now()};this.cleanUp(),this.channel.event(F,JSON.stringify(J));return}await Ave(1e3),this.monitorUploadsCompletion()}cleanUp(){let C;for(let F of this.assets)if(F.info.type==="rrweb-recording"){C=(0,B1.dirname)(F.info.path);break}C&&(0,_d.rmdirSync)(C,{recursive:!0})}isUploadStalled(){let C=this.assets.reduce((F,J)=>Math.max(F,J.lastProgress??0),0)-Date.now()>this.UPLOAD_STALL_TIMEOUT;return C&&this.channel.log("Uploads are stalled"),C}async startServer(){let C=await this.acquirePortNumber();this.channel.event("port",C.toString()),this.server=(0,AWe.createServer)((F,J)=>{let ne=t(Oe=>{J.writeHead(400,{"Content-Type":"text/plain"}),J.end(Oe)},"returnErrorWithMessage");if(F.method!=="POST"){J.writeHead(404,{"Content-Type":"text/plain"}),J.end("Method not allowed");return}let he="";F.on("data",Oe=>{he+=Oe.toString()}),F.on("end",()=>{let Oe;try{Oe=JSON.parse(he)}catch{return ne("Invalid body")}let{type:nt,payload:At,watch:Mt}=Oe;switch(this.channel.debug(`Server received message, ${nt}, ${this.stringify(At)}`),nt){case"asset":if(!At.path||!At.type)return ne("Missing arguments");Mt?this.watchAsset(At):this.processAsset(At);break;case"testInfo":if(!At.pwTestId||!At.checksumTestId)return ne("Missing arguments");this.pwTestIdToChecksumTestId[At.pwTestId]=At.checksumTestId,At.usingChecksumTestIdPlaceholder!==void 0&&(this.checksumTestIdToUsingPlaceholder[At.checksumTestId]=At.usingChecksumTestIdPlaceholder);break;case"checksumTestMetadata":let Dt=At;if(!Dt.checksumTestId||!At.data)return ne("Missing arguments");this.channel.event("checksumTestMetadata",JSON.stringify({...Dt}));break;case"testStats":break;case"playwrightConfig":this.channel.event("playwrightConfig",JSON.stringify(At));break;case"runProgress":this.forwardProgress(At);break;default:return ne("Invalid message type")}J.writeHead(200,{"Content-Type":"text/plain"}),J.end("OK")})}),this.server.listen(C)}forwardProgress(C){this.latestProgress=C,!this.progressFlushInFlight&&this.flushProgress()}async flushProgress(){this.progressFlushInFlight=!0;try{for(;this.latestProgress;){let C=this.latestProgress;this.latestProgress=void 0,await this.patchProgress(C)}}finally{this.progressFlushInFlight=!1}}async patchProgress(C){if(this.isolationMode)return;let F=new AbortController,J=setTimeout(()=>F.abort(),3e4);try{await fetch(`${this.config.apiURL}/client-api/test-runs/${this.config.sessionId}/progress`,{method:"PATCH",headers:{Accept:"application/json","Content-Type":"application/json",ChecksumAppCode:this.config.apiKey},body:JSON.stringify({progress:C}),signal:F.signal})}catch(ne){this.channel.debug("Failed to send run progress: "+(ne==null?void 0:ne.message))}finally{clearTimeout(J)}}stringify(C){try{return JSON.stringify(C)}catch{return"message"in C?C.message:C}}monitorUploads(){let{totalSizeBytes:C,totalUploadedBytes:F}=this.calculateUploadProgress();if(C>0&&!this.isolationMode){let he=(F/C*100).toFixed(2);this.channel.event("upload-progress",he)}let J=this.assets.filter(he=>!he.uploadStarted);if(J.length===0)return;let ne=t(()=>this.assets.filter(he=>he.uploadStarted&&!he.complete&&!he.error).length,"getNumOfActiveUploads");if(!(ne()>=this.MAX_UPLOADS))for(;J.length>0&&ne()<this.MAX_UPLOADS;){let he=J.pop();this.uploadAsset(he)}}calculateUploadProgress(){let C=this.assets.reduce((J,{sizeBytes:ne})=>J+(ne??0),0),F=Math.min(C,this.assets.reduce((J,{loadedBytes:ne})=>J+(ne??0),0));return{totalSizeBytes:C,totalUploadedBytes:F}}getUploadLogMessage(C){switch(C.info.type){case"report":return"Uploading report";case"har":return`Uploading har file for test ${C.info.testId}`;case"trace":return`Uploading trace file for test ${C.info.testId}`;case"esra":return`Uploading metadata file for test ${C.info.testId}`;case"test-files":return`Uploading auto-healed test code for file ${C.info.path}`}}async uploadAsset(C){try{C.uploadStarted=!0;let F=this.getUploadLogMessage(C);F&&!this.isolationMode&&this.channel.event("log",F),await this.testAssetUploader.uploadAsset(C)}catch(F){C.error=!0,this.channel.debug("Error uploading asset"+this.stringify(F)),this.channel.trace("Upload Failed",{asset:C.info.fileName,error:String(F)})}}async getSignedURLForUpload(C){try{let{apiKey:F,sessionId:J,apiURL:ne}=this.config,he=C.info,Oe=await fetch(`${ne}/client-api/test-runs/${J}/get-upload-url`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",ChecksumAppCode:F},body:JSON.stringify(he)}),{url:nt}=await Oe.json();C.uploadURL=nt}catch(F){return this.channel.debug("Error getting signed URL for artifact"+this.stringify(F)),null}}watchAsset(C){if(this.watchAssets.some(J=>J.path===C.path)){this.channel.debug(`Already watching file ${C.path}, skipping duplicate`);return}this.channel.debug("Watching file "+C.path),this.watchAssets.push({...C,addedAt:Date.now()});let F=t(async()=>{await this.waitForFileComplete(C.path)&&(this.processAsset(C),this.watchAssets=this.watchAssets.filter(ne=>ne.path!==C.path))},"waitForCompletion");if((0,_d.existsSync)(C.path))F();else{let J=(0,B1.dirname)(C.path),ne=(0,B1.basename)(C.path),he=!1,Oe=(0,_d.watch)(J,async(nt,At)=>{if(!(At!==ne||he))try{this.channel.debug("Watched file changed "+C.path),he=!0,await F()}finally{Oe.close()}})}}waitForFileComplete(C,F=1e3,J=6e4,ne=1){return new Promise(he=>{let Oe=Date.now(),nt=0,At=t(()=>{if(!(0,_d.existsSync)(C))return this.channel.debug(`Asset required for upload doesn't exist anymore ${C}`),he(!1);let Mt=(0,_d.statSync)(C).size;if(Mt===nt){if(ne>0){this.channel.debug(`File size has not changed, verifying stabilization, ${C}, size: ${Mt}, equalSizeValidationCountLeft: ${ne}`),ne--,setTimeout(At,F);return}return this.channel.debug(`File size has not changed, stabilization verified, ${C}, size: ${Mt}`),he(!0)}if(this.channel.debug(`File size changed, waiting for stabilization, ${C}, previous size: ${nt}, current size: ${Mt}`),Date.now()-Oe>J)return this.channel.debug(`Asset required for upload is taking over ${J} ms to write to disk ${C}`),he(!0);nt=Mt,setTimeout(At,F)},"checkFile");At()})}processAsset(C){switch(C.type){case"trace":return this.processTrace(C.path,C.testId);case"har":return this.processHar(C.path,C.testId);case"rrweb-recording":case"esra":case"test-files":return this.addAsset(C)}}async processHar(C,F){}calculateSha1(C){let F=(0,H5.createHash)("sha1");return F.update(C),F.digest("hex")}async calculateFileSha1Streaming(C){let F=(0,H5.createHash)("sha1"),J=(0,_d.createReadStream)(C);return await(0,PWe.pipeline)(J,F),F.digest("hex")}async processTrace(C,F){if(this.processingPaths.has(C)){this.channel.debug(`Trace file ${C} already being processed, skipping`);return}this.processingPaths.add(C);try{this.processingInProgress=!0,await Ave(1e3);let J=C;if(!this.isolationMode){this.channel.debug(`Preparing trace for upload (testId: ${F})...`),J=C.replace(".zip",".actual.zip"),(0,_d.renameSync)(C,J);let Oe="checksum-playwright-trace:"+Date.now().toString()+(0,H5.randomBytes)(1024).toString("hex");(0,_d.writeFileSync)(C,Oe)}let he=await t(async()=>await this.calculateFileSha1Streaming(C)+(0,B1.extname)(C),"makePlaywrightHTMLReporterName")();this.channel.debug(`Trace file for test ${F} has been manipulated with file name ${he}, sending for upload...`),this.addAsset({type:"report-data-file",path:J,testId:F,fileName:he})}catch(J){let ne=String(J);this.channel.debug("Error processing trace file"+ne),this.channel.trace("Trace Processing Error",{error:ne})}finally{this.processingPaths.delete(C),this.processingInProgress=!1}}addAsset(C){this.channel.debug("Adding file "+C.path);let F=this.initAsset(C);return this.assets.push(F),F}initAsset(C){return{complete:!1,error:!1,response:void 0,info:C,removeAfterUpload:C.type==="rrweb-recording"}}async acquirePortNumber(){return await new Promise((C,F)=>{let J=NWe.createServer();J.unref(),J.on("error",F),J.listen(0,()=>{let ne=J.address().port;J.close(()=>{C(ne)})})})}};t(rxe,"TestRunMonitor");var Cee=rxe,OWe;try{OWe=JSON.parse(process.argv[2])}catch(E){console.log("Error starting test run monitor",E),process.exit(1)}var EWe;new Cee(OWe,((EWe=process.argv)==null?void 0:EWe[3])==="isolated");0&&(module.exports={TestRunMonitor});
|
|
451
451
|
/*! Bundled license information:
|
|
452
452
|
|
|
453
453
|
typescript/lib/typescript.js:
|
package/.gitignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.DS_Store
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { init } from "@checksum-ai/runtime";
|
|
2
|
-
const { test, defineChecksumTest, login, expect, checksumAI } = init();
|
|
3
|
-
|
|
4
|
-
test.describe("Example test", () => {
|
|
5
|
-
test.beforeEach(async ({ page }) => {
|
|
6
|
-
await login(page);
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
test(
|
|
10
|
-
defineChecksumTest("Navigate to home page", "TSTID"),
|
|
11
|
-
async ({ page }) => {
|
|
12
|
-
await page.goto("/");
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
#################################
|
|
2
|
-
# This file has two example Github Action workflows to run Checksum tests
|
|
3
|
-
# 1. Runs Checksum tests on every push or PR to main/master
|
|
4
|
-
# 2. Runs the test using Docker container
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name: Checksum Tests
|
|
9
|
-
on:
|
|
10
|
-
push:
|
|
11
|
-
branches: [ main, master ]
|
|
12
|
-
pull_request:
|
|
13
|
-
branches: [ main, master ]
|
|
14
|
-
jobs:
|
|
15
|
-
test:
|
|
16
|
-
timeout-minutes: 120
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v3
|
|
20
|
-
- uses: actions/setup-node@v3
|
|
21
|
-
with:
|
|
22
|
-
node-version: 18
|
|
23
|
-
# Installing deps, which should Include Checksum runtime
|
|
24
|
-
- name: Install dependencies
|
|
25
|
-
run: npm ci
|
|
26
|
-
- name: Install Playwright Browsers
|
|
27
|
-
run: npx playwright install --with-deps
|
|
28
|
-
# Run tests
|
|
29
|
-
- name: Run Checksum tests
|
|
30
|
-
run: npm run checksum test
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
name: Checksum Tests with Docker
|
|
34
|
-
on:
|
|
35
|
-
push:
|
|
36
|
-
branches: [ main, master ]
|
|
37
|
-
pull_request:
|
|
38
|
-
branches: [ main, master ]
|
|
39
|
-
jobs:
|
|
40
|
-
playwright:
|
|
41
|
-
name: 'Checksum Tests with Docker'
|
|
42
|
-
runs-on: ubuntu-latest
|
|
43
|
-
container:
|
|
44
|
-
image: mcr.microsoft.com/playwright:v1.40.0-jammy
|
|
45
|
-
steps:
|
|
46
|
-
- uses: actions/checkout@v3
|
|
47
|
-
- uses: actions/setup-node@v3
|
|
48
|
-
with:
|
|
49
|
-
node-version: 18
|
|
50
|
-
- name: Install dependencies
|
|
51
|
-
run: npm ci
|
|
52
|
-
- name: Run Checksum tests
|
|
53
|
-
run: npm run checksum test
|
|
54
|
-
env:
|
|
55
|
-
HOME: /root
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": {
|
|
3
|
-
"main.css": "/static/css/main.feaf2948.css",
|
|
4
|
-
"main.js": "/static/js/main.e6ee53ca.js",
|
|
5
|
-
"index.html": "/index.html",
|
|
6
|
-
"main.feaf2948.css.map": "/static/css/main.feaf2948.css.map",
|
|
7
|
-
"main.e6ee53ca.js.map": "/static/js/main.e6ee53ca.js.map"
|
|
8
|
-
},
|
|
9
|
-
"entrypoints": [
|
|
10
|
-
"static/css/main.feaf2948.css",
|
|
11
|
-
"static/js/main.e6ee53ca.js"
|
|
12
|
-
]
|
|
13
|
-
}
|
package/vtg-build/index.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Checksum.ai VTG</title><script defer="defer" src="/static/js/main.e6ee53ca.js"></script><link href="/static/css/main.feaf2948.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
package/vtg-build/manifest.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
package/vtg-build/robots.txt
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#bec4c4}::-webkit-scrollbar-thumb:hover{background:#555}.Toastify__toast-container{minwidth:400px;maxWidth:600px;width:400px}:root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error)}.Toastify__toast-container{box-sizing:border-box;color:#fff;padding:4px;position:fixed;-webkit-transform:translateZ(9999);-webkit-transform:translateZ(var(--toastify-z-index));width:320px;width:var(--toastify-toast-width);z-index:9999;z-index:var(--toastify-z-index)}.Toastify__toast-container--top-left{left:1em;top:1em}.Toastify__toast-container--top-center{left:50%;top:1em;transform:translateX(-50%)}.Toastify__toast-container--top-right{right:1em;top:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width:480px){.Toastify__toast-container{left:0;margin:0;padding:0;width:100vw}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:0;transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:0;transform:translateX(0)}.Toastify__toast-container--rtl{left:auto;right:0}}.Toastify__toast{border-radius:4px;box-shadow:0 1px 10px 0 rgba(0,0,0,.1),0 2px 15px 0 rgba(0,0,0,.05);box-sizing:border-box;cursor:pointer;direction:ltr;display:flex;font-family:sans-serif;font-family:var(--toastify-font-family);justify-content:space-between;margin-bottom:1rem;max-height:800px;max-height:var(--toastify-toast-max-height);min-height:64px;min-height:var(--toastify-toast-min-height);overflow:hidden;padding:8px;position:relative}.Toastify__toast--rtl{direction:rtl}.Toastify__toast-body{align-items:center;display:flex;flex:1 1 auto;margin:auto 0;padding:6px}.Toastify__toast-body>div:last-child{flex:1 1}.Toastify__toast-icon{display:flex;flex-shrink:0;margin-inline-end:10px;width:20px}.Toastify--animate{animation-duration:.7s;animation-fill-mode:both}.Toastify--animate-icon{animation-duration:.3s;animation-fill-mode:both}@media only screen and (max-width:480px){.Toastify__toast{border-radius:0;margin-bottom:0}}.Toastify__toast-theme--dark{background:#121212;background:var(--toastify-color-dark);color:#fff;color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:#fff;background:var(--toastify-color-light);color:#757575;color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{background:#3498db;background:var(--toastify-color-info);color:#fff;color:var(--toastify-text-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{background:#07bc0c;background:var(--toastify-color-success);color:#fff;color:var(--toastify-text-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{background:#f1c40f;background:var(--toastify-color-warning);color:#fff;color:var(--toastify-text-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{background:#e74c3c;background:var(--toastify-color-error);color:#fff;color:var(--toastify-text-color-error)}.Toastify__progress-bar-theme--light{background:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:#bb86fc;background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:#3498db;background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:#07bc0c;background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:#f1c40f;background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:#e74c3c;background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:hsla(0,0%,100%,.7);background:var(--toastify-color-transparent)}.Toastify__close-button{align-self:flex-start;background:transparent;border:none;color:#fff;cursor:pointer;opacity:.7;outline:none;padding:0;transition:.3s ease}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{bottom:0;height:5px;left:0;opacity:.7;position:absolute;transform-origin:left;width:100%;z-index:9999;z-index:var(--toastify-z-index)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{left:auto;right:0;transform-origin:right}.Toastify__spinner{animation:Toastify__spin .65s linear infinite;border:2px solid #e0e0e0;border-color:var(--toastify-spinner-color-empty-area);border-radius:100%;border-right-color:#616161;border-right-color:var(--toastify-spinner-color);box-sizing:border-box;height:20px;width:20px}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{animation-timing-function:ease-in;opacity:0;transform:perspective(400px) rotateX(90deg)}40%{animation-timing-function:ease-in;transform:perspective(400px) rotateX(-20deg)}60%{opacity:1;transform:perspective(400px) rotateX(10deg)}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{opacity:1;transform:perspective(400px) rotateX(-20deg)}to{opacity:0;transform:perspective(400px) rotateX(90deg)}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{transform:translate3d(110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{transform:translate3d(-110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{transform:translate3d(0,500px,0);visibility:hidden}}@keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{transform:translate3d(0,-500px,0);visibility:hidden}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
|
2
|
-
/*# sourceMappingURL=main.feaf2948.css.map*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/css/main.feaf2948.css","mappings":"AACA,oBACI,SACJ,CAGA,0BACI,kBACJ,CAGA,0BACI,kBACJ,CAGA,gC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B,CAAC,GAAG,uBAAuB,CAAC,CAAC,mCAAmC,GAAG,uBAAuB,CAAC,GAAqB,+BAA8B,CAAhD,iBAAiD,CAAC,CAAC,kCAAkC,GAAG,uBAAuB,CAAC,GAAqB,gCAA+B,CAAjD,iBAAkD,CAAC,CAAC,kCAAkC,GAAG,uBAAuB,CAAC,GAAqB,gCAA+B,CAAjD,iBAAkD,CAAC,CAAC,gCAAgC,GAAG,uBAAuB,CAAC,GAAqB,iCAAgC,CAAlD,iBAAmD,CAAC,CAAC,qEAAqE,oCAAoC,CAAC,uEAAuE,qCAAqC,CAAC,mCAAmC,oCAAoC,CAAC,sCAAsC,kCAAkC,CAAC,mEAAmE,qCAAqC,CAAC,qEAAqE,sCAAsC,CAAC,kCAAkC,mCAAmC,CAAC,qCAAqC,qCAAqC,CAAC,0BAA0B,GAAG,sBAAsB,CAAC,GAAG,uBAAuB,CAAC","sources":["style/css/scrollbar.css","style/css/toast.css","../../../node_modules/react-toastify/dist/ReactToastify.min.css"],"sourcesContent":["/* width */\n::-webkit-scrollbar {\n width: 5px;\n}\n\n/* Track */\n::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n/* Handle */\n::-webkit-scrollbar-thumb {\n background: #bec4c4;\n}\n\n/* Handle on hover */\n::-webkit-scrollbar-thumb:hover {\n background: #555;\n}",".Toastify__toast-container {\n width: 400px;\n minwidth: 400px;\n maxWidth: 600px;\n}\n",":root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error)}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:1em;left:1em}.Toastify__toast-container--top-center{top:1em;left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:1em;right:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:0;margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:0;transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:0;transform:translateX(0)}.Toastify__toast-container--rtl{right:0;left:auto}}.Toastify__toast{position:relative;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:4px;box-shadow:0 1px 10px 0 rgba(0,0,0,.1),0 2px 15px 0 rgba(0,0,0,.05);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);overflow:hidden;font-family:var(--toastify-font-family);cursor:pointer;direction:ltr}.Toastify__toast--rtl{direction:rtl}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.7s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:5px;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateX(-20deg);opacity:1}to{transform:perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(110%,0,0)}}@keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(-110%,0,0)}}@keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"],"names":[],"sourceRoot":""}
|