@graphql-hive/gateway 2.0.0-next-599fa70cae41e9a42a343ea73b7dee5d36bf3517 → 2.0.0-next-e2698677f10276e29194b5559409235a15f2f324
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/CHANGELOG.md +62 -35
- package/dist/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/{cli-BG8XaVLT.js → cli-CP9iY6tm.js} +27 -6
- package/dist/{cli-DqXsx5Cd.cjs → cli-CPxULGJb.cjs} +26 -5
- package/dist/execAsync-CZu27rRM.cjs +44 -0
- package/dist/execAsync-DmTy47v9.js +21 -0
- package/dist/getMachineId-bsd-B4KI42yf.js +40 -0
- package/dist/getMachineId-bsd-Bm_iwnsS.cjs +42 -0
- package/dist/getMachineId-darwin-BDexu45J.cjs +43 -0
- package/dist/getMachineId-darwin-c7bqIReD.js +41 -0
- package/dist/getMachineId-linux-D2g1lfzo.js +33 -0
- package/dist/getMachineId-linux-sJzq0whF.cjs +35 -0
- package/dist/getMachineId-unsupported-C6mI58qQ.js +23 -0
- package/dist/getMachineId-unsupported-Cmowwltd.cjs +25 -0
- package/dist/getMachineId-win-5mPgREt3.cjs +63 -0
- package/dist/getMachineId-win-CvE0ShWu.js +41 -0
- package/dist/index-61dm03o3.js +279698 -0
- package/dist/index-B44NjpxU.cjs +843 -0
- package/dist/index-DWaHa380.cjs +279743 -0
- package/dist/index-Dw4Doxg2.js +821 -0
- package/dist/index.cjs +5 -14
- package/dist/index.d.cts +14 -16
- package/dist/index.d.ts +14 -16
- package/dist/index.js +2 -3
- package/dist/opentelemetry/api.cjs +12 -0
- package/dist/opentelemetry/api.d.cts +1 -0
- package/dist/opentelemetry/api.d.ts +1 -0
- package/dist/opentelemetry/api.js +1 -0
- package/dist/opentelemetry/index.cjs +12 -0
- package/dist/opentelemetry/index.d.cts +3 -0
- package/dist/opentelemetry/index.d.ts +3 -0
- package/dist/opentelemetry/index.js +1 -0
- package/dist/opentelemetry/setup.cjs +12 -0
- package/dist/opentelemetry/setup.d.cts +1 -0
- package/dist/opentelemetry/setup.d.ts +1 -0
- package/dist/opentelemetry/setup.js +1 -0
- package/package.json +46 -16
@@ -0,0 +1,33 @@
|
|
1
|
+
import { promises } from 'fs';
|
2
|
+
import { diag } from '@opentelemetry/api';
|
3
|
+
|
4
|
+
/*
|
5
|
+
* Copyright The OpenTelemetry Authors
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
*/
|
19
|
+
async function getMachineId() {
|
20
|
+
const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
|
21
|
+
for (const path of paths) {
|
22
|
+
try {
|
23
|
+
const result = await promises.readFile(path, { encoding: 'utf8' });
|
24
|
+
return result.trim();
|
25
|
+
}
|
26
|
+
catch (e) {
|
27
|
+
diag.debug(`error reading machine id: ${e}`);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
return undefined;
|
31
|
+
}
|
32
|
+
|
33
|
+
export { getMachineId };
|
@@ -0,0 +1,35 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var fs = require('fs');
|
4
|
+
var require$$0 = require('@opentelemetry/api');
|
5
|
+
|
6
|
+
/*
|
7
|
+
* Copyright The OpenTelemetry Authors
|
8
|
+
*
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
+
* you may not use this file except in compliance with the License.
|
11
|
+
* You may obtain a copy of the License at
|
12
|
+
*
|
13
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
14
|
+
*
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
+
* See the License for the specific language governing permissions and
|
19
|
+
* limitations under the License.
|
20
|
+
*/
|
21
|
+
async function getMachineId() {
|
22
|
+
const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
|
23
|
+
for (const path of paths) {
|
24
|
+
try {
|
25
|
+
const result = await fs.promises.readFile(path, { encoding: 'utf8' });
|
26
|
+
return result.trim();
|
27
|
+
}
|
28
|
+
catch (e) {
|
29
|
+
require$$0.diag.debug(`error reading machine id: ${e}`);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
return undefined;
|
33
|
+
}
|
34
|
+
|
35
|
+
exports.getMachineId = getMachineId;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { diag } from '@opentelemetry/api';
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Copyright The OpenTelemetry Authors
|
5
|
+
*
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
* you may not use this file except in compliance with the License.
|
8
|
+
* You may obtain a copy of the License at
|
9
|
+
*
|
10
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
*
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
* See the License for the specific language governing permissions and
|
16
|
+
* limitations under the License.
|
17
|
+
*/
|
18
|
+
async function getMachineId() {
|
19
|
+
diag.debug('could not read machine-id: unsupported platform');
|
20
|
+
return undefined;
|
21
|
+
}
|
22
|
+
|
23
|
+
export { getMachineId };
|
@@ -0,0 +1,25 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var require$$0 = require('@opentelemetry/api');
|
4
|
+
|
5
|
+
/*
|
6
|
+
* Copyright The OpenTelemetry Authors
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
*/
|
20
|
+
async function getMachineId() {
|
21
|
+
require$$0.diag.debug('could not read machine-id: unsupported platform');
|
22
|
+
return undefined;
|
23
|
+
}
|
24
|
+
|
25
|
+
exports.getMachineId = getMachineId;
|
@@ -0,0 +1,63 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var process = require('process');
|
4
|
+
var execAsync = require('./execAsync-CZu27rRM.cjs');
|
5
|
+
var require$$0 = require('@opentelemetry/api');
|
6
|
+
require('child_process');
|
7
|
+
require('util');
|
8
|
+
|
9
|
+
function _interopNamespace(e) {
|
10
|
+
if (e && e.__esModule) return e;
|
11
|
+
var n = Object.create(null);
|
12
|
+
if (e) {
|
13
|
+
Object.keys(e).forEach(function (k) {
|
14
|
+
if (k !== 'default') {
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
17
|
+
enumerable: true,
|
18
|
+
get: function () { return e[k]; }
|
19
|
+
});
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}
|
23
|
+
n.default = e;
|
24
|
+
return Object.freeze(n);
|
25
|
+
}
|
26
|
+
|
27
|
+
var process__namespace = /*#__PURE__*/_interopNamespace(process);
|
28
|
+
|
29
|
+
/*
|
30
|
+
* Copyright The OpenTelemetry Authors
|
31
|
+
*
|
32
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
33
|
+
* you may not use this file except in compliance with the License.
|
34
|
+
* You may obtain a copy of the License at
|
35
|
+
*
|
36
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
37
|
+
*
|
38
|
+
* Unless required by applicable law or agreed to in writing, software
|
39
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
40
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
41
|
+
* See the License for the specific language governing permissions and
|
42
|
+
* limitations under the License.
|
43
|
+
*/
|
44
|
+
async function getMachineId() {
|
45
|
+
const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
|
46
|
+
let command = '%windir%\\System32\\REG.exe';
|
47
|
+
if (process__namespace.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process__namespace.env) {
|
48
|
+
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
|
49
|
+
}
|
50
|
+
try {
|
51
|
+
const result = await execAsync.execAsync(`${command} ${args}`);
|
52
|
+
const parts = result.stdout.split('REG_SZ');
|
53
|
+
if (parts.length === 2) {
|
54
|
+
return parts[1].trim();
|
55
|
+
}
|
56
|
+
}
|
57
|
+
catch (e) {
|
58
|
+
require$$0.diag.debug(`error reading machine id: ${e}`);
|
59
|
+
}
|
60
|
+
return undefined;
|
61
|
+
}
|
62
|
+
|
63
|
+
exports.getMachineId = getMachineId;
|
@@ -0,0 +1,41 @@
|
|
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 };
|