@sentio/runtime 2.44.5 → 2.44.6

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.d.ts CHANGED
@@ -41,12 +41,7 @@ declare abstract class Plugin {
41
41
  name: string;
42
42
  supportedHandlers: HandlerType[];
43
43
  configure(config: ProcessConfigResponse): Promise<void>;
44
- start(start: StartRequest, actionServerPort?: number): Promise<void>;
45
- /**
46
- * method used by action server only
47
- * @param port
48
- */
49
- startServer(port?: number): Promise<void>;
44
+ start(start: StartRequest): Promise<void>;
50
45
  /**
51
46
  * @deprecated The method should not be used, use ctx.states instead
52
47
  */
@@ -55,6 +50,15 @@ declare abstract class Plugin {
55
50
  preprocessBinding(request: DataBinding, preprocessStore: {
56
51
  [k: string]: any;
57
52
  }): Promise<PreprocessResult>;
53
+ /**
54
+ * method used by action server only
55
+ * @param port
56
+ */
57
+ startServer(port?: number): Promise<void>;
58
+ /**
59
+ * method used by action server only
60
+ */
61
+ shutdownServer(): void;
58
62
  }
59
63
  declare class PluginManager {
60
64
  static INSTANCE: PluginManager;
@@ -65,6 +69,7 @@ declare class PluginManager {
65
69
  configure(config: ProcessConfigResponse): Promise<void[]>;
66
70
  start(start: StartRequest, actionServerPort?: number): Promise<void[]>;
67
71
  startServer(port?: number): Promise<void[]>;
72
+ shutdown(): void;
68
73
  /**
69
74
  * @deprecated The method should not be used, use ctx.states instead
70
75
  */
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-MHFCQFYK.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};
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-LC6Z2ZSV.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