@sentio/runtime 3.2.0 → 3.3.0-rc.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.
Files changed (42) hide show
  1. package/lib/chunk-5M6FVPAW.js +26070 -0
  2. package/lib/chunk-5M6FVPAW.js.map +1 -0
  3. package/lib/chunk-D6CHVWKJ.js +60244 -0
  4. package/lib/{chunk-WQZPRG3V.js.map → chunk-D6CHVWKJ.js.map} +1 -1
  5. package/lib/chunk-I45UXGDM.js +1697 -0
  6. package/lib/{chunk-TW627LH5.js.map → chunk-I45UXGDM.js.map} +1 -1
  7. package/lib/chunk-KVSDPGUI.js +50 -0
  8. package/lib/chunk-L2A6JPIQ.js +21 -0
  9. package/lib/{chunk-CJDESLYQ.js.map → chunk-L2A6JPIQ.js.map} +1 -1
  10. package/lib/getMachineId-bsd-QYFPRONP.js +41 -0
  11. package/lib/{getMachineId-bsd-CDSZ2S36.js.map → getMachineId-bsd-QYFPRONP.js.map} +1 -1
  12. package/lib/getMachineId-darwin-XC67FIUW.js +41 -0
  13. package/lib/{getMachineId-darwin-LM5BSWCG.js.map → getMachineId-darwin-XC67FIUW.js.map} +1 -1
  14. package/lib/getMachineId-linux-4G7ZY7LQ.js +33 -0
  15. package/lib/{getMachineId-linux-UA53ZQFA.js.map → getMachineId-linux-4G7ZY7LQ.js.map} +1 -1
  16. package/lib/getMachineId-unsupported-5IH5IW7P.js +24 -0
  17. package/lib/{getMachineId-unsupported-LDR77GGJ.js.map → getMachineId-unsupported-5IH5IW7P.js.map} +1 -1
  18. package/lib/getMachineId-win-WSA3TUKL.js +43 -0
  19. package/lib/{getMachineId-win-XULW45X4.js.map → getMachineId-win-WSA3TUKL.js.map} +1 -1
  20. package/lib/index.d.ts +2 -2
  21. package/lib/index.js +139 -1
  22. package/lib/index.js.map +1 -1
  23. package/lib/{processor-BUTmbpmJ.d.ts → processor-MLp_j8IT.d.ts} +16 -0
  24. package/lib/processor-runner.js +30646 -73
  25. package/lib/processor-runner.js.map +1 -1
  26. package/lib/test-processor.test.d.ts +1 -1
  27. package/lib/test-processor.test.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/gen/processor/protos/processor.ts +164 -2
  30. package/src/gen/service/common/protos/common.ts +34 -0
  31. package/lib/chunk-AUPVVLD3.js +0 -3
  32. package/lib/chunk-CJDESLYQ.js +0 -3
  33. package/lib/chunk-TW627LH5.js +0 -3
  34. package/lib/chunk-VRBW2KLF.js +0 -26
  35. package/lib/chunk-VRBW2KLF.js.map +0 -1
  36. package/lib/chunk-WQZPRG3V.js +0 -117
  37. package/lib/getMachineId-bsd-CDSZ2S36.js +0 -3
  38. package/lib/getMachineId-darwin-LM5BSWCG.js +0 -4
  39. package/lib/getMachineId-linux-UA53ZQFA.js +0 -3
  40. package/lib/getMachineId-unsupported-LDR77GGJ.js +0 -3
  41. package/lib/getMachineId-win-XULW45X4.js +0 -3
  42. /package/lib/{chunk-AUPVVLD3.js.map → chunk-KVSDPGUI.js.map} +0 -0
