mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 06:32:14 +03:00
[extensions] Add new library: Bun, Dart, Deno, hackney, Node.js, rest-client, undici
This commit is contained in:
@@ -708,9 +708,13 @@ const Extension = Object.freeze({
|
||||
AIOHTTP: 'aiohttp',
|
||||
APACHE_HTTPCLIENT: 'Apache-HttpClient',
|
||||
AXIOS: 'axios',
|
||||
BUN: 'Bun',
|
||||
DART: 'Dart',
|
||||
DENO: 'Deno',
|
||||
GO_HTTP_CLIENT: 'go-http-client',
|
||||
GOT: 'got',
|
||||
GUZZLEHTTP: 'GuzzleHttp',
|
||||
HACKNEY: 'hackney',
|
||||
JAVA: 'Java',
|
||||
JAVA_HTTPCLIENT: 'Java-http-client',
|
||||
JSDOM: 'jsdom',
|
||||
@@ -718,16 +722,19 @@ const Extension = Object.freeze({
|
||||
LUA_RESTY_HTTP: 'lua-resty-http',
|
||||
NEEDLE: 'Needle',
|
||||
NUTCH: 'Nutch',
|
||||
OKHTTP: 'OkHttp',
|
||||
NODE_FETCH: 'node-fetch',
|
||||
NODE_JS: 'Node.js',
|
||||
NODE_SUPERAGENT: 'node-superagent',
|
||||
OKHTTP: 'OkHttp',
|
||||
PHP_SOAP: 'PHP-SOAP',
|
||||
POSTMAN_RUNTIME: 'PostmanRuntime',
|
||||
PYTHON_HTTPX: 'python-httpx',
|
||||
PYTHON_URLLIB: 'python-urllib',
|
||||
PYTHON_URLLIB3: 'python-urllib3',
|
||||
PYTHON_REQUESTS: 'python-requests',
|
||||
SCRAPY: 'Scrapy'
|
||||
REST_CLIENT: 'rest-client',
|
||||
SCRAPY: 'Scrapy',
|
||||
UNDICI: 'undici'
|
||||
}
|
||||
},
|
||||
DeviceVendor: {
|
||||
|
||||
@@ -389,13 +389,15 @@ const MediaPlayers = Object.freeze({
|
||||
|
||||
const Libraries = Object.freeze({
|
||||
browser : [
|
||||
// Apache-HttpClient/Axios/go-http-client/got/GuzzleHttp/Java[-HttpClient]/jsdom/libwww-perl/lua-resty-http/Needle/node-fetch/OkHttp/PHP-SOAP/PostmanRuntime/python-urllib/python-requests/Scrapy/superagent
|
||||
[
|
||||
/^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:httpx|urllib[23]?|requests)|scrapy)\/([\w\.]+)/i,
|
||||
// Apache-HttpClient/Axios/Bun/Dart/go-http-client/got/GuzzleHttp/hackney/Java[-HttpClient]/jsdom/libwww-perl/lua-resty-http/Needle/Node.js/node-fetch/OkHttp/PHP-SOAP/PostmanRuntime/python-urllib/python-requests/rest-client/Scrapy/superagent
|
||||
/^(apache-httpclient|axios|bun|dart|deno|(?:go|java)-http-client|got|guzzlehttp|hackney|java|libwww-perl|lua-resty-http|needle|node(?:\.js|-fetch|-superagent)|okhttp|php-soap|postmanruntime|python-(?:httpx|urllib[23]?|requests)|rest-client|scrapy)\/([\w\.]+)/i,
|
||||
/(adobeair|aiohttp|jsdom)\/([\w\.]+)/i,
|
||||
/(nutch)-([\w\.-]+)(\(|$)/i,
|
||||
/\((java)\/([\w\.]+)/i
|
||||
], [NAME, VERSION, [TYPE, LIBRARY]]
|
||||
], [NAME, VERSION, [TYPE, LIBRARY]], [
|
||||
/(node-fetch|undici)/i
|
||||
], [NAME, [TYPE, LIBRARY]]
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@@ -39,6 +39,36 @@
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Bun",
|
||||
"ua" : "Bun/1.0.6",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Bun",
|
||||
"version" : "1.0.6",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Dart",
|
||||
"ua" : "Dart/3.5 (dart:io)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Dart",
|
||||
"version" : "3.5",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Deno",
|
||||
"ua" : "Deno/2.1.7",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Deno",
|
||||
"version" : "2.1.7",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "go-http-client",
|
||||
"ua" : "go-http-client/1.1",
|
||||
@@ -59,6 +89,16 @@
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "hackney",
|
||||
"ua" : "hackney/1.20.1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "hackney",
|
||||
"version" : "1.20.1",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "GuzzleHttp",
|
||||
"ua" : "GuzzleHttp/6.5.5 curl/7.70.0 PHP/7.4.22",
|
||||
@@ -129,6 +169,26 @@
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Node.js",
|
||||
"ua" : "Node.js/22",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Node.js",
|
||||
"version" : "22",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "node-fetch",
|
||||
"ua" : "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "node-fetch",
|
||||
"version" : "1.0",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Nutch",
|
||||
"ua" : "AliyunSecBot/Nutch-1.21-SNAPSHOT",
|
||||
@@ -149,16 +209,6 @@
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "node-fetch",
|
||||
"ua" : "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "node-fetch",
|
||||
"version" : "1.0",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "PHP-SOAP",
|
||||
"ua" : "PHP-SOAP/7.4.33",
|
||||
@@ -219,6 +269,16 @@
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "rest-client",
|
||||
"ua" : "rest-client/2.1.0 (linux-gnu x86_64) ruby/2.7.2p137",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "rest-client",
|
||||
"version" : "2.1.0",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Scrapy",
|
||||
"ua" : "Scrapy/1.5.0 (+https://scrapy.org)",
|
||||
@@ -238,5 +298,15 @@
|
||||
"version" : "5.0.2",
|
||||
"type" : "library"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "undici",
|
||||
"ua" : "undici",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "undici",
|
||||
"version" : "undefined",
|
||||
"type" : "library"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user