@sentio/runtime 3.8.0 → 3.8.1-rc3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chunk-HLJD4QOP.js +26266 -0
- package/lib/{chunk-3DTPHRJ2.js.map → chunk-HLJD4QOP.js.map} +1 -1
- package/lib/chunk-I45UXGDM.js +1697 -0
- package/lib/{chunk-TW627LH5.js.map → chunk-I45UXGDM.js.map} +1 -1
- package/lib/chunk-KVSDPGUI.js +50 -0
- package/lib/chunk-L2A6JPIQ.js +21 -0
- package/lib/{chunk-CJDESLYQ.js.map → chunk-L2A6JPIQ.js.map} +1 -1
- package/lib/chunk-XBNTVOAP.js +60359 -0
- package/lib/{chunk-LK4RU6UR.js.map → chunk-XBNTVOAP.js.map} +1 -1
- package/lib/getMachineId-bsd-QYFPRONP.js +41 -0
- package/lib/{getMachineId-bsd-CDSZ2S36.js.map → getMachineId-bsd-QYFPRONP.js.map} +1 -1
- package/lib/getMachineId-darwin-XC67FIUW.js +41 -0
- package/lib/{getMachineId-darwin-LM5BSWCG.js.map → getMachineId-darwin-XC67FIUW.js.map} +1 -1
- package/lib/getMachineId-linux-4G7ZY7LQ.js +33 -0
- package/lib/{getMachineId-linux-UA53ZQFA.js.map → getMachineId-linux-4G7ZY7LQ.js.map} +1 -1
- package/lib/getMachineId-unsupported-5IH5IW7P.js +24 -0
- package/lib/{getMachineId-unsupported-LDR77GGJ.js.map → getMachineId-unsupported-5IH5IW7P.js.map} +1 -1
- package/lib/getMachineId-win-WSA3TUKL.js +43 -0
- package/lib/{getMachineId-win-XULW45X4.js.map → getMachineId-win-WSA3TUKL.js.map} +1 -1
- package/lib/index.js +139 -1
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.js +30732 -73
- package/lib/processor-runner.js.map +1 -1
- package/lib/test-processor.test.js.map +1 -1
- package/package.json +1 -1
- package/src/full-service.ts +11 -0
- package/lib/chunk-3DTPHRJ2.js +0 -26
- package/lib/chunk-AUPVVLD3.js +0 -3
- package/lib/chunk-CJDESLYQ.js +0 -3
- package/lib/chunk-LK4RU6UR.js +0 -117
- package/lib/chunk-TW627LH5.js +0 -3
- package/lib/getMachineId-bsd-CDSZ2S36.js +0 -3
- package/lib/getMachineId-darwin-LM5BSWCG.js +0 -4
- package/lib/getMachineId-linux-UA53ZQFA.js +0 -3
- package/lib/getMachineId-unsupported-LDR77GGJ.js +0 -3
- package/lib/getMachineId-win-XULW45X4.js +0 -3
- /package/lib/{chunk-AUPVVLD3.js.map → chunk-KVSDPGUI.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/test-processor.test.ts"],"sourcesContent":["import { Plugin, PluginManager } from './plugin.js'\nimport { DataBinding, HandlerType, ProcessResult } from './gen/processor/protos/processor.js'\nimport { AccountConfig, InitResponse, ProcessConfigResponse, ProcessStreamResponse_Partitions } from '@sentio/protos'\n\nexport class TestPlugin extends Plugin {\n async processBinding(request: DataBinding): Promise<ProcessResult> {\n const dbContext = PluginManager.INSTANCE.dbContextLocalStorage.getStore()\n if (dbContext) {\n await dbContext.sendRequest({\n get: {\n entity: 'Test',\n id: '1'\n }\n })\n }\n\n return ProcessResult.fromPartial({\n states: {\n configUpdated: true\n }\n })\n }\n supportedHandlers = [HandlerType.UNKNOWN, HandlerType.ETH_LOG]\n\n async partition(request: DataBinding): Promise<ProcessStreamResponse_Partitions> {\n return {\n partitions: request.handlerIds.reduce(\n (acc, id) => ({\n ...acc,\n [id]: {\n userValue: 'test'\n }\n }),\n {}\n )\n }\n }\n\n async init(config: InitResponse): Promise<void> {\n config.chainIds = ['1']\n }\n\n async configure(config: ProcessConfigResponse, forChainId?: string): Promise<void> {\n config.accountConfigs = [\n AccountConfig.fromPartial({\n address: '0x',\n chainId: '1'\n })\n ]\n }\n}\n\nPluginManager.INSTANCE.plugins = []\nPluginManager.INSTANCE.register(new TestPlugin())\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/test-processor.test.ts"],"sourcesContent":["import { Plugin, PluginManager } from './plugin.js'\nimport { DataBinding, HandlerType, ProcessResult } from './gen/processor/protos/processor.js'\nimport { AccountConfig, InitResponse, ProcessConfigResponse, ProcessStreamResponse_Partitions } from '@sentio/protos'\n\nexport class TestPlugin extends Plugin {\n async processBinding(request: DataBinding): Promise<ProcessResult> {\n const dbContext = PluginManager.INSTANCE.dbContextLocalStorage.getStore()\n if (dbContext) {\n await dbContext.sendRequest({\n get: {\n entity: 'Test',\n id: '1'\n }\n })\n }\n\n return ProcessResult.fromPartial({\n states: {\n configUpdated: true\n }\n })\n }\n supportedHandlers = [HandlerType.UNKNOWN, HandlerType.ETH_LOG]\n\n async partition(request: DataBinding): Promise<ProcessStreamResponse_Partitions> {\n return {\n partitions: request.handlerIds.reduce(\n (acc, id) => ({\n ...acc,\n [id]: {\n userValue: 'test'\n }\n }),\n {}\n )\n }\n }\n\n async init(config: InitResponse): Promise<void> {\n config.chainIds = ['1']\n }\n\n async configure(config: ProcessConfigResponse, forChainId?: string): Promise<void> {\n config.accountConfigs = [\n AccountConfig.fromPartial({\n address: '0x',\n chainId: '1'\n })\n ]\n }\n}\n\nPluginManager.INSTANCE.plugins = []\nPluginManager.INSTANCE.register(new TestPlugin())\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";;;;;;;;;;AAIO,IAAM,aAAN,cAAyB,OAAO;AAAA,EACrC,MAAM,eAAe,SAA8C;AACjE,UAAM,YAAY,cAAc,SAAS,sBAAsB,SAAS;AACxE,QAAI,WAAW;AACb,YAAM,UAAU,YAAY;AAAA,QAC1B,KAAK;AAAA,UACH,QAAQ;AAAA,UACR,IAAI;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,cAAc,YAAY;AAAA,MAC/B,QAAQ;AAAA,QACN,eAAe;AAAA,MACjB;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EACA,oBAAoB,iCAAyC;AAAA,EAE7D,MAAM,UAAU,SAAiE;AAC/E,WAAO;AAAA,MACL,YAAY,QAAQ,WAAW;AAAA,QAC7B,CAAC,KAAK,QAAQ;AAAA,UACZ,GAAG;AAAA,UACH,CAAC,EAAE,GAAG;AAAA,YACJ,WAAW;AAAA,UACb;AAAA,QACF;AAAA,QACA,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAM,KAAK,QAAqC;AAC9C,WAAO,WAAW,CAAC,GAAG;AAAA,EACxB;AAAA,EAEA,MAAM,UAAU,QAA+B,YAAoC;AACjF,WAAO,iBAAiB;AAAA,MACtB,cAAc,YAAY;AAAA,QACxB,SAAS;AAAA,QACT,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAEA,cAAc,SAAS,UAAU,CAAC;AAClC,cAAc,SAAS,SAAS,IAAI,WAAW,CAAC;AAC/C,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;","names":[]}
|
package/package.json
CHANGED
package/src/full-service.ts
CHANGED
|
@@ -265,6 +265,17 @@ export class RuntimeServicePatcher {
|
|
|
265
265
|
patchConfig(config: DeepPartial<ProcessConfigResponse>): void {
|
|
266
266
|
config.executionConfig = ExecutionConfig.fromPartial(GLOBAL_CONFIG.execution)
|
|
267
267
|
|
|
268
|
+
// Move resource/object change handlers before the plural `types` field (SDK < 3.4.1)
|
|
269
|
+
// only set the deprecated singular `type`. The latest driver reads `types` only, so
|
|
270
|
+
// back-fill it here. Resource change configs live under both contract and account configs.
|
|
271
|
+
for (const cfg of [...(config.contractConfigs ?? []), ...(config.accountConfigs ?? [])]) {
|
|
272
|
+
for (const rc of cfg.moveResourceChangeConfigs ?? []) {
|
|
273
|
+
if (!rc.types?.length && rc.type) {
|
|
274
|
+
rc.types = [rc.type]
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
268
279
|
if (config.contractConfigs) {
|
|
269
280
|
for (const contract of config.contractConfigs) {
|
|
270
281
|
// for old fuel processor
|