@naria2/options
Advanced tools
Comparing version 0.0.9-beta.1 to 0.0.9-beta.2
@@ -241,13 +241,84 @@ import { PartialDeep } from 'type-fest'; | ||
}; | ||
type Aria2RPCOptionsKey = 'pause' | 'pause-metadata' | 'rpc-allow-origin-all' | 'rpc-certificate' | 'rpc-listen-all' | 'rpc-listen-port' | 'rpc-max-request-size' | 'rpc-private-key' | 'rpc-save-upload-metadata' | 'rpc-secret' | 'rpc-secure'; | ||
/** | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#rpc-options | ||
*/ | ||
interface Aria2RPCOptions { | ||
/** | ||
* Pause download after added. This option is effective only when --enable-rpc=true is given. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-pause | ||
*/ | ||
pause: boolean; | ||
/** | ||
* Pause downloads created as a result of metadata download. There are 3 types of metadata downloads in aria2: (1) downloading .torrent file. (2) downloading torrent metadata using magnet link. (3) downloading metalink file. These metadata downloads will generate downloads using their metadata. This option pauses these subsequent downloads. This option is effective only when --enable-rpc=true is given. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-pause-metadata | ||
*/ | ||
pauseMetadata: boolean; | ||
/** | ||
* Add Access-Control-Allow-Origin header field with value * to the RPC response. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-allow-origin-all | ||
*/ | ||
allowOriginAll: boolean; | ||
/** | ||
* Use the certificate in FILE for RPC server. The certificate must be either in PKCS12 (.p12, .pfx) or in PEM format. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-certificate | ||
*/ | ||
certificate: string; | ||
/** | ||
* Listen incoming JSON-RPC/XML-RPC requests on all network interfaces. If false is given, listen only on local loopback interface. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-listen-all | ||
*/ | ||
listenAll: boolean; | ||
/** | ||
* Specify a port number for JSON-RPC/XML-RPC server to listen to. Possible Values: 1024 -65535. | ||
* | ||
* @default 6800 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-listen-port | ||
*/ | ||
listenPort: number; | ||
maxRequestSize: number; | ||
/** | ||
* Set max size of JSON-RPC/XML-RPC request. If aria2 detects the request is more than SIZE bytes, it drops connection. | ||
* | ||
* @default '2M' | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-max-request-size | ||
*/ | ||
maxRequestSize: string; | ||
/** | ||
* Use the private key in FILE for RPC server. The private key must be decrypted and in PEM format. Use --rpc-secure option to enable encryption. See also --rpc-certificate option. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-private-key | ||
*/ | ||
privateKey: string; | ||
/** | ||
* Save the uploaded torrent or metalink meta data in the directory specified by --dir option. The file name consists of SHA-1 hash hex string of meta data plus extension. For torrent, the extension is '.torrent'. For metalink, it is '.meta4'. If false is given to this option, the downloads added by aria2.addTorrent() or aria2.addMetalink() will not be saved by --save-session option. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-save-upload-metadata | ||
*/ | ||
saveUploadMetadata: boolean; | ||
/** | ||
* Set RPC secret authorization token. Read [RPC authorization secret token](https://aria2.github.io/manual/en/html/aria2c.html#rpc-auth) to know how this option value is used. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-secret | ||
*/ | ||
secret: string; | ||
/** | ||
* RPC transport will be encrypted by SSL/TLS. The RPC clients must use https scheme to access the server. For WebSocket client, use wss scheme. Use --rpc-certificate and --rpc-private-key options to specify the server certificate and private key. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-secure | ||
*/ | ||
secure: boolean; | ||
@@ -257,2 +328,3 @@ } | ||
declare function resolveProxyOptions(options?: PartialDeep<Aria2ProxyOptions>): Partial<Record<Aria2ClientInputOptionKey, string>>; | ||
declare function resolveRPCOptions(options?: PartialDeep<Aria2RPCOptions>): Partial<Record<Aria2RPCOptionsKey, string>>; | ||
declare function resolveOptions(options: PartialDeep<Aria2Options>): Partial<Record<Aria2ClientInputOptionKey, string>>; | ||
@@ -263,2 +335,2 @@ | ||
export { Aria2BasicOptions, Aria2BtMetalinkOptions, Aria2BtOptions, Aria2FTPOptions, Aria2HTTPFTPOptions, Aria2HTTPOptions, Aria2Options, Aria2ProxyOptions, Aria2RPCOptions, isDef, resolveArray, resolveOptions, resolveProxyOptions }; | ||
export { Aria2BasicOptions, Aria2BtMetalinkOptions, Aria2BtOptions, Aria2FTPOptions, Aria2HTTPFTPOptions, Aria2HTTPOptions, Aria2Options, Aria2ProxyOptions, Aria2RPCOptions, Aria2RPCOptionsKey, isDef, resolveArray, resolveOptions, resolveProxyOptions, resolveRPCOptions }; |
{ | ||
"name": "@naria2/options", | ||
"version": "0.0.9-beta.1", | ||
"version": "0.0.9-beta.2", | ||
"description": "Shared aria2 options type declerations and utils for naria2", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25166
568