UNPKG

652 BPlain TextView Raw
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License. See License.txt in the project root for license information.
3
4import * as os from "os";
5import { TelemetryInfo } from "./userAgentPolicy";
6import { Constants } from "../util/constants";
7
8export function getDefaultUserAgentKey(): string {
9 return Constants.HeaderConstants.USER_AGENT;
10}
11
12export 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}