Skip to content

Commit 17ee177

Browse files
committed
feat: add CurlVersion enum
1 parent 0d444a6 commit 17ee177

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1616
- Electron v3, v4 and v5
1717
- Added `isMonitoringSockets` boolean readonly property to `Easy` instances, it is `true`
1818
when `monitorSocketEvents` has been called on that `Easy` instance.
19+
- Added `CurlVersion` enum to be used with the `rawFeatures` property returned from `Curl.getVersionInfo`.
1920
### Changed
2021

2122
## [2.1.1] - 2020-04-28

lib/enum/CurlVersion.ts

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/**
2+
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
/**
8+
* Object with constants for use with the `rawFeatures` member
9+
* of {@link CurlVersionInfoNativeBindingObject | `CurlVersionInfoNativeBindingObject`}, which is returned
10+
* from {@link Curl.getVersionInfo | `Curl.getVersionInfo`}.
11+
*
12+
* `CURL_VERSION_IPV6` becomes `CurlVersion.Ipv6`
13+
* `CURL_VERSION_GSSNEGOTIATE` becomes `CurlVersion.GssNegotiate`
14+
* ...
15+
*
16+
* @public
17+
*/
18+
export enum CurlVersion {
19+
/**
20+
* IPv6-enabled
21+
*/
22+
Ipv6 = 1 << 0,
23+
/**
24+
* Kerberos V4 auth is supported (deprecated)
25+
*/
26+
Kerberos4 = 1 << 1,
27+
/**
28+
* SSL options are present
29+
*/
30+
Ssl = 1 << 2,
31+
/**
32+
* libz features are present
33+
*/
34+
Libz = 1 << 3,
35+
/**
36+
* NTLM auth is supported
37+
*/
38+
Ntlm = 1 << 4,
39+
/**
40+
* Negotiate auth is supported (deprecated)
41+
*/
42+
GssNegotiate = 1 << 5,
43+
/**
44+
* libcurl was built with debug capabilities
45+
*/
46+
Debug = 1 << 6,
47+
/**
48+
* Asynchronous DNS resolver is available
49+
*/
50+
AsynchDns = 1 << 7,
51+
/**
52+
* SPNEGO auth is supported
53+
*/
54+
Spnego = 1 << 8,
55+
/**
56+
* Supports files larger than 2GB
57+
*/
58+
LargeFile = 1 << 9,
59+
/**
60+
* Internationized Domain Names are supported
61+
*/
62+
Idn = 1 << 10,
63+
/**
64+
* Built against Windows SSPI
65+
*/
66+
Sspi = 1 << 11,
67+
/**
68+
* Character conversions supported
69+
*/
70+
Conv = 1 << 12,
71+
/**
72+
* Debug memory tracking supported
73+
*/
74+
CurlDebug = 1 << 13,
75+
/**
76+
* TLS-SRP auth is supported
77+
*/
78+
TlsAuthSrp = 1 << 14,
79+
/**
80+
* NTLM delegation to winbind helper is supported
81+
*/
82+
NtlmWb = 1 << 15,
83+
/**
84+
* HTTP2 support built-in
85+
*/
86+
Http2 = 1 << 16,
87+
/**
88+
* Built against a GSS-API library
89+
*/
90+
GssApi = 1 << 17,
91+
/**
92+
* Kerberos V5 auth is supported
93+
*/
94+
Kerberos5 = 1 << 18,
95+
/**
96+
* Unix domain sockets support
97+
*/
98+
UnixSockets = 1 << 19,
99+
/**
100+
* Mozilla's Public Suffix List, used for cookie domain verification
101+
*/
102+
Psl = 1 << 20,
103+
/**
104+
* HTTPS-proxy support built-in
105+
*/
106+
HttpsProxy = 1 << 21,
107+
/**
108+
* Multiple SSL backends available
109+
*/
110+
MultiSsl = 1 << 22,
111+
/**
112+
* Brotli features are present.
113+
*/
114+
Brotli = 1 << 23,
115+
/**
116+
* Alt-Svc handling built-in
117+
*/
118+
AltSvc = 1 << 24,
119+
/**
120+
* HTTP3 support built-in
121+
*/
122+
Http3 = 1 << 25,
123+
}

0 commit comments

Comments
 (0)