opik 0.2.0 → 0.2.1

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.
@@ -4787,7 +4787,9 @@ declare class OpikClient {
4787
4787
  traceBatchQueue: TraceBatchQueue;
4788
4788
  spanFeedbackScoresBatchQueue: SpanFeedbackScoresBatchQueue;
4789
4789
  traceFeedbackScoresBatchQueue: TraceFeedbackScoresBatchQueue;
4790
+ private lastProjectNameLogged;
4790
4791
  constructor(explicitConfig?: Partial<OpikConfig>);
4792
+ private displayTraceLog;
4791
4793
  trace: (traceData: TraceData) => Trace;
4792
4794
  flush: () => Promise<void>;
4793
4795
  }
@@ -4787,7 +4787,9 @@ declare class OpikClient {
4787
4787
  traceBatchQueue: TraceBatchQueue;
4788
4788
  spanFeedbackScoresBatchQueue: SpanFeedbackScoresBatchQueue;
4789
4789
  traceFeedbackScoresBatchQueue: TraceFeedbackScoresBatchQueue;
4790
+ private lastProjectNameLogged;
4790
4791
  constructor(explicitConfig?: Partial<OpikConfig>);
4792
+ private displayTraceLog;
4791
4793
  trace: (traceData: TraceData) => Trace;
4792
4794
  flush: () => Promise<void>;
4793
4795
  }
@@ -0,0 +1 @@
1
+ import'./chunk-WOT6VMZA.js';var s=class t{constructor(e){this.readableStream=e,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(e,r){var a;(a=this.events[e])==null||a.push(r);}off(e,r){var a;this.events[e]=(a=this.events[e])==null?void 0:a.filter(i=>i!==r);}pipe(e){return this.on("data",async r=>{if(e instanceof t)e._write(r);else if(e instanceof WritableStream){let a=e.getWriter();a.write(r).then(()=>a.releaseLock());}else e.write(r);}),this.on("end",async()=>{e instanceof t?e._end():e instanceof WritableStream?e.getWriter().close():e.end();}),this.on("error",async r=>{e instanceof t?e._error(r):e instanceof WritableStream?e.getWriter().abort(r):e.destroy(r);}),this._startReading(),e}pipeTo(e){return this.pipe(e)}unpipe(e){this.off("data",async r=>{if(e instanceof t)e._write(r);else if(e instanceof WritableStream){let a=e.getWriter();a.write(r).then(()=>a.releaseLock());}else e.write(r);}),this.off("end",async()=>{e instanceof t?e._end():e instanceof WritableStream?e.getWriter().close():e.end();}),this.off("error",async r=>{e instanceof t?e._error(r):e instanceof WritableStream?e.getWriter().abort(r):e.destroy(r);});}destroy(e){this.reader.cancel(e).then(()=>{this._emit("close");}).catch(r=>{this._emit("error",r);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(a=>{this.resumeCallback=a;});let{done:e,value:r}=await this.reader.read();if(!e)return r}setEncoding(e){this.encoding=e;}async text(){let e=[];for(;;){let{done:a,value:i}=await this.reader.read();if(a)break;i&&e.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(e).arrayBuffer())}async json(){let e=await this.text();return JSON.parse(e)}_write(e){this._emit("data",e);}_end(){this._emit("end");}_error(e){this._emit("error",e);}_emit(e,r){if(this.events[e])for(let a of this.events[e]||[])a(r);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(a=>{this.resumeCallback=a;});let{done:e,value:r}=await this.reader.read();if(e){this._emit("end"),this._emit("close");break}r&&this._emit("data",r);}}catch(e){this._emit("error",e);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(a=>{this.resumeCallback=a;});let{done:e,value:r}=await this.reader.read();return e?{done:true,value:void 0}:{done:false,value:r}},[Symbol.asyncIterator](){return this}}}};export{s as Node18UniversalStreamWrapper};
@@ -0,0 +1 @@
1
+ import'./chunk-WOT6VMZA.js';var i=class{constructor(e){this.readableStream=e;}on(e,r){this.readableStream.on(e,r);}off(e,r){this.readableStream.off(e,r);}pipe(e){return this.readableStream.pipe(e),e}pipeTo(e){return this.pipe(e)}unpipe(e){e?this.readableStream.unpipe(e):this.readableStream.unpipe();}destroy(e){this.readableStream.destroy(e);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((e,r)=>{let a=this.readableStream.read();a?e(a):(this.readableStream.once("readable",()=>{let t=this.readableStream.read();e(t);}),this.readableStream.once("error",r));})}setEncoding(e){this.readableStream.setEncoding(e),this.encoding=e;}async text(){let e=[],r=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let t of this.readableStream)e.push(r.encode(t));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(e))}async json(){let e=await this.text();return JSON.parse(e)}[Symbol.asyncIterator](){let r=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:a,done:t}=await r.next();return {value:a,done:t}},[Symbol.asyncIterator](){return this}}}};export{i as NodePre18StreamWrapper};
@@ -0,0 +1 @@
1
+ import'./chunk-WOT6VMZA.js';var s=class a{constructor(e){this.readableStream=e,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(e,r){var t;(t=this.events[e])==null||t.push(r);}off(e,r){var t;this.events[e]=(t=this.events[e])==null?void 0:t.filter(i=>i!==r);}pipe(e){return this.on("data",r=>{if(e instanceof a)e._write(r);else {let t=e.getWriter();t.write(r).then(()=>t.releaseLock());}}),this.on("end",()=>{e instanceof a?e._end():e.getWriter().close();}),this.on("error",r=>{e instanceof a?e._error(r):e.getWriter().abort(r);}),this._startReading(),e}pipeTo(e){return this.pipe(e)}unpipe(e){this.off("data",r=>{if(e instanceof a)e._write(r);else {let t=e.getWriter();t.write(r).then(()=>t.releaseLock());}}),this.off("end",()=>{e instanceof a?e._end():e.getWriter().close();}),this.off("error",r=>{e instanceof a?e._error(r):e.getWriter().abort(r);});}destroy(e){this.reader.cancel(e).then(()=>{this._emit("close");}).catch(r=>{this._emit("error",r);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(t=>{this.resumeCallback=t;});let{done:e,value:r}=await this.reader.read();if(!e)return r}setEncoding(e){this.encoding=e;}async text(){let e=[];for(;;){let{done:t,value:i}=await this.reader.read();if(t)break;i&&e.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(e).arrayBuffer())}async json(){let e=await this.text();return JSON.parse(e)}_write(e){this._emit("data",e);}_end(){this._emit("end");}_error(e){this._emit("error",e);}_emit(e,r){if(this.events[e])for(let t of this.events[e]||[])t(r);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(t=>{this.resumeCallback=t;});let{done:e,value:r}=await this.reader.read();if(e){this._emit("end"),this._emit("close");break}r&&this._emit("data",r);}}catch(e){this._emit("error",e);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(t=>{this.resumeCallback=t;});let{done:e,value:r}=await this.reader.read();return e?{done:true,value:void 0}:{done:false,value:r}},[Symbol.asyncIterator](){return this}}}};export{s as UndiciStreamWrapper};