@sentio/runtime 3.0.0-rc.8 → 3.0.0
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-757YRULG.js +38 -0
- package/lib/{chunk-CPJKSHSV.js.map → chunk-757YRULG.js.map} +1 -1
- package/lib/chunk-AUPVVLD3.js +3 -0
- package/lib/chunk-CJDESLYQ.js +3 -0
- package/lib/{chunk-L2A6JPIQ.js.map → chunk-CJDESLYQ.js.map} +1 -1
- package/lib/chunk-KF7FHZ25.js +117 -0
- package/lib/{chunk-6MZJOWMH.js.map → chunk-KF7FHZ25.js.map} +1 -1
- package/lib/chunk-TW627LH5.js +3 -0
- package/lib/{chunk-MV6JXS2P.js.map → chunk-TW627LH5.js.map} +1 -1
- package/lib/chunk-ZTRGPIW7.js +26 -0
- package/lib/chunk-ZTRGPIW7.js.map +1 -0
- package/lib/getMachineId-bsd-CDSZ2S36.js +3 -0
- package/lib/{getMachineId-bsd-ZJR2OQTA.js.map → getMachineId-bsd-CDSZ2S36.js.map} +1 -1
- package/lib/getMachineId-darwin-LM5BSWCG.js +4 -0
- package/lib/{getMachineId-darwin-OW6SYINH.js.map → getMachineId-darwin-LM5BSWCG.js.map} +1 -1
- package/lib/getMachineId-linux-UA53ZQFA.js +3 -0
- package/lib/{getMachineId-linux-L5XPRJBN.js.map → getMachineId-linux-UA53ZQFA.js.map} +1 -1
- package/lib/getMachineId-unsupported-LDR77GGJ.js +3 -0
- package/lib/{getMachineId-unsupported-B3NMIOO3.js.map → getMachineId-unsupported-LDR77GGJ.js.map} +1 -1
- package/lib/getMachineId-win-XULW45X4.js +3 -0
- package/lib/{getMachineId-win-TT64F63B.js.map → getMachineId-win-XULW45X4.js.map} +1 -1
- package/lib/index.d.ts +4 -9
- package/lib/index.js +1 -76
- package/lib/index.js.map +1 -1
- package/lib/{processor-CNHsQeJ6.d.ts → processor-BUTmbpmJ.d.ts} +2 -3
- package/lib/processor-runner.js +43 -32947
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.js +2 -132
- package/lib/service-worker.js.map +1 -1
- package/lib/test-processor.test.d.ts +1 -1
- package/lib/test-processor.test.js.map +1 -1
- package/package.json +1 -1
- package/src/db-context.ts +4 -4
- package/src/gen/processor/protos/processor.ts +17 -1
- package/src/gen/service/common/protos/common.ts +356 -1
- package/src/otlp.ts +20 -12
- package/src/plugin.ts +0 -11
- package/src/processor-runner.ts +3 -3
- package/src/service-manager.ts +0 -8
- package/src/service-v3.ts +11 -18
- package/src/state.ts +0 -22
- package/lib/chunk-6MZJOWMH.js +0 -60145
- package/lib/chunk-CPJKSHSV.js +0 -10976
- package/lib/chunk-KVSDPGUI.js +0 -50
- package/lib/chunk-L2A6JPIQ.js +0 -21
- package/lib/chunk-MV6JXS2P.js +0 -1703
- package/lib/chunk-N3VEKOPD.js +0 -97
- package/lib/chunk-N3VEKOPD.js.map +0 -1
- package/lib/chunk-QHFSZVR5.js +0 -25779
- package/lib/chunk-QHFSZVR5.js.map +0 -1
- package/lib/getMachineId-bsd-ZJR2OQTA.js +0 -41
- package/lib/getMachineId-darwin-OW6SYINH.js +0 -41
- package/lib/getMachineId-linux-L5XPRJBN.js +0 -33
- package/lib/getMachineId-unsupported-B3NMIOO3.js +0 -24
- package/lib/getMachineId-win-TT64F63B.js +0 -43
- /package/lib/{chunk-KVSDPGUI.js.map → chunk-AUPVVLD3.js.map} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
|
2
|
+
import{a as t,b as s}from"./chunk-CJDESLYQ.js";import{j as r,o as n}from"./chunk-TW627LH5.js";import{b as i}from"./chunk-AUPVVLD3.js";import{promises as o}from"fs";async function m(){try{return(await o.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(e){r.debug(`error reading machine id: ${e}`)}try{return(await t("kenv -q smbios.system.uuid")).stdout.trim()}catch(e){r.debug(`error reading machine id: ${e}`)}}var a=i(()=>{s();n()});a();export{m as getMachineId};
|
|
3
|
+
//# sourceMappingURL=getMachineId-bsd-CDSZ2S36.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":"
|
|
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"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
|
2
|
+
import{a as n,b as s}from"./chunk-CJDESLYQ.js";import{j as i,o}from"./chunk-TW627LH5.js";import{b as d}from"./chunk-AUPVVLD3.js";async function l(){try{let t=(await n('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
3
|
+
`).find(c=>c.includes("IOPlatformUUID"));if(!t)return;let r=t.split('" = "');if(r.length===2)return r[1].slice(0,-1)}catch(e){i.debug(`error reading machine id: ${e}`)}}var a=d(()=>{s();o()});a();export{l as getMachineId};
|
|
4
|
+
//# sourceMappingURL=getMachineId-darwin-LM5BSWCG.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":"
|
|
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"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
|
2
|
+
import{j as r,o as a}from"./chunk-TW627LH5.js";import{b as n}from"./chunk-AUPVVLD3.js";import{promises as o}from"fs";async function m(){let t=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let i of t)try{return(await o.readFile(i,{encoding:"utf8"})).trim()}catch(e){r.debug(`error reading machine id: ${e}`)}}var c=n(()=>{a()});c();export{m as getMachineId};
|
|
3
|
+
//# sourceMappingURL=getMachineId-linux-UA53ZQFA.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":"
|
|
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"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
|
2
|
+
import{j as e,o as d}from"./chunk-TW627LH5.js";import{b as n}from"./chunk-AUPVVLD3.js";async function t(){e.debug("could not read machine-id: unsupported platform")}var o=n(()=>{d()});o();export{t as getMachineId};
|
|
3
|
+
//# sourceMappingURL=getMachineId-unsupported-LDR77GGJ.js.map
|
package/lib/{getMachineId-unsupported-B3NMIOO3.js.map → getMachineId-unsupported-LDR77GGJ.js.map}
RENAMED
|
@@ -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":"
|
|
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"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
|
2
|
+
import{a as s,b as d}from"./chunk-CJDESLYQ.js";import{j as n,o as a}from"./chunk-TW627LH5.js";import{b as o}from"./chunk-AUPVVLD3.js";import*as r from"process";async function f(){let c="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";r.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in r.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let i=(await s(`${e} ${c}`)).stdout.split("REG_SZ");if(i.length===2)return i[1].trim()}catch(t){n.debug(`error reading machine id: ${t}`)}}var m=o(()=>{d();a()});m();export{f as getMachineId};
|
|
3
|
+
//# sourceMappingURL=getMachineId-win-XULW45X4.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":"
|
|
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"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as StoreContext, E as ExecutionConfig } from './processor-
|
|
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-
|
|
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';
|
|
3
3
|
import * as _sentio_protos from '@sentio/protos';
|
|
4
|
-
import {
|
|
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';
|
|
6
6
|
import { CallContext } from 'nice-grpc';
|
|
7
7
|
import { Subject } from 'rxjs';
|
|
@@ -36,11 +36,6 @@ declare abstract class ListStateStorage<T> extends StateStorage<T[]> {
|
|
|
36
36
|
getValues(): T[];
|
|
37
37
|
addValue(value: T): T;
|
|
38
38
|
}
|
|
39
|
-
declare class TemplateInstanceState extends ListStateStorage<TemplateInstance> {
|
|
40
|
-
static INSTANCE: TemplateInstanceState;
|
|
41
|
-
constructor();
|
|
42
|
-
addValue(value: TemplateInstance): TemplateInstance;
|
|
43
|
-
}
|
|
44
39
|
|
|
45
40
|
declare function mergeProcessResults(results: ProcessResult[]): Required<ProcessResult, 'states'>;
|
|
46
41
|
declare function mergeProcessResultsInPlace(res: ProcessResult, results: ProcessResult[]): Required<ProcessResult, 'states'>;
|
|
@@ -867,4 +862,4 @@ declare const processMetrics: {
|
|
|
867
862
|
};
|
|
868
863
|
declare const metricsStorage: AsyncLocalStorage<string>;
|
|
869
864
|
|
|
870
|
-
export { type ChainConfig, DummyProvider, Endpoints, GLOBAL_CONFIG, type GlobalConfig, ListStateStorage, MapStateStorage, ProcessorServiceImpl, QueuedStaticJsonRpcProvider, type Semver, State, StateStorage, StoreContext,
|
|
865
|
+
export { type ChainConfig, DummyProvider, Endpoints, GLOBAL_CONFIG, type GlobalConfig, ListStateStorage, MapStateStorage, ProcessorServiceImpl, QueuedStaticJsonRpcProvider, type Semver, State, StateStorage, StoreContext, USER_PROCESSOR, compareSemver, configureEndpoints, dbMetrics, errorString, getProvider, makeEthCallKey, mergeProcessResults, mergeProcessResultsInPlace, metricsStorage, parseSemver, processMetrics, providerMetrics, recordRuntimeInfo };
|
package/lib/index.js
CHANGED
|
@@ -1,78 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ListStateStorage,
|
|
4
|
-
MapStateStorage,
|
|
5
|
-
State,
|
|
6
|
-
StateStorage,
|
|
7
|
-
TemplateInstanceState
|
|
8
|
-
} from "./chunk-N3VEKOPD.js";
|
|
9
|
-
import {
|
|
10
|
-
AbstractStoreContext,
|
|
11
|
-
DataBindingContext,
|
|
12
|
-
DummyProvider,
|
|
13
|
-
Endpoints,
|
|
14
|
-
GLOBAL_CONFIG,
|
|
15
|
-
ProcessorServiceImpl,
|
|
16
|
-
QueuedStaticJsonRpcProvider,
|
|
17
|
-
StoreContext,
|
|
18
|
-
USER_PROCESSOR,
|
|
19
|
-
compareSemver,
|
|
20
|
-
configureEndpoints,
|
|
21
|
-
dbMetrics,
|
|
22
|
-
errorString,
|
|
23
|
-
getProvider,
|
|
24
|
-
makeEthCallKey,
|
|
25
|
-
mergeProcessResults,
|
|
26
|
-
mergeProcessResultsInPlace,
|
|
27
|
-
metricsStorage,
|
|
28
|
-
parseSemver,
|
|
29
|
-
processMetrics,
|
|
30
|
-
providerMetrics,
|
|
31
|
-
recordRuntimeInfo,
|
|
32
|
-
timeoutError
|
|
33
|
-
} from "./chunk-6MZJOWMH.js";
|
|
34
|
-
import {
|
|
35
|
-
Plugin,
|
|
36
|
-
PluginManager
|
|
37
|
-
} from "./chunk-QHFSZVR5.js";
|
|
38
|
-
import "./chunk-MV6JXS2P.js";
|
|
39
|
-
import "./chunk-KVSDPGUI.js";
|
|
40
|
-
|
|
41
|
-
// src/chain-config.ts
|
|
42
|
-
import("node:process").then((p) => p.stdout.write(""));
|
|
43
|
-
|
|
44
|
-
// src/index.ts
|
|
45
|
-
import("node:process").then((p) => p.stdout.write(""));
|
|
46
|
-
export {
|
|
47
|
-
AbstractStoreContext,
|
|
48
|
-
DataBindingContext,
|
|
49
|
-
DummyProvider,
|
|
50
|
-
Endpoints,
|
|
51
|
-
GLOBAL_CONFIG,
|
|
52
|
-
ListStateStorage,
|
|
53
|
-
MapStateStorage,
|
|
54
|
-
Plugin,
|
|
55
|
-
PluginManager,
|
|
56
|
-
ProcessorServiceImpl,
|
|
57
|
-
QueuedStaticJsonRpcProvider,
|
|
58
|
-
State,
|
|
59
|
-
StateStorage,
|
|
60
|
-
StoreContext,
|
|
61
|
-
TemplateInstanceState,
|
|
62
|
-
USER_PROCESSOR,
|
|
63
|
-
compareSemver,
|
|
64
|
-
configureEndpoints,
|
|
65
|
-
dbMetrics,
|
|
66
|
-
errorString,
|
|
67
|
-
getProvider,
|
|
68
|
-
makeEthCallKey,
|
|
69
|
-
mergeProcessResults,
|
|
70
|
-
mergeProcessResultsInPlace,
|
|
71
|
-
metricsStorage,
|
|
72
|
-
parseSemver,
|
|
73
|
-
processMetrics,
|
|
74
|
-
providerMetrics,
|
|
75
|
-
recordRuntimeInfo,
|
|
76
|
-
timeoutError
|
|
77
|
-
};
|
|
2
|
+
import{B as E,C as R,D as k,E as G,F as S,a as T,b as m,c as h,d as l,e as f,f as x,g as d,i as N,j as C,p,r as V,s as w,t as O,u as A,v as I,w as M,x as b,y}from"./chunk-KF7FHZ25.js";import{p as u,q as c}from"./chunk-ZTRGPIW7.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{M as AbstractStoreContext,y as DataBindingContext,E as DummyProvider,N as Endpoints,p as GLOBAL_CONFIG,g as ListStateStorage,a as MapStateStorage,u as Plugin,c as PluginManager,G as ProcessorServiceImpl,k as QueuedStaticJsonRpcProvider,r as State,i as StateStorage,b as StoreContext,l as USER_PROCESSOR,d as compareSemver,C as configureEndpoints,V as dbMetrics,h as errorString,R as getProvider,f as makeEthCallKey,T as mergeProcessResults,m as mergeProcessResultsInPlace,A as metricsStorage,x as parseSemver,O as processMetrics,w as providerMetrics,S as recordRuntimeInfo,I as timeoutError};
|
|
78
3
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chain-config.ts","../src/index.ts"],"sourcesContent":["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":"
|
|
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":";+RAAO,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"]}
|
|
@@ -13,7 +13,7 @@ interface IStoreContext {
|
|
|
13
13
|
close(): void;
|
|
14
14
|
}
|
|
15
15
|
interface IDataBindingContext extends IStoreContext {
|
|
16
|
-
sendTemplateRequest(templates: Array<TemplateInstance
|
|
16
|
+
sendTemplateRequest(templates: Array<TemplateInstance>, unbind: boolean): void;
|
|
17
17
|
sendTimeseriesRequest(timeseries: Array<TimeseriesResult$1>): void;
|
|
18
18
|
}
|
|
19
19
|
declare abstract class AbstractStoreContext implements IStoreContext {
|
|
@@ -52,7 +52,7 @@ declare class DataBindingContext extends AbstractStoreContext implements IDataBi
|
|
|
52
52
|
readonly processId: number;
|
|
53
53
|
readonly subject: Subject<DeepPartial$2<ProcessStreamResponseV3>>;
|
|
54
54
|
constructor(processId: number, subject: Subject<DeepPartial$2<ProcessStreamResponseV3>>);
|
|
55
|
-
sendTemplateRequest(templates: Array<TemplateInstance
|
|
55
|
+
sendTemplateRequest(templates: Array<TemplateInstance>, unbind: boolean): void;
|
|
56
56
|
sendTimeseriesRequest(timeseries: Array<TimeseriesResult$1>): void;
|
|
57
57
|
doSend(resp: DeepPartial$2<ProcessStreamResponseV3>): void;
|
|
58
58
|
}
|
|
@@ -101,7 +101,6 @@ declare class PluginManager {
|
|
|
101
101
|
[k: string]: any;
|
|
102
102
|
}, dbContext?: IDataBindingContext | IStoreContext): Promise<PreprocessResult>;
|
|
103
103
|
updateTemplates(request: UpdateTemplatesRequest): Promise<void>;
|
|
104
|
-
sendTemplateInstance(instance: TemplateInstance): void;
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
declare enum RichValue_NullValue {
|