@on-belay/sdk 1.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.
@@ -0,0 +1,8 @@
1
+ import {
2
+ resolveFieldsetId
3
+ } from "./chunk-4LH3I3IE.mjs";
4
+ import "./chunk-OIJRSJJE.mjs";
5
+ import "./chunk-HLS5VZ6M.mjs";
6
+ export {
7
+ resolveFieldsetId
8
+ };
@@ -0,0 +1,39 @@
1
+ import {
2
+ execAsync,
3
+ init_execAsync
4
+ } from "./chunk-CHLTNLHZ.mjs";
5
+ import {
6
+ diag,
7
+ init_esm
8
+ } from "./chunk-AV66LNH6.mjs";
9
+ import {
10
+ __esm
11
+ } from "./chunk-HLS5VZ6M.mjs";
12
+
13
+ // ../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js
14
+ import { promises as fs } from "fs";
15
+ async function getMachineId() {
16
+ try {
17
+ const result = await fs.readFile("/etc/hostid", { encoding: "utf8" });
18
+ return result.trim();
19
+ } catch (e) {
20
+ diag.debug(`error reading machine id: ${e}`);
21
+ }
22
+ try {
23
+ const result = await execAsync("kenv -q smbios.system.uuid");
24
+ return result.stdout.trim();
25
+ } catch (e) {
26
+ diag.debug(`error reading machine id: ${e}`);
27
+ }
28
+ return void 0;
29
+ }
30
+ var init_getMachineId_bsd = __esm({
31
+ "../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js"() {
32
+ init_execAsync();
33
+ init_esm();
34
+ }
35
+ });
36
+ init_getMachineId_bsd();
37
+ export {
38
+ getMachineId
39
+ };
@@ -0,0 +1,39 @@
1
+ import {
2
+ execAsync,
3
+ init_execAsync
4
+ } from "./chunk-CHLTNLHZ.mjs";
5
+ import {
6
+ diag,
7
+ init_esm
8
+ } from "./chunk-AV66LNH6.mjs";
9
+ import {
10
+ __esm
11
+ } from "./chunk-HLS5VZ6M.mjs";
12
+
13
+ // ../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js
14
+ async function getMachineId() {
15
+ try {
16
+ const result = await execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"');
17
+ const idLine = result.stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
18
+ if (!idLine) {
19
+ return void 0;
20
+ }
21
+ const parts = idLine.split('" = "');
22
+ if (parts.length === 2) {
23
+ return parts[1].slice(0, -1);
24
+ }
25
+ } catch (e) {
26
+ diag.debug(`error reading machine id: ${e}`);
27
+ }
28
+ return void 0;
29
+ }
30
+ var init_getMachineId_darwin = __esm({
31
+ "../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js"() {
32
+ init_execAsync();
33
+ init_esm();
34
+ }
35
+ });
36
+ init_getMachineId_darwin();
37
+ export {
38
+ getMachineId
39
+ };
@@ -0,0 +1,31 @@
1
+ import {
2
+ diag,
3
+ init_esm
4
+ } from "./chunk-AV66LNH6.mjs";
5
+ import {
6
+ __esm
7
+ } from "./chunk-HLS5VZ6M.mjs";
8
+
9
+ // ../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js
10
+ import { promises as fs } from "fs";
11
+ async function getMachineId() {
12
+ const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
13
+ for (const path of paths) {
14
+ try {
15
+ const result = await fs.readFile(path, { encoding: "utf8" });
16
+ return result.trim();
17
+ } catch (e) {
18
+ diag.debug(`error reading machine id: ${e}`);
19
+ }
20
+ }
21
+ return void 0;
22
+ }
23
+ var init_getMachineId_linux = __esm({
24
+ "../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js"() {
25
+ init_esm();
26
+ }
27
+ });
28
+ init_getMachineId_linux();
29
+ export {
30
+ getMachineId
31
+ };
@@ -0,0 +1,22 @@
1
+ import {
2
+ diag,
3
+ init_esm
4
+ } from "./chunk-AV66LNH6.mjs";
5
+ import {
6
+ __esm
7
+ } from "./chunk-HLS5VZ6M.mjs";
8
+
9
+ // ../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js
10
+ async function getMachineId() {
11
+ diag.debug("could not read machine-id: unsupported platform");
12
+ return void 0;
13
+ }
14
+ var init_getMachineId_unsupported = __esm({
15
+ "../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js"() {
16
+ init_esm();
17
+ }
18
+ });
19
+ init_getMachineId_unsupported();
20
+ export {
21
+ getMachineId
22
+ };
@@ -0,0 +1,41 @@
1
+ import {
2
+ execAsync,
3
+ init_execAsync
4
+ } from "./chunk-CHLTNLHZ.mjs";
5
+ import {
6
+ diag,
7
+ init_esm
8
+ } from "./chunk-AV66LNH6.mjs";
9
+ import {
10
+ __esm
11
+ } from "./chunk-HLS5VZ6M.mjs";
12
+
13
+ // ../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-win.js
14
+ import * as process from "process";
15
+ async function getMachineId() {
16
+ const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
17
+ let command = "%windir%\\System32\\REG.exe";
18
+ if (process.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process.env) {
19
+ command = "%windir%\\sysnative\\cmd.exe /c " + command;
20
+ }
21
+ try {
22
+ const result = await execAsync(`${command} ${args}`);
23
+ const parts = result.stdout.split("REG_SZ");
24
+ if (parts.length === 2) {
25
+ return parts[1].trim();
26
+ }
27
+ } catch (e) {
28
+ diag.debug(`error reading machine id: ${e}`);
29
+ }
30
+ return void 0;
31
+ }
32
+ var init_getMachineId_win = __esm({
33
+ "../../node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-win.js"() {
34
+ init_execAsync();
35
+ init_esm();
36
+ }
37
+ });
38
+ init_getMachineId_win();
39
+ export {
40
+ getMachineId
41
+ };