mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-12-31 11:29:07 +03:00
[extensions] Add new CLI: Windows' PowerShell
This commit is contained in:
@@ -448,6 +448,7 @@ const Extension = Object.freeze({
|
|||||||
ELINKS: 'ELinks',
|
ELINKS: 'ELinks',
|
||||||
HTTPIE: 'HTTPie',
|
HTTPIE: 'HTTPie',
|
||||||
LYNX: 'Lynx',
|
LYNX: 'Lynx',
|
||||||
|
POWERSHELL: 'PowerShell',
|
||||||
WGET: 'Wget'
|
WGET: 'Wget'
|
||||||
},
|
},
|
||||||
Crawler: {
|
Crawler: {
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ const LIBRARY = 'library';
|
|||||||
|
|
||||||
const CLIs = Object.freeze({
|
const CLIs = Object.freeze({
|
||||||
browser : [
|
browser : [
|
||||||
// wget / curl / Lynx / ELinks / HTTPie
|
// wget / curl / Lynx / ELinks / HTTPie / PowerShell
|
||||||
[/(wget|curl|lynx|elinks|httpie)[\/ ]\(?([\w\.-]+)/i], [NAME, VERSION, [TYPE, CLI]]
|
[/(wget|curl|lynx|elinks|httpie|powershell)[\/ ]\(?([\w\.-]+)/i], [NAME, VERSION, [TYPE, CLI]]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,26 @@
|
|||||||
"type" : "cli"
|
"type" : "cli"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "PowerShell",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.15063; en-US) PowerShell/6.0.0",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "PowerShell",
|
||||||
|
"version" : "6.0.0",
|
||||||
|
"type" : "cli"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc" : "PowerShell",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows NT; Windows NT 10.0; de-DE) WindowsPowerShell/5.1.19041.5737",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "PowerShell",
|
||||||
|
"version" : "5.1.19041.5737",
|
||||||
|
"type" : "cli"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "wget",
|
"desc" : "wget",
|
||||||
"ua" : "Wget/1.21.1",
|
"ua" : "Wget/1.21.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user