@@ -0,0 +1,50 @@
1
+ import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __esm = (fn, res) => function __init() {
15
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
+ };
17
+ var __commonJS = (cb, mod) => function __require2() {
18
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, { get: all[name], enumerable: true });
23
+ };
24
+ var __copyProps = (to, from, except, desc) => {
25
+ if (from && typeof from === "object" || typeof from === "function") {
26
+ for (let key of __getOwnPropNames(from))
27
+ if (!__hasOwnProp.call(to, key) && key !== except)
28
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
+ }
30
+ return to;
31
+ };
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
+ // If the importer is in node compatibility mode or this is not an ESM
34
+ // file that has been converted to a CommonJS file using a Babel-
35
+ // compatible transform (i.e. "__esModule" has not been set), then set
36
+ // "default" to the CommonJS "module.exports" for node compatibility.
37
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
+ mod
39
+ ));
40
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
41
+
42
+ export {
43
+ __require,
44
+ __esm,
45
+ __commonJS,
46
+ __export,
47
+ __toESM,
48
+ __toCommonJS
49
+ };
50
+ //# sourceMappingURL=chunk-KVSDPGUI.js.map
@@ -0,0 +1,21 @@
1
+ import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
+ import {
3
+ __esm
4
+ } from "./chunk-KVSDPGUI.js";
5
+
6
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/execAsync.js
7
+ import * as child_process from "child_process";
8
+ import * as util from "util";
9
+ var execAsync;
10
+ var init_execAsync = __esm({
11
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/execAsync.js"() {
12
+ "use strict";
13
+ execAsync = util.promisify(child_process.exec);
14
+ }
15
+ });
16
+
17
+ export {
18
+ execAsync,
19
+ init_execAsync
20
+ };
21
+ //# sourceMappingURL=chunk-L2A6JPIQ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/execAsync.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as child_process from 'child_process';\nimport * as util from 'util';\n\nexport const execAsync = util.promisify(child_process.exec);\n"],"mappings":";wCAgBA,UAAYA,MAAmB,gBAC/B,UAAYC,MAAU,OAjBtB,IAmBaC,EAnBbC,EAAAC,EAAA,kBAmBaF,EAAiB,YAAwB,MAAI","names":["child_process","util","execAsync","init_execAsync","__esmMin"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/execAsync.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as child_process from 'child_process';\nimport * as util from 'util';\n\nexport const execAsync = util.promisify(child_process.exec);\n"],"mappings":";;;;;;AAgBA,YAAY,mBAAmB;AAC/B,YAAY,UAAU;AAjBtB,IAmBa;AAnBb;;;AAmBO,IAAM,YAAiB,eAAwB,kBAAI;;;","names":[]}
@@ -0,0 +1,41 @@
1
+ import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
+ import {
3
+ execAsync,
4
+ init_execAsync
5
+ } from "./chunk-L2A6JPIQ.js";
6
+ import {
7
+ diag,
8
+ init_esm
9
+ } from "./chunk-I45UXGDM.js";
10
+ import {
11
+ __esm
12
+ } from "./chunk-KVSDPGUI.js";
13
+
14
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js
15
+ import { promises as fs } from "fs";
16
+ async function getMachineId() {
17
+ try {
18
+ const result = await fs.readFile("/etc/hostid", { encoding: "utf8" });
19
+ return result.trim();
20
+ } catch (e) {
21
+ diag.debug(`error reading machine id: ${e}`);
22
+ }
23
+ try {
24
+ const result = await execAsync("kenv -q smbios.system.uuid");
25
+ return result.stdout.trim();
26
+ } catch (e) {
27
+ diag.debug(`error reading machine id: ${e}`);
28
+ }
29
+ return void 0;
30
+ }
31
+ var init_getMachineId_bsd = __esm({
32
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js"() {
33
+ init_execAsync();
34
+ init_esm();
35
+ }
36
+ });
37
+ init_getMachineId_bsd();
38
+ export {
39
+ getMachineId
40
+ };
41
+ //# sourceMappingURL=getMachineId-bsd-QYFPRONP.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-bsd.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n try {\n const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n try {\n const result = await execAsync('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return undefined;\n}\n"],"mappings":";sIAgBA,OAAS,YAAYA,MAAU,KAI/B,eAAsBC,GAAY,CAChC,GAAI,CAEF,OADe,MAAMD,EAAG,SAAS,cAAe,CAAE,SAAU,MAAM,CAAE,GACtD,KAAI,QACX,EAAG,CACVE,EAAK,MAAM,6BAA6B,CAAC,EAAE,EAG7C,GAAI,CAEF,OADe,MAAMC,EAAU,4BAA4B,GAC7C,OAAO,KAAI,QAClB,EAAG,CACVD,EAAK,MAAM,6BAA6B,CAAC,EAAE,EAI/C,CApCA,IAAAE,EAAAC,EAAA,KAiBAC,IACAC","names":["fs","getMachineId","diag","execAsync","init_getMachineId_bsd","__esmMin","init_execAsync","init_esm"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-bsd.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n try {\n const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n try {\n const result = await execAsync('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;AAgBA,SAAS,YAAY,UAAU;AAI/B,eAAsB,eAAY;AAChC,MAAI;AACF,UAAM,SAAS,MAAM,GAAG,SAAS,eAAe,EAAE,UAAU,OAAM,CAAE;AACpE,WAAO,OAAO,KAAI;WACX,GAAG;AACV,SAAK,MAAM,6BAA6B,CAAC,EAAE;;AAG7C,MAAI;AACF,UAAM,SAAS,MAAM,UAAU,4BAA4B;AAC3D,WAAO,OAAO,OAAO,KAAI;WAClB,GAAG;AACV,SAAK,MAAM,6BAA6B,CAAC,EAAE;;AAG7C,SAAO;AACT;AApCA;;AAiBA;AACA;;;","names":[]}
@@ -0,0 +1,41 @@
1
+ import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
+ import {
3
+ execAsync,
4
+ init_execAsync
5
+ } from "./chunk-L2A6JPIQ.js";
6
+ import {
7
+ diag,
8
+ init_esm
9
+ } from "./chunk-I45UXGDM.js";
10
+ import {
11
+ __esm
12
+ } from "./chunk-KVSDPGUI.js";
13
+
14
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js
15
+ async function getMachineId() {
16
+ try {
17
+ const result = await execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"');
18
+ const idLine = result.stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
19
+ if (!idLine) {
20
+ return void 0;
21
+ }
22
+ const parts = idLine.split('" = "');
23
+ if (parts.length === 2) {
24
+ return parts[1].slice(0, -1);
25
+ }
26
+ } catch (e) {
27
+ diag.debug(`error reading machine id: ${e}`);
28
+ }
29
+ return void 0;
30
+ }
31
+ var init_getMachineId_darwin = __esm({
32
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js"() {
33
+ init_execAsync();
34
+ init_esm();
35
+ }
36
+ });
37
+ init_getMachineId_darwin();
38
+ export {
39
+ getMachineId
40
+ };
41
+ //# sourceMappingURL=getMachineId-darwin-XC67FIUW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-darwin.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return undefined;\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return undefined;\n}\n"],"mappings":";iIAmBA,eAAsBA,GAAY,CAChC,GAAI,CAGF,IAAMC,GAFS,MAAMC,EAAU,wCAAwC,GAEjD,OACnB,MAAM;CAAI,EACV,KAAKC,GAAQA,EAAK,SAAS,gBAAgB,CAAC,EAE/C,GAAI,CAACF,EACH,OAGF,IAAMG,EAAQH,EAAO,MAAM,OAAO,EAClC,GAAIG,EAAM,SAAW,EACnB,OAAOA,EAAM,CAAC,EAAE,MAAM,EAAG,EAAE,QAEtB,EAAG,CACVC,EAAK,MAAM,6BAA6B,CAAC,EAAE,EAI/C,CAxCA,IAAAC,EAAAC,EAAA,KAgBAC,IACAC","names":["getMachineId","idLine","execAsync","line","parts","diag","init_getMachineId_darwin","__esmMin","init_execAsync","init_esm"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-darwin.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return undefined;\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,eAAsB,eAAY;AAChC,MAAI;AACF,UAAM,SAAS,MAAM,UAAU,wCAAwC;AAEvE,UAAM,SAAS,OAAO,OACnB,MAAM,IAAI,EACV,KAAK,UAAQ,KAAK,SAAS,gBAAgB,CAAC;AAE/C,QAAI,CAAC,QAAQ;AACX,aAAO;;AAGT,UAAM,QAAQ,OAAO,MAAM,OAAO;AAClC,QAAI,MAAM,WAAW,GAAG;AACtB,aAAO,MAAM,CAAC,EAAE,MAAM,GAAG,EAAE;;WAEtB,GAAG;AACV,SAAK,MAAM,6BAA6B,CAAC,EAAE;;AAG7C,SAAO;AACT;AAxCA;;AAgBA;AACA;;;","names":[]}
@@ -0,0 +1,33 @@
1
+ import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
+ import {
3
+ diag,
4
+ init_esm
5
+ } from "./chunk-I45UXGDM.js";
6
+ import {
7
+ __esm
8
+ } from "./chunk-KVSDPGUI.js";
9
+
10
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js
11
+ import { promises as fs } from "fs";
12
+ async function getMachineId() {
13
+ const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
14
+ for (const path of paths) {
15
+ try {
16
+ const result = await fs.readFile(path, { encoding: "utf8" });
17
+ return result.trim();
18
+ } catch (e) {
19
+ diag.debug(`error reading machine id: ${e}`);
20
+ }
21
+ }
22
+ return void 0;
23
+ }
24
+ var init_getMachineId_linux = __esm({
25
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js"() {
26
+ init_esm();
27
+ }
28
+ });
29
+ init_getMachineId_linux();
30
+ export {
31
+ getMachineId
32
+ };
33
+ //# sourceMappingURL=getMachineId-linux-4G7ZY7LQ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-linux.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n for (const path of paths) {\n try {\n const result = await fs.readFile(path, { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n }\n\n return undefined;\n}\n"],"mappings":";uFAeA,OAAS,YAAYA,MAAU,KAG/B,eAAsBC,GAAY,CAChC,IAAMC,EAAQ,CAAC,kBAAmB,0BAA0B,EAE5D,QAAWC,KAAQD,EACjB,GAAI,CAEF,OADe,MAAMF,EAAG,SAASG,EAAM,CAAE,SAAU,MAAM,CAAE,GAC7C,KAAI,QACX,EAAG,CACVC,EAAK,MAAM,6BAA6B,CAAC,EAAE,EAKjD,CA/BA,IAAAC,EAAAC,EAAA,KAgBAC","names":["fs","getMachineId","paths","path","diag","init_getMachineId_linux","__esmMin","init_esm"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-linux.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n for (const path of paths) {\n try {\n const result = await fs.readFile(path, { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n }\n\n return undefined;\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAS,YAAY,UAAU;AAG/B,eAAsB,eAAY;AAChC,QAAM,QAAQ,CAAC,mBAAmB,0BAA0B;AAE5D,aAAW,QAAQ,OAAO;AACxB,QAAI;AACF,YAAM,SAAS,MAAM,GAAG,SAAS,MAAM,EAAE,UAAU,OAAM,CAAE;AAC3D,aAAO,OAAO,KAAI;aACX,GAAG;AACV,WAAK,MAAM,6BAA6B,CAAC,EAAE;;;AAI/C,SAAO;AACT;AA/BA;;AAgBA;;;","names":[]}
@@ -0,0 +1,24 @@
1
+ import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
+ import {
3
+ diag,
4
+ init_esm
5
+ } from "./chunk-I45UXGDM.js";
6
+ import {
7
+ __esm
8
+ } from "./chunk-KVSDPGUI.js";
9
+
10
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js
11
+ async function getMachineId() {
12
+ diag.debug("could not read machine-id: unsupported platform");
13
+ return void 0;
14
+ }
15
+ var init_getMachineId_unsupported = __esm({
16
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js"() {
17
+ init_esm();
18
+ }
19
+ });
20
+ init_getMachineId_unsupported();
21
+ export {
22
+ getMachineId
23
+ };
24
+ //# sourceMappingURL=getMachineId-unsupported-5IH5IW7P.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-unsupported.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n diag.debug('could not read machine-id: unsupported platform');\n return undefined;\n}\n"],"mappings":";uFAkBA,eAAsBA,GAAY,CAChCC,EAAK,MAAM,iDAAiD,CAE9D,CArBA,IAAAC,EAAAC,EAAA,KAgBAC","names":["getMachineId","diag","init_getMachineId_unsupported","__esmMin","init_esm"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-unsupported.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n diag.debug('could not read machine-id: unsupported platform');\n return undefined;\n}\n"],"mappings":";;;;;;;;;;AAkBA,eAAsB,eAAY;AAChC,OAAK,MAAM,iDAAiD;AAC5D,SAAO;AACT;AArBA;;AAgBA;;;","names":[]}
@@ -0,0 +1,43 @@
1
+ import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
+ import {
3
+ execAsync,
4
+ init_execAsync
5
+ } from "./chunk-L2A6JPIQ.js";
6
+ import {
7
+ diag,
8
+ init_esm
9
+ } from "./chunk-I45UXGDM.js";
10
+ import {
11
+ __esm
12
+ } from "./chunk-KVSDPGUI.js";
13
+
14
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-win.js
15
+ import * as process from "process";
16
+ async function getMachineId() {
17
+ const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
18
+ let command = "%windir%\\System32\\REG.exe";
19
+ if (process.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process.env) {
20
+ command = "%windir%\\sysnative\\cmd.exe /c " + command;
21
+ }
22
+ try {
23
+ const result = await execAsync(`${command} ${args}`);
24
+ const parts = result.stdout.split("REG_SZ");
25
+ if (parts.length === 2) {
26
+ return parts[1].trim();
27
+ }
28
+ } catch (e) {
29
+ diag.debug(`error reading machine id: ${e}`);
30
+ }
31
+ return void 0;
32
+ }
33
+ var init_getMachineId_win = __esm({
34
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-win.js"() {
35
+ init_execAsync();
36
+ init_esm();
37
+ }
38
+ });
39
+ init_getMachineId_win();
40
+ export {
41
+ getMachineId
42
+ };
43
+ //# sourceMappingURL=getMachineId-win-WSA3TUKL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-win.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n const args =\n 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n\n try {\n const result = await execAsync(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return undefined;\n}\n"],"mappings":";sIAgBA,UAAYA,MAAa,UAIzB,eAAsBC,GAAY,CAChC,IAAMC,EACJ,6EACEC,EAAU,8BACF,SAAS,QAAU,2BAAoC,QACjEA,EAAU,mCAAqCA,GAGjD,GAAI,CAEF,IAAMC,GADS,MAAMC,EAAU,GAAGF,CAAO,IAAID,CAAI,EAAE,GAC9B,OAAO,MAAM,QAAQ,EAC1C,GAAIE,EAAM,SAAW,EACnB,OAAOA,EAAM,CAAC,EAAE,KAAI,QAEfE,EAAG,CACVC,EAAK,MAAM,6BAA6BD,CAAC,EAAE,EAI/C,CAvCA,IAAAE,EAAAC,EAAA,KAiBAC,IACAC","names":["process","getMachineId","args","command","parts","execAsync","e","diag","init_getMachineId_win","__esmMin","init_execAsync","init_esm"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-win.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n const args =\n 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n\n try {\n const result = await execAsync(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;AAgBA,YAAY,aAAa;AAIzB,eAAsB,eAAY;AAChC,QAAM,OACJ;AACF,MAAI,UAAU;AACd,MAAY,iBAAS,UAAU,4BAAoC,aAAK;AACtE,cAAU,qCAAqC;;AAGjD,MAAI;AACF,UAAM,SAAS,MAAM,UAAU,GAAG,OAAO,IAAI,IAAI,EAAE;AACnD,UAAM,QAAQ,OAAO,OAAO,MAAM,QAAQ;AAC1C,QAAI,MAAM,WAAW,GAAG;AACtB,aAAO,MAAM,CAAC,EAAE,KAAI;;WAEf,GAAG;AACV,SAAK,MAAM,6BAA6B,CAAC,EAAE;;AAG7C,SAAO;AACT;AAvCA;;AAiBA;AACA;;;","names":[]}
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as StoreContext, E as ExecutionConfig } from './processor-BUTmbpmJ.js';
2
- export { A as AbstractStoreContext, d as DataBindingContext, c as IDataBindingContext, I as IStoreContext, P as Plugin, b as PluginManager, t as timeoutError } from './processor-BUTmbpmJ.js';
1
+ import { S as StoreContext, E as ExecutionConfig } from './processor-MLp_j8IT.js';
2
+ export { A as AbstractStoreContext, d as DataBindingContext, c as IDataBindingContext, I as IStoreContext, P as Plugin, b as PluginManager, t as timeoutError } from './processor-MLp_j8IT.js';
3
3
  import * as _sentio_protos from '@sentio/protos';
