Skip to content

Commit 6813518

Browse files
committed
chore: reformat
1 parent a9cd835 commit 6813518

File tree

3 files changed

+29
-38
lines changed

3 files changed

+29
-38
lines changed

src/config.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,6 @@ const mergedUserConfig = {
4040
...getCliConfig(),
4141
};
4242

43-
// Machine-specific metadata that isn't configurable
44-
export const machineMetadata = {
45-
device_id: "id", // TODO: use @mongodb-js/machine-id
46-
platform: process.platform,
47-
arch: process.arch,
48-
os_type: process.platform,
49-
os_version: process.version,
50-
};
51-
5243
const config = {
5344
...mergedUserConfig,
5445
version: packageJson.version,

src/telemetry/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pkg from "../../package.json" with { type: "json" };
22
import config from "../config.js";
3-
import { getMachineIdSync } from 'native-machine-id';
3+
import { getMachineIdSync } from "native-machine-id";
44

55
/**
66
* Machine-specific metadata formatted for telemetry

src/types/native-machine-id.d.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33
* Provides functionality to retrieve the machine ID of the current device.
44
*/
55

6-
declare module 'native-machine-id' {
7-
/**
8-
* Gets the machine ID synchronously.
9-
* @returns A string containing the machine ID.
10-
*/
11-
export function getMachineIdSync(): string;
12-
13-
/**
14-
* Gets the machine ID asynchronously.
15-
* @returns A Promise that resolves to a string containing the machine ID.
16-
*/
17-
export function getMachineId(): Promise<string>;
18-
19-
/**
20-
* Gets a machine ID that is based on the original ID but is "hashed" for privacy.
21-
* @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first.
22-
* @param {string} [type='md5'] - The hashing algorithm to use.
23-
* @returns A Promise that resolves to a string containing the hashed machine ID.
24-
*/
25-
export function machineIdSync(original?: string, type?: string): string;
26-
27-
/**
28-
* Gets a machine ID that is based on the original ID but is "hashed" for privacy.
29-
* @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first.
30-
* @param {string} [type='md5'] - The hashing algorithm to use.
31-
* @returns A Promise that resolves to a string containing the hashed machine ID.
32-
*/
33-
export function machineId(original?: string, type?: string): Promise<string>;
6+
declare module "native-machine-id" {
7+
/**
8+
* Gets the machine ID synchronously.
9+
* @returns A string containing the machine ID.
10+
*/
11+
export function getMachineIdSync(): string;
12+
13+
/**
14+
* Gets the machine ID asynchronously.
15+
* @returns A Promise that resolves to a string containing the machine ID.
16+
*/
17+
export function getMachineId(): Promise<string>;
18+
19+
/**
20+
* Gets a machine ID that is based on the original ID but is "hashed" for privacy.
21+
* @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first.
22+
* @param {string} [type='md5'] - The hashing algorithm to use.
23+
* @returns A Promise that resolves to a string containing the hashed machine ID.
24+
*/
25+
export function machineIdSync(original?: string, type?: string): string;
26+
27+
/**
28+
* Gets a machine ID that is based on the original ID but is "hashed" for privacy.
29+
* @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first.
30+
* @param {string} [type='md5'] - The hashing algorithm to use.
31+
* @returns A Promise that resolves to a string containing the hashed machine ID.
32+
*/
33+
export function machineId(original?: string, type?: string): Promise<string>;
3434
}

0 commit comments

Comments
 (0)