@naria2/options
Advanced tools
Comparing version 0.0.9-beta.2 to 0.0.9-beta.3
@@ -1,9 +0,12 @@ | ||
import { PartialDeep } from 'type-fest'; | ||
import { Aria2ClientInputOptionKey } from 'maria2'; | ||
import { MergeDeep, PartialDeep } from 'type-fest'; | ||
import { Aria2ClientInputOptionKey, Aria2ClientGlobalOptionKey } from 'maria2'; | ||
type StrSize = `${number}${'' | 'K' | 'M'}`; | ||
/** | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#basic-options | ||
*/ | ||
interface Aria2BasicOptions { | ||
interface Aria2BasicInputOptions { | ||
/** | ||
* -d, --dir=<DIR> | ||
* | ||
* The directory to store the downloaded file. | ||
@@ -15,18 +18,6 @@ * | ||
/** | ||
* The file name of the log file. If - is specified, log is written to stdout. If empty string("") is specified, or this option is omitted, no log is written to disk at all. | ||
* -V, --check-integrity [true|false] | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-l | ||
*/ | ||
log: string | undefined; | ||
/** | ||
* Set the maximum number of parallel downloads for every queue item. See also the --split option. | ||
* Check file integrity by validating piece hashes or a hash of entire file. This option has effect only in BitTorrent, Metalink downloads with checksums or HTTP(S)/FTP downloads with [--checksum](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-checksum) option. If piece hashes are provided, this option can detect damaged portions of a file and re-download them. If a hash of entire file is provided, hash check is only done when file has been already download. This is determined by file length. If hash check fails, file is re-downloaded from scratch. If both piece hashes and a hash of entire file are provided, only piece hashes are used. | ||
* | ||
* @default 5 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-j | ||
*/ | ||
maxConcurrentDownloads: number; | ||
/** | ||
* Check file integrity by validating piece hashes or a hash of entire file. This option has effect only in BitTorrent, Metalink downloads with checksums or HTTP(S)/FTP downloads with --checksum option. If piece hashes are provided, this option can detect damaged portions of a file and re-download them. If a hash of entire file is provided, hash check is only done when file has been already download. This is determined by file length. If hash check fails, file is re-downloaded from scratch. If both piece hashes and a hash of entire file are provided, only piece hashes are used. | ||
* | ||
* @default false | ||
@@ -38,2 +29,4 @@ * | ||
/** | ||
* -c, --continue | ||
* | ||
* Continue downloading a partially downloaded file. Use this option to resume a download started by a web browser or another program which downloads files sequentially from the beginning. Currently this option is only applicable to HTTP(S)/FTP downloads. | ||
@@ -45,2 +38,18 @@ * | ||
} | ||
interface Aria2BasicGlobalOptions { | ||
/** | ||
* The file name of the log file. If - is specified, log is written to `stdout`. If empty string("") is specified, or this option is omitted, no log is written to disk at all. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-l | ||
*/ | ||
log: string | undefined; | ||
/** | ||
* Set the maximum number of parallel downloads for every queue item. See also the [--split](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-s) option. | ||
* | ||
* @default 5 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-j | ||
*/ | ||
maxConcurrentDownloads: number; | ||
} | ||
/** | ||
@@ -77,5 +86,327 @@ * @link https://aria2.github.io/manual/en/html/aria2c.html#http-ftp-sftp-options | ||
*/ | ||
interface Aria2BtOptions { | ||
interface Aria2BtInputOptions { | ||
/** | ||
* Enable Local Peer Discovery. If a private flag is set in a torrent, aria2 doesn't use this feature for that download even if `true` is given. | ||
* | ||
* @default false | ||
* | ||
* @link http://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-enable-lpd | ||
*/ | ||
enableLpd: boolean; | ||
/** | ||
* Comma separated list of BitTorrent tracker's announce URI to remove. You can use special value `*` which matches all URIs, thus removes all announce URIs. When specifying `*` in shell command-line, don't forget to escape or quote it. See also `--bt-tracker` option. | ||
* | ||
* @link http://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-exclude-tracker | ||
*/ | ||
excludeTracker: string[]; | ||
/** | ||
* Specify the external IP address to use in BitTorrent download and DHT. It may be sent to BitTorrent tracker. For DHT, this option should be set to report that local node is downloading a particular torrent. This is critical to use DHT in a private network. Although this function is named `external`, it can accept any kind of IP addresses. | ||
* | ||
* @link http://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-external-ip | ||
*/ | ||
externalIp: string; | ||
/** | ||
* Requires BitTorrent message payload encryption with arc4. This is a shorthand of `--bt-require-crypto` `--bt-min-crypto-level=arc4`. This option does not change the option value of those options. If `true` is given, deny legacy BitTorrent handshake and only use Obfuscation handshake and always encrypt message payload. | ||
* | ||
* @default false | ||
* | ||
* @link http://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-force-encryption | ||
*/ | ||
forceEncryption: boolean; | ||
/** | ||
* If `true` is given, after hash check using [--check-integrity](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-V) option and file is complete, continue to seed file. If you want to check file and download it only when it is damaged or incomplete, set this option to `false`. This option has effect only on BitTorrent download. | ||
* | ||
* @default true | ||
* | ||
* @link http://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-hash-check-seed | ||
*/ | ||
hashCheckSeed: boolean; | ||
/** | ||
* Before getting torrent metadata from DHT when downloading with magnet link, first try to read file saved by [--bt-save-metadata](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-save-metadata) option. If it is successful, then skip downloading metadata from DHT. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-load-saved-metadata | ||
*/ | ||
loadSavedMetadata: boolean; | ||
/** | ||
* Specify the maximum number of peers per torrent. `0` means unlimited. See also [--bt-request-peer-speed-limit](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-request-peer-speed-limit) option. | ||
* | ||
* @default 55 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-max-peers | ||
*/ | ||
maxPeers: number; | ||
/** | ||
* Download meta data only. The file(s) described in meta data will not be downloaded. This option has effect only when BitTorrent Magnet URI is used. See also [--bt-save-metadata](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-save-metadata) option. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-metadata-only | ||
*/ | ||
metadataOnly: boolean; | ||
/** | ||
* Set minimum level of encryption method. If several encryption methods are provided by a peer, aria2 chooses the lowest one which satisfies the given level. | ||
* | ||
* @default 'plain' | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-min-crypto-level | ||
*/ | ||
minCryptoLevel: 'plain' | 'arc4'; | ||
/** | ||
* --bt-prioritize-piece=head[=<SIZE>],tail[=<SIZE>] | ||
* | ||
* Try to download first and last pieces of each file first. This is useful for previewing files. The argument can contain 2 keywords: `head` and `tail`. To include both keywords, they must be separated by comma. These keywords can take one parameter, SIZE. For example, if `head=<SIZE>` is specified, pieces in the range of first SIZE bytes of each file get higher priority. `tail=<SIZE>` means the range of last SIZE bytes of each file. SIZE can include `K` or `M` (1K = 1024, 1M = 1024K). If SIZE is omitted, SIZE=1M is used. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-prioritize-piece | ||
*/ | ||
prioritizePiece: { | ||
head: '' | StrSize; | ||
tail: '' | StrSize; | ||
}; | ||
/** | ||
* Removes the unselected files when download is completed in BitTorrent. To select files, use [--select-file](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-select-file) option. If it is not used, all files are assumed to be selected. Please use this option with care because it will actually remove files from your disk. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-remove-unselected-file | ||
*/ | ||
removeUnselectedFile: boolean; | ||
/** | ||
* If `true` is given, aria2 doesn't accept and establish connection with legacy BitTorrent handshake(\19BitTorrent protocol). Thus aria2 always uses Obfuscation handshake. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-require-crypto | ||
*/ | ||
requireCrypto: boolean; | ||
/** | ||
* If the whole download speed of every torrent is lower than SPEED, aria2 temporarily increases the number of peers to try for more download speed. Configuring this option with your preferred download speed can increase your download speed in some cases. You can append `K` or `M` (1K = 1024, 1M = 1024K). | ||
* | ||
* @default '50K' | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-request-peer-speed-limit | ||
*/ | ||
requestPeerSpeedLimit: StrSize; | ||
/** | ||
* Save meta data as ".torrent" file. This option has effect only when BitTorrent Magnet URI is used. The file name is hex encoded info hash with suffix ".torrent". The directory to be saved is the same directory where download file is saved. If the same file already exists, meta data is not saved. See also [--bt-metadata-only](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-metadata-only) option. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-save-metadata | ||
*/ | ||
saveMetadata: boolean; | ||
/** | ||
* Seed previously downloaded files without verifying piece hashes. | ||
* | ||
* @default false | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-seed-unverified | ||
*/ | ||
seedUnverified: boolean; | ||
/** | ||
* Stop BitTorrent download if download speed is 0 in consecutive SEC seconds. If `0` is given, this feature is disabled. | ||
* | ||
* @default 0 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-stop-timeout | ||
*/ | ||
stopTimeout: number; | ||
/** | ||
* Comma separated list of additional BitTorrent tracker's announce URI. These URIs are not affected by [--bt-exclude-tracker](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-exclude-tracker) option because they are added after URIs in [--bt-exclude-tracker](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-exclude-tracker) option are removed. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-tracker | ||
*/ | ||
tracker: string[]; | ||
/** | ||
* Set the connect timeout in seconds to establish connection to tracker. After the connection is established, this option makes no effect and [--bt-tracker-timeout](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-tracker-timeout) option is used instead. | ||
* | ||
* @default 60 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-tracker-connect-timeout | ||
*/ | ||
trackerConnectTimeout: number; | ||
/** | ||
* Set the interval in seconds between tracker requests. This completely overrides interval value and aria2 just uses this value and ignores the min interval and interval value in the response of tracker. If `0` is set, aria2 determines interval based on the response of tracker and the download progress. | ||
* | ||
* @default 0 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-tracker-interval | ||
*/ | ||
trackerInterval: number; | ||
/** | ||
* Set timeout in seconds. | ||
* | ||
* @default 60 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-tracker-timeout | ||
*/ | ||
trackerTimeout: number; | ||
/** | ||
* Enable Peer Exchange extension. If a private flag is set in a torrent, this feature is disabled for that download even if `true` is given. | ||
* | ||
* @default true | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-enable-peer-exchange | ||
*/ | ||
enablePeerExchange: boolean; | ||
/** | ||
* If `true` or `mem` is specified, when a file whose suffix is `.torrent` or content type is `application/x-bittorrent` is downloaded, aria2 parses it as a torrent file and downloads files mentioned in it. If `mem` is specified, a torrent file is not written to the disk, but is just kept in memory. If `false` is specified, the `.torrent` file is downloaded to the disk, but is not parsed as a torrent and its contents are not downloaded. | ||
* | ||
* @default true | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-follow-torrent | ||
*/ | ||
followTorrent: boolean | 'mem'; | ||
/** | ||
* Set file path for file with index=INDEX. You can find the file index using the [--show-files](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-S) option. PATH is a relative path to the path specified in [--dir](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-d) option. You can use this option multiple times. Using this option, you can specify the output file names of BitTorrent downloads. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-O | ||
*/ | ||
indexOut: Record<string, string>; | ||
/** | ||
* Set max upload speed per each torrent in bytes/sec. `0` means unrestricted. You can append `K` or `M` (1K = 1024, 1M = 1024K). To limit the overall upload speed, use [--max-overall-upload-limit](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-max-overall-upload-limit) option. | ||
* | ||
* @default 0 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-0 | ||
*/ | ||
maxUploadLimit: StrSize; | ||
/** | ||
* Specify share ratio. Seed completed torrents until share ratio reaches RATIO. You are strongly encouraged to specify equals or more than `1.0` here. Specify `0.0` if you intend to do seeding regardless of share ratio. If [--seed-time](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-seed-time) option is specified along with this option, seeding ends when at least one of the conditions is satisfied. | ||
* | ||
* @default '1.0' | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-seed-ratio | ||
*/ | ||
seedRatio: string; | ||
/** | ||
* Specify seeding time in (fractional) minutes. Also see the [--seed-ratio](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-seed-ratio) option. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-seed-time | ||
*/ | ||
seedTime: string; | ||
} | ||
/** | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#bittorrent-specific-options | ||
*/ | ||
interface Aria2BtGlobalOptions { | ||
/** | ||
* Exclude seed only downloads when counting concurrent active downloads (See `-j` option). This means that if `-j3` is given and this option is turned on and 3 downloads are active and one of those enters seed mode, then it is excluded from active download count (thus it becomes 2), and the next download waiting in queue gets started. But be aware that seeding item is still recognized as active download in RPC method. | ||
* | ||
* @default false | ||
* | ||
* @link http://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-detach-seed-only | ||
*/ | ||
detachSeedOnly: boolean; | ||
/** | ||
* Use given interface for Local Peer Discovery. If this option is not specified, the default interface is chosen. You can specify interface name and IP address. Possible Values: interface, IP address. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-lpd-interface | ||
*/ | ||
lpdInterface: string; | ||
/** | ||
* Specify maximum number of files to open in multi-file BitTorrent/Metalink download globally. | ||
* | ||
* @default 100 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-bt-max-open-files | ||
*/ | ||
maxOpenFiles: number; | ||
/** | ||
* Set TCP port number for BitTorrent downloads. Multiple ports can be specified by using `,`, for example: 6881,6885. You can also use `-` to specify a range: `6881-6999`. `,` and `-` can be used together: `6881-6889,6999`. Default: `6881-6999` | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-listen-port | ||
*/ | ||
listenPort: number[]; | ||
/** | ||
* Set max overall upload speed in bytes/sec. `0` means unrestricted. You can append `K` or `M` (1K = 1024, 1M = 1024K). To limit the upload speed per torrent, use [--max-upload-limit](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-0) option. | ||
* | ||
* @default 0 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-max-overall-upload-limit | ||
*/ | ||
maxOverallUploadLimit: StrSize; | ||
/** | ||
* Specify the prefix of peer ID. The peer ID in BitTorrent is 20 byte length. If more than 20 bytes are specified, only first 20 bytes are used. If less than 20 bytes are specified, random byte data are added to make its length 20 bytes. | ||
* Default: A2-$MAJOR-$MINOR-$PATCH-, $MAJOR, $MINOR and $PATCH are replaced by major, minor and patch version number respectively. For instance, aria2 version 1.18.8 has prefix ID A2-1-18-8-. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-peer-id-prefix | ||
*/ | ||
peerIdPrefix: string; | ||
/** | ||
* Specify the string used during the bitorrent extended handshake for the peer's client version. | ||
* Default: aria2/$MAJOR.$MINOR.$PATCH, $MAJOR, $MINOR and $PATCH are replaced by major, minor and patch version number respectively. For instance, aria2 version 1.18.8 has peer agent aria2/1.18.8. | ||
* | ||
* https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-peer-agent | ||
*/ | ||
peerAgent: string; | ||
} | ||
interface Aria2DhtInputOptions { | ||
} | ||
interface Aria2DhtGlobalOptions { | ||
/** | ||
* Enable IPv4 DHT functionality. It also enables UDP tracker support. If a private flag is set in a torrent, aria2 doesn't use DHT for that download even if `true` is given. | ||
* | ||
* @default true | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-enable-dht | ||
*/ | ||
enable: boolean; | ||
/** | ||
* Enable IPv6 DHT functionality. If a private flag is set in a torrent, aria2 doesn't use DHT for that download even if `true` is given. Use [--dht-listen-port](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-listen-port) option to specify port number to listen on. See also [--dht-listen-addr6](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-listen-addr6) option. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-enable-dht6 | ||
*/ | ||
enable6: boolean; | ||
/** | ||
* --dht-entry-point=<HOST>:<PORT> | ||
* | ||
* Set host and port as an entry point to IPv4 DHT network. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-entry-point | ||
*/ | ||
entryPoint: string; | ||
/** | ||
* --dht-entry-point=<HOST>:<PORT> | ||
* | ||
* Set host and port as an entry point to IPv6 DHT network. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-entry-point6 | ||
*/ | ||
entryPoint6: string; | ||
/** | ||
* Change the IPv4 DHT routing table file to PATH. Default: `$HOME/.aria2/dht.dat` if present, otherwise `$XDG_CACHE_HOME/aria2/dht.dat`. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-file-path | ||
*/ | ||
filePath: string; | ||
/** | ||
* Change the IPv6 DHT routing table file to PATH. Default: `$HOME/.aria2/dht6.dat` if present, otherwise `$XDG_CACHE_HOME/aria2/dht6.dat`. | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-file-path6 | ||
*/ | ||
filePath6: string; | ||
/** | ||
* https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-listen-addr6 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-listen-addr6 | ||
*/ | ||
listenAddr6: string; | ||
/** | ||
* Set UDP listening port used by DHT(IPv4, IPv6) and UDP tracker. Multiple ports can be specified by using `,`, for example: `6881,6885`. You can also use `-` to specify a range: `6881-6999`. `,` and `-` can be used together. Default: `6881-6999` | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-listen-port | ||
*/ | ||
listenPort: number[]; | ||
/** | ||
* Set timeout in seconds. | ||
* | ||
* @default 10 | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-message-timeout | ||
*/ | ||
messageTimeout: number; | ||
} | ||
/** | ||
* Use a proxy server for all protocols. To override a previously defined proxy, use "". You also can override this setting and specify a proxy server for a particular protocol using --http-proxy, --https-proxy and --ftp-proxy options. This affects all downloads. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]. See also ENVIRONMENT section. | ||
@@ -234,3 +565,3 @@ * | ||
}; | ||
type Aria2Options = Aria2BasicOptions & { | ||
type Aria2InputOptions = Aria2BasicInputOptions & { | ||
/** | ||
@@ -244,4 +575,8 @@ * Use a proxy server for all protocols. To override a previously defined proxy, use "". You also can override this setting and specify a proxy server for a particular protocol using --http-proxy, --https-proxy and --ftp-proxy options. This affects all downloads. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT]. See also ENVIRONMENT section. | ||
ftp: Aria2HTTPFTPOptions & Aria2FTPOptions; | ||
bt: Aria2BtMetalinkOptions & Aria2BtOptions; | ||
bt: Aria2BtMetalinkOptions & Aria2BtInputOptions & Aria2DhtInputOptions; | ||
}; | ||
type Aria2GlobalOptions = MergeDeep<Aria2InputOptions & Aria2BasicGlobalOptions, { | ||
rpc: Aria2RPCOptions; | ||
bt: Aria2BtGlobalOptions & Aria2DhtGlobalOptions; | ||
}>; | ||
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'; | ||
@@ -291,3 +626,3 @@ /** | ||
/** | ||
* Specify a port number for JSON-RPC/XML-RPC server to listen to. Possible Values: 1024 -65535. | ||
* Specify a port number for JSON-RPC/XML-RPC server to listen to. Possible Values: `1024` - `65535`. | ||
* | ||
@@ -306,5 +641,5 @@ * @default 6800 | ||
*/ | ||
maxRequestSize: string; | ||
maxRequestSize: StrSize; | ||
/** | ||
* 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. | ||
* Use the private key in FILE for RPC server. The private key must be decrypted and in PEM format. Use [--rpc-secure](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-secure) option to enable encryption. See also [--rpc-certificate](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-certificate) option. | ||
* | ||
@@ -315,4 +650,6 @@ * @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-private-key | ||
/** | ||
* 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. | ||
* Save the uploaded torrent or metalink meta data in the directory specified by [--dir](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-d) 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()](https://aria2.github.io/manual/en/html/aria2c.html#aria2.addTorrent) or [aria2.addMetalink()](https://aria2.github.io/manual/en/html/aria2c.html#aria2.addMetalink) will not be saved by [--save-session](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-save-session) option. | ||
* | ||
* @default true | ||
* | ||
* @link https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-rpc-save-upload-metadata | ||
@@ -336,4 +673,5 @@ */ | ||
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>>; | ||
declare const resolveRPCOptions: (options?: PartialDeep<Aria2RPCOptions>) => Partial<Record<Aria2RPCOptionsKey, string>>; | ||
declare function resolveInputOptions(options: PartialDeep<Aria2InputOptions>): Partial<Record<Aria2ClientInputOptionKey, string>>; | ||
declare function resolveGlobalOptions(options: PartialDeep<Aria2GlobalOptions>): Partial<Record<Aria2ClientInputOptionKey & Aria2ClientGlobalOptionKey, string>>; | ||
@@ -343,2 +681,2 @@ declare function resolveArray<T>(arr: T | T[]): T[]; | ||
export { Aria2BasicOptions, Aria2BtMetalinkOptions, Aria2BtOptions, Aria2FTPOptions, Aria2HTTPFTPOptions, Aria2HTTPOptions, Aria2Options, Aria2ProxyOptions, Aria2RPCOptions, Aria2RPCOptionsKey, isDef, resolveArray, resolveOptions, resolveProxyOptions, resolveRPCOptions }; | ||
export { Aria2BasicGlobalOptions, Aria2BasicInputOptions, Aria2BtGlobalOptions, Aria2BtInputOptions, Aria2BtMetalinkOptions, Aria2DhtGlobalOptions, Aria2DhtInputOptions, Aria2FTPOptions, Aria2GlobalOptions, Aria2HTTPFTPOptions, Aria2HTTPOptions, Aria2InputOptions, Aria2ProxyOptions, Aria2RPCOptions, Aria2RPCOptionsKey, StrSize, isDef, resolveArray, resolveGlobalOptions, resolveInputOptions, resolveProxyOptions, resolveRPCOptions }; |
{ | ||
"name": "@naria2/options", | ||
"version": "0.0.9-beta.2", | ||
"version": "0.0.9-beta.3", | ||
"description": "Shared aria2 options type declerations and utils for naria2", | ||
@@ -39,4 +39,4 @@ "keywords": [ | ||
"dependencies": { | ||
"maria2": "^0.3.0", | ||
"type-fest": "^3.13.0" | ||
"maria2": "^0.3.2", | ||
"type-fest": "^4.1.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
@@ -0,0 +0,0 @@ # @naria2/options |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
52302
1170
+ Addedtype-fest@4.35.0(transitive)
- Removedtype-fest@3.13.1(transitive)
Updatedmaria2@^0.3.2
Updatedtype-fest@^4.1.0