@sentio/runtime 2.49.1-rc.3 → 2.49.1-rc.4
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/lib/chunk-WFPBTN5B.js +131 -0
- package/lib/chunk-WFPBTN5B.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/processor-runner.js +1 -1
- package/package.json +1 -1
- package/src/service.ts +2 -2
- package/lib/chunk-CZM3TJ4J.js +0 -131
- package/lib/chunk-CZM3TJ4J.js.map +0 -1
package/lib/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
2
|
-
import{$ as O,V as x,W as d,X as N,Y as C,Z as V,_ as w,aa as A,ba as I,i as p,j as c,m as T,n as m,o as h,p as l,q as f,y as g}from"./chunk-
|
2
|
+
import{$ as O,V as x,W as d,X as N,Y as C,Z as V,_ as w,aa as A,ba as I,i as p,j as c,m as T,n as m,o as h,p as l,q as f,y as g}from"./chunk-WFPBTN5B.js";var r=class e{stateMap=new Map;static INSTANCE=new e;static reset(){e.INSTANCE=new e}},n=class{constructor(){}key(){return this.constructor.name}getOrRegister(){let t=r.INSTANCE.stateMap.get(this.key());return t||(t=this.initValue(),r.INSTANCE.stateMap.set(this.key(),t)),t}unregister(){let t=r.INSTANCE.stateMap.get(this.key());return r.INSTANCE.stateMap.delete(this.key()),t}},a=class extends n{initValue(){return new Map}getValue(t){return this.getOrRegister().get(t)}getValues(){let t=this.getOrRegister();return Array.from(t.values())}getOrSetValue(t,s){let i=this.getOrRegister(),o=i.get(t);return o?(console.warn(t,"has been registered twice, use the previous one"),o):(i.set(t,s),s)}},u=class extends n{initValue(){return[]}getValues(){return this.getOrRegister()}addValue(t){return this.getOrRegister().push(t),t}};import("node:process").then(e=>e.stdout.write(""));import("node:process").then(e=>e.stdout.write(""));import("node:process").then(e=>e.stdout.write(""));export{w as DummyProvider,f as Endpoints,g as GLOBAL_CONFIG,u as ListStateStorage,a as MapStateStorage,p as Plugin,c as PluginManager,I as ProcessorServiceImpl,A as QueuedStaticJsonRpcProvider,r as State,n as StateStorage,V as StoreContext,h as USER_PROCESSOR,x as dbMetrics,m as errorString,O as getProvider,l as makeEthCallKey,T as mergeProcessResults,N as processMetrics,d as providerMetrics,C as timeoutError};
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/processor-runner.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
3
|
-
import{A as aE,B as $r,C as sE,D as uE,E as pt,F as J,G as lE,H as Gt,I as Ii,J as dt,K as cE,L as Et,M as fE,N as pE,O as He,P as g,Q as Ci,R as it,S as X,T as Re,U as b,a as L,b as m,ba as dE,c as h,d as nt,e as Ke,f as Y,g as IU,h as tE,j as Ol,k as rE,l as nE,q as hr,r as gl,s as CU,t as Zn,u as oE,v as iE,w as wU,x as UU,y as Nl,z as ot}from"./chunk-
|
3
|
+
import{A as aE,B as $r,C as sE,D as uE,E as pt,F as J,G as lE,H as Gt,I as Ii,J as dt,K as cE,L as Et,M as fE,N as pE,O as He,P as g,Q as Ci,R as it,S as X,T as Re,U as b,a as L,b as m,ba as dE,c as h,d as nt,e as Ke,f as Y,g as IU,h as tE,j as Ol,k as rE,l as nE,q as hr,r as gl,s as CU,t as Zn,u as oE,v as iE,w as wU,x as UU,y as Nl,z as ot}from"./chunk-WFPBTN5B.js";var Ee=h(Rl=>{"use strict";Rl.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((n,i)=>{e.push((a,s)=>a!=null?i(a):n(s)),t.apply(this,e)})},"name",{value:t.name})};Rl.fromPromise=function(t){return Object.defineProperty(function(...e){let n=e[e.length-1];if(typeof n!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(i=>n(null,i),n)},"name",{value:t.name})}});var _E=h((L7,EE)=>{"use strict";var kt=L("constants"),DU=process.cwd,wi=null,VU=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return wi||(wi=DU.call(process)),wi};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Pl=process.chdir,process.chdir=function(t){wi=null,Pl.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Pl));var Pl;EE.exports=BU;function BU(t){kt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||n(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=i(t.chmod),t.fchmod=i(t.fchmod),t.lchmod=i(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=a(t.chmodSync),t.fchmodSync=a(t.fchmodSync),t.lchmodSync=a(t.lchmodSync),t.stat=r(t.stat),t.fstat=r(t.fstat),t.lstat=r(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,p,_){_&&process.nextTick(_)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,p,_,f){f&&process.nextTick(f)},t.lchownSync=function(){}),VU==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function p(_,f,S){var v=Date.now(),T=0;c(_,f,function A(O){if(O&&(O.code==="EACCES"||O.code==="EPERM"||O.code==="EBUSY")&&Date.now()-v<6e4){setTimeout(function(){t.stat(f,function(N,D){N&&N.code==="ENOENT"?c(_,f,A):S(O)})},T),T<100&&(T+=10);return}S&&S(O)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function p(_,f,S,v,T,A){var O;if(A&&typeof A=="function"){var N=0;O=function(D,G,F){if(D&&D.code==="EAGAIN"&&N<10)return N++,c.call(t,_,f,S,v,T,O);A.apply(this,arguments)}}return c.call(t,_,f,S,v,T,O)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(p,_,f,S,v){for(var T=0;;)try{return c.call(t,p,_,f,S,v)}catch(A){if(A.code==="EAGAIN"&&T<10){T++;continue}throw A}}}(t.readSync);function e(c){c.lchmod=function(p,_,f){c.open(p,kt.O_WRONLY|kt.O_SYMLINK,_,function(S,v){if(S){f&&f(S);return}c.fchmod(v,_,function(T){c.close(v,function(A){f&&f(T||A)})})})},c.lchmodSync=function(p,_){var f=c.openSync(p,kt.O_WRONLY|kt.O_SYMLINK,_),S=!0,v;try{v=c.fchmodSync(f,_),S=!1}finally{if(S)try{c.closeSync(f)}catch{}else c.closeSync(f)}return v}}function n(c){kt.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(p,_,f,S){c.open(p,kt.O_SYMLINK,function(v,T){if(v){S&&S(v);return}c.futimes(T,_,f,function(A){c.close(T,function(O){S&&S(A||O)})})})},c.lutimesSync=function(p,_,f){var S=c.openSync(p,kt.O_SYMLINK),v,T=!0;try{v=c.futimesSync(S,_,f),T=!1}finally{if(T)try{c.closeSync(S)}catch{}else c.closeSync(S)}return v}):c.futimes&&(c.lutimes=function(p,_,f,S){S&&process.nextTick(S)},c.lutimesSync=function(){})}function i(c){return c&&function(p,_,f){return c.call(t,p,_,function(S){l(S)&&(S=null),f&&f.apply(this,arguments)})}}function a(c){return c&&function(p,_){try{return c.call(t,p,_)}catch(f){if(!l(f))throw f}}}function s(c){return c&&function(p,_,f,S){return c.call(t,p,_,f,function(v){l(v)&&(v=null),S&&S.apply(this,arguments)})}}function o(c){return c&&function(p,_,f){try{return c.call(t,p,_,f)}catch(S){if(!l(S))throw S}}}function r(c){return c&&function(p,_,f){typeof _=="function"&&(f=_,_=null);function S(v,T){T&&(T.uid<0&&(T.uid+=4294967296),T.gid<0&&(T.gid+=4294967296)),f&&f.apply(this,arguments)}return _?c.call(t,p,_,S):c.call(t,p,S)}}function u(c){return c&&function(p,_){var f=_?c.call(t,p,_):c.call(t,p);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function l(c){if(!c||c.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var TE=h((I7,hE)=>{"use strict";var SE=L("stream").Stream;hE.exports=GU;function GU(t){return{ReadStream:e,WriteStream:n};function e(i,a){if(!(this instanceof e))return new e(i,a);SE.call(this);var s=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var o=Object.keys(a),r=0,u=o.length;r<u;r++){var l=o[r];this[l]=a[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(c,p){if(c){s.emit("error",c),s.readable=!1;return}s.fd=p,s.emit("open",p),s._read()})}function n(i,a){if(!(this instanceof n))return new n(i,a);SE.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var s=Object.keys(a),o=0,r=s.length;o<r;o++){var u=s[o];this[u]=a[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var mE=h((C7,vE)=>{"use strict";vE.exports=HU;var kU=Object.getPrototypeOf||function(t){return t.__proto__};function HU(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:kU(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var Wr=h((w7,xl)=>{"use strict";var ie=L("fs"),FU=_E(),YU=TE(),qU=mE(),Ui=L("util"),ve,Vi;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ve=Symbol.for("graceful-fs.queue"),Vi=Symbol.for("graceful-fs.previous")):(ve="___graceful-fs.queue",Vi="___graceful-fs.previous");function jU(){}function OE(t,e){Object.defineProperty(t,ve,{get:function(){return e}})}var Tr=jU;Ui.debuglog?Tr=Ui.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Tr=function(){var t=Ui.format.apply(Ui,arguments);t="GFS4: "+t.split(/\n/).join(`
|
4
4
|
GFS4: `),console.error(t)});ie[ve]||(yE=global[ve]||[],OE(ie,yE),ie.close=function(t){function e(n,i){return t.call(ie,n,function(a){a||AE(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(e,Vi,{value:t}),e}(ie.close),ie.closeSync=function(t){function e(n){t.apply(ie,arguments),AE()}return Object.defineProperty(e,Vi,{value:t}),e}(ie.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Tr(ie[ve]),L("assert").equal(ie[ve].length,0)}));var yE;global[ve]||OE(global,ie[ve]);xl.exports=bl(qU(ie));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ie.__patched&&(xl.exports=bl(ie),ie.__patched=!0);function bl(t){FU(t),t.gracefulify=bl,t.createReadStream=G,t.createWriteStream=F;var e=t.readFile;t.readFile=n;function n(x,B,w){return typeof B=="function"&&(w=B,B=null),W(x,B,w);function W(z,ne,oe,se){return e(z,ne,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Kr([W,[z,ne,oe],Z,se||Date.now(),Date.now()]):typeof oe=="function"&&oe.apply(this,arguments)})}}var i=t.writeFile;t.writeFile=a;function a(x,B,w,W){return typeof w=="function"&&(W=w,w=null),z(x,B,w,W);function z(ne,oe,se,Z,Te){return i(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Kr([z,[ne,oe,se,Z],re,Te||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(x,B,w,W){return typeof w=="function"&&(W=w,w=null),z(x,B,w,W);function z(ne,oe,se,Z,Te){return s(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Kr([z,[ne,oe,se,Z],re,Te||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var r=t.copyFile;r&&(t.copyFile=u);function u(x,B,w,W){return typeof w=="function"&&(W=w,w=0),z(x,B,w,W);function z(ne,oe,se,Z,Te){return r(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Kr([z,[ne,oe,se,Z],re,Te||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var l=t.readdir;t.readdir=p;var c=/^v[0-5]\./;function p(x,B,w){typeof B=="function"&&(w=B,B=null);var W=c.test(process.version)?function(oe,se,Z,Te){return l(oe,z(oe,se,Z,Te))}:function(oe,se,Z,Te){return l(oe,se,z(oe,se,Z,Te))};return W(x,B,w);function z(ne,oe,se,Z){return function(Te,re){Te&&(Te.code==="EMFILE"||Te.code==="ENFILE")?Kr([W,[ne,oe,se],Te,Z||Date.now(),Date.now()]):(re&&re.sort&&re.sort(),typeof se=="function"&&se.call(this,Te,re))}}}if(process.version.substr(0,4)==="v0.8"){var _=YU(t);A=_.ReadStream,N=_.WriteStream}var f=t.ReadStream;f&&(A.prototype=Object.create(f.prototype),A.prototype.open=O);var S=t.WriteStream;S&&(N.prototype=Object.create(S.prototype),N.prototype.open=D),Object.defineProperty(t,"ReadStream",{get:function(){return A},set:function(x){A=x},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return N},set:function(x){N=x},enumerable:!0,configurable:!0});var v=A;Object.defineProperty(t,"FileReadStream",{get:function(){return v},set:function(x){v=x},enumerable:!0,configurable:!0});var T=N;Object.defineProperty(t,"FileWriteStream",{get:function(){return T},set:function(x){T=x},enumerable:!0,configurable:!0});function A(x,B){return this instanceof A?(f.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function O(){var x=this;j(x.path,x.flags,x.mode,function(B,w){B?(x.autoClose&&x.destroy(),x.emit("error",B)):(x.fd=w,x.emit("open",w),x.read())})}function N(x,B){return this instanceof N?(S.apply(this,arguments),this):N.apply(Object.create(N.prototype),arguments)}function D(){var x=this;j(x.path,x.flags,x.mode,function(B,w){B?(x.destroy(),x.emit("error",B)):(x.fd=w,x.emit("open",w))})}function G(x,B){return new t.ReadStream(x,B)}function F(x,B){return new t.WriteStream(x,B)}var ae=t.open;t.open=j;function j(x,B,w,W){return typeof w=="function"&&(W=w,w=null),z(x,B,w,W);function z(ne,oe,se,Z,Te){return ae(ne,oe,se,function(re,M7){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Kr([z,[ne,oe,se,Z],re,Te||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}return t}function Kr(t){Tr("ENQUEUE",t[0].name,t[1]),ie[ve].push(t),Ml()}var Di;function AE(){for(var t=Date.now(),e=0;e<ie[ve].length;++e)ie[ve][e].length>2&&(ie[ve][e][3]=t,ie[ve][e][4]=t);Ml()}function Ml(){if(clearTimeout(Di),Di=void 0,ie[ve].length!==0){var t=ie[ve].shift(),e=t[0],n=t[1],i=t[2],a=t[3],s=t[4];if(a===void 0)Tr("RETRY",e.name,n),e.apply(null,n);else if(Date.now()-a>=6e4){Tr("TIMEOUT",e.name,n);var o=n.pop();typeof o=="function"&&o.call(null,i)}else{var r=Date.now()-s,u=Math.max(s-a,1),l=Math.min(u*1.2,100);r>=l?(Tr("RETRY",e.name,n),e.apply(null,n.concat([a]))):ie[ve].push(t)}Di===void 0&&(Di=setTimeout(Ml,0))}}});var Le=h(xt=>{"use strict";var gE=Ee().fromCallback,xe=Wr(),$U=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof xe[t]=="function");Object.assign(xt,xe);$U.forEach(t=>{xt[t]=gE(xe[t])});xt.exists=function(t,e){return typeof e=="function"?xe.exists(t,e):new Promise(n=>xe.exists(t,n))};xt.read=function(t,e,n,i,a,s){return typeof s=="function"?xe.read(t,e,n,i,a,s):new Promise((o,r)=>{xe.read(t,e,n,i,a,(u,l,c)=>{if(u)return r(u);o({bytesRead:l,buffer:c})})})};xt.write=function(t,e,...n){return typeof n[n.length-1]=="function"?xe.write(t,e,...n):new Promise((i,a)=>{xe.write(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesWritten:o,buffer:r})})})};xt.readv=function(t,e,...n){return typeof n[n.length-1]=="function"?xe.readv(t,e,...n):new Promise((i,a)=>{xe.readv(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesRead:o,buffers:r})})})};xt.writev=function(t,e,...n){return typeof n[n.length-1]=="function"?xe.writev(t,e,...n):new Promise((i,a)=>{xe.writev(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesWritten:o,buffers:r})})})};typeof xe.realpath.native=="function"?xt.realpath.native=gE(xe.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var RE=h((D7,NE)=>{"use strict";var KU=L("path");NE.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(KU.parse(e).root,""))){let i=new Error(`Path contains invalid characters: ${e}`);throw i.code="EINVAL",i}}});var xE=h((V7,Ll)=>{"use strict";var PE=Le(),{checkPath:bE}=RE(),ME=t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode};Ll.exports.makeDir=async(t,e)=>(bE(t),PE.mkdir(t,{mode:ME(e),recursive:!0}));Ll.exports.makeDirSync=(t,e)=>(bE(t),PE.mkdirSync(t,{mode:ME(e),recursive:!0}))});var at=h((B7,LE)=>{"use strict";var WU=Ee().fromPromise,{makeDir:zU,makeDirSync:Il}=xE(),Cl=WU(zU);LE.exports={mkdirs:Cl,mkdirsSync:Il,mkdirp:Cl,mkdirpSync:Il,ensureDir:Cl,ensureDirSync:Il}});var Ht=h((G7,CE)=>{"use strict";var XU=Ee().fromPromise,IE=Le();function JU(t){return IE.access(t).then(()=>!0).catch(()=>!1)}CE.exports={pathExists:XU(JU),pathExistsSync:IE.existsSync}});var wl=h((k7,wE)=>{"use strict";var zr=Le(),QU=Ee().fromPromise;async function ZU(t,e,n){let i=await zr.open(t,"r+"),a=null;try{await zr.futimes(i,e,n)}finally{try{await zr.close(i)}catch(s){a=s}}if(a)throw a}function eD(t,e,n){let i=zr.openSync(t,"r+");return zr.futimesSync(i,e,n),zr.closeSync(i)}wE.exports={utimesMillis:QU(ZU),utimesMillisSync:eD}});var vr=h((H7,BE)=>{"use strict";var Xr=Le(),_e=L("path"),UE=Ee().fromPromise;function tD(t,e,n){let i=n.dereference?a=>Xr.stat(a,{bigint:!0}):a=>Xr.lstat(a,{bigint:!0});return Promise.all([i(t),i(e).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,s])=>({srcStat:a,destStat:s}))}function rD(t,e,n){let i,a=n.dereference?o=>Xr.statSync(o,{bigint:!0}):o=>Xr.lstatSync(o,{bigint:!0}),s=a(t);try{i=a(e)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:i}}async function nD(t,e,n,i){let{srcStat:a,destStat:s}=await tD(t,e,i);if(s){if(eo(a,s)){let o=_e.basename(t),r=_e.basename(e);if(n==="move"&&o!==r&&o.toLowerCase()===r.toLowerCase())return{srcStat:a,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!a.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(a.isDirectory()&&Ul(t,e))throw new Error(Bi(t,e,n));return{srcStat:a,destStat:s}}function oD(t,e,n,i){let{srcStat:a,destStat:s}=rD(t,e,i);if(s){if(eo(a,s)){let o=_e.basename(t),r=_e.basename(e);if(n==="move"&&o!==r&&o.toLowerCase()===r.toLowerCase())return{srcStat:a,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!a.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(a.isDirectory()&&Ul(t,e))throw new Error(Bi(t,e,n));return{srcStat:a,destStat:s}}async function DE(t,e,n,i){let a=_e.resolve(_e.dirname(t)),s=_e.resolve(_e.dirname(n));if(s===a||s===_e.parse(s).root)return;let o;try{o=await Xr.stat(s,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(eo(e,o))throw new Error(Bi(t,n,i));return DE(t,e,s,i)}function VE(t,e,n,i){let a=_e.resolve(_e.dirname(t)),s=_e.resolve(_e.dirname(n));if(s===a||s===_e.parse(s).root)return;let o;try{o=Xr.statSync(s,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(eo(e,o))throw new Error(Bi(t,n,i));return VE(t,e,s,i)}function eo(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}function Ul(t,e){let n=_e.resolve(t).split(_e.sep).filter(a=>a),i=_e.resolve(e).split(_e.sep).filter(a=>a);return n.every((a,s)=>i[s]===a)}function Bi(t,e,n){return`Cannot ${n} '${t}' to a subdirectory of itself, '${e}'.`}BE.exports={checkPaths:UE(nD),checkPathsSync:oD,checkParentPaths:UE(DE),checkParentPathsSync:VE,isSrcSubdir:Ul,areIdentical:eo}});var YE=h((F7,FE)=>{"use strict";var Pe=Le(),to=L("path"),{mkdirs:iD}=at(),{pathExists:aD}=Ht(),{utimesMillis:sD}=wl(),ro=vr();async function uD(t,e,n={}){typeof n=="function"&&(n={filter:n}),n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
5
5
|
|
6
6
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:i,destStat:a}=await ro.checkPaths(t,e,"copy",n);if(await ro.checkParentPaths(t,i,e,"copy"),!await kE(t,e,n))return;let o=to.dirname(e);await aD(o)||await iD(o),await HE(a,t,e,n)}async function kE(t,e,n){return n.filter?n.filter(t,e):!0}async function HE(t,e,n,i){let s=await(i.dereference?Pe.stat:Pe.lstat)(e);if(s.isDirectory())return pD(s,t,e,n,i);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return lD(s,t,e,n,i);if(s.isSymbolicLink())return dD(t,e,n,i);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}async function lD(t,e,n,i,a){if(!e)return GE(t,n,i,a);if(a.overwrite)return await Pe.unlink(i),GE(t,n,i,a);if(a.errorOnExist)throw new Error(`'${i}' already exists`)}async function GE(t,e,n,i){if(await Pe.copyFile(e,n),i.preserveTimestamps){cD(t.mode)&&await fD(n,t.mode);let a=await Pe.stat(e);await sD(n,a.atime,a.mtime)}return Pe.chmod(n,t.mode)}function cD(t){return(t&128)===0}function fD(t,e){return Pe.chmod(t,e|128)}async function pD(t,e,n,i,a){e||await Pe.mkdir(i);let s=await Pe.readdir(n);await Promise.all(s.map(async o=>{let r=to.join(n,o),u=to.join(i,o);if(!await kE(r,u,a))return;let{destStat:c}=await ro.checkPaths(r,u,"copy",a);return HE(c,r,u,a)})),e||await Pe.chmod(i,t.mode)}async function dD(t,e,n,i){let a=await Pe.readlink(e);if(i.dereference&&(a=to.resolve(process.cwd(),a)),!t)return Pe.symlink(a,n);let s=null;try{s=await Pe.readlink(n)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return Pe.symlink(a,n);throw o}if(i.dereference&&(s=to.resolve(process.cwd(),s)),ro.isSrcSubdir(a,s))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${s}'.`);if(ro.isSrcSubdir(s,a))throw new Error(`Cannot overwrite '${s}' with '${a}'.`);return await Pe.unlink(n),Pe.symlink(a,n)}FE.exports=uD});var WE=h((Y7,KE)=>{"use strict";var Ie=Wr(),no=L("path"),ED=at().mkdirsSync,_D=wl().utimesMillisSync,oo=vr();function SD(t,e,n){typeof n=="function"&&(n={filter:n}),n=n||{},n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
package/package.json
CHANGED
package/src/service.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { CallContext, ServerError, Status } from 'nice-grpc'
|
2
2
|
import { DebugInfo, RichServerError } from 'nice-grpc-error-details'
|
3
|
-
import { from } from 'ix/Ix.
|
4
|
-
import { withAbort } from 'ix/Ix.
|
3
|
+
import { from } from 'ix/Ix.asynciterable'
|
4
|
+
import { withAbort } from 'ix/Ix.asynciterable.operators'
|
5
5
|
|
6
6
|
import {
|
7
7
|
DataBinding,
|