@sentio/runtime 2.55.0-rc.1 → 2.55.0-rc.3
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/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,A as g,X as N,Y as C,Z as V,_ as w,aa as A,ba as I,ca as M,da as b,ea as y,i as p,j as c,m as T,n as m,o as h,p as l,q as f,r as x,s as d}from"./chunk-
|
2
|
+
import{$ as O,A as g,X as N,Y as C,Z as V,_ as w,aa as A,ba as I,ca as M,da as b,ea as y,i as p,j as c,m as T,n as m,o as h,p as l,q as f,r as x,s as d}from"./chunk-Y3SLNZFW.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{I as DummyProvider,d as Endpoints,g as GLOBAL_CONFIG,u as ListStateStorage,a as MapStateStorage,p as Plugin,c as PluginManager,y as ProcessorServiceImpl,b as QueuedStaticJsonRpcProvider,r as State,n as StateStorage,A as StoreContext,h as USER_PROCESSOR,x as compareSemver,N as dbMetrics,m as errorString,M as getProvider,l as makeEthCallKey,T as mergeProcessResults,w as metricsStorage,f as parseSemver,V as processMetrics,C as providerMetrics,O 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 dE,B as it,C as EE,D as jr,E as _E,F as SE,G as Et,H as Q,I as hE,J as Gt,K as bi,L as _t,M as TE,N as St,O as vE,P as mE,Q as Ye,R as g,S as xi,T as at,U as J,V as Pe,W as M,a as L,b as m,c as h,d as Je,e as Re,ea as yE,f as Y,g as jU,h as sE,j as xl,k as uE,l as lE,q as Ri,r as Pi,s as _r,t as Ml,u as cE,v as zn,w as fE,x as pE,y as $U,z as KU}from"./chunk-
|
3
|
+
import{A as dE,B as it,C as EE,D as jr,E as _E,F as SE,G as Et,H as Q,I as hE,J as Gt,K as bi,L as _t,M as TE,N as St,O as vE,P as mE,Q as Ye,R as g,S as xi,T as at,U as J,V as Pe,W as M,a as L,b as m,c as h,d as Je,e as Re,ea as yE,f as Y,g as jU,h as sE,j as xl,k as uE,l as lE,q as Ri,r as Pi,s as _r,t as Ml,u as cE,v as zn,w as fE,x as pE,y as $U,z as KU}from"./chunk-Y3SLNZFW.js";var Ee=h(Ll=>{"use strict";Ll.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})};Ll.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 OE=h((iQ,AE)=>{"use strict";var kt=L("constants"),WU=process.cwd,Mi=null,zU=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Mi||(Mi=WU.call(process)),Mi};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Il=process.chdir,process.chdir=function(t){Mi=null,Il.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Il));var Il;AE.exports=XU;function XU(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(){}),zU==="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 RE=h((aQ,NE)=>{"use strict";var gE=L("stream").Stream;NE.exports=JU;function JU(t){return{ReadStream:e,WriteStream:n};function e(i,a){if(!(this instanceof e))return new e(i,a);gE.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);gE.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 bE=h((sQ,PE)=>{"use strict";PE.exports=ZU;var QU=Object.getPrototypeOf||function(t){return t.__proto__};function ZU(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:QU(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var Kr=h((uQ,Ul)=>{"use strict";var ie=L("fs"),eD=OE(),tD=RE(),rD=bE(),Li=L("util"),me,Ci;typeof Symbol=="function"&&typeof Symbol.for=="function"?(me=Symbol.for("graceful-fs.queue"),Ci=Symbol.for("graceful-fs.previous")):(me="___graceful-fs.queue",Ci="___graceful-fs.previous");function nD(){}function LE(t,e){Object.defineProperty(t,me,{get:function(){return e}})}var Sr=nD;Li.debuglog?Sr=Li.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Sr=function(){var t=Li.format.apply(Li,arguments);t="GFS4: "+t.split(/\n/).join(`
|
4
4
|
GFS4: `),console.error(t)});ie[me]||(xE=global[me]||[],LE(ie,xE),ie.close=function(t){function e(n,i){return t.call(ie,n,function(a){a||ME(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(e,Ci,{value:t}),e}(ie.close),ie.closeSync=function(t){function e(n){t.apply(ie,arguments),ME()}return Object.defineProperty(e,Ci,{value:t}),e}(ie.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Sr(ie[me]),L("assert").equal(ie[me].length,0)}));var xE;global[me]||LE(global,ie[me]);Ul.exports=Cl(rD(ie));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ie.__patched&&(Ul.exports=Cl(ie),ie.__patched=!0);function Cl(t){eD(t),t.gracefulify=Cl,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),z(x,B,w);function z(X,ne,oe,se){return e(X,ne,function(ee){ee&&(ee.code==="EMFILE"||ee.code==="ENFILE")?$r([z,[X,ne,oe],ee,se||Date.now(),Date.now()]):typeof oe=="function"&&oe.apply(this,arguments)})}}var i=t.writeFile;t.writeFile=a;function a(x,B,w,z){return typeof w=="function"&&(z=w,w=null),X(x,B,w,z);function X(ne,oe,se,ee,ve){return i(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?$r([X,[ne,oe,se,ee],re,ve||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(x,B,w,z){return typeof w=="function"&&(z=w,w=null),X(x,B,w,z);function X(ne,oe,se,ee,ve){return s(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?$r([X,[ne,oe,se,ee],re,ve||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}var r=t.copyFile;r&&(t.copyFile=u);function u(x,B,w,z){return typeof w=="function"&&(z=w,w=0),X(x,B,w,z);function X(ne,oe,se,ee,ve){return r(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?$r([X,[ne,oe,se,ee],re,ve||Date.now(),Date.now()]):typeof ee=="function"&&ee.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 z=c.test(process.version)?function(oe,se,ee,ve){return l(oe,X(oe,se,ee,ve))}:function(oe,se,ee,ve){return l(oe,se,X(oe,se,ee,ve))};return z(x,B,w);function X(ne,oe,se,ee){return function(ve,re){ve&&(ve.code==="EMFILE"||ve.code==="ENFILE")?$r([z,[ne,oe,se],ve,ee||Date.now(),Date.now()]):(re&&re.sort&&re.sort(),typeof se=="function"&&se.call(this,ve,re))}}}if(process.version.substr(0,4)==="v0.8"){var _=tD(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,z){return typeof w=="function"&&(z=w,w=null),X(x,B,w,z);function X(ne,oe,se,ee,ve){return ae(ne,oe,se,function(re,nQ){re&&(re.code==="EMFILE"||re.code==="ENFILE")?$r([X,[ne,oe,se,ee],re,ve||Date.now(),Date.now()]):typeof ee=="function"&&ee.apply(this,arguments)})}}return t}function $r(t){Sr("ENQUEUE",t[0].name,t[1]),ie[me].push(t),wl()}var Ii;function ME(){for(var t=Date.now(),e=0;e<ie[me].length;++e)ie[me][e].length>2&&(ie[me][e][3]=t,ie[me][e][4]=t);wl()}function wl(){if(clearTimeout(Ii),Ii=void 0,ie[me].length!==0){var t=ie[me].shift(),e=t[0],n=t[1],i=t[2],a=t[3],s=t[4];if(a===void 0)Sr("RETRY",e.name,n),e.apply(null,n);else if(Date.now()-a>=6e4){Sr("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?(Sr("RETRY",e.name,n),e.apply(null,n.concat([a]))):ie[me].push(t)}Ii===void 0&&(Ii=setTimeout(wl,0))}}});var Ce=h(bt=>{"use strict";var IE=Ee().fromCallback,Ie=Kr(),oD=["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 Ie[t]=="function");Object.assign(bt,Ie);oD.forEach(t=>{bt[t]=IE(Ie[t])});bt.exists=function(t,e){return typeof e=="function"?Ie.exists(t,e):new Promise(n=>Ie.exists(t,n))};bt.read=function(t,e,n,i,a,s){return typeof s=="function"?Ie.read(t,e,n,i,a,s):new Promise((o,r)=>{Ie.read(t,e,n,i,a,(u,l,c)=>{if(u)return r(u);o({bytesRead:l,buffer:c})})})};bt.write=function(t,e,...n){return typeof n[n.length-1]=="function"?Ie.write(t,e,...n):new Promise((i,a)=>{Ie.write(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesWritten:o,buffer:r})})})};bt.readv=function(t,e,...n){return typeof n[n.length-1]=="function"?Ie.readv(t,e,...n):new Promise((i,a)=>{Ie.readv(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesRead:o,buffers:r})})})};bt.writev=function(t,e,...n){return typeof n[n.length-1]=="function"?Ie.writev(t,e,...n):new Promise((i,a)=>{Ie.writev(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesWritten:o,buffers:r})})})};typeof Ie.realpath.native=="function"?bt.realpath.native=IE(Ie.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var wE=h((cQ,CE)=>{"use strict";var iD=L("path");CE.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(iD.parse(e).root,""))){let i=new Error(`Path contains invalid characters: ${e}`);throw i.code="EINVAL",i}}});var BE=h((fQ,Dl)=>{"use strict";var UE=Ce(),{checkPath:DE}=wE(),VE=t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode};Dl.exports.makeDir=async(t,e)=>(DE(t),UE.mkdir(t,{mode:VE(e),recursive:!0}));Dl.exports.makeDirSync=(t,e)=>(DE(t),UE.mkdirSync(t,{mode:VE(e),recursive:!0}))});var st=h((pQ,GE)=>{"use strict";var aD=Ee().fromPromise,{makeDir:sD,makeDirSync:Vl}=BE(),Bl=aD(sD);GE.exports={mkdirs:Bl,mkdirsSync:Vl,mkdirp:Bl,mkdirpSync:Vl,ensureDir:Bl,ensureDirSync:Vl}});var Ht=h((dQ,HE)=>{"use strict";var uD=Ee().fromPromise,kE=Ce();function lD(t){return kE.access(t).then(()=>!0).catch(()=>!1)}HE.exports={pathExists:uD(lD),pathExistsSync:kE.existsSync}});var Gl=h((EQ,FE)=>{"use strict";var Wr=Ce(),cD=Ee().fromPromise;async function fD(t,e,n){let i=await Wr.open(t,"r+"),a=null;try{await Wr.futimes(i,e,n)}finally{try{await Wr.close(i)}catch(s){a=s}}if(a)throw a}function pD(t,e,n){let i=Wr.openSync(t,"r+");return Wr.futimesSync(i,e,n),Wr.closeSync(i)}FE.exports={utimesMillis:cD(fD),utimesMillisSync:pD}});var hr=h((_Q,$E)=>{"use strict";var zr=Ce(),_e=L("path"),YE=Ee().fromPromise;function dD(t,e,n){let i=n.dereference?a=>zr.stat(a,{bigint:!0}):a=>zr.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 ED(t,e,n){let i,a=n.dereference?o=>zr.statSync(o,{bigint:!0}):o=>zr.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 _D(t,e,n,i){let{srcStat:a,destStat:s}=await dD(t,e,i);if(s){if(Xn(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()&&kl(t,e))throw new Error(wi(t,e,n));return{srcStat:a,destStat:s}}function SD(t,e,n,i){let{srcStat:a,destStat:s}=ED(t,e,i);if(s){if(Xn(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()&&kl(t,e))throw new Error(wi(t,e,n));return{srcStat:a,destStat:s}}async function qE(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 zr.stat(s,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(Xn(e,o))throw new Error(wi(t,n,i));return qE(t,e,s,i)}function jE(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=zr.statSync(s,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(Xn(e,o))throw new Error(wi(t,n,i));return jE(t,e,s,i)}function Xn(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}function kl(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 wi(t,e,n){return`Cannot ${n} '${t}' to a subdirectory of itself, '${e}'.`}$E.exports={checkPaths:YE(_D),checkPathsSync:SD,checkParentPaths:YE(qE),checkParentPathsSync:jE,isSrcSubdir:kl,areIdentical:Xn}});var JE=h((SQ,XE)=>{"use strict";var be=Ce(),Jn=L("path"),{mkdirs:hD}=st(),{pathExists:TD}=Ht(),{utimesMillis:vD}=Gl(),Qn=hr();async function mD(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 Qn.checkPaths(t,e,"copy",n);if(await Qn.checkParentPaths(t,i,e,"copy"),!await WE(t,e,n))return;let o=Jn.dirname(e);await TD(o)||await hD(o),await zE(a,t,e,n)}async function WE(t,e,n){return n.filter?n.filter(t,e):!0}async function zE(t,e,n,i){let s=await(i.dereference?be.stat:be.lstat)(e);if(s.isDirectory())return gD(s,t,e,n,i);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return yD(s,t,e,n,i);if(s.isSymbolicLink())return ND(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 yD(t,e,n,i,a){if(!e)return KE(t,n,i,a);if(a.overwrite)return await be.unlink(i),KE(t,n,i,a);if(a.errorOnExist)throw new Error(`'${i}' already exists`)}async function KE(t,e,n,i){if(await be.copyFile(e,n),i.preserveTimestamps){AD(t.mode)&&await OD(n,t.mode);let a=await be.stat(e);await vD(n,a.atime,a.mtime)}return be.chmod(n,t.mode)}function AD(t){return(t&128)===0}function OD(t,e){return be.chmod(t,e|128)}async function gD(t,e,n,i,a){e||await be.mkdir(i);let s=await be.readdir(n);await Promise.all(s.map(async o=>{let r=Jn.join(n,o),u=Jn.join(i,o);if(!await WE(r,u,a))return;let{destStat:c}=await Qn.checkPaths(r,u,"copy",a);return zE(c,r,u,a)})),e||await be.chmod(i,t.mode)}async function ND(t,e,n,i){let a=await be.readlink(e);if(i.dereference&&(a=Jn.resolve(process.cwd(),a)),!t)return be.symlink(a,n);let s=null;try{s=await be.readlink(n)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return be.symlink(a,n);throw o}if(i.dereference&&(s=Jn.resolve(process.cwd(),s)),Qn.isSrcSubdir(a,s))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${s}'.`);if(Qn.isSrcSubdir(s,a))throw new Error(`Cannot overwrite '${s}' with '${a}'.`);return await be.unlink(n),be.symlink(a,n)}XE.exports=mD});var r_=h((hQ,t_)=>{"use strict";var we=Kr(),Zn=L("path"),RD=st().mkdirsSync,PD=Gl().utimesMillisSync,eo=hr();function bD(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
@@ -437,7 +437,9 @@ export interface ContractConfig {
|
|
437
437
|
moveEventConfigs: MoveEventHandlerConfig[];
|
438
438
|
moveCallConfigs: MoveCallHandlerConfig[];
|
439
439
|
moveResourceChangeConfigs: MoveResourceChangeConfig[];
|
440
|
+
/** @deprecated */
|
440
441
|
fuelCallConfigs: FuelCallHandlerConfig[];
|
442
|
+
fuelTransactionConfigs: FuelTransactionHandlerConfig[];
|
441
443
|
assetConfigs: FuelAssetHandlerConfig[];
|
442
444
|
fuelLogConfigs: FuelLogHandlerConfig[];
|
443
445
|
cosmosLogConfigs: CosmosLogHandlerConfig[];
|
@@ -856,6 +858,11 @@ export interface FuelCallHandlerConfig {
|
|
856
858
|
handlerName: string;
|
857
859
|
}
|
858
860
|
|
861
|
+
export interface FuelTransactionHandlerConfig {
|
862
|
+
handlerId: number;
|
863
|
+
handlerName: string;
|
864
|
+
}
|
865
|
+
|
859
866
|
export interface Topic {
|
860
867
|
hashes: string[];
|
861
868
|
}
|
@@ -1811,6 +1818,7 @@ function createBaseContractConfig(): ContractConfig {
|
|
1811
1818
|
moveCallConfigs: [],
|
1812
1819
|
moveResourceChangeConfigs: [],
|
1813
1820
|
fuelCallConfigs: [],
|
1821
|
+
fuelTransactionConfigs: [],
|
1814
1822
|
assetConfigs: [],
|
1815
1823
|
fuelLogConfigs: [],
|
1816
1824
|
cosmosLogConfigs: [],
|
@@ -1855,6 +1863,9 @@ export const ContractConfig = {
|
|
1855
1863
|
for (const v of message.fuelCallConfigs) {
|
1856
1864
|
FuelCallHandlerConfig.encode(v!, writer.uint32(106).fork()).ldelim();
|
1857
1865
|
}
|
1866
|
+
for (const v of message.fuelTransactionConfigs) {
|
1867
|
+
FuelTransactionHandlerConfig.encode(v!, writer.uint32(162).fork()).ldelim();
|
1868
|
+
}
|
1858
1869
|
for (const v of message.assetConfigs) {
|
1859
1870
|
FuelAssetHandlerConfig.encode(v!, writer.uint32(114).fork()).ldelim();
|
1860
1871
|
}
|
@@ -1968,6 +1979,13 @@ export const ContractConfig = {
|
|
1968
1979
|
|
1969
1980
|
message.fuelCallConfigs.push(FuelCallHandlerConfig.decode(reader, reader.uint32()));
|
1970
1981
|
continue;
|
1982
|
+
case 20:
|
1983
|
+
if (tag !== 162) {
|
1984
|
+
break;
|
1985
|
+
}
|
1986
|
+
|
1987
|
+
message.fuelTransactionConfigs.push(FuelTransactionHandlerConfig.decode(reader, reader.uint32()));
|
1988
|
+
continue;
|
1971
1989
|
case 14:
|
1972
1990
|
if (tag !== 114) {
|
1973
1991
|
break;
|
@@ -2070,6 +2088,9 @@ export const ContractConfig = {
|
|
2070
2088
|
fuelCallConfigs: globalThis.Array.isArray(object?.fuelCallConfigs)
|
2071
2089
|
? object.fuelCallConfigs.map((e: any) => FuelCallHandlerConfig.fromJSON(e))
|
2072
2090
|
: [],
|
2091
|
+
fuelTransactionConfigs: globalThis.Array.isArray(object?.fuelTransactionConfigs)
|
2092
|
+
? object.fuelTransactionConfigs.map((e: any) => FuelTransactionHandlerConfig.fromJSON(e))
|
2093
|
+
: [],
|
2073
2094
|
assetConfigs: globalThis.Array.isArray(object?.assetConfigs)
|
2074
2095
|
? object.assetConfigs.map((e: any) => FuelAssetHandlerConfig.fromJSON(e))
|
2075
2096
|
: [],
|
@@ -2126,6 +2147,9 @@ export const ContractConfig = {
|
|
2126
2147
|
if (message.fuelCallConfigs?.length) {
|
2127
2148
|
obj.fuelCallConfigs = message.fuelCallConfigs.map((e) => FuelCallHandlerConfig.toJSON(e));
|
2128
2149
|
}
|
2150
|
+
if (message.fuelTransactionConfigs?.length) {
|
2151
|
+
obj.fuelTransactionConfigs = message.fuelTransactionConfigs.map((e) => FuelTransactionHandlerConfig.toJSON(e));
|
2152
|
+
}
|
2129
2153
|
if (message.assetConfigs?.length) {
|
2130
2154
|
obj.assetConfigs = message.assetConfigs.map((e) => FuelAssetHandlerConfig.toJSON(e));
|
2131
2155
|
}
|
@@ -2174,6 +2198,8 @@ export const ContractConfig = {
|
|
2174
2198
|
message.moveResourceChangeConfigs =
|
2175
2199
|
object.moveResourceChangeConfigs?.map((e) => MoveResourceChangeConfig.fromPartial(e)) || [];
|
2176
2200
|
message.fuelCallConfigs = object.fuelCallConfigs?.map((e) => FuelCallHandlerConfig.fromPartial(e)) || [];
|
2201
|
+
message.fuelTransactionConfigs =
|
2202
|
+
object.fuelTransactionConfigs?.map((e) => FuelTransactionHandlerConfig.fromPartial(e)) || [];
|
2177
2203
|
message.assetConfigs = object.assetConfigs?.map((e) => FuelAssetHandlerConfig.fromPartial(e)) || [];
|
2178
2204
|
message.fuelLogConfigs = object.fuelLogConfigs?.map((e) => FuelLogHandlerConfig.fromPartial(e)) || [];
|
2179
2205
|
message.cosmosLogConfigs = object.cosmosLogConfigs?.map((e) => CosmosLogHandlerConfig.fromPartial(e)) || [];
|
@@ -7123,6 +7149,80 @@ export const FuelCallHandlerConfig = {
|
|
7123
7149
|
},
|
7124
7150
|
};
|
7125
7151
|
|
7152
|
+
function createBaseFuelTransactionHandlerConfig(): FuelTransactionHandlerConfig {
|
7153
|
+
return { handlerId: 0, handlerName: "" };
|
7154
|
+
}
|
7155
|
+
|
7156
|
+
export const FuelTransactionHandlerConfig = {
|
7157
|
+
encode(message: FuelTransactionHandlerConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
7158
|
+
if (message.handlerId !== 0) {
|
7159
|
+
writer.uint32(8).int32(message.handlerId);
|
7160
|
+
}
|
7161
|
+
if (message.handlerName !== "") {
|
7162
|
+
writer.uint32(18).string(message.handlerName);
|
7163
|
+
}
|
7164
|
+
return writer;
|
7165
|
+
},
|
7166
|
+
|
7167
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): FuelTransactionHandlerConfig {
|
7168
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
7169
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
7170
|
+
const message = createBaseFuelTransactionHandlerConfig();
|
7171
|
+
while (reader.pos < end) {
|
7172
|
+
const tag = reader.uint32();
|
7173
|
+
switch (tag >>> 3) {
|
7174
|
+
case 1:
|
7175
|
+
if (tag !== 8) {
|
7176
|
+
break;
|
7177
|
+
}
|
7178
|
+
|
7179
|
+
message.handlerId = reader.int32();
|
7180
|
+
continue;
|
7181
|
+
case 2:
|
7182
|
+
if (tag !== 18) {
|
7183
|
+
break;
|
7184
|
+
}
|
7185
|
+
|
7186
|
+
message.handlerName = reader.string();
|
7187
|
+
continue;
|
7188
|
+
}
|
7189
|
+
if ((tag & 7) === 4 || tag === 0) {
|
7190
|
+
break;
|
7191
|
+
}
|
7192
|
+
reader.skipType(tag & 7);
|
7193
|
+
}
|
7194
|
+
return message;
|
7195
|
+
},
|
7196
|
+
|
7197
|
+
fromJSON(object: any): FuelTransactionHandlerConfig {
|
7198
|
+
return {
|
7199
|
+
handlerId: isSet(object.handlerId) ? globalThis.Number(object.handlerId) : 0,
|
7200
|
+
handlerName: isSet(object.handlerName) ? globalThis.String(object.handlerName) : "",
|
7201
|
+
};
|
7202
|
+
},
|
7203
|
+
|
7204
|
+
toJSON(message: FuelTransactionHandlerConfig): unknown {
|
7205
|
+
const obj: any = {};
|
7206
|
+
if (message.handlerId !== 0) {
|
7207
|
+
obj.handlerId = Math.round(message.handlerId);
|
7208
|
+
}
|
7209
|
+
if (message.handlerName !== "") {
|
7210
|
+
obj.handlerName = message.handlerName;
|
7211
|
+
}
|
7212
|
+
return obj;
|
7213
|
+
},
|
7214
|
+
|
7215
|
+
create(base?: DeepPartial<FuelTransactionHandlerConfig>): FuelTransactionHandlerConfig {
|
7216
|
+
return FuelTransactionHandlerConfig.fromPartial(base ?? {});
|
7217
|
+
},
|
7218
|
+
fromPartial(object: DeepPartial<FuelTransactionHandlerConfig>): FuelTransactionHandlerConfig {
|
7219
|
+
const message = createBaseFuelTransactionHandlerConfig();
|
7220
|
+
message.handlerId = object.handlerId ?? 0;
|
7221
|
+
message.handlerName = object.handlerName ?? "";
|
7222
|
+
return message;
|
7223
|
+
},
|
7224
|
+
};
|
7225
|
+
|
7126
7226
|
function createBaseTopic(): Topic {
|
7127
7227
|
return { hashes: [] };
|
7128
7228
|
}
|