forked from mirrors/action-gh-release
remove node_modules
This commit is contained in:
parent
c7638c8893
commit
60358a145c
444 changed files with 0 additions and 83958 deletions
30
node_modules/windows-release/index.d.ts
generated
vendored
30
node_modules/windows-release/index.d.ts
generated
vendored
|
@ -1,30 +0,0 @@
|
|||
/**
|
||||
Get the name of a Windows version from the release number: `5.1.2600` → `XP`.
|
||||
|
||||
@param release - By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release).
|
||||
|
||||
Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`.
|
||||
|
||||
@example
|
||||
```
|
||||
import * as os from 'os';
|
||||
import windowsRelease = require('windows-release');
|
||||
|
||||
// On a Windows XP system
|
||||
|
||||
windowsRelease();
|
||||
//=> 'XP'
|
||||
|
||||
os.release();
|
||||
//=> '5.1.2600'
|
||||
|
||||
windowsRelease(os.release());
|
||||
//=> 'XP'
|
||||
|
||||
windowsRelease('4.9.3000');
|
||||
//=> 'ME'
|
||||
```
|
||||
*/
|
||||
declare function windowsRelease(release?: string): string;
|
||||
|
||||
export = windowsRelease;
|
44
node_modules/windows-release/index.js
generated
vendored
44
node_modules/windows-release/index.js
generated
vendored
|
@ -1,44 +0,0 @@
|
|||
'use strict';
|
||||
const os = require('os');
|
||||
const execa = require('execa');
|
||||
|
||||
// Reference: https://www.gaijin.at/en/lstwinver.php
|
||||
const names = new Map([
|
||||
['10.0', '10'],
|
||||
['6.3', '8.1'],
|
||||
['6.2', '8'],
|
||||
['6.1', '7'],
|
||||
['6.0', 'Vista'],
|
||||
['5.2', 'Server 2003'],
|
||||
['5.1', 'XP'],
|
||||
['5.0', '2000'],
|
||||
['4.9', 'ME'],
|
||||
['4.1', '98'],
|
||||
['4.0', '95']
|
||||
]);
|
||||
|
||||
const windowsRelease = release => {
|
||||
const version = /\d+\.\d/.exec(release || os.release());
|
||||
|
||||
if (release && !version) {
|
||||
throw new Error('`release` argument doesn\'t match `n.n`');
|
||||
}
|
||||
|
||||
const ver = (version || [])[0];
|
||||
|
||||
// Server 2008, 2012 and 2016 versions are ambiguous with desktop versions and must be detected at runtime.
|
||||
// If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version
|
||||
// then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx
|
||||
// If the resulting caption contains the year 2008, 2012 or 2016, it is a server version, so return a server OS name.
|
||||
if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) {
|
||||
const stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || '';
|
||||
const year = (stdout.match(/2008|2012|2016/) || [])[0];
|
||||
if (year) {
|
||||
return `Server ${year}`;
|
||||
}
|
||||
}
|
||||
|
||||
return names.get(ver);
|
||||
};
|
||||
|
||||
module.exports = windowsRelease;
|
9
node_modules/windows-release/license
generated
vendored
9
node_modules/windows-release/license
generated
vendored
|
@ -1,9 +0,0 @@
|
|||
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.
|
78
node_modules/windows-release/package.json
generated
vendored
78
node_modules/windows-release/package.json
generated
vendored
|
@ -1,78 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"windows-release@3.2.0",
|
||||
"/Users/dougtangren/code/rust/action-gh-release"
|
||||
]
|
||||
],
|
||||
"_from": "windows-release@3.2.0",
|
||||
"_id": "windows-release@3.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==",
|
||||
"_location": "/windows-release",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "windows-release@3.2.0",
|
||||
"name": "windows-release",
|
||||
"escapedName": "windows-release",
|
||||
"rawSpec": "3.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/os-name"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.2.0.tgz",
|
||||
"_spec": "3.2.0",
|
||||
"_where": "/Users/dougtangren/code/rust/action-gh-release",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/windows-release/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"execa": "^1.0.0"
|
||||
},
|
||||
"description": "Get the name of a Windows version from the release number: `5.1.2600` → `XP`",
|
||||
"devDependencies": {
|
||||
"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/windows-release#readme",
|
||||
"keywords": [
|
||||
"os",
|
||||
"win",
|
||||
"win32",
|
||||
"windows",
|
||||
"operating",
|
||||
"system",
|
||||
"platform",
|
||||
"name",
|
||||
"title",
|
||||
"release",
|
||||
"version"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "windows-release",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/windows-release.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "3.2.0"
|
||||
}
|
56
node_modules/windows-release/readme.md
generated
vendored
56
node_modules/windows-release/readme.md
generated
vendored
|
@ -1,56 +0,0 @@
|
|||
# windows-release [](https://travis-ci.org/sindresorhus/windows-release)
|
||||
|
||||
> Get the name of a Windows version from the release number: `5.1.2600` → `XP`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install windows-release
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const os = require('os');
|
||||
const windowsRelease = require('windows-release');
|
||||
|
||||
// On a Windows XP system
|
||||
|
||||
windowsRelease();
|
||||
//=> 'XP'
|
||||
|
||||
os.release();
|
||||
//=> '5.1.2600'
|
||||
|
||||
windowsRelease(os.release());
|
||||
//=> 'XP'
|
||||
|
||||
windowsRelease('4.9.3000');
|
||||
//=> 'ME'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### windowsRelease([release])
|
||||
|
||||
#### release
|
||||
|
||||
Type: `string`
|
||||
|
||||
By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release).
|
||||
|
||||
Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system
|
||||
- [macos-release](https://github.com/sindresorhus/macos-release) - Get the name and version of a macOS release from the Darwin version
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Loading…
Add table
Add a link
Reference in a new issue