@checksum-ai/runtime 4.1.1-beta.6 → 4.1.1-beta.7

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 CHANGED
@@ -1 +1 @@
1
- CHECKSUM_RUNTIME_BUILD_TIME=2026-05-27T23:50:17.621Z
1
+ CHECKSUM_RUNTIME_BUILD_TIME=2026-05-29T06:31:55.211Z
@@ -1 +1 @@
1
- "use strict";var s=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var l=(r,t)=>s(r,"name",{value:t,configurable:!0});var b=(r,t)=>{for(var e in t)s(r,e,{get:t[e],enumerable:!0})},A=(r,t,e,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!T.call(r,o)&&o!==e&&s(r,o,{get:()=>t[o],enumerable:!(a=y(t,o))||a.enumerable});return r};var x=r=>A(s({},"__esModule",{value:!0}),r);var M={};b(M,{default:()=>n});module.exports=x(M);var h=require("path");var m=2e3;function k(r){switch(r){case"passed":return"passed";case"timedOut":return"timedOut";case"skipped":return"skipped";case"interrupted":return"interrupted";case"failed":default:return"failed"}}l(k,"toProgressStatus");var p=class p{constructor(){this.monitorPort=process.env.CHECKSUM_UPLOAD_AGENT_PORT;this.startedAt=Date.now();this.rootDir=process.cwd();this.testsById=new Map;this.lastFlushAt=0;this.sendChain=Promise.resolve()}printsToStdio(){return!1}onBegin(t,e){this.guard(()=>{var a;t!=null&&t.rootDir&&(this.rootDir=t.rootDir);for(let o of((a=e==null?void 0:e.allTests)==null?void 0:a.call(e))??[])this.register(o);this.flush(!0)})}onTestBegin(t,e){this.guard(()=>{var o;let a=this.itemFor(t);a.status="running",a.startedAt=((o=e==null?void 0:e.startTime)==null?void 0:o.getTime())??Date.now(),a.endedAt=null,a.durationMs=null,a.retry=(e==null?void 0:e.retry)??0,this.flush()})}onTestEnd(t,e){this.guard(()=>{var o;let a=this.itemFor(t);a.status=k(e==null?void 0:e.status),a.endedAt=Date.now(),a.durationMs=(e==null?void 0:e.duration)??null,a.retry=(e==null?void 0:e.retry)??a.retry,a.startedAt==null&&(a.startedAt=((o=e==null?void 0:e.startTime)==null?void 0:o.getTime())??null),this.flush()})}async onEnd(){this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0),await this.send()}itemFor(t){return this.testsById.get(t.id)??this.register(t)}register(t){var i,c,d,g,u;let e="";try{e=((d=(c=(i=t.parent)==null?void 0:i.project)==null?void 0:c.call(i))==null?void 0:d.name)??""}catch{}let a=((g=t.location)==null?void 0:g.file)??"";try{a&&(a=(0,h.relative)(this.rootDir,a))}catch{}let o={id:t.id,title:t.title??"",titlePath:this.titlePathOf(t),file:a,line:((u=t.location)==null?void 0:u.line)??0,project:e,status:"pending",startedAt:null,endedAt:null,durationMs:null,retry:0};return this.testsById.set(o.id,o),o}titlePathOf(t){var e;try{return(((e=t.titlePath)==null?void 0:e.call(t))??[]).filter(a=>!!a)}catch{return t.title?[t.title]:[]}}snapshot(){return{schemaVersion:1,source:"playwright",startedAt:this.startedAt,updatedAt:Date.now(),tests:[...this.testsById.values()]}}flush(t=!1){if(!this.monitorPort)return;let e=Date.now()-this.lastFlushAt;if(t||e>=m){this.lastFlushAt=Date.now(),this.send();return}this.flushTimer||(this.flushTimer=setTimeout(()=>{this.flushTimer=void 0,this.lastFlushAt=Date.now(),this.send()},m-e))}send(){return this.monitorPort?(this.sendChain=this.sendChain.then(()=>this.postSnapshot()),this.sendChain):Promise.resolve()}async postSnapshot(){try{await fetch(`http://127.0.0.1:${this.monitorPort}/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"runProgress",payload:this.snapshot()})})}catch{}}guard(t){try{t()}catch{}}};l(p,"ChecksumProgressReporter");var n=p;
1
+ "use strict";var n=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var l=(r,t)=>n(r,"name",{value:t,configurable:!0});var b=(r,t)=>{for(var e in t)n(r,e,{get:t[e],enumerable:!0})},A=(r,t,e,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!T.call(r,o)&&o!==e&&n(r,o,{get:()=>t[o],enumerable:!(a=y(t,o))||a.enumerable});return r};var x=r=>A(n({},"__esModule",{value:!0}),r);var k={};b(k,{default:()=>s});module.exports=x(k);var h=require("path");var m=2e3;function P(r){switch(r){case"passed":return"passed";case"timedOut":return"timedOut";case"skipped":return"skipped";case"interrupted":return"interrupted";case"failed":default:return"failed"}}l(P,"toProgressStatus");var p=class p{constructor(){this.monitorPort=process.env.CHECKSUM_UPLOAD_AGENT_PORT;this.startedAt=Date.now();this.rootDir=process.cwd();this.testsById=new Map;this.lastFlushAt=0;this.sendChain=Promise.resolve()}printsToStdio(){return!1}onBegin(t,e){this.guard(()=>{var a;t!=null&&t.rootDir&&(this.rootDir=t.rootDir);for(let o of((a=e==null?void 0:e.allTests)==null?void 0:a.call(e))??[])this.register(o);this.flush(!0)})}onTestBegin(t,e){this.guard(()=>{var o;let a=this.itemFor(t);a.status="running",a.startedAt=((o=e==null?void 0:e.startTime)==null?void 0:o.getTime())??Date.now(),a.endedAt=null,a.durationMs=null,a.retry=(e==null?void 0:e.retry)??0,this.flush()})}onTestEnd(t,e){this.guard(()=>{var o;let a=this.itemFor(t);a.status=P(e==null?void 0:e.status),a.endedAt=Date.now(),a.durationMs=(e==null?void 0:e.duration)??null,a.retry=(e==null?void 0:e.retry)??a.retry,a.startedAt==null&&(a.startedAt=((o=e==null?void 0:e.startTime)==null?void 0:o.getTime())??null),this.flush()})}async onEnd(){this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0),await this.send()}itemFor(t){return this.testsById.get(t.id)??this.register(t)}register(t){var i,c,d,g,u;let e="";try{e=((d=(c=(i=t.parent)==null?void 0:i.project)==null?void 0:c.call(i))==null?void 0:d.name)??""}catch{}let a=((g=t.location)==null?void 0:g.file)??"";try{a&&(a=(0,h.relative)(this.rootDir,a))}catch{}let o={id:t.id,title:t.title??"",titlePath:this.titlePathOf(t),file:a,line:((u=t.location)==null?void 0:u.line)??0,project:e,status:"pending",startedAt:null,endedAt:null,durationMs:null,retry:0};return this.testsById.set(o.id,o),o}titlePathOf(t){var e;try{return(((e=t.titlePath)==null?void 0:e.call(t))??[]).filter(a=>!!a)}catch{return t.title?[t.title]:[]}}snapshot(){return{schemaVersion:1,source:"playwright",startedAt:this.startedAt,updatedAt:Date.now(),tests:[...this.testsById.values()]}}flush(t=!1){if(!this.monitorPort)return;let e=Date.now()-this.lastFlushAt;if(t||e>=m){this.lastFlushAt=Date.now(),this.send();return}this.flushTimer||(this.flushTimer=setTimeout(()=>{this.flushTimer=void 0,this.lastFlushAt=Date.now(),this.send()},m-e))}send(){return this.monitorPort?(this.sendChain=this.sendChain.then(()=>this.postSnapshot()),this.sendChain):Promise.resolve()}async postSnapshot(){try{await fetch(`http://127.0.0.1:${this.monitorPort}/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"runProgress",payload:this.snapshot()})})}catch{}}guard(t){try{t()}catch{}}};l(p,"ChecksumProgressReporter");var s=p;