@sentio/runtime 2.45.3 → 2.46.0-rc.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/lib/{chunk-AC2PYREJ.js → chunk-5EBST54H.js} +11 -11
- package/lib/{chunk-AC2PYREJ.js.map → chunk-5EBST54H.js.map} +1 -1
- package/lib/index.js +1 -1
- package/lib/processor-runner.js +1 -1
- package/package.json +1 -1
- package/src/gen/processor/protos/processor.ts +25 -0
- package/src/gen/service/common/protos/common.ts +243 -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 A,W as N,X as C,Y as V,Z as w,_ as O,aa as I,ba as M,ca as b,g as u,j as T,k as m,n as h,o as l,p as f,q as x,r as d,z as c}from"./chunk-
|
2
|
+
import{$ as A,W as N,X as C,Y as V,Z as w,_ as O,aa as I,ba as M,ca as b,g as u,j as T,k as m,n as h,o as l,p as f,q as x,r as d,z as c}from"./chunk-5EBST54H.js";var s=class{stateMap=new Map;static reset(){s.INSTANCE=new s}},r=s;u(r,"INSTANCE",new s);var i=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}},g=class extends i{initValue(){return new Map}getValue(t){return this.getOrRegister().get(t)}getValues(){let t=this.getOrRegister();return Array.from(t.values())}getOrSetValue(t,n){let o=this.getOrRegister(),a=o.get(t);return a?(console.warn(t,"has been registered twice, use the previous one"),a):(o.set(t,n),n)}},p=class extends i{initValue(){return[]}getValues(){return this.getOrRegister()}addValue(t){return this.getOrRegister().push(t),t}};import("process").then(e=>e.stdout.write(""));import("process").then(e=>e.stdout.write(""));import("process").then(e=>e.stdout.write(""));export{A as DummyProvider,d as Endpoints,c as GLOBAL_CONFIG,p as ListStateStorage,g as MapStateStorage,T as Plugin,m as PluginManager,b as ProcessorServiceImpl,M as QueuedStaticJsonRpcProvider,r as State,i as StateStorage,O as StoreContext,f as USER_PROCESSOR,N as dbMetrics,l as errorString,I as getProvider,x as makeEthCallKey,h as mergeProcessResults,V as processMetrics,C as providerMetrics,w 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 at,B as aE,C as Jr,D as sE,E as uE,F as Et,G as J,H as lE,I as Ft,J as Gi,K as _t,L as cE,M as St,N as fE,O as pE,P as He,Q as g,R as ki,S as st,T as X,U as Re,V as b,a as L,b as m,c as h,ca as dE,d as it,e as Ke,f as Y,h as LU,i as tE,k as Pl,l as rE,m as nE,r as yr,s as bl,t as IU,u as io,v as oE,w as iE,x as CU,y as wU,z as Ml}from"./chunk-
|
3
|
+
import{A as at,B as aE,C as Jr,D as sE,E as uE,F as Et,G as J,H as lE,I as Ft,J as Gi,K as _t,L as cE,M as St,N as fE,O as pE,P as He,Q as g,R as ki,S as st,T as X,U as Re,V as b,a as L,b as m,c as h,ca as dE,d as it,e as Ke,f as Y,h as LU,i as tE,k as Pl,l as rE,m as nE,r as yr,s as bl,t as IU,u as io,v as oE,w as iE,x as CU,y as wU,z as Ml}from"./chunk-5EBST54H.js";var Ee=h(xl=>{"use strict";xl.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})};xl.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((x7,EE)=>{var Yt=L("constants"),UU=process.cwd,Hi=null,DU=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Hi||(Hi=UU.call(process)),Hi};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Ll=process.chdir,process.chdir=function(t){Hi=null,Ll.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Ll));var Ll;EE.exports=VU;function VU(t){Yt.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(){}),DU==="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,Yt.O_WRONLY|Yt.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,Yt.O_WRONLY|Yt.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){Yt.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(p,_,f,S){c.open(p,Yt.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,Yt.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((L7,hE)=>{var SE=L("stream").Stream;hE.exports=BU;function BU(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((I7,vE)=>{"use strict";vE.exports=kU;var GU=Object.getPrototypeOf||function(t){return t.__proto__};function kU(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:GU(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var Zr=h((C7,wl)=>{var ie=L("fs"),HU=_E(),FU=TE(),YU=mE(),Fi=L("util"),ve,qi;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ve=Symbol.for("graceful-fs.queue"),qi=Symbol.for("graceful-fs.previous")):(ve="___graceful-fs.queue",qi="___graceful-fs.previous");function qU(){}function OE(t,e){Object.defineProperty(t,ve,{get:function(){return e}})}var Ar=qU;Fi.debuglog?Ar=Fi.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Ar=function(){var t=Fi.format.apply(Fi,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,qi,{value:t}),e}(ie.close),ie.closeSync=function(t){function e(n){t.apply(ie,arguments),AE()}return Object.defineProperty(e,qi,{value:t}),e}(ie.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Ar(ie[ve]),L("assert").equal(ie[ve].length,0)}));var yE;global[ve]||OE(global,ie[ve]);wl.exports=Il(YU(ie));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ie.__patched&&(wl.exports=Il(ie),ie.__patched=!0);function Il(t){HU(t),t.gracefulify=Il,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")?Qr([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")?Qr([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")?Qr([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")?Qr([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")?Qr([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 _=FU(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,b7){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Qr([z,[ne,oe,se,Z],re,Te||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}return t}function Qr(t){Ar("ENQUEUE",t[0].name,t[1]),ie[ve].push(t),Cl()}var Yi;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);Cl()}function Cl(){if(clearTimeout(Yi),Yi=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)Ar("RETRY",e.name,n),e.apply(null,n);else if(Date.now()-a>=6e4){Ar("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?(Ar("RETRY",e.name,n),e.apply(null,n.concat([a]))):ie[ve].push(t)}Yi===void 0&&(Yi=setTimeout(Cl,0))}}});var Le=h(Ct=>{"use strict";var gE=Ee().fromCallback,xe=Zr(),jU=["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(Ct,xe);jU.forEach(t=>{Ct[t]=gE(xe[t])});Ct.exists=function(t,e){return typeof e=="function"?xe.exists(t,e):new Promise(n=>xe.exists(t,n))};Ct.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})})})};Ct.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})})})};Ct.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})})})};Ct.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"?Ct.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((U7,NE)=>{"use strict";var $U=L("path");NE.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace($U.parse(e).root,""))){let i=new Error(`Path contains invalid characters: ${e}`);throw i.code="EINVAL",i}}});var xE=h((D7,Ul)=>{"use strict";var PE=Le(),{checkPath:bE}=RE(),ME=t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode};Ul.exports.makeDir=async(t,e)=>(bE(t),PE.mkdir(t,{mode:ME(e),recursive:!0}));Ul.exports.makeDirSync=(t,e)=>(bE(t),PE.mkdirSync(t,{mode:ME(e),recursive:!0}))});var ut=h((V7,LE)=>{"use strict";var KU=Ee().fromPromise,{makeDir:WU,makeDirSync:Dl}=xE(),Vl=KU(WU);LE.exports={mkdirs:Vl,mkdirsSync:Dl,mkdirp:Vl,mkdirpSync:Dl,ensureDir:Vl,ensureDirSync:Dl}});var qt=h((B7,CE)=>{"use strict";var zU=Ee().fromPromise,IE=Le();function XU(t){return IE.access(t).then(()=>!0).catch(()=>!1)}CE.exports={pathExists:zU(XU),pathExistsSync:IE.existsSync}});var Bl=h((G7,wE)=>{"use strict";var en=Le(),JU=Ee().fromPromise;async function QU(t,e,n){let i=await en.open(t,"r+"),a=null;try{await en.futimes(i,e,n)}finally{try{await en.close(i)}catch(s){a=s}}if(a)throw a}function ZU(t,e,n){let i=en.openSync(t,"r+");return en.futimesSync(i,e,n),en.closeSync(i)}wE.exports={utimesMillis:JU(QU),utimesMillisSync:ZU}});var Or=h((k7,BE)=>{"use strict";var tn=Le(),_e=L("path"),UE=Ee().fromPromise;function eD(t,e,n){let i=n.dereference?a=>tn.stat(a,{bigint:!0}):a=>tn.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 tD(t,e,n){let i,a=n.dereference?o=>tn.statSync(o,{bigint:!0}):o=>tn.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 rD(t,e,n,i){let{srcStat:a,destStat:s}=await eD(t,e,i);if(s){if(ao(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()&&Gl(t,e))throw new Error(ji(t,e,n));return{srcStat:a,destStat:s}}function nD(t,e,n,i){let{srcStat:a,destStat:s}=tD(t,e,i);if(s){if(ao(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()&&Gl(t,e))throw new Error(ji(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 tn.stat(s,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(ao(e,o))throw new Error(ji(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=tn.statSync(s,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(ao(e,o))throw new Error(ji(t,n,i));return VE(t,e,s,i)}function ao(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}function Gl(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 ji(t,e,n){return`Cannot ${n} '${t}' to a subdirectory of itself, '${e}'.`}BE.exports={checkPaths:UE(rD),checkPathsSync:nD,checkParentPaths:UE(DE),checkParentPathsSync:VE,isSrcSubdir:Gl,areIdentical:ao}});var YE=h((H7,FE)=>{"use strict";var Pe=Le(),so=L("path"),{mkdirs:oD}=ut(),{pathExists:iD}=qt(),{utimesMillis:aD}=Bl(),uo=Or();async function sD(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 uo.checkPaths(t,e,"copy",n);if(await uo.checkParentPaths(t,i,e,"copy"),!await kE(t,e,n))return;let o=so.dirname(e);await iD(o)||await oD(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 fD(s,t,e,n,i);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return uD(s,t,e,n,i);if(s.isSymbolicLink())return pD(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 uD(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){lD(t.mode)&&await cD(n,t.mode);let a=await Pe.stat(e);await aD(n,a.atime,a.mtime)}return Pe.chmod(n,t.mode)}function lD(t){return(t&128)===0}function cD(t,e){return Pe.chmod(t,e|128)}async function fD(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=so.join(n,o),u=so.join(i,o);if(!await kE(r,u,a))return;let{destStat:c}=await uo.checkPaths(r,u,"copy",a);return HE(c,r,u,a)})),e||await Pe.chmod(i,t.mode)}async function pD(t,e,n,i){let a=await Pe.readlink(e);if(i.dereference&&(a=so.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=so.resolve(process.cwd(),s)),uo.isSrcSubdir(a,s))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${s}'.`);if(uo.isSrcSubdir(s,a))throw new Error(`Cannot overwrite '${s}' with '${a}'.`);return await Pe.unlink(n),Pe.symlink(a,n)}FE.exports=sD});var WE=h((F7,KE)=>{"use strict";var Ie=Zr(),lo=L("path"),dD=ut().mkdirsSync,ED=Bl().utimesMillisSync,co=Or();function _D(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
@@ -120,6 +120,7 @@ export enum MoveOwnerType {
|
|
120
120
|
ADDRESS = 0,
|
121
121
|
OBJECT = 1,
|
122
122
|
WRAPPED_OBJECT = 2,
|
123
|
+
TYPE = 3,
|
123
124
|
UNRECOGNIZED = -1,
|
124
125
|
}
|
125
126
|
|
@@ -134,6 +135,9 @@ export function moveOwnerTypeFromJSON(object: any): MoveOwnerType {
|
|
134
135
|
case 2:
|
135
136
|
case "WRAPPED_OBJECT":
|
136
137
|
return MoveOwnerType.WRAPPED_OBJECT;
|
138
|
+
case 3:
|
139
|
+
case "TYPE":
|
140
|
+
return MoveOwnerType.TYPE;
|
137
141
|
case -1:
|
138
142
|
case "UNRECOGNIZED":
|
139
143
|
default:
|
@@ -149,6 +153,8 @@ export function moveOwnerTypeToJSON(object: MoveOwnerType): string {
|
|
149
153
|
return "OBJECT";
|
150
154
|
case MoveOwnerType.WRAPPED_OBJECT:
|
151
155
|
return "WRAPPED_OBJECT";
|
156
|
+
case MoveOwnerType.TYPE:
|
157
|
+
return "TYPE";
|
152
158
|
case MoveOwnerType.UNRECOGNIZED:
|
153
159
|
default:
|
154
160
|
return "UNRECOGNIZED";
|
@@ -708,6 +714,7 @@ export interface MoveFetchConfig {
|
|
708
714
|
inputs: boolean;
|
709
715
|
resourceConfig?: ResourceConfig | undefined;
|
710
716
|
supportMultisigFunc?: boolean | undefined;
|
717
|
+
includeFailedTransaction?: boolean | undefined;
|
711
718
|
}
|
712
719
|
|
713
720
|
export interface MoveAccountFetchConfig {
|
@@ -4929,6 +4936,7 @@ function createBaseMoveFetchConfig(): MoveFetchConfig {
|
|
4929
4936
|
inputs: false,
|
4930
4937
|
resourceConfig: undefined,
|
4931
4938
|
supportMultisigFunc: undefined,
|
4939
|
+
includeFailedTransaction: undefined,
|
4932
4940
|
};
|
4933
4941
|
}
|
4934
4942
|
|
@@ -4949,6 +4957,9 @@ export const MoveFetchConfig = {
|
|
4949
4957
|
if (message.supportMultisigFunc !== undefined) {
|
4950
4958
|
writer.uint32(40).bool(message.supportMultisigFunc);
|
4951
4959
|
}
|
4960
|
+
if (message.includeFailedTransaction !== undefined) {
|
4961
|
+
writer.uint32(48).bool(message.includeFailedTransaction);
|
4962
|
+
}
|
4952
4963
|
return writer;
|
4953
4964
|
},
|
4954
4965
|
|
@@ -4994,6 +5005,13 @@ export const MoveFetchConfig = {
|
|
4994
5005
|
|
4995
5006
|
message.supportMultisigFunc = reader.bool();
|
4996
5007
|
continue;
|
5008
|
+
case 6:
|
5009
|
+
if (tag !== 48) {
|
5010
|
+
break;
|
5011
|
+
}
|
5012
|
+
|
5013
|
+
message.includeFailedTransaction = reader.bool();
|
5014
|
+
continue;
|
4997
5015
|
}
|
4998
5016
|
if ((tag & 7) === 4 || tag === 0) {
|
4999
5017
|
break;
|
@@ -5012,6 +5030,9 @@ export const MoveFetchConfig = {
|
|
5012
5030
|
supportMultisigFunc: isSet(object.supportMultisigFunc)
|
5013
5031
|
? globalThis.Boolean(object.supportMultisigFunc)
|
5014
5032
|
: undefined,
|
5033
|
+
includeFailedTransaction: isSet(object.includeFailedTransaction)
|
5034
|
+
? globalThis.Boolean(object.includeFailedTransaction)
|
5035
|
+
: undefined,
|
5015
5036
|
};
|
5016
5037
|
},
|
5017
5038
|
|
@@ -5032,6 +5053,9 @@ export const MoveFetchConfig = {
|
|
5032
5053
|
if (message.supportMultisigFunc !== undefined) {
|
5033
5054
|
obj.supportMultisigFunc = message.supportMultisigFunc;
|
5034
5055
|
}
|
5056
|
+
if (message.includeFailedTransaction !== undefined) {
|
5057
|
+
obj.includeFailedTransaction = message.includeFailedTransaction;
|
5058
|
+
}
|
5035
5059
|
return obj;
|
5036
5060
|
},
|
5037
5061
|
|
@@ -5047,6 +5071,7 @@ export const MoveFetchConfig = {
|
|
5047
5071
|
? ResourceConfig.fromPartial(object.resourceConfig)
|
5048
5072
|
: undefined;
|
5049
5073
|
message.supportMultisigFunc = object.supportMultisigFunc ?? undefined;
|
5074
|
+
message.includeFailedTransaction = object.includeFailedTransaction ?? undefined;
|
5050
5075
|
return message;
|
5051
5076
|
},
|
5052
5077
|
};
|
@@ -418,6 +418,7 @@ export function project_VisibilityToJSON(object: Project_Visibility): string {
|
|
418
418
|
export enum Project_Type {
|
419
419
|
SENTIO = 0,
|
420
420
|
SUBGRAPH = 1,
|
421
|
+
ACTION = 2,
|
421
422
|
UNRECOGNIZED = -1,
|
422
423
|
}
|
423
424
|
|
@@ -429,6 +430,9 @@ export function project_TypeFromJSON(object: any): Project_Type {
|
|
429
430
|
case 1:
|
430
431
|
case "SUBGRAPH":
|
431
432
|
return Project_Type.SUBGRAPH;
|
433
|
+
case 2:
|
434
|
+
case "ACTION":
|
435
|
+
return Project_Type.ACTION;
|
432
436
|
case -1:
|
433
437
|
case "UNRECOGNIZED":
|
434
438
|
default:
|
@@ -442,6 +446,8 @@ export function project_TypeToJSON(object: Project_Type): string {
|
|
442
446
|
return "SENTIO";
|
443
447
|
case Project_Type.SUBGRAPH:
|
444
448
|
return "SUBGRAPH";
|
449
|
+
case Project_Type.ACTION:
|
450
|
+
return "ACTION";
|
445
451
|
case Project_Type.UNRECOGNIZED:
|
446
452
|
default:
|
447
453
|
return "UNRECOGNIZED";
|
@@ -545,6 +551,7 @@ export interface ApiKey {
|
|
545
551
|
updatedAt: bigint;
|
546
552
|
expiresAt: bigint;
|
547
553
|
source: string;
|
554
|
+
ownerType: string;
|
548
555
|
}
|
549
556
|
|
550
557
|
export interface TimeRangeLite {
|
@@ -1392,6 +1399,18 @@ export interface UserUsage {
|
|
1392
1399
|
tier: Tier;
|
1393
1400
|
projects: number;
|
1394
1401
|
alerts: number;
|
1402
|
+
usageByProjects: { [key: string]: UserUsage_ProjectUsage };
|
1403
|
+
}
|
1404
|
+
|
1405
|
+
export interface UserUsage_ProjectUsage {
|
1406
|
+
owner: string;
|
1407
|
+
slug: string;
|
1408
|
+
cost: bigint;
|
1409
|
+
}
|
1410
|
+
|
1411
|
+
export interface UserUsage_UsageByProjectsEntry {
|
1412
|
+
key: string;
|
1413
|
+
value: UserUsage_ProjectUsage | undefined;
|
1395
1414
|
}
|
1396
1415
|
|
1397
1416
|
export interface CoinID {
|
@@ -4468,6 +4487,7 @@ function createBaseApiKey(): ApiKey {
|
|
4468
4487
|
updatedAt: BigInt("0"),
|
4469
4488
|
expiresAt: BigInt("0"),
|
4470
4489
|
source: "",
|
4490
|
+
ownerType: "",
|
4471
4491
|
};
|
4472
4492
|
}
|
4473
4493
|
|
@@ -4506,6 +4526,9 @@ export const ApiKey = {
|
|
4506
4526
|
if (message.source !== "") {
|
4507
4527
|
writer.uint32(74).string(message.source);
|
4508
4528
|
}
|
4529
|
+
if (message.ownerType !== "") {
|
4530
|
+
writer.uint32(82).string(message.ownerType);
|
4531
|
+
}
|
4509
4532
|
return writer;
|
4510
4533
|
},
|
4511
4534
|
|
@@ -4572,6 +4595,13 @@ export const ApiKey = {
|
|
4572
4595
|
|
4573
4596
|
message.source = reader.string();
|
4574
4597
|
continue;
|
4598
|
+
case 10:
|
4599
|
+
if (tag !== 82) {
|
4600
|
+
break;
|
4601
|
+
}
|
4602
|
+
|
4603
|
+
message.ownerType = reader.string();
|
4604
|
+
continue;
|
4575
4605
|
}
|
4576
4606
|
if ((tag & 7) === 4 || tag === 0) {
|
4577
4607
|
break;
|
@@ -4591,6 +4621,7 @@ export const ApiKey = {
|
|
4591
4621
|
updatedAt: isSet(object.updatedAt) ? BigInt(object.updatedAt) : BigInt("0"),
|
4592
4622
|
expiresAt: isSet(object.expiresAt) ? BigInt(object.expiresAt) : BigInt("0"),
|
4593
4623
|
source: isSet(object.source) ? globalThis.String(object.source) : "",
|
4624
|
+
ownerType: isSet(object.ownerType) ? globalThis.String(object.ownerType) : "",
|
4594
4625
|
};
|
4595
4626
|
},
|
4596
4627
|
|
@@ -4620,6 +4651,9 @@ export const ApiKey = {
|
|
4620
4651
|
if (message.source !== "") {
|
4621
4652
|
obj.source = message.source;
|
4622
4653
|
}
|
4654
|
+
if (message.ownerType !== "") {
|
4655
|
+
obj.ownerType = message.ownerType;
|
4656
|
+
}
|
4623
4657
|
return obj;
|
4624
4658
|
},
|
4625
4659
|
|
@@ -4636,6 +4670,7 @@ export const ApiKey = {
|
|
4636
4670
|
message.updatedAt = object.updatedAt ?? BigInt("0");
|
4637
4671
|
message.expiresAt = object.expiresAt ?? BigInt("0");
|
4638
4672
|
message.source = object.source ?? "";
|
4673
|
+
message.ownerType = object.ownerType ?? "";
|
4639
4674
|
return message;
|
4640
4675
|
},
|
4641
4676
|
};
|
@@ -9053,7 +9088,7 @@ export const DashboardSharingRequest = {
|
|
9053
9088
|
};
|
9054
9089
|
|
9055
9090
|
function createBaseUserUsage(): UserUsage {
|
9056
|
-
return { tier: 0, projects: 0, alerts: 0 };
|
9091
|
+
return { tier: 0, projects: 0, alerts: 0, usageByProjects: {} };
|
9057
9092
|
}
|
9058
9093
|
|
9059
9094
|
export const UserUsage = {
|
@@ -9067,6 +9102,9 @@ export const UserUsage = {
|
|
9067
9102
|
if (message.alerts !== 0) {
|
9068
9103
|
writer.uint32(24).int32(message.alerts);
|
9069
9104
|
}
|
9105
|
+
Object.entries(message.usageByProjects).forEach(([key, value]) => {
|
9106
|
+
UserUsage_UsageByProjectsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim();
|
9107
|
+
});
|
9070
9108
|
return writer;
|
9071
9109
|
},
|
9072
9110
|
|
@@ -9098,6 +9136,16 @@ export const UserUsage = {
|
|
9098
9136
|
|
9099
9137
|
message.alerts = reader.int32();
|
9100
9138
|
continue;
|
9139
|
+
case 4:
|
9140
|
+
if (tag !== 34) {
|
9141
|
+
break;
|
9142
|
+
}
|
9143
|
+
|
9144
|
+
const entry4 = UserUsage_UsageByProjectsEntry.decode(reader, reader.uint32());
|
9145
|
+
if (entry4.value !== undefined) {
|
9146
|
+
message.usageByProjects[entry4.key] = entry4.value;
|
9147
|
+
}
|
9148
|
+
continue;
|
9101
9149
|
}
|
9102
9150
|
if ((tag & 7) === 4 || tag === 0) {
|
9103
9151
|
break;
|
@@ -9112,6 +9160,15 @@ export const UserUsage = {
|
|
9112
9160
|
tier: isSet(object.tier) ? tierFromJSON(object.tier) : 0,
|
9113
9161
|
projects: isSet(object.projects) ? globalThis.Number(object.projects) : 0,
|
9114
9162
|
alerts: isSet(object.alerts) ? globalThis.Number(object.alerts) : 0,
|
9163
|
+
usageByProjects: isObject(object.usageByProjects)
|
9164
|
+
? Object.entries(object.usageByProjects).reduce<{ [key: string]: UserUsage_ProjectUsage }>(
|
9165
|
+
(acc, [key, value]) => {
|
9166
|
+
acc[key] = UserUsage_ProjectUsage.fromJSON(value);
|
9167
|
+
return acc;
|
9168
|
+
},
|
9169
|
+
{},
|
9170
|
+
)
|
9171
|
+
: {},
|
9115
9172
|
};
|
9116
9173
|
},
|
9117
9174
|
|
@@ -9126,6 +9183,15 @@ export const UserUsage = {
|
|
9126
9183
|
if (message.alerts !== 0) {
|
9127
9184
|
obj.alerts = Math.round(message.alerts);
|
9128
9185
|
}
|
9186
|
+
if (message.usageByProjects) {
|
9187
|
+
const entries = Object.entries(message.usageByProjects);
|
9188
|
+
if (entries.length > 0) {
|
9189
|
+
obj.usageByProjects = {};
|
9190
|
+
entries.forEach(([k, v]) => {
|
9191
|
+
obj.usageByProjects[k] = UserUsage_ProjectUsage.toJSON(v);
|
9192
|
+
});
|
9193
|
+
}
|
9194
|
+
}
|
9129
9195
|
return obj;
|
9130
9196
|
},
|
9131
9197
|
|
@@ -9137,6 +9203,182 @@ export const UserUsage = {
|
|
9137
9203
|
message.tier = object.tier ?? 0;
|
9138
9204
|
message.projects = object.projects ?? 0;
|
9139
9205
|
message.alerts = object.alerts ?? 0;
|
9206
|
+
message.usageByProjects = Object.entries(object.usageByProjects ?? {}).reduce<
|
9207
|
+
{ [key: string]: UserUsage_ProjectUsage }
|
9208
|
+
>((acc, [key, value]) => {
|
9209
|
+
if (value !== undefined) {
|
9210
|
+
acc[key] = UserUsage_ProjectUsage.fromPartial(value);
|
9211
|
+
}
|
9212
|
+
return acc;
|
9213
|
+
}, {});
|
9214
|
+
return message;
|
9215
|
+
},
|
9216
|
+
};
|
9217
|
+
|
9218
|
+
function createBaseUserUsage_ProjectUsage(): UserUsage_ProjectUsage {
|
9219
|
+
return { owner: "", slug: "", cost: BigInt("0") };
|
9220
|
+
}
|
9221
|
+
|
9222
|
+
export const UserUsage_ProjectUsage = {
|
9223
|
+
encode(message: UserUsage_ProjectUsage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
9224
|
+
if (message.owner !== "") {
|
9225
|
+
writer.uint32(10).string(message.owner);
|
9226
|
+
}
|
9227
|
+
if (message.slug !== "") {
|
9228
|
+
writer.uint32(18).string(message.slug);
|
9229
|
+
}
|
9230
|
+
if (message.cost !== BigInt("0")) {
|
9231
|
+
if (BigInt.asUintN(64, message.cost) !== message.cost) {
|
9232
|
+
throw new globalThis.Error("value provided for field message.cost of type uint64 too large");
|
9233
|
+
}
|
9234
|
+
writer.uint32(24).uint64(message.cost.toString());
|
9235
|
+
}
|
9236
|
+
return writer;
|
9237
|
+
},
|
9238
|
+
|
9239
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UserUsage_ProjectUsage {
|
9240
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
9241
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
9242
|
+
const message = createBaseUserUsage_ProjectUsage();
|
9243
|
+
while (reader.pos < end) {
|
9244
|
+
const tag = reader.uint32();
|
9245
|
+
switch (tag >>> 3) {
|
9246
|
+
case 1:
|
9247
|
+
if (tag !== 10) {
|
9248
|
+
break;
|
9249
|
+
}
|
9250
|
+
|
9251
|
+
message.owner = reader.string();
|
9252
|
+
continue;
|
9253
|
+
case 2:
|
9254
|
+
if (tag !== 18) {
|
9255
|
+
break;
|
9256
|
+
}
|
9257
|
+
|
9258
|
+
message.slug = reader.string();
|
9259
|
+
continue;
|
9260
|
+
case 3:
|
9261
|
+
if (tag !== 24) {
|
9262
|
+
break;
|
9263
|
+
}
|
9264
|
+
|
9265
|
+
message.cost = longToBigint(reader.uint64() as Long);
|
9266
|
+
continue;
|
9267
|
+
}
|
9268
|
+
if ((tag & 7) === 4 || tag === 0) {
|
9269
|
+
break;
|
9270
|
+
}
|
9271
|
+
reader.skipType(tag & 7);
|
9272
|
+
}
|
9273
|
+
return message;
|
9274
|
+
},
|
9275
|
+
|
9276
|
+
fromJSON(object: any): UserUsage_ProjectUsage {
|
9277
|
+
return {
|
9278
|
+
owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
|
9279
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
|
9280
|
+
cost: isSet(object.cost) ? BigInt(object.cost) : BigInt("0"),
|
9281
|
+
};
|
9282
|
+
},
|
9283
|
+
|
9284
|
+
toJSON(message: UserUsage_ProjectUsage): unknown {
|
9285
|
+
const obj: any = {};
|
9286
|
+
if (message.owner !== "") {
|
9287
|
+
obj.owner = message.owner;
|
9288
|
+
}
|
9289
|
+
if (message.slug !== "") {
|
9290
|
+
obj.slug = message.slug;
|
9291
|
+
}
|
9292
|
+
if (message.cost !== BigInt("0")) {
|
9293
|
+
obj.cost = message.cost.toString();
|
9294
|
+
}
|
9295
|
+
return obj;
|
9296
|
+
},
|
9297
|
+
|
9298
|
+
create(base?: DeepPartial<UserUsage_ProjectUsage>): UserUsage_ProjectUsage {
|
9299
|
+
return UserUsage_ProjectUsage.fromPartial(base ?? {});
|
9300
|
+
},
|
9301
|
+
fromPartial(object: DeepPartial<UserUsage_ProjectUsage>): UserUsage_ProjectUsage {
|
9302
|
+
const message = createBaseUserUsage_ProjectUsage();
|
9303
|
+
message.owner = object.owner ?? "";
|
9304
|
+
message.slug = object.slug ?? "";
|
9305
|
+
message.cost = object.cost ?? BigInt("0");
|
9306
|
+
return message;
|
9307
|
+
},
|
9308
|
+
};
|
9309
|
+
|
9310
|
+
function createBaseUserUsage_UsageByProjectsEntry(): UserUsage_UsageByProjectsEntry {
|
9311
|
+
return { key: "", value: undefined };
|
9312
|
+
}
|
9313
|
+
|
9314
|
+
export const UserUsage_UsageByProjectsEntry = {
|
9315
|
+
encode(message: UserUsage_UsageByProjectsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
9316
|
+
if (message.key !== "") {
|
9317
|
+
writer.uint32(10).string(message.key);
|
9318
|
+
}
|
9319
|
+
if (message.value !== undefined) {
|
9320
|
+
UserUsage_ProjectUsage.encode(message.value, writer.uint32(18).fork()).ldelim();
|
9321
|
+
}
|
9322
|
+
return writer;
|
9323
|
+
},
|
9324
|
+
|
9325
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UserUsage_UsageByProjectsEntry {
|
9326
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
9327
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
9328
|
+
const message = createBaseUserUsage_UsageByProjectsEntry();
|
9329
|
+
while (reader.pos < end) {
|
9330
|
+
const tag = reader.uint32();
|
9331
|
+
switch (tag >>> 3) {
|
9332
|
+
case 1:
|
9333
|
+
if (tag !== 10) {
|
9334
|
+
break;
|
9335
|
+
}
|
9336
|
+
|
9337
|
+
message.key = reader.string();
|
9338
|
+
continue;
|
9339
|
+
case 2:
|
9340
|
+
if (tag !== 18) {
|
9341
|
+
break;
|
9342
|
+
}
|
9343
|
+
|
9344
|
+
message.value = UserUsage_ProjectUsage.decode(reader, reader.uint32());
|
9345
|
+
continue;
|
9346
|
+
}
|
9347
|
+
if ((tag & 7) === 4 || tag === 0) {
|
9348
|
+
break;
|
9349
|
+
}
|
9350
|
+
reader.skipType(tag & 7);
|
9351
|
+
}
|
9352
|
+
return message;
|
9353
|
+
},
|
9354
|
+
|
9355
|
+
fromJSON(object: any): UserUsage_UsageByProjectsEntry {
|
9356
|
+
return {
|
9357
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
9358
|
+
value: isSet(object.value) ? UserUsage_ProjectUsage.fromJSON(object.value) : undefined,
|
9359
|
+
};
|
9360
|
+
},
|
9361
|
+
|
9362
|
+
toJSON(message: UserUsage_UsageByProjectsEntry): unknown {
|
9363
|
+
const obj: any = {};
|
9364
|
+
if (message.key !== "") {
|
9365
|
+
obj.key = message.key;
|
9366
|
+
}
|
9367
|
+
if (message.value !== undefined) {
|
9368
|
+
obj.value = UserUsage_ProjectUsage.toJSON(message.value);
|
9369
|
+
}
|
9370
|
+
return obj;
|
9371
|
+
},
|
9372
|
+
|
9373
|
+
create(base?: DeepPartial<UserUsage_UsageByProjectsEntry>): UserUsage_UsageByProjectsEntry {
|
9374
|
+
return UserUsage_UsageByProjectsEntry.fromPartial(base ?? {});
|
9375
|
+
},
|
9376
|
+
fromPartial(object: DeepPartial<UserUsage_UsageByProjectsEntry>): UserUsage_UsageByProjectsEntry {
|
9377
|
+
const message = createBaseUserUsage_UsageByProjectsEntry();
|
9378
|
+
message.key = object.key ?? "";
|
9379
|
+
message.value = (object.value !== undefined && object.value !== null)
|
9380
|
+
? UserUsage_ProjectUsage.fromPartial(object.value)
|
9381
|
+
: undefined;
|
9140
9382
|
return message;
|
9141
9383
|
},
|
9142
9384
|
};
|