@graphql-hive/gateway 2.0.0-next-644c389eef9f770fab018ad7bfc5f099c0fbedda → 2.0.0-next-2b0ee4cc25987e24689c93b46fd831a8978a7221

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.
@@ -1,41 +0,0 @@
1
- import * as process from 'process';
2
- import { e as execAsync } from './execAsync-DmTy47v9.js';
3
- import { diag } from '@opentelemetry/api';
4
- import 'child_process';
5
- import 'util';
6
-
7
- /*
8
- * Copyright The OpenTelemetry Authors
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * https://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- async function getMachineId() {
23
- const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
24
- let command = '%windir%\\System32\\REG.exe';
25
- if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
26
- command = '%windir%\\sysnative\\cmd.exe /c ' + command;
27
- }
28
- try {
29
- const result = await execAsync(`${command} ${args}`);
30
- const parts = result.stdout.split('REG_SZ');
31
- if (parts.length === 2) {
32
- return parts[1].trim();
33
- }
34
- }
35
- catch (e) {
36
- diag.debug(`error reading machine id: ${e}`);
37
- }
38
- return undefined;
39
- }
40
-
41
- export { getMachineId };