@mastra/upstash 0.10.2-alpha.0 → 0.10.2-alpha.2

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,30 @@
1
+ 'use strict';
2
+
3
+ var chunkN2CPQVE3_cjs = require('./chunk-N2CPQVE3.cjs');
4
+ var chunkU74OJRHU_cjs = require('./chunk-U74OJRHU.cjs');
5
+ var fs = require('fs');
6
+
7
+ async function getMachineId() {
8
+ try {
9
+ const result = await fs.promises.readFile("/etc/hostid", { encoding: "utf8" });
10
+ return result.trim();
11
+ } catch (e) {
12
+ chunkU74OJRHU_cjs.diag.debug(`error reading machine id: ${e}`);
13
+ }
14
+ try {
15
+ const result = await chunkN2CPQVE3_cjs.execAsync("kenv -q smbios.system.uuid");
16
+ return result.stdout.trim();
17
+ } catch (e) {
18
+ chunkU74OJRHU_cjs.diag.debug(`error reading machine id: ${e}`);
19
+ }
20
+ return void 0;
21
+ }
22
+ var init_getMachineId_bsd = chunkU74OJRHU_cjs.__esm({
23
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js"() {
24
+ chunkN2CPQVE3_cjs.init_execAsync();
25
+ chunkU74OJRHU_cjs.init_esm();
26
+ }
27
+ });
28
+ init_getMachineId_bsd();
29
+
30
+ exports.getMachineId = getMachineId;
@@ -0,0 +1,28 @@
1
+ import { init_execAsync, execAsync } from './chunk-IGKEDEDE.js';
2
+ import { __esm, init_esm, diag } from './chunk-HSTZWXH7.js';
3
+ import { promises } from 'fs';
4
+
5
+ async function getMachineId() {
6
+ try {
7
+ const result = await promises.readFile("/etc/hostid", { encoding: "utf8" });
8
+ return result.trim();
9
+ } catch (e) {
10
+ diag.debug(`error reading machine id: ${e}`);
11
+ }
12
+ try {
13
+ const result = await execAsync("kenv -q smbios.system.uuid");
14
+ return result.stdout.trim();
15
+ } catch (e) {
16
+ diag.debug(`error reading machine id: ${e}`);
17
+ }
18
+ return void 0;
19
+ }
20
+ var init_getMachineId_bsd = __esm({
21
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js"() {
22
+ init_execAsync();
23
+ init_esm();
24
+ }
25
+ });
26
+ init_getMachineId_bsd();
27
+
28
+ export { getMachineId };
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var chunkN2CPQVE3_cjs = require('./chunk-N2CPQVE3.cjs');
4
+ var chunkU74OJRHU_cjs = require('./chunk-U74OJRHU.cjs');
5
+
6
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js
7
+ async function getMachineId() {
8
+ try {
9
+ const result = await chunkN2CPQVE3_cjs.execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"');
10
+ const idLine = result.stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
11
+ if (!idLine) {
12
+ return void 0;
13
+ }
14
+ const parts = idLine.split('" = "');
15
+ if (parts.length === 2) {
16
+ return parts[1].slice(0, -1);
17
+ }
18
+ } catch (e) {
19
+ chunkU74OJRHU_cjs.diag.debug(`error reading machine id: ${e}`);
20
+ }
21
+ return void 0;
22
+ }
23
+ var init_getMachineId_darwin = chunkU74OJRHU_cjs.__esm({
24
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js"() {
25
+ chunkN2CPQVE3_cjs.init_execAsync();
26
+ chunkU74OJRHU_cjs.init_esm();
27
+ }
28
+ });
29
+ init_getMachineId_darwin();
30
+
31
+ exports.getMachineId = getMachineId;
@@ -0,0 +1,29 @@
1
+ import { init_execAsync, execAsync } from './chunk-IGKEDEDE.js';
2
+ import { __esm, init_esm, diag } from './chunk-HSTZWXH7.js';
3
+
4
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js
5
+ async function getMachineId() {
6
+ try {
7
+ const result = await execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"');
8
+ const idLine = result.stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
9
+ if (!idLine) {
10
+ return void 0;
11
+ }
12
+ const parts = idLine.split('" = "');
13
+ if (parts.length === 2) {
14
+ return parts[1].slice(0, -1);
15
+ }
16
+ } catch (e) {
17
+ diag.debug(`error reading machine id: ${e}`);
18
+ }
19
+ return void 0;
20
+ }
21
+ var init_getMachineId_darwin = __esm({
22
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js"() {
23
+ init_execAsync();
24
+ init_esm();
25
+ }
26
+ });
27
+ init_getMachineId_darwin();
28
+
29
+ export { getMachineId };
@@ -0,0 +1,23 @@
1
+ import { __esm, init_esm, diag } from './chunk-HSTZWXH7.js';
2
+ import { promises } from 'fs';
3
+
4
+ async function getMachineId() {
5
+ const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
6
+ for (const path of paths) {
7
+ try {
8
+ const result = await promises.readFile(path, { encoding: "utf8" });
9
+ return result.trim();
10
+ } catch (e) {
11
+ diag.debug(`error reading machine id: ${e}`);
12
+ }
13
+ }
14
+ return void 0;
15
+ }
16
+ var init_getMachineId_linux = __esm({
17
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js"() {
18
+ init_esm();
19
+ }
20
+ });
21
+ init_getMachineId_linux();
22
+
23
+ export { getMachineId };
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var chunkU74OJRHU_cjs = require('./chunk-U74OJRHU.cjs');
4
+ var fs = require('fs');
5
+
6
+ async function getMachineId() {
7
+ const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
8
+ for (const path of paths) {
9
+ try {
10
+ const result = await fs.promises.readFile(path, { encoding: "utf8" });
11
+ return result.trim();
12
+ } catch (e) {
13
+ chunkU74OJRHU_cjs.diag.debug(`error reading machine id: ${e}`);
14
+ }
15
+ }
16
+ return void 0;
17
+ }
18
+ var init_getMachineId_linux = chunkU74OJRHU_cjs.__esm({
19
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js"() {
20
+ chunkU74OJRHU_cjs.init_esm();
21
+ }
22
+ });
23
+ init_getMachineId_linux();
24
+
25
+ exports.getMachineId = getMachineId;
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var chunkU74OJRHU_cjs = require('./chunk-U74OJRHU.cjs');
4
+
5
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js
6
+ async function getMachineId() {
7
+ chunkU74OJRHU_cjs.diag.debug("could not read machine-id: unsupported platform");
8
+ return void 0;
9
+ }
10
+ var init_getMachineId_unsupported = chunkU74OJRHU_cjs.__esm({
11
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js"() {
12
+ chunkU74OJRHU_cjs.init_esm();
13
+ }
14
+ });
15
+ init_getMachineId_unsupported();
16
+
17
+ exports.getMachineId = getMachineId;
@@ -0,0 +1,15 @@
1
+ import { __esm, init_esm, diag } from './chunk-HSTZWXH7.js';
2
+
3
+ // ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js
4
+ async function getMachineId() {
5
+ diag.debug("could not read machine-id: unsupported platform");
6
+ return void 0;
7
+ }
8
+ var init_getMachineId_unsupported = __esm({
9
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-unsupported.js"() {
10
+ init_esm();
11
+ }
12
+ });
13
+ init_getMachineId_unsupported();
14
+
15
+ export { getMachineId };
@@ -0,0 +1,30 @@
1
+ import { init_execAsync, execAsync } from './chunk-IGKEDEDE.js';
2
+ import { __esm, init_esm, diag } from './chunk-HSTZWXH7.js';
3
+ import * as process from 'process';
4
+
5
+ async function getMachineId() {
6
+ const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
7
+ let command = "%windir%\\System32\\REG.exe";
8
+ if (process.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process.env) {
9
+ command = "%windir%\\sysnative\\cmd.exe /c " + command;
10
+ }
11
+ try {
12
+ const result = await execAsync(`${command} ${args}`);
13
+ const parts = result.stdout.split("REG_SZ");
14
+ if (parts.length === 2) {
15
+ return parts[1].trim();
16
+ }
17
+ } catch (e) {
18
+ diag.debug(`error reading machine id: ${e}`);
19
+ }
20
+ return void 0;
21
+ }
22
+ var init_getMachineId_win = __esm({
23
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-win.js"() {
24
+ init_execAsync();
25
+ init_esm();
26
+ }
27
+ });
28
+ init_getMachineId_win();
29
+
30
+ export { getMachineId };
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ var chunkN2CPQVE3_cjs = require('./chunk-N2CPQVE3.cjs');
4
+ var chunkU74OJRHU_cjs = require('./chunk-U74OJRHU.cjs');
5
+ var process = require('process');
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var process__namespace = /*#__PURE__*/_interopNamespace(process);
26
+
27
+ async function getMachineId() {
28
+ const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
29
+ let command = "%windir%\\System32\\REG.exe";
30
+ if (process__namespace.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process__namespace.env) {
31
+ command = "%windir%\\sysnative\\cmd.exe /c " + command;
32
+ }
33
+ try {
34
+ const result = await chunkN2CPQVE3_cjs.execAsync(`${command} ${args}`);
35
+ const parts = result.stdout.split("REG_SZ");
36
+ if (parts.length === 2) {
37
+ return parts[1].trim();
38
+ }
39
+ } catch (e) {
40
+ chunkU74OJRHU_cjs.diag.debug(`error reading machine id: ${e}`);
41
+ }
42
+ return void 0;
43
+ }
44
+ var init_getMachineId_win = chunkU74OJRHU_cjs.__esm({
45
+ "../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-win.js"() {
46
+ chunkN2CPQVE3_cjs.init_execAsync();
47
+ chunkU74OJRHU_cjs.init_esm();
48
+ }
49
+ });
50
+ init_getMachineId_win();
51
+
52
+ exports.getMachineId = getMachineId;