mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-04-07 15:59:50 +00:00
GPR authentication support
This commit is contained in:
committed by
Alex Mullans
parent
6c0e2a2a6b
commit
6bd4969ec6
37
node_modules/os-name/index.d.ts
generated
vendored
Normal file
37
node_modules/os-name/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/// <reference types="node"/>
|
||||
|
||||
/**
|
||||
Get the name of the current operating system.
|
||||
|
||||
By default, the name of the current operating system is returned.
|
||||
|
||||
@param platform - Custom platform name.
|
||||
@param release - Custom release name.
|
||||
|
||||
@example
|
||||
```
|
||||
import * as os fron 'os';
|
||||
import osName = require('os-name');
|
||||
|
||||
// On a macOS Sierra system
|
||||
|
||||
osName();
|
||||
//=> 'macOS Sierra'
|
||||
|
||||
osName(os.platform(), os.release());
|
||||
//=> 'macOS Sierra'
|
||||
|
||||
osName('darwin', '14.0.0');
|
||||
//=> 'OS X Yosemite'
|
||||
|
||||
osName('linux', '3.13.0-24-generic');
|
||||
//=> 'Linux 3.13'
|
||||
|
||||
osName('win32', '6.3.9600');
|
||||
//=> 'Windows 8.1'
|
||||
```
|
||||
*/
|
||||
declare function osName(): string;
|
||||
declare function osName(platform: NodeJS.Platform, release: string): string;
|
||||
|
||||
export = osName;
|
46
node_modules/os-name/index.js
generated
vendored
Normal file
46
node_modules/os-name/index.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
const os = require('os');
|
||||
const macosRelease = require('macos-release');
|
||||
const winRelease = require('windows-release');
|
||||
|
||||
const osName = (platform, release) => {
|
||||
if (!platform && release) {
|
||||
throw new Error('You can\'t specify a `release` without specifying `platform`');
|
||||
}
|
||||
|
||||
platform = platform || os.platform();
|
||||
|
||||
let id;
|
||||
|
||||
if (platform === 'darwin') {
|
||||
if (!release && os.platform() === 'darwin') {
|
||||
release = os.release();
|
||||
}
|
||||
|
||||
const prefix = release ? (Number(release.split('.')[0]) > 15 ? 'macOS' : 'OS X') : 'macOS';
|
||||
id = release ? macosRelease(release).name : '';
|
||||
return prefix + (id ? ' ' + id : '');
|
||||
}
|
||||
|
||||
if (platform === 'linux') {
|
||||
if (!release && os.platform() === 'linux') {
|
||||
release = os.release();
|
||||
}
|
||||
|
||||
id = release ? release.replace(/^(\d+\.\d+).*/, '$1') : '';
|
||||
return 'Linux' + (id ? ' ' + id : '');
|
||||
}
|
||||
|
||||
if (platform === 'win32') {
|
||||
if (!release && os.platform() === 'win32') {
|
||||
release = os.release();
|
||||
}
|
||||
|
||||
id = release ? winRelease(release) : '';
|
||||
return 'Windows' + (id ? ' ' + id : '');
|
||||
}
|
||||
|
||||
return platform;
|
||||
};
|
||||
|
||||
module.exports = osName;
|
9
node_modules/os-name/license
generated
vendored
Normal file
9
node_modules/os-name/license
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
83
node_modules/os-name/package.json
generated
vendored
Normal file
83
node_modules/os-name/package.json
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"os-name@3.1.0",
|
||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
||||
]
|
||||
],
|
||||
"_from": "os-name@3.1.0",
|
||||
"_id": "os-name@3.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==",
|
||||
"_location": "/os-name",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "os-name@3.1.0",
|
||||
"name": "os-name",
|
||||
"escapedName": "os-name",
|
||||
"rawSpec": "3.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@octokit/endpoint/universal-user-agent",
|
||||
"/@octokit/request/universal-user-agent",
|
||||
"/@octokit/rest/universal-user-agent",
|
||||
"/universal-user-agent"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
|
||||
"_spec": "3.1.0",
|
||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/os-name/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"macos-release": "^2.2.0",
|
||||
"windows-release": "^3.1.0"
|
||||
},
|
||||
"description": "Get the name of the current operating system. Example: macOS Sierra",
|
||||
"devDependencies": {
|
||||
"@types/node": "^11.13.0",
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/os-name#readme",
|
||||
"keywords": [
|
||||
"os",
|
||||
"operating",
|
||||
"system",
|
||||
"platform",
|
||||
"name",
|
||||
"title",
|
||||
"release",
|
||||
"version",
|
||||
"macos",
|
||||
"windows",
|
||||
"linux"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "os-name",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/os-name.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "3.1.0"
|
||||
}
|
64
node_modules/os-name/readme.md
generated
vendored
Normal file
64
node_modules/os-name/readme.md
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
# os-name [](https://travis-ci.org/sindresorhus/os-name)
|
||||
|
||||
> Get the name of the current operating system<br>
|
||||
> Example: `macOS Sierra`
|
||||
|
||||
Useful for analytics and debugging.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install os-name
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const os = require('os');
|
||||
const osName = require('os-name');
|
||||
|
||||
// On a macOS Sierra system
|
||||
|
||||
osName();
|
||||
//=> 'macOS Sierra'
|
||||
|
||||
osName(os.platform(), os.release());
|
||||
//=> 'macOS Sierra'
|
||||
|
||||
osName('darwin', '14.0.0');
|
||||
//=> 'OS X Yosemite'
|
||||
|
||||
osName('linux', '3.13.0-24-generic');
|
||||
//=> 'Linux 3.13'
|
||||
|
||||
osName('win32', '6.3.9600');
|
||||
//=> 'Windows 8.1'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### osName([platform, release])
|
||||
|
||||
By default, the name of the current operating system is returned.
|
||||
|
||||
You can optionally supply a custom [`os.platform()`](https://nodejs.org/api/os.html#os_os_platform) and [`os.release()`](https://nodejs.org/api/os.html#os_os_release).
|
||||
|
||||
Check out [`getos`](https://github.com/wblankenship/getos) if you need the Linux distribution name.
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
Production systems depend on this package for logging / tracking. Please be careful when introducing new output, and adhere to existing output format (whitespace, capitalization, etc.).
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [os-name-cli](https://github.com/sindresorhus/os-name-cli) - CLI for this module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Reference in New Issue
Block a user