4
4
  import { ProcessResult, EthCallParam, ProcessorServiceImplementation, ProcessConfigRequest, ProcessConfigResponse, StartRequest, Empty, ProcessBindingsRequest, ProcessBindingResponse, DataBinding, PreparedData, PreprocessResult, ProcessStreamRequest, HandlerType, PreprocessStreamRequest, DeepPartial, PreprocessStreamResponse, ProcessStreamResponse } from '@sentio/protos';
5
5
  import { Required } from 'utility-types';
package/lib/index.js CHANGED
@@ -1,3 +1,141 @@
1
1
  import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
- import{C as R,D as k,E as G,F as S,G as v,a as T,b as m,c as h,d as l,e as f,f as x,g as d,h as N,j as C,k as V,q as p,s as w,t as O,u as A,v as I,w as M,x as b,y,z as E}from"./chunk-WQZPRG3V.js";import{o as u,p as c}from"./chunk-VRBW2KLF.js";import"./chunk-TW627LH5.js";import"./chunk-AUPVVLD3.js";var r=class e{stateMap=new Map;static INSTANCE=new e;static reset(){e.INSTANCE=new e}},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}},a=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,s){let o=this.getOrRegister(),n=o.get(t);return n?(n!==s&&console.warn(t,"has been registered twice, use the previous one"),n):(o.set(t,s),s)}},g=class extends i{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{b as AbstractStoreContext,E as DataBindingContext,R as DummyProvider,C as Endpoints,p as GLOBAL_CONFIG,g as ListStateStorage,a as MapStateStorage,u as Plugin,c as PluginManager,S as ProcessorServiceImpl,G as QueuedStaticJsonRpcProvider,r as State,i as StateStorage,y as StoreContext,l as USER_PROCESSOR,d as compareSemver,V as configureEndpoints,w as dbMetrics,h as errorString,k as getProvider,N as locatePackageJson,f as makeEthCallKey,T as mergeProcessResults,m as mergeProcessResultsInPlace,I as metricsStorage,x as parseSemver,A as processMetrics,O as providerMetrics,v as recordRuntimeInfo,M as timeoutError};
2
+ import {
3
+ AbstractStoreContext,
4
+ DataBindingContext,
5
+ DummyProvider,
6
+ Endpoints,
7
+ GLOBAL_CONFIG,
8
+ ProcessorServiceImpl,
9
+ QueuedStaticJsonRpcProvider,
10
+ StoreContext,
11
+ USER_PROCESSOR,
12
+ compareSemver,
13
+ configureEndpoints,
14
+ dbMetrics,
15
+ errorString,
16
+ getProvider,
17
+ locatePackageJson,
18
+ makeEthCallKey,
19
+ mergeProcessResults,
20
+ mergeProcessResultsInPlace,
21
+ metricsStorage,
22
+ parseSemver,
23
+ processMetrics,
24
+ providerMetrics,
25
+ recordRuntimeInfo,
26
+ timeoutError
27
+ } from "./chunk-D6CHVWKJ.js";
28
+ import {
29
+ Plugin,
30
+ PluginManager
31
+ } from "./chunk-5M6FVPAW.js";
32
+ import "./chunk-I45UXGDM.js";
33
+ import "./chunk-KVSDPGUI.js";
34
+
35
+ // src/state.ts
36
+ var State = class _State {
37
+ stateMap = /* @__PURE__ */ new Map();
38
+ static INSTANCE = new _State();
39
+ static reset() {
40
+ _State.INSTANCE = new _State();
41
+ }
42
+ };
43
+ var StateStorage = class {
44
+ // TODO learn how to define single instance for all subclasses
45
+ constructor() {
46
+ }
47
+ key() {
48
+ return this.constructor.name;
49
+ }
50
+ getOrRegister() {
51
+ let metricState = State.INSTANCE.stateMap.get(this.key());
52
+ if (!metricState) {
53
+ metricState = this.initValue();
54
+ State.INSTANCE.stateMap.set(this.key(), metricState);
55
+ }
56
+ return metricState;
57
+ }
58
+ unregister() {
59
+ const value = State.INSTANCE.stateMap.get(this.key());
60
+ State.INSTANCE.stateMap.delete(this.key());
61
+ return value;
62
+ }
63
+ };
64
+ var MapStateStorage = class extends StateStorage {
65
+ initValue() {
66
+ return /* @__PURE__ */ new Map();
67
+ }
68
+ getValue(key) {
69
+ const m = this.getOrRegister();
70
+ return m.get(key);
71
+ }
72
+ getValues() {
73
+ const m = this.getOrRegister();
74
+ return Array.from(m.values());
75
+ }
76
+ getOrSetValue(key, value) {
77
+ const m = this.getOrRegister();
78
+ const oldValue = m.get(key);
79
+ if (oldValue) {
80
+ if (oldValue !== value) {
81
+ console.warn(key, "has been registered twice, use the previous one");
82
+ }
83
+ return oldValue;
84
+ }
85
+ m.set(key, value);
86
+ return value;
87
+ }
88
+ };
89
+ var ListStateStorage = class extends StateStorage {
90
+ initValue() {
91
+ return [];
92
+ }
93
+ getValues() {
94
+ return this.getOrRegister();
95
+ }
96
+ addValue(value) {
97
+ const m = this.getOrRegister();
98
+ m.push(value);
99
+ return value;
100
+ }
101
+ };
102
+ import("node:process").then((p) => p.stdout.write(""));
103
+
104
+ // src/chain-config.ts
105
+ import("node:process").then((p) => p.stdout.write(""));
106
+
107
+ // src/index.ts
108
+ import("node:process").then((p) => p.stdout.write(""));
109
+ export {
110
+ AbstractStoreContext,
111
+ DataBindingContext,
112
+ DummyProvider,
113
+ Endpoints,
114
+ GLOBAL_CONFIG,
115
+ ListStateStorage,
116
+ MapStateStorage,
117
+ Plugin,
118
+ PluginManager,
119
+ ProcessorServiceImpl,
120
+ QueuedStaticJsonRpcProvider,
121
+ State,
122
+ StateStorage,
123
+ StoreContext,
124
+ USER_PROCESSOR,
125
+ compareSemver,
126
+ configureEndpoints,
127
+ dbMetrics,
128
+ errorString,
129
+ getProvider,
130
+ locatePackageJson,
131
+ makeEthCallKey,
132
+ mergeProcessResults,
133
+ mergeProcessResultsInPlace,
134
+ metricsStorage,
135
+ parseSemver,
136
+ processMetrics,
137
+ providerMetrics,
138
+ recordRuntimeInfo,
139
+ timeoutError
140
+ };
3
141
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/state.ts","../src/chain-config.ts","../src/index.ts"],"sourcesContent":["export class State {\n stateMap = new Map<string, any>()\n\n static INSTANCE = new State()\n\n static reset() {\n State.INSTANCE = new State()\n }\n}\n\nexport abstract class StateStorage<T> {\n // TODO learn how to define single instance for all subclasses\n\n protected constructor() {\n //\n }\n\n abstract initValue(): T\n\n key(): string {\n return this.constructor.name\n }\n\n getOrRegister(): T {\n let metricState: T = State.INSTANCE.stateMap.get(this.key())\n if (!metricState) {\n metricState = this.initValue()\n State.INSTANCE.stateMap.set(this.key(), metricState)\n }\n return metricState\n }\n\n unregister(): T {\n const value = State.INSTANCE.stateMap.get(this.key())\n State.INSTANCE.stateMap.delete(this.key())\n return value\n }\n}\n\nexport abstract class MapStateStorage<T> extends StateStorage<Map<string, T>> {\n initValue() {\n return new Map<string, T>()\n }\n\n getValue(key: string): T | undefined {\n const m = this.getOrRegister()\n return m.get(key)\n }\n\n getValues(): T[] {\n const m = this.getOrRegister()\n return Array.from(m.values())\n }\n\n getOrSetValue(key: string, value: T): T {\n const m = this.getOrRegister()\n const oldValue = m.get(key)\n if (oldValue) {\n if (oldValue !== value) {\n console.warn(key, 'has been registered twice, use the previous one')\n }\n return oldValue\n }\n m.set(key, value)\n return value\n }\n}\n\nexport abstract class ListStateStorage<T> extends StateStorage<T[]> {\n initValue() {\n return []\n }\n\n getValues(): T[] {\n return this.getOrRegister()\n }\n\n addValue(value: T): T {\n const m = this.getOrRegister()\n m.push(value)\n return value\n }\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export interface ChainConfig {\n ChainID: string\n Https?: string[]\n ChainServer?: string\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export * from './plugin.js'\nexport * from './state.js'\nexport * from './utils.js'\nexport * from './endpoints.js'\nexport * from './chain-config.js'\nexport * from './service.js'\nexport { GLOBAL_CONFIG, type GlobalConfig } from './global-config.js'\nexport * from './db-context.js'\nexport * from './provider.js'\nexport * from './metrics.js'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";2SAAO,IAAMA,EAAN,MAAMC,CAAM,CACjB,SAAW,IAAI,IAEf,OAAO,SAAW,IAAIA,EAEtB,OAAO,OAAQ,CACbA,EAAM,SAAW,IAAIA,CACvB,CACF,EAEsBC,EAAf,KAA+B,CAG1B,aAAc,CAExB,CAIA,KAAc,CACZ,OAAO,KAAK,YAAY,IAC1B,CAEA,eAAmB,CACjB,IAAIC,EAAiBH,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC,EAC3D,OAAKG,IACHA,EAAc,KAAK,UAAU,EAC7BH,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,EAAGG,CAAW,GAE9CA,CACT,CAEA,YAAgB,CACd,IAAMC,EAAQJ,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC,EACpD,OAAAA,EAAM,SAAS,SAAS,OAAO,KAAK,IAAI,CAAC,EAClCI,CACT,CACF,EAEsBC,EAAf,cAA0CH,CAA6B,CAC5E,WAAY,CACV,OAAO,IAAI,GACb,CAEA,SAASI,EAA4B,CAEnC,OADU,KAAK,cAAc,EACpB,IAAIA,CAAG,CAClB,CAEA,WAAiB,CACf,IAAMC,EAAI,KAAK,cAAc,EAC7B,OAAO,MAAM,KAAKA,EAAE,OAAO,CAAC,CAC9B,CAEA,cAAcD,EAAaF,EAAa,CACtC,IAAMG,EAAI,KAAK,cAAc,EACvBC,EAAWD,EAAE,IAAID,CAAG,EAC1B,OAAIE,GACEA,IAAaJ,GACf,QAAQ,KAAKE,EAAK,iDAAiD,EAE9DE,IAETD,EAAE,IAAID,EAAKF,CAAK,EACTA,EACT,CACF,EAEsBK,EAAf,cAA2CP,CAAkB,CAClE,WAAY,CACV,MAAO,CAAC,CACV,CAEA,WAAiB,CACf,OAAO,KAAK,cAAc,CAC5B,CAEA,SAASE,EAAa,CAEpB,OADU,KAAK,cAAc,EAC3B,KAAKA,CAAK,EACLA,CACT,CACF,EACC,OAAO,cAAc,EAAE,KAAMM,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC,EC9ErD,OAAO,cAAc,EAAE,KAAMC,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC,ECKrD,OAAO,cAAc,EAAE,KAAMC,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC","names":["State","_State","StateStorage","metricState","value","MapStateStorage","key","m","oldValue","ListStateStorage","p","p","p"]}
1
+ {"version":3,"sources":["../src/state.ts","../src/chain-config.ts","../src/index.ts"],"sourcesContent":["export class State {\n stateMap = new Map<string, any>()\n\n static INSTANCE = new State()\n\n static reset() {\n State.INSTANCE = new State()\n }\n}\n\nexport abstract class StateStorage<T> {\n // TODO learn how to define single instance for all subclasses\n\n protected constructor() {\n //\n }\n\n abstract initValue(): T\n\n key(): string {\n return this.constructor.name\n }\n\n getOrRegister(): T {\n let metricState: T = State.INSTANCE.stateMap.get(this.key())\n if (!metricState) {\n metricState = this.initValue()\n State.INSTANCE.stateMap.set(this.key(), metricState)\n }\n return metricState\n }\n\n unregister(): T {\n const value = State.INSTANCE.stateMap.get(this.key())\n State.INSTANCE.stateMap.delete(this.key())\n return value\n }\n}\n\nexport abstract class MapStateStorage<T> extends StateStorage<Map<string, T>> {\n initValue() {\n return new Map<string, T>()\n }\n\n getValue(key: string): T | undefined {\n const m = this.getOrRegister()\n return m.get(key)\n }\n\n getValues(): T[] {\n const m = this.getOrRegister()\n return Array.from(m.values())\n }\n\n getOrSetValue(key: string, value: T): T {\n const m = this.getOrRegister()\n const oldValue = m.get(key)\n if (oldValue) {\n if (oldValue !== value) {\n console.warn(key, 'has been registered twice, use the previous one')\n }\n return oldValue\n }\n m.set(key, value)\n return value\n }\n}\n\nexport abstract class ListStateStorage<T> extends StateStorage<T[]> {\n initValue() {\n return []\n }\n\n getValues(): T[] {\n return this.getOrRegister()\n }\n\n addValue(value: T): T {\n const m = this.getOrRegister()\n m.push(value)\n return value\n }\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export interface ChainConfig {\n ChainID: string\n Https?: string[]\n ChainServer?: string\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export * from './plugin.js'\nexport * from './state.js'\nexport * from './utils.js'\nexport * from './endpoints.js'\nexport * from './chain-config.js'\nexport * from './service.js'\nexport { GLOBAL_CONFIG, type GlobalConfig } from './global-config.js'\nexport * from './db-context.js'\nexport * from './provider.js'\nexport * from './metrics.js'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAM,QAAN,MAAM,OAAM;AAAA,EACjB,WAAW,oBAAI,IAAiB;AAAA,EAEhC,OAAO,WAAW,IAAI,OAAM;AAAA,EAE5B,OAAO,QAAQ;AACb,WAAM,WAAW,IAAI,OAAM;AAAA,EAC7B;AACF;AAEO,IAAe,eAAf,MAA+B;AAAA;AAAA,EAG1B,cAAc;AAAA,EAExB;AAAA,EAIA,MAAc;AACZ,WAAO,KAAK,YAAY;AAAA,EAC1B;AAAA,EAEA,gBAAmB;AACjB,QAAI,cAAiB,MAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC;AAC3D,QAAI,CAAC,aAAa;AAChB,oBAAc,KAAK,UAAU;AAC7B,YAAM,SAAS,SAAS,IAAI,KAAK,IAAI,GAAG,WAAW;AAAA,IACrD;AACA,WAAO;AAAA,EACT;AAAA,EAEA,aAAgB;AACd,UAAM,QAAQ,MAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC;AACpD,UAAM,SAAS,SAAS,OAAO,KAAK,IAAI,CAAC;AACzC,WAAO;AAAA,EACT;AACF;AAEO,IAAe,kBAAf,cAA0C,aAA6B;AAAA,EAC5E,YAAY;AACV,WAAO,oBAAI,IAAe;AAAA,EAC5B;AAAA,EAEA,SAAS,KAA4B;AACnC,UAAM,IAAI,KAAK,cAAc;AAC7B,WAAO,EAAE,IAAI,GAAG;AAAA,EAClB;AAAA,EAEA,YAAiB;AACf,UAAM,IAAI,KAAK,cAAc;AAC7B,WAAO,MAAM,KAAK,EAAE,OAAO,CAAC;AAAA,EAC9B;AAAA,EAEA,cAAc,KAAa,OAAa;AACtC,UAAM,IAAI,KAAK,cAAc;AAC7B,UAAM,WAAW,EAAE,IAAI,GAAG;AAC1B,QAAI,UAAU;AACZ,UAAI,aAAa,OAAO;AACtB,gBAAQ,KAAK,KAAK,iDAAiD;AAAA,MACrE;AACA,aAAO;AAAA,IACT;AACA,MAAE,IAAI,KAAK,KAAK;AAChB,WAAO;AAAA,EACT;AACF;AAEO,IAAe,mBAAf,cAA2C,aAAkB;AAAA,EAClE,YAAY;AACV,WAAO,CAAC;AAAA,EACV;AAAA,EAEA,YAAiB;AACf,WAAO,KAAK,cAAc;AAAA,EAC5B;AAAA,EAEA,SAAS,OAAa;AACpB,UAAM,IAAI,KAAK,cAAc;AAC7B,MAAE,KAAK,KAAK;AACZ,WAAO;AAAA,EACT;AACF;AACC,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;;;AC9ErD,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;;;ACKrD,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;","names":[]}
@@ -279,6 +279,7 @@ declare enum HandlerType {
279
279
  FUEL_BLOCK = 17,
280
280
  COSMOS_CALL = 14,
281
281
  STARKNET_EVENT = 15,
282
+ SOL_BLOCK = 21,
282
283
  UNRECOGNIZED = -1
283
284
  }
284
285
  declare enum LogLevel {
@@ -350,6 +351,7 @@ interface Data {
350
351
  fuelBlock?: Data_FuelBlock | undefined;
351
352
  cosmosCall?: Data_CosmosCall | undefined;
352
353
  starknetEvents?: Data_StarknetEvent | undefined;
354
+ solBlock?: Data_SolBlock | undefined;
353
355
  }
354
356
  declare const Data: {
355
357
  encode(message: Data, writer?: _m0.Writer): _m0.Writer;
@@ -457,6 +459,7 @@ interface Data_SolInstruction {
457
459
  parsed?: {
458
460
  [key: string]: any;
459
461
  } | undefined;
462
+ rawTransaction?: string | undefined;
460
463
  }
461
464
  declare const Data_SolInstruction: {
462
465
  encode(message: Data_SolInstruction, writer?: _m0.Writer): _m0.Writer;
@@ -466,6 +469,19 @@ declare const Data_SolInstruction: {
466
469
  create(base?: DeepPartial<Data_SolInstruction>): Data_SolInstruction;
467
470
  fromPartial(object: DeepPartial<Data_SolInstruction>): Data_SolInstruction;
468
471
  };
472
+ interface Data_SolBlock {
473
+ rawBlock: string;
474
+ timestamp: Date | undefined;
475
+ slot: bigint;
476
+ }
477
+ declare const Data_SolBlock: {
478
+ encode(message: Data_SolBlock, writer?: _m0.Writer): _m0.Writer;
479
+ decode(input: _m0.Reader | Uint8Array, length?: number): Data_SolBlock;
480
+ fromJSON(object: any): Data_SolBlock;
481
+ toJSON(message: Data_SolBlock): unknown;
482
+ create(base?: DeepPartial<Data_SolBlock>): Data_SolBlock;
483
+ fromPartial(object: DeepPartial<Data_SolBlock>): Data_SolBlock;
484
+ };
469
485
  interface Data_AptEvent {
470
486
  rawEvent: string;
471
487
  eventIndex: number;