Permalink
Cannot retrieve contributors at this time
28 lines (22 sloc)
834 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/@azure/ms-rest-js/lib/policies/msRestUserAgentPolicy.browser.ts
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// Licensed under the MIT License. See License.txt in the project root for license information. | |
/* | |
* NOTE: When moving this file, please update "browser" section in package.json | |
* and "plugins" section in webpack.testconfig.ts. | |
*/ | |
import { TelemetryInfo } from "./userAgentPolicy"; | |
interface NavigatorEx extends Navigator { | |
// oscpu is not yet standards-compliant, but can not be undefined in TypeScript 3.6.2 | |
readonly oscpu: string; | |
} | |
export function getDefaultUserAgentKey(): string { | |
return "x-ms-command-name"; | |
} | |
export function getPlatformSpecificData(): TelemetryInfo[] { | |
const navigator = self.navigator as NavigatorEx; | |
const osInfo = { | |
key: "OS", | |
value: (navigator.oscpu || navigator.platform).replace(" ", ""), | |
}; | |
return [osInfo]; | |
} |