Skip to content

Commit

Permalink
fix: SSL_OPTIONS / PROXY_SSL_OPTIONS overloading not being generated …
Browse files Browse the repository at this point in the history
…correctly
  • Loading branch information
JCMais committed May 19, 2019
1 parent 388a3e8 commit 514acd3
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
8 changes: 7 additions & 1 deletion lib/Curl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,13 @@ interface Curl {
*
* Official libcurl documentation: [curl_easy_setopt()](http://curl.haxx.se/libcurl/c/curl_easy_setopt.html)
*/
setOpt(option: 'SSL_OPT', value: CurlSslOpt | null): this
setOpt(option: 'PROXY_SSL_OPTIONS', value: CurlSslOpt | null): this
/**
* Use `Curl.option` for predefined constants.
*
* Official libcurl documentation: [curl_easy_setopt()](http://curl.haxx.se/libcurl/c/curl_easy_setopt.html)
*/
setOpt(option: 'SSL_OPTIONS', value: CurlSslOpt | null): this
/**
* Use `Curl.option` for predefined constants.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/generated/CurlInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// This file was generated by scripts/build-options.js on 2019-05-19T12:30:11.533Z
// This file was generated by scripts/build-options.js on 2019-05-19T12:52:43.008Z
// Do not edit manually

export interface CurlInfo {
Expand Down
13 changes: 7 additions & 6 deletions lib/generated/CurlOption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// This file was generated by scripts/build-options.js on 2019-05-19T12:30:10.473Z
// This file was generated by scripts/build-options.js on 2019-05-19T12:52:42.897Z
// Do not edit manually

import { CurlGssApi } from '../enum/CurlGssApi'
Expand Down Expand Up @@ -3541,7 +3541,8 @@ export type SpecificOptions =
| 'SHARE'
| 'HTTPPOST'
| 'GSSAPI_DELEGATION'
| 'SSL_OPT'
| 'PROXY_SSL_OPTIONS'
| 'SSL_OPTIONS'
export type CurlOptionValueType = {
/**
* Path to an abstract Unix domain socket.
Expand Down Expand Up @@ -5386,14 +5387,14 @@ export type CurlOptionValueType = {
*
* Official libcurl documentation: : [https://curl.haxx.se/libcurl/c/CURLOPT_PROXY_SSL_OPTIONS.html](https://curl.haxx.se/libcurl/c/CURLOPT_PROXY_SSL_OPTIONS.html)
*/
PROXY_SSL_OPTIONS?: string | number | boolean | null
PROXY_SSL_OPTIONS?: CurlSslOpt | null

/**
* Control proxy SSL behavior.
*
* Official libcurl documentation: : [https://curl.haxx.se/libcurl/c/CURLOPT_PROXY_SSL_OPTIONS.html](https://curl.haxx.se/libcurl/c/CURLOPT_PROXY_SSL_OPTIONS.html)
*/
proxySslOptions?: string | number | boolean | null
proxySslOptions?: CurlSslOpt | null

/**
* Verify the host name in the proxy SSL certificate.
Expand Down Expand Up @@ -6156,14 +6157,14 @@ export type CurlOptionValueType = {
*
* Official libcurl documentation: : [https://curl.haxx.se/libcurl/c/CURLOPT_SSL_OPTIONS.html](https://curl.haxx.se/libcurl/c/CURLOPT_SSL_OPTIONS.html)
*/
SSL_OPTIONS?: string | number | boolean | null
SSL_OPTIONS?: CurlSslOpt | null

/**
* Control SSL behavior.
*
* Official libcurl documentation: : [https://curl.haxx.se/libcurl/c/CURLOPT_SSL_OPTIONS.html](https://curl.haxx.se/libcurl/c/CURLOPT_SSL_OPTIONS.html)
*/
sslOptions?: string | number | boolean | null
sslOptions?: CurlSslOpt | null

/**
* Disable SSL session-id cache.
Expand Down
2 changes: 1 addition & 1 deletion lib/generated/MultiOption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// This file was generated by scripts/build-options.js on 2019-05-19T12:30:12.470Z
// This file was generated by scripts/build-options.js on 2019-05-19T12:52:43.146Z
// Do not edit manually

export interface MultiOption {
Expand Down
8 changes: 7 additions & 1 deletion lib/types/EasyNativeBinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ export declare class EasyNativeBinding {
*
* Official libcurl documentation: [curl_easy_setopt()](http://curl.haxx.se/libcurl/c/curl_easy_setopt.html)
*/
setOpt(option: 'SSL_OPT', value: CurlSslOpt | null): CurlCode
setOpt(option: 'PROXY_SSL_OPTIONS', value: CurlSslOpt | null): CurlCode
/**
* Use `Curl.option` for predefined constants.
*
* Official libcurl documentation: [curl_easy_setopt()](http://curl.haxx.se/libcurl/c/curl_easy_setopt.html)
*/
setOpt(option: 'SSL_OPTIONS', value: CurlSslOpt | null): CurlCode
/**
* Use `Curl.option` for predefined constants.
*
Expand Down
4 changes: 2 additions & 2 deletions scripts/data/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const optionKindValueMap = {

// enums
GSSAPI_DELEGATION: 'CurlGssApi',
PROXY_SSL_OPT: 'CurlSslOpt',
SSL_OPT: 'CurlSslOpt',
PROXY_SSL_OPTIONS: 'CurlSslOpt',
SSL_OPTIONS: 'CurlSslOpt',
_: 'string | number | boolean',
}

Expand Down

0 comments on commit 514acd3

Please sign in to comment.