1 |
|
2 |
|
3 |
|
4 | import * as os from "os";
|
5 | import { TelemetryInfo } from "./userAgentPolicy";
|
6 | import { Constants } from "../util/constants";
|
7 |
|
8 | export function getDefaultUserAgentKey(): string {
|
9 | return Constants.HeaderConstants.USER_AGENT;
|
10 | }
|
11 |
|
12 | export function getPlatformSpecificData(): TelemetryInfo[] {
|
13 | const runtimeInfo = {
|
14 | key: "Node",
|
15 | value: process.version,
|
16 | };
|
17 |
|
18 | const osInfo = {
|
19 | key: "OS",
|
20 | value: `(${os.arch()}-${os.type()}-${os.release()})`,
|
21 | };
|
22 |
|
23 | return [runtimeInfo, osInfo];
|
24 | }
|