Update example proxy for v2, use workspaces.

- `example/proxy` is new folder for `example_proxy`.
- `riven` is new folder for the main riven lib.
- Updated metadata to be an array and include HTTP method.
pull/34/head
Mingwei Samuel 2021-09-09 14:31:39 -07:00
parent 5c26ddd211
commit 74eb5fa045
2000 changed files with 198919 additions and 234 deletions

View File

@ -1,50 +1,5 @@
[package]
name = "riven"
version = "2.0.0-rc.1"
authors = ["Mingwei Samuel <mingwei.samuel@gmail.com>"]
repository = "https://github.com/MingweiSamuel/Riven"
description = "Riot Games API Library"
readme = "README.md"
license = "MIT"
edition = "2018"
include = [ "src/**", "/README.md" ]
keywords = [ "riot-games", "riot", "league", "league-of-legends" ]
categories = [ "api-bindings", "web-programming::http-client" ]
#[badges]
#travis-ci = { repository = "MingweiSamuel/Riven" }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package.metadata.docs.rs]
features = [ "nightly" ]
[features]
default = [ "default-tls" ]
nightly = [ "parking_lot/nightly" ]
default-tls = [ "reqwest/default-tls" ]
native-tls = [ "reqwest/native-tls" ]
rustls-tls = [ "reqwest/rustls-tls" ]
[dependencies]
lazy_static = "1.4"
log = "0.4"
num_enum = "0.5"
parking_lot = "0.11"
reqwest = { version = "0.11", default-features = false, features = [ "gzip", "json" ] }
scan_fmt = { version = "0.2", default-features = false }
serde = { version = "1.0", features = [ "derive" ] }
serde_json = "1.0"
serde_repr = "0.1"
strum = "0.20"
strum_macros = "0.20"
tokio = { version = "1", default-features = false, features = [ "time", "macros", "parking_lot" ] }
tracing = { version = "0.1", optional = true }
[dev-dependencies]
colored = "2"
env_logger = "0.8"
fake_instant = "0.4"
tokio = { version = "1", default-features = false, features = [ "rt-multi-thread" ] }
[workspace]
members = [
"riven",
"example/proxy",
]

13
example/proxy/Cargo.toml Normal file
View File

@ -0,0 +1,13 @@
[package]
name = "riven_example_proxy"
version = "0.0.0"
authors = [ "Mingwei Samuel <mingwei.samuel@gmail.com>" ]
edition = "2018"
[dependencies]
hyper = { version = "0.14", features = [ "server" ] }
lazy_static = "1.4"
riven = { path = "../../riven" }
tokio = { version = "1.0", features = [ "full" ] }
tracing = "0.1"
tracing-subscriber = "0.2"

View File

@ -1,7 +1,5 @@
# Riven Example Proxy
<span color="red">This is not yet updated for V2.</span>
This is a simple example implementation of a Riot API proxy server using `hyper`. This adds the API key and forwards
requests to the Riot API, then returns and forwards responses back to the requester. It handles error cases but only
provides minimal failure information. HTTP requests will wait to complete when Riven is waiting on rate limits.
@ -17,6 +15,12 @@ Test in your browser or using `curl`. The first path segment specifies the regio
$ curl http://localhost:3000/na1/lol/summoner/v4/summoners/by-name/LugnutsK
{"id":"...","accountId":"...","puuid":"...","name":"LugnutsK","profileIconId":4540,"revisionDate":1589704662000,"summonerLevel":111}
$ curl http://localhost:3000/na1/valorant/v4/players/by-name/LugnutsK # not yet :)
$ curl http://localhost:3000/eu/val/status/v1/platform-data
{"id": "EU", "name": "Europe", "locales": ["..."], "maintenances": [], "incidents": []}
$ curl http://localhost:3000/americas/lol/tournament-stub/v4/providers -H "Content-Type: application/json" -d '{"region":"JP","url":"https://github.com/MingweiSamuel/Riven"}'
764
$ curl http://localhost:3000/na1/unknown/endpoint
{"error":"Riot API endpoint method not found."}
```

View File

@ -2,20 +2,26 @@
use std::convert::Infallible;
use hyper::http;
use http::{ Method, Request, Response, StatusCode };
use hyper::{ Body, Server };
use hyper::service::{ make_service_fn, service_fn };
use hyper::{ Body, Method, Request, Response, Server, StatusCode };
use hyper::header::HeaderValue;
use lazy_static::lazy_static;
use tracing as log;
use riven::{ RiotApi, RiotApiConfig };
use riven::consts::Region;
use riven::consts::Route;
lazy_static! {
/// Create lazy static RiotApi instance.
/// Easier than passing it around.
pub static ref RIOT_API: RiotApi = {
let api_key = std::env::var("RGAPI_KEY").ok()
.or_else(|| std::fs::read_to_string("../apikey.txt").ok())
.or_else(|| {
let path: std::path::PathBuf = [ env!("CARGO_MANIFEST_DIR"), "../../apikey.txt" ].iter().collect();
std::fs::read_to_string(path).ok()
})
.expect("Failed to find RGAPI_KEY env var or apikey.txt.");
RiotApi::with_config(RiotApiConfig::with_key(api_key.trim())
.preconfig_burst())
@ -33,26 +39,40 @@ fn create_json_response(body: &'static str, status: StatusCode) -> Response<Body
/// Main request handler service.
async fn handle_request(req: Request<Body>) -> Result<Response<Body>, Infallible> {
if Method::GET != req.method() {
return Ok(create_json_response(r#"{"error":"HTTP method must be GET."}"#, StatusCode::METHOD_NOT_ALLOWED));
}
let (parts, body) = req.into_parts();
let http::request::Parts { method, uri, .. } = parts;
// Handle path.
let path_data_opt = parse_path(req.uri().path());
let ( region, method_id, req_path ) = match path_data_opt {
let path_data_opt = parse_path(&method, uri.path());
let ( route, method_id, req_path ) = match path_data_opt {
None => return Ok(create_json_response(
r#"{"error":"Riot API endpoint method not found."}"#, StatusCode::NOT_FOUND)),
Some(path_data) => path_data,
};
println!("Request to region {} path {}:\n\t{} {}", region, method_id, region, req_path);
log::debug!("Request to route {:?}, method ID {:?}: {} {:?}.", route, method_id, method, req_path);
// Convert http:request::Parts from hyper to reqwest's RequestBuilder.
let body = match hyper::body::to_bytes(body).await {
Err(err) => {
log::info!("Error handling request body: {:#?}", err);
return Ok(create_json_response(
r#"{"error":"Failed to handle request body."}"#, StatusCode::BAD_REQUEST));
},
Ok(bytes) => bytes,
};
let req_builder = RIOT_API.request(method, route.into(), req_path)
.body(body);
// Send request to Riot API.
let query = req.uri().query().map(|s| s.to_owned());
let resp_result = RIOT_API.get_raw_response(method_id, region.into(), req_path.to_owned(), query).await;
let resp_result = RIOT_API.execute_raw(method_id, route.into(), req_builder).await;
let resp_info = match resp_result {
Err(_err) => return Ok(create_json_response(
r#"{"error":"Riot API request failed."}"#, StatusCode::INTERNAL_SERVER_ERROR)),
Err(err) => {
log::info!("Riot API error: {:#?}", err.source_reqwest_error());
return Ok(create_json_response(
r#"{"error":"Riot API request failed."}"#, StatusCode::INTERNAL_SERVER_ERROR));
},
Ok(resp_info) => resp_info,
};
@ -81,24 +101,24 @@ async fn handle_request(req: Request<Body>) -> Result<Response<Body>, Infallible
return Ok(out_response);
}
/// Gets the region, method_id, and Riot API path based on the given path.
fn parse_path<'a>(req_path: &'a str) -> Option<( Region, &'static str, &'a str )> {
/// Gets the region, method_id, and Riot API path based on the given http method and path.
fn parse_path<'a>(http_method: &Method, req_path: &'a str) -> Option<( Route, &'static str, &'a str )> {
// Split URI into region and rest of path.
let req_path = req_path.trim_start_matches('/');
let ( region, req_path ) = req_path.split_at(req_path.find('/')?);
let region: Region = region.to_uppercase().parse().ok()?;
let ( route, req_path ) = req_path.split_at(req_path.find('/')?);
let route: Route = route.to_uppercase().parse().ok()?;
// Find method_id for given path.
let method_id = find_matching_method_id(req_path)?;
let method_id = find_matching_method_id(http_method, req_path)?;
return Some(( region, method_id, req_path ))
return Some(( route, method_id, req_path ))
}
/// Finds the method_id given the request path.
fn find_matching_method_id(req_path: &str) -> Option<&'static str> {
for ( ref_path, method_id ) in &*riven::meta::ENDPOINT_PATH_METHODID {
if paths_match(ref_path, req_path) {
fn find_matching_method_id(http_method: &Method, req_path: &str) -> Option<&'static str> {
for ( endpoint_http_method, ref_path, method_id ) in &riven::meta::ALL_ENDPOINTS {
if http_method == endpoint_http_method && paths_match(ref_path, req_path) {
return Some(method_id);
}
}
@ -128,6 +148,13 @@ fn paths_match(ref_path: &str, req_path: &str) -> bool {
#[tokio::main]
pub async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
// Setup loggers.
// env_logger::init();
tracing_subscriber::fmt::init();
// Trigger lazy_static.
let _ = &*RIOT_API;
// For every connection, we must make a `Service` to handle all
// incoming HTTP requests on said connection.
let make_svc = make_service_fn(|_conn| {
@ -141,7 +168,7 @@ pub async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let server = Server::bind(&addr).serve(make_svc);
println!("Listening on http://{}", addr);
log::info!("Listening on http://{}", addr);
server.await?;

View File

@ -1 +0,0 @@
target

View File

@ -1,12 +0,0 @@
[package]
name = "riven_example_proxy"
version = "0.0.0"
authors = [ "Mingwei Samuel <mingwei.samuel@gmail.com>" ]
edition = "2018"
[dependencies]
riven = { path = '..' }
hyper = "0.13"
lazy_static = "1.4"
tokio = { version = "0.2", features = [ "full" ] }

50
riven/Cargo.toml Normal file
View File

@ -0,0 +1,50 @@
[package]
name = "riven"
version = "2.0.0-rc.1"
authors = ["Mingwei Samuel <mingwei.samuel@gmail.com>"]
repository = "https://github.com/MingweiSamuel/Riven"
description = "Riot Games API Library"
readme = "README.md"
license = "MIT"
edition = "2018"
include = [ "src/**", "/README.md" ]
keywords = [ "riot-games", "riot", "league", "league-of-legends" ]
categories = [ "api-bindings", "web-programming::http-client" ]
#[badges]
#travis-ci = { repository = "MingweiSamuel/Riven" }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package.metadata.docs.rs]
features = [ "nightly" ]
[features]
default = [ "default-tls" ]
nightly = [ "parking_lot/nightly" ]
default-tls = [ "reqwest/default-tls" ]
native-tls = [ "reqwest/native-tls" ]
rustls-tls = [ "reqwest/rustls-tls" ]
[dependencies]
lazy_static = "1.4"
log = "0.4"
num_enum = "0.5"
parking_lot = "0.11"
reqwest = { version = "0.11", default-features = false, features = [ "gzip", "json" ] }
scan_fmt = { version = "0.2", default-features = false }
serde = { version = "1.0", features = [ "derive" ] }
serde_json = "1.0"
serde_repr = "0.1"
strum = "0.20"
strum_macros = "0.20"
tokio = { version = "1", default-features = false, features = [ "time", "macros", "parking_lot" ] }
tracing = { version = "0.1", optional = true }
[dev-dependencies]
colored = "2"
env_logger = "0.9"
fake_instant = "0.4"
tokio = { version = "1", default-features = false, features = [ "rt-multi-thread" ] }

View File

@ -153,6 +153,7 @@ newtype_enum! {
/// `VAYNE` | "Vayne" | "Vayne" | 67
/// `VEIGAR` | "Veigar" | "Veigar" | 45
/// `VEL_KOZ` | "Vel'Koz" | "Velkoz" | 161
/// `VEX` | "Vex" | "Vex" | 711
/// `VI` | "Vi" | "Vi" | 254
/// `VIEGO` | "Viego" | "Viego" | 234
/// `VIKTOR` | "Viktor" | "Viktor" | 112
@ -312,6 +313,7 @@ newtype_enum! {
VAYNE = 67,
VEIGAR = 45,
VEL_KOZ = 161,
VEX = 711,
VI = 254,
VIEGO = 234,
VIKTOR = 112,
@ -475,6 +477,7 @@ impl Champion {
Self::VAYNE => Some("Vayne"),
Self::VEIGAR => Some("Veigar"),
Self::VEL_KOZ => Some("Vel'Koz"),
Self::VEX => Some("Vex"),
Self::VI => Some("Vi"),
Self::VIEGO => Some("Viego"),
Self::VIKTOR => Some("Viktor"),
@ -653,6 +656,7 @@ impl Champion {
Self::VAYNE => Some("Vayne"),
Self::VEIGAR => Some("Veigar"),
Self::VEL_KOZ => Some("Velkoz"),
Self::VEX => Some("Vex"),
Self::VI => Some("Vi"),
Self::VIEGO => Some("Viego"),
Self::VIKTOR => Some("Viktor"),
@ -830,6 +834,7 @@ impl std::str::FromStr for Champion {
0x56454947 /* VEIG */ => Ok(Champion::VEIGAR),
0x56454c4b /* VELK */ => Ok(Champion::VEL_KOZ),
0x56454c /* VEL */ => Ok(Champion::VEL_KOZ),
0x564558 /* VEX */ => Ok(Champion::VEX),
0x5649 /* VI */ => Ok(Champion::VI),
0x56494547 /* VIEG */ => Ok(Champion::VIEGO),
0x56494b54 /* VIKT */ => Ok(Champion::VIKTOR),

View File

@ -218,6 +218,19 @@ impl std::fmt::Display for Route {
}
}
impl std::str::FromStr for Route {
type Err = strum::ParseError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
RegionalRoute::from_str(s)
.map(|r| Self::Regional(r))
.or_else(|_| PlatformRoute::from_str(s)
.map(|r| Self::Platform(r)))
.or_else(|_| ValPlatformRoute::from_str(s)
.map(|r| Self::ValPlatform(r)))
.map_err(|_| strum::ParseError::VariantNotFound)
}
}
impl Route {
pub fn iter() -> impl Iterator<Item = Self> {
use strum::IntoEnumIterator;

92
riven/src/meta.rs Normal file
View File

@ -0,0 +1,92 @@
///////////////////////////////////////////////
// //
// ! //
// This file is automatically generated! //
// Do not directly edit! //
// //
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 12e3bc69894adde9001edb3c64126cd90d4531bd
//! Metadata about the Riot API and Riven.
//!
//! Note: this modules is automatically generated.
pub static ALL_ENDPOINTS: [(reqwest::Method, &'static str, &'static str); 75] = [
(reqwest::Method::GET, "/riot/account/v1/accounts/by-puuid/{puuid}", "account-v1.getByPuuid"),
(reqwest::Method::GET, "/riot/account/v1/accounts/by-riot-id/{gameName}/{tagLine}", "account-v1.getByRiotId"),
(reqwest::Method::GET, "/riot/account/v1/accounts/me", "account-v1.getByAccessToken"),
(reqwest::Method::GET, "/riot/account/v1/active-shards/by-game/{game}/by-puuid/{puuid}", "account-v1.getActiveShard"),
(reqwest::Method::GET, "/lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerId}", "champion-mastery-v4.getAllChampionMasteries"),
(reqwest::Method::GET, "/lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerId}/by-champion/{championId}", "champion-mastery-v4.getChampionMastery"),
(reqwest::Method::GET, "/lol/champion-mastery/v4/scores/by-summoner/{encryptedSummonerId}", "champion-mastery-v4.getChampionMasteryScore"),
(reqwest::Method::GET, "/lol/platform/v3/champion-rotations", "champion-v3.getChampionInfo"),
(reqwest::Method::GET, "/lol/clash/v1/players/by-summoner/{summonerId}", "clash-v1.getPlayersBySummoner"),
(reqwest::Method::GET, "/lol/clash/v1/teams/{teamId}", "clash-v1.getTeamById"),
(reqwest::Method::GET, "/lol/clash/v1/tournaments", "clash-v1.getTournaments"),
(reqwest::Method::GET, "/lol/clash/v1/tournaments/by-team/{teamId}", "clash-v1.getTournamentByTeam"),
(reqwest::Method::GET, "/lol/clash/v1/tournaments/{tournamentId}", "clash-v1.getTournamentById"),
(reqwest::Method::GET, "/lol/league-exp/v4/entries/{queue}/{tier}/{division}", "league-exp-v4.getLeagueEntries"),
(reqwest::Method::GET, "/lol/league/v4/challengerleagues/by-queue/{queue}", "league-v4.getChallengerLeague"),
(reqwest::Method::GET, "/lol/league/v4/entries/by-summoner/{encryptedSummonerId}", "league-v4.getLeagueEntriesForSummoner"),
(reqwest::Method::GET, "/lol/league/v4/entries/{queue}/{tier}/{division}", "league-v4.getLeagueEntries"),
(reqwest::Method::GET, "/lol/league/v4/grandmasterleagues/by-queue/{queue}", "league-v4.getGrandmasterLeague"),
(reqwest::Method::GET, "/lol/league/v4/leagues/{leagueId}", "league-v4.getLeagueById"),
(reqwest::Method::GET, "/lol/league/v4/masterleagues/by-queue/{queue}", "league-v4.getMasterLeague"),
(reqwest::Method::GET, "/lol/status/v3/shard-data", "lol-status-v3.getShardData"),
(reqwest::Method::GET, "/lol/status/v4/platform-data", "lol-status-v4.getPlatformData"),
(reqwest::Method::GET, "/lor/deck/v1/decks/me", "lor-deck-v1.getDecks"),
(reqwest::Method::POST, "/lor/deck/v1/decks/me", "lor-deck-v1.createDeck"),
(reqwest::Method::GET, "/lor/inventory/v1/cards/me", "lor-inventory-v1.getCards"),
(reqwest::Method::GET, "/lor/match/v1/matches/by-puuid/{puuid}/ids", "lor-match-v1.getMatchIdsByPUUID"),
(reqwest::Method::GET, "/lor/match/v1/matches/{matchId}", "lor-match-v1.getMatch"),
(reqwest::Method::GET, "/lor/ranked/v1/leaderboards", "lor-ranked-v1.getLeaderboards"),
(reqwest::Method::GET, "/lor/status/v1/platform-data", "lor-status-v1.getPlatformData"),
(reqwest::Method::GET, "/lol/match/v4/matches/by-tournament-code/{tournamentCode}/ids", "match-v4.getMatchIdsByTournamentCode"),
(reqwest::Method::GET, "/lol/match/v4/matches/{matchId}", "match-v4.getMatch"),
(reqwest::Method::GET, "/lol/match/v4/matches/{matchId}/by-tournament-code/{tournamentCode}", "match-v4.getMatchByTournamentCode"),
(reqwest::Method::GET, "/lol/match/v4/matchlists/by-account/{encryptedAccountId}", "match-v4.getMatchlist"),
(reqwest::Method::GET, "/lol/match/v4/timelines/by-match/{matchId}", "match-v4.getMatchTimeline"),
(reqwest::Method::GET, "/lol/match/v5/matches/by-puuid/{puuid}/ids", "match-v5.getMatchIdsByPUUID"),
(reqwest::Method::GET, "/lol/match/v5/matches/{matchId}", "match-v5.getMatch"),
(reqwest::Method::GET, "/lol/match/v5/matches/{matchId}/timeline", "match-v5.getTimeline"),
(reqwest::Method::GET, "/lol/spectator/v4/active-games/by-summoner/{encryptedSummonerId}", "spectator-v4.getCurrentGameInfoBySummoner"),
(reqwest::Method::GET, "/lol/spectator/v4/featured-games", "spectator-v4.getFeaturedGames"),
(reqwest::Method::GET, "/lol/summoner/v4/summoners/by-account/{encryptedAccountId}", "summoner-v4.getByAccountId"),
(reqwest::Method::GET, "/lol/summoner/v4/summoners/by-name/{summonerName}", "summoner-v4.getBySummonerName"),
(reqwest::Method::GET, "/lol/summoner/v4/summoners/by-puuid/{encryptedPUUID}", "summoner-v4.getByPUUID"),
(reqwest::Method::GET, "/lol/summoner/v4/summoners/me", "summoner-v4.getByAccessToken"),
(reqwest::Method::GET, "/lol/summoner/v4/summoners/{encryptedSummonerId}", "summoner-v4.getBySummonerId"),
(reqwest::Method::GET, "/tft/league/v1/challenger", "tft-league-v1.getChallengerLeague"),
(reqwest::Method::GET, "/tft/league/v1/entries/by-summoner/{summonerId}", "tft-league-v1.getLeagueEntriesForSummoner"),
(reqwest::Method::GET, "/tft/league/v1/entries/{tier}/{division}", "tft-league-v1.getLeagueEntries"),
(reqwest::Method::GET, "/tft/league/v1/grandmaster", "tft-league-v1.getGrandmasterLeague"),
(reqwest::Method::GET, "/tft/league/v1/leagues/{leagueId}", "tft-league-v1.getLeagueById"),
(reqwest::Method::GET, "/tft/league/v1/master", "tft-league-v1.getMasterLeague"),
(reqwest::Method::GET, "/tft/league/v1/rated-ladders/{queue}/top", "tft-league-v1.getTopRatedLadder"),
(reqwest::Method::GET, "/tft/match/v1/matches/by-puuid/{puuid}/ids", "tft-match-v1.getMatchIdsByPUUID"),
(reqwest::Method::GET, "/tft/match/v1/matches/{matchId}", "tft-match-v1.getMatch"),
(reqwest::Method::GET, "/tft/summoner/v1/summoners/by-account/{encryptedAccountId}", "tft-summoner-v1.getByAccountId"),
(reqwest::Method::GET, "/tft/summoner/v1/summoners/by-name/{summonerName}", "tft-summoner-v1.getBySummonerName"),
(reqwest::Method::GET, "/tft/summoner/v1/summoners/by-puuid/{encryptedPUUID}", "tft-summoner-v1.getByPUUID"),
(reqwest::Method::GET, "/tft/summoner/v1/summoners/me", "tft-summoner-v1.getByAccessToken"),
(reqwest::Method::GET, "/tft/summoner/v1/summoners/{encryptedSummonerId}", "tft-summoner-v1.getBySummonerId"),
(reqwest::Method::GET, "/lol/platform/v4/third-party-code/by-summoner/{encryptedSummonerId}", "third-party-code-v4.getThirdPartyCodeBySummonerId"),
(reqwest::Method::POST, "/lol/tournament-stub/v4/codes", "tournament-stub-v4.createTournamentCode"),
(reqwest::Method::GET, "/lol/tournament-stub/v4/lobby-events/by-code/{tournamentCode}", "tournament-stub-v4.getLobbyEventsByCode"),
(reqwest::Method::POST, "/lol/tournament-stub/v4/providers", "tournament-stub-v4.registerProviderData"),
(reqwest::Method::POST, "/lol/tournament-stub/v4/tournaments", "tournament-stub-v4.registerTournament"),
(reqwest::Method::POST, "/lol/tournament/v4/codes", "tournament-v4.createTournamentCode"),
(reqwest::Method::GET, "/lol/tournament/v4/codes/{tournamentCode}", "tournament-v4.getTournamentCode"),
(reqwest::Method::PUT, "/lol/tournament/v4/codes/{tournamentCode}", "tournament-v4.updateCode"),
(reqwest::Method::GET, "/lol/tournament/v4/lobby-events/by-code/{tournamentCode}", "tournament-v4.getLobbyEventsByCode"),
(reqwest::Method::POST, "/lol/tournament/v4/providers", "tournament-v4.registerProviderData"),
(reqwest::Method::POST, "/lol/tournament/v4/tournaments", "tournament-v4.registerTournament"),
(reqwest::Method::GET, "/val/content/v1/contents", "val-content-v1.getContent"),
(reqwest::Method::GET, "/val/match/v1/matches/{matchId}", "val-match-v1.getMatch"),
(reqwest::Method::GET, "/val/match/v1/matchlists/by-puuid/{puuid}", "val-match-v1.getMatchlist"),
(reqwest::Method::GET, "/val/match/v1/recent-matches/by-queue/{queue}", "val-match-v1.getRecent"),
(reqwest::Method::GET, "/val/ranked/v1/leaderboards/by-act/{actId}", "val-ranked-v1.getLeaderboard"),
(reqwest::Method::GET, "/val/status/v1/platform-data", "val-status-v1.getPlatformData"),
];

View File

@ -116,7 +116,7 @@ impl RiotApi {
/// * `request` - The request information. Use `request()` to obtain a `RequestBuilder` instance.
///
/// # Returns
/// A future resolving to a `Result` containg either a `Option<T>` (success) or a `RiotApiError` (failure).
/// A future resolving to a `Result` containg either an `Option<T>` (success) or a `RiotApiError` (failure).
pub async fn execute_opt<'a, T: serde::de::DeserializeOwned + 'a>(&'a self,
method_id: &'static str, region_platform: &'static str, request: RequestBuilder)
-> Result<Option<T>>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,163 @@
[
{
"gameMode": "ARAM",
"description": "ARAM games",
"x-value": "ARAM",
"x-name": "ARAM",
"x-desc": "ARAM games"
},
{
"gameMode": "ARSR",
"description": "All Random Summoner's Rift games",
"x-value": "ARSR",
"x-name": "ARSR",
"x-desc": "All Random Summoner's Rift games"
},
{
"gameMode": "ASCENSION",
"description": "Ascension games",
"x-value": "ASCENSION",
"x-name": "ASCENSION",
"x-desc": "Ascension games"
},
{
"gameMode": "ASSASSINATE",
"description": "Blood Hunt Assassin games",
"x-value": "ASSASSINATE",
"x-name": "ASSASSINATE",
"x-desc": "Blood Hunt Assassin games"
},
{
"gameMode": "CLASSIC",
"description": "Classic Summoner's Rift and Twisted Treeline games",
"x-value": "CLASSIC",
"x-name": "CLASSIC",
"x-desc": "Classic Summoner's Rift and Twisted Treeline games"
},
{
"gameMode": "DARKSTAR",
"description": "Dark Star: Singularity games",
"x-value": "DARKSTAR",
"x-name": "DARKSTAR",
"x-desc": "Dark Star: Singularity games"
},
{
"gameMode": "DOOMBOTSTEEMO",
"description": "Doom Bot games",
"x-value": "DOOMBOTSTEEMO",
"x-name": "DOOMBOTSTEEMO",
"x-desc": "Doom Bot games"
},
{
"gameMode": "FIRSTBLOOD",
"description": "Snowdown Showdown games",
"x-value": "FIRSTBLOOD",
"x-name": "FIRSTBLOOD",
"x-desc": "Snowdown Showdown games"
},
{
"gameMode": "GAMEMODEX",
"description": "Nexus Blitz games, deprecated in patch 9.2 in favor of gameMode NEXUSBLITZ.",
"x-value": "GAMEMODEX",
"x-name": "GAMEMODEX",
"x-desc": "Nexus Blitz games, deprecated in patch 9.2 in favor of gameMode NEXUSBLITZ."
},
{
"gameMode": "KINGPORO",
"description": "Legend of the Poro King games",
"x-value": "KINGPORO",
"x-name": "KINGPORO",
"x-desc": "Legend of the Poro King games"
},
{
"gameMode": "NEXUSBLITZ",
"description": "Nexus Blitz games.",
"x-value": "NEXUSBLITZ",
"x-name": "NEXUSBLITZ",
"x-desc": "Nexus Blitz games."
},
{
"gameMode": "ODIN",
"description": "Dominion/Crystal Scar games",
"x-value": "ODIN",
"x-name": "ODIN",
"x-desc": "Dominion/Crystal Scar games"
},
{
"gameMode": "ODYSSEY",
"description": "Odyssey: Extraction games",
"x-value": "ODYSSEY",
"x-name": "ODYSSEY",
"x-desc": "Odyssey: Extraction games"
},
{
"gameMode": "ONEFORALL",
"description": "One for All games",
"x-value": "ONEFORALL",
"x-name": "ONEFORALL",
"x-desc": "One for All games"
},
{
"gameMode": "PROJECT",
"description": "PROJECT: Hunters games",
"x-value": "PROJECT",
"x-name": "PROJECT",
"x-desc": "PROJECT: Hunters games"
},
{
"gameMode": "SIEGE",
"description": "Nexus Siege games",
"x-value": "SIEGE",
"x-name": "SIEGE",
"x-desc": "Nexus Siege games"
},
{
"gameMode": "STARGUARDIAN",
"description": "Star Guardian Invasion games",
"x-value": "STARGUARDIAN",
"x-name": "STARGUARDIAN",
"x-desc": "Star Guardian Invasion games"
},
{
"gameMode": "TUTORIAL",
"description": "Tutorial games",
"x-value": "TUTORIAL",
"x-name": "TUTORIAL",
"x-desc": "Tutorial games"
},
{
"gameMode": "TUTORIAL_MODULE_1",
"description": "Tutorial: Welcome to League.",
"x-value": "TUTORIAL_MODULE_1",
"x-name": "TUTORIAL_MODULE_1",
"x-desc": "Tutorial: Welcome to League."
},
{
"gameMode": "TUTORIAL_MODULE_2",
"description": "Tutorial: Power Up.",
"x-value": "TUTORIAL_MODULE_2",
"x-name": "TUTORIAL_MODULE_2",
"x-desc": "Tutorial: Power Up."
},
{
"gameMode": "TUTORIAL_MODULE_3",
"description": "Tutorial: Shop for Gear.",
"x-value": "TUTORIAL_MODULE_3",
"x-name": "TUTORIAL_MODULE_3",
"x-desc": "Tutorial: Shop for Gear."
},
{
"gameMode": "ULTBOOK",
"description": "Ultimate Spellbook games.",
"x-value": "ULTBOOK",
"x-name": "ULTBOOK",
"x-desc": "Ultimate Spellbook games."
},
{
"gameMode": "URF",
"description": "URF games",
"x-value": "URF",
"x-name": "URF",
"x-desc": "URF games"
}
]

View File

@ -0,0 +1,23 @@
[
{
"gametype": "CUSTOM_GAME",
"description": "Custom games",
"x-value": "CUSTOM_GAME",
"x-name": "CUSTOM_GAME",
"x-desc": "Custom games"
},
{
"gametype": "MATCHED_GAME",
"description": "all other games",
"x-value": "MATCHED_GAME",
"x-name": "MATCHED_GAME",
"x-desc": "all other games"
},
{
"gametype": "TUTORIAL_GAME",
"description": "Tutorial games",
"x-value": "TUTORIAL_GAME",
"x-name": "TUTORIAL_GAME",
"x-desc": "Tutorial games"
}
]

137
riven/srcgen/.maps.json Normal file
View File

@ -0,0 +1,137 @@
[
{
"mapId": 1,
"mapName": "Summoner's Rift",
"notes": "Original Summer variant",
"x-value": 1,
"x-deprecated": true,
"x-desc": "Summoner's Rift\nOriginal Summer variant",
"x-name": "SUMMONERS_RIFT_ORIGINAL_SUMMER_VARIANT"
},
{
"mapId": 2,
"mapName": "Summoner's Rift",
"notes": "Original Autumn variant",
"x-value": 2,
"x-deprecated": true,
"x-desc": "Summoner's Rift\nOriginal Autumn variant",
"x-name": "SUMMONERS_RIFT_ORIGINAL_AUTUMN_VARIANT"
},
{
"mapId": 3,
"mapName": "The Proving Grounds",
"notes": "Tutorial Map",
"x-value": 3,
"x-deprecated": false,
"x-desc": "The Proving Grounds\nTutorial Map",
"x-name": "THE_PROVING_GROUNDS"
},
{
"mapId": 4,
"mapName": "Twisted Treeline",
"notes": "Original Version",
"x-value": 4,
"x-deprecated": true,
"x-desc": "Twisted Treeline\nOriginal Version",
"x-name": "TWISTED_TREELINE_ORIGINAL_VERSION"
},
{
"mapId": 8,
"mapName": "The Crystal Scar",
"notes": "Dominion map",
"x-value": 8,
"x-deprecated": false,
"x-desc": "The Crystal Scar\nDominion map",
"x-name": "THE_CRYSTAL_SCAR"
},
{
"mapId": 10,
"mapName": "Twisted Treeline",
"notes": "Last TT map",
"x-value": 10,
"x-deprecated": false,
"x-desc": "Twisted Treeline\nLast TT map",
"x-name": "TWISTED_TREELINE"
},
{
"mapId": 11,
"mapName": "Summoner's Rift",
"notes": "Current Version",
"x-value": 11,
"x-deprecated": false,
"x-desc": "Summoner's Rift\nCurrent Version",
"x-name": "SUMMONERS_RIFT"
},
{
"mapId": 12,
"mapName": "Howling Abyss",
"notes": "ARAM map",
"x-value": 12,
"x-deprecated": false,
"x-desc": "Howling Abyss\nARAM map",
"x-name": "HOWLING_ABYSS"
},
{
"mapId": 14,
"mapName": "Butcher's Bridge",
"notes": "Alternate ARAM map",
"x-value": 14,
"x-deprecated": false,
"x-desc": "Butcher's Bridge\nAlternate ARAM map",
"x-name": "BUTCHERS_BRIDGE"
},
{
"mapId": 16,
"mapName": "Cosmic Ruins",
"notes": "Dark Star: Singularity map",
"x-value": 16,
"x-deprecated": false,
"x-desc": "Cosmic Ruins\nDark Star: Singularity map",
"x-name": "COSMIC_RUINS"
},
{
"mapId": 18,
"mapName": "Valoran City Park",
"notes": "Star Guardian Invasion map",
"x-value": 18,
"x-deprecated": false,
"x-desc": "Valoran City Park\nStar Guardian Invasion map",
"x-name": "VALORAN_CITY_PARK"
},
{
"mapId": 19,
"mapName": "Substructure 43",
"notes": "PROJECT: Hunters map",
"x-value": 19,
"x-deprecated": false,
"x-desc": "Substructure 43\nPROJECT: Hunters map",
"x-name": "SUBSTRUCTURE_43"
},
{
"mapId": 20,
"mapName": "Crash Site",
"notes": "Odyssey: Extraction map",
"x-value": 20,
"x-deprecated": false,
"x-desc": "Crash Site\nOdyssey: Extraction map",
"x-name": "CRASH_SITE"
},
{
"mapId": 21,
"mapName": "Nexus Blitz",
"notes": "Nexus Blitz map",
"x-value": 21,
"x-deprecated": false,
"x-desc": "Nexus Blitz\nNexus Blitz map",
"x-name": "NEXUS_BLITZ"
},
{
"mapId": 22,
"mapName": "Convergence",
"notes": "Teamfight Tactics map",
"x-value": 22,
"x-deprecated": false,
"x-desc": "Convergence\nTeamfight Tactics map",
"x-name": "CONVERGENCE"
}
]

832
riven/srcgen/.queues.json Normal file
View File

@ -0,0 +1,832 @@
[
{
"queueId": 0,
"map": "Custom games",
"description": null,
"notes": null,
"x-value": 0,
"x-deprecated": false,
"x-desc": "Games on Custom games",
"x-name": "CUSTOM"
},
{
"queueId": 2,
"map": "Summoner's Rift",
"description": "5v5 Blind Pick games",
"notes": "Deprecated in patch 7.19 in favor of queueId 430",
"x-value": 2,
"x-deprecated": true,
"x-desc": "5v5 Blind Pick games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_BLIND_PICK_DEPRECATED_2"
},
{
"queueId": 4,
"map": "Summoner's Rift",
"description": "5v5 Ranked Solo games",
"notes": "Deprecated in favor of queueId 420",
"x-value": 4,
"x-deprecated": true,
"x-desc": "5v5 Ranked Solo games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_RANKED_SOLO_DEPRECATED_4"
},
{
"queueId": 6,
"map": "Summoner's Rift",
"description": "5v5 Ranked Premade games",
"notes": "Game mode deprecated",
"x-value": 6,
"x-deprecated": true,
"x-desc": "5v5 Ranked Premade games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_RANKED_PREMADE"
},
{
"queueId": 7,
"map": "Summoner's Rift",
"description": "Co-op vs AI games",
"notes": "Deprecated in favor of queueId 32 and 33",
"x-value": 7,
"x-deprecated": true,
"x-desc": "Co-op vs AI games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CO_OP_VS_AI"
},
{
"queueId": 8,
"map": "Twisted Treeline",
"description": "3v3 Normal games",
"notes": "Deprecated in patch 7.19 in favor of queueId 460",
"x-value": 8,
"x-deprecated": true,
"x-desc": "3v3 Normal games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_3V3_NORMAL"
},
{
"queueId": 9,
"map": "Twisted Treeline",
"description": "3v3 Ranked Flex games",
"notes": "Deprecated in patch 7.19 in favor of queueId 470",
"x-value": 9,
"x-deprecated": true,
"x-desc": "3v3 Ranked Flex games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_3V3_RANKED_FLEX_DEPRECATED_9"
},
{
"queueId": 14,
"map": "Summoner's Rift",
"description": "5v5 Draft Pick games",
"notes": "Deprecated in favor of queueId 400",
"x-value": 14,
"x-deprecated": true,
"x-desc": "5v5 Draft Pick games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_DRAFT_PICK_DEPRECATED_14"
},
{
"queueId": 16,
"map": "Crystal Scar",
"description": "5v5 Dominion Blind Pick games",
"notes": "Game mode deprecated",
"x-value": 16,
"x-deprecated": true,
"x-desc": "5v5 Dominion Blind Pick games on Crystal Scar",
"x-name": "CRYSTAL_SCAR_5V5_DOMINION_BLIND_PICK"
},
{
"queueId": 17,
"map": "Crystal Scar",
"description": "5v5 Dominion Draft Pick games",
"notes": "Game mode deprecated",
"x-value": 17,
"x-deprecated": true,
"x-desc": "5v5 Dominion Draft Pick games on Crystal Scar",
"x-name": "CRYSTAL_SCAR_5V5_DOMINION_DRAFT_PICK"
},
{
"queueId": 25,
"map": "Crystal Scar",
"description": "Dominion Co-op vs AI games",
"notes": "Game mode deprecated",
"x-value": 25,
"x-deprecated": true,
"x-desc": "Dominion Co-op vs AI games on Crystal Scar",
"x-name": "CRYSTAL_SCAR_DOMINION_CO_OP_VS_AI"
},
{
"queueId": 31,
"map": "Summoner's Rift",
"description": "Co-op vs AI Intro Bot games",
"notes": "Deprecated in patch 7.19 in favor of queueId 830",
"x-value": 31,
"x-deprecated": true,
"x-desc": "Co-op vs AI Intro Bot games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT_DEPRECATED_31"
},
{
"queueId": 32,
"map": "Summoner's Rift",
"description": "Co-op vs AI Beginner Bot games",
"notes": "Deprecated in patch 7.19 in favor of queueId 840",
"x-value": 32,
"x-deprecated": true,
"x-desc": "Co-op vs AI Beginner Bot games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT_DEPRECATED_32"
},
{
"queueId": 33,
"map": "Summoner's Rift",
"description": "Co-op vs AI Intermediate Bot games",
"notes": "Deprecated in patch 7.19 in favor of queueId 850",
"x-value": 33,
"x-deprecated": true,
"x-desc": "Co-op vs AI Intermediate Bot games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT_DEPRECATED_33"
},
{
"queueId": 41,
"map": "Twisted Treeline",
"description": "3v3 Ranked Team games",
"notes": "Game mode deprecated",
"x-value": 41,
"x-deprecated": true,
"x-desc": "3v3 Ranked Team games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_3V3_RANKED_TEAM"
},
{
"queueId": 42,
"map": "Summoner's Rift",
"description": "5v5 Ranked Team games",
"notes": "Game mode deprecated",
"x-value": 42,
"x-deprecated": true,
"x-desc": "5v5 Ranked Team games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_RANKED_TEAM"
},
{
"queueId": 52,
"map": "Twisted Treeline",
"description": "Co-op vs AI games",
"notes": "Deprecated in patch 7.19 in favor of queueId 800",
"x-value": 52,
"x-deprecated": true,
"x-desc": "Co-op vs AI games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_CO_OP_VS_AI"
},
{
"queueId": 61,
"map": "Summoner's Rift",
"description": "5v5 Team Builder games",
"notes": "Game mode deprecated",
"x-value": 61,
"x-deprecated": true,
"x-desc": "5v5 Team Builder games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_TEAM_BUILDER"
},
{
"queueId": 65,
"map": "Howling Abyss",
"description": "5v5 ARAM games",
"notes": "Deprecated in patch 7.19 in favor of queueId 450",
"x-value": 65,
"x-deprecated": true,
"x-desc": "5v5 ARAM games on Howling Abyss",
"x-name": "HOWLING_ABYSS_5V5_ARAM_DEPRECATED_65"
},
{
"queueId": 67,
"map": "Howling Abyss",
"description": "ARAM Co-op vs AI games",
"notes": "Game mode deprecated",
"x-value": 67,
"x-deprecated": true,
"x-desc": "ARAM Co-op vs AI games on Howling Abyss",
"x-name": "HOWLING_ABYSS_ARAM_CO_OP_VS_AI"
},
{
"queueId": 70,
"map": "Summoner's Rift",
"description": "One for All games",
"notes": "Deprecated in patch 8.6 in favor of queueId 1020",
"x-value": 70,
"x-deprecated": true,
"x-desc": "One for All games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_ONE_FOR_ALL_DEPRECATED_70"
},
{
"queueId": 72,
"map": "Howling Abyss",
"description": "1v1 Snowdown Showdown games",
"notes": null,
"x-value": 72,
"x-deprecated": false,
"x-desc": "1v1 Snowdown Showdown games on Howling Abyss",
"x-name": "HOWLING_ABYSS_1V1_SNOWDOWN_SHOWDOWN"
},
{
"queueId": 73,
"map": "Howling Abyss",
"description": "2v2 Snowdown Showdown games",
"notes": null,
"x-value": 73,
"x-deprecated": false,
"x-desc": "2v2 Snowdown Showdown games on Howling Abyss",
"x-name": "HOWLING_ABYSS_2V2_SNOWDOWN_SHOWDOWN"
},
{
"queueId": 75,
"map": "Summoner's Rift",
"description": "6v6 Hexakill games",
"notes": null,
"x-value": 75,
"x-deprecated": false,
"x-desc": "6v6 Hexakill games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_6V6_HEXAKILL"
},
{
"queueId": 76,
"map": "Summoner's Rift",
"description": "Ultra Rapid Fire games",
"notes": null,
"x-value": 76,
"x-deprecated": false,
"x-desc": "Ultra Rapid Fire games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_ULTRA_RAPID_FIRE"
},
{
"queueId": 78,
"map": "Howling Abyss",
"description": "One For All: Mirror Mode games",
"notes": null,
"x-value": 78,
"x-deprecated": false,
"x-desc": "One For All: Mirror Mode games on Howling Abyss",
"x-name": "HOWLING_ABYSS_ONE_FOR_ALL_MIRROR_MODE"
},
{
"queueId": 83,
"map": "Summoner's Rift",
"description": "Co-op vs AI Ultra Rapid Fire games",
"notes": null,
"x-value": 83,
"x-deprecated": false,
"x-desc": "Co-op vs AI Ultra Rapid Fire games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CO_OP_VS_AI_ULTRA_RAPID_FIRE"
},
{
"queueId": 91,
"map": "Summoner's Rift",
"description": "Doom Bots Rank 1 games",
"notes": "Deprecated in patch 7.19 in favor of queueId 950",
"x-value": 91,
"x-deprecated": true,
"x-desc": "Doom Bots Rank 1 games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_DOOM_BOTS_RANK_1"
},
{
"queueId": 92,
"map": "Summoner's Rift",
"description": "Doom Bots Rank 2 games",
"notes": "Deprecated in patch 7.19 in favor of queueId 950",
"x-value": 92,
"x-deprecated": true,
"x-desc": "Doom Bots Rank 2 games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_DOOM_BOTS_RANK_2"
},
{
"queueId": 93,
"map": "Summoner's Rift",
"description": "Doom Bots Rank 5 games",
"notes": "Deprecated in patch 7.19 in favor of queueId 950",
"x-value": 93,
"x-deprecated": true,
"x-desc": "Doom Bots Rank 5 games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_DOOM_BOTS_RANK_5"
},
{
"queueId": 96,
"map": "Crystal Scar",
"description": "Ascension games",
"notes": "Deprecated in patch 7.19 in favor of queueId 910",
"x-value": 96,
"x-deprecated": true,
"x-desc": "Ascension games on Crystal Scar",
"x-name": "CRYSTAL_SCAR_ASCENSION_DEPRECATED_96"
},
{
"queueId": 98,
"map": "Twisted Treeline",
"description": "6v6 Hexakill games",
"notes": null,
"x-value": 98,
"x-deprecated": false,
"x-desc": "6v6 Hexakill games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_6V6_HEXAKILL"
},
{
"queueId": 100,
"map": "Butcher's Bridge",
"description": "5v5 ARAM games",
"notes": null,
"x-value": 100,
"x-deprecated": false,
"x-desc": "5v5 ARAM games on Butcher's Bridge",
"x-name": "BUTCHERS_BRIDGE_5V5_ARAM"
},
{
"queueId": 300,
"map": "Howling Abyss",
"description": "Legend of the Poro King games",
"notes": "Deprecated in patch 7.19 in favor of queueId 920",
"x-value": 300,
"x-deprecated": true,
"x-desc": "Legend of the Poro King games on Howling Abyss",
"x-name": "HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING_DEPRECATED_300"
},
{
"queueId": 310,
"map": "Summoner's Rift",
"description": "Nemesis games",
"notes": null,
"x-value": 310,
"x-deprecated": false,
"x-desc": "Nemesis games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_NEMESIS"
},
{
"queueId": 313,
"map": "Summoner's Rift",
"description": "Black Market Brawlers games",
"notes": null,
"x-value": 313,
"x-deprecated": false,
"x-desc": "Black Market Brawlers games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_BLACK_MARKET_BRAWLERS"
},
{
"queueId": 315,
"map": "Summoner's Rift",
"description": "Nexus Siege games",
"notes": "Deprecated in patch 7.19 in favor of queueId 940",
"x-value": 315,
"x-deprecated": true,
"x-desc": "Nexus Siege games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_NEXUS_SIEGE_DEPRECATED_315"
},
{
"queueId": 317,
"map": "Crystal Scar",
"description": "Definitely Not Dominion games",
"notes": null,
"x-value": 317,
"x-deprecated": false,
"x-desc": "Definitely Not Dominion games on Crystal Scar",
"x-name": "CRYSTAL_SCAR_DEFINITELY_NOT_DOMINION"
},
{
"queueId": 318,
"map": "Summoner's Rift",
"description": "ARURF games",
"notes": "Deprecated in patch 7.19 in favor of queueId 900",
"x-value": 318,
"x-deprecated": true,
"x-desc": "ARURF games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_ARURF"
},
{
"queueId": 325,
"map": "Summoner's Rift",
"description": "All Random games",
"notes": null,
"x-value": 325,
"x-deprecated": false,
"x-desc": "All Random games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_ALL_RANDOM"
},
{
"queueId": 400,
"map": "Summoner's Rift",
"description": "5v5 Draft Pick games",
"notes": null,
"x-value": 400,
"x-deprecated": false,
"x-desc": "5v5 Draft Pick games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_DRAFT_PICK"
},
{
"queueId": 410,
"map": "Summoner's Rift",
"description": "5v5 Ranked Dynamic games",
"notes": "Game mode deprecated in patch 6.22",
"x-value": 410,
"x-deprecated": true,
"x-desc": "5v5 Ranked Dynamic games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_RANKED_DYNAMIC"
},
{
"queueId": 420,
"map": "Summoner's Rift",
"description": "5v5 Ranked Solo games",
"notes": null,
"x-value": 420,
"x-deprecated": false,
"x-desc": "5v5 Ranked Solo games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_RANKED_SOLO"
},
{
"queueId": 430,
"map": "Summoner's Rift",
"description": "5v5 Blind Pick games",
"notes": null,
"x-value": 430,
"x-deprecated": false,
"x-desc": "5v5 Blind Pick games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_BLIND_PICK"
},
{
"queueId": 440,
"map": "Summoner's Rift",
"description": "5v5 Ranked Flex games",
"notes": null,
"x-value": 440,
"x-deprecated": false,
"x-desc": "5v5 Ranked Flex games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_5V5_RANKED_FLEX"
},
{
"queueId": 450,
"map": "Howling Abyss",
"description": "5v5 ARAM games",
"notes": null,
"x-value": 450,
"x-deprecated": false,
"x-desc": "5v5 ARAM games on Howling Abyss",
"x-name": "HOWLING_ABYSS_5V5_ARAM"
},
{
"queueId": 460,
"map": "Twisted Treeline",
"description": "3v3 Blind Pick games",
"notes": "Deprecated in patch 9.23",
"x-value": 460,
"x-deprecated": true,
"x-desc": "3v3 Blind Pick games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_3V3_BLIND_PICK"
},
{
"queueId": 470,
"map": "Twisted Treeline",
"description": "3v3 Ranked Flex games",
"notes": "Deprecated in patch 9.23",
"x-value": 470,
"x-deprecated": true,
"x-desc": "3v3 Ranked Flex games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_3V3_RANKED_FLEX_DEPRECATED_470"
},
{
"queueId": 600,
"map": "Summoner's Rift",
"description": "Blood Hunt Assassin games",
"notes": null,
"x-value": 600,
"x-deprecated": false,
"x-desc": "Blood Hunt Assassin games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_BLOOD_HUNT_ASSASSIN"
},
{
"queueId": 610,
"map": "Cosmic Ruins",
"description": "Dark Star: Singularity games",
"notes": null,
"x-value": 610,
"x-deprecated": false,
"x-desc": "Dark Star: Singularity games on Cosmic Ruins",
"x-name": "COSMIC_RUINS_DARK_STAR_SINGULARITY"
},
{
"queueId": 700,
"map": "Summoner's Rift",
"description": "Clash games",
"notes": null,
"x-value": 700,
"x-deprecated": false,
"x-desc": "Clash games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CLASH"
},
{
"queueId": 800,
"map": "Twisted Treeline",
"description": "Co-op vs. AI Intermediate Bot games",
"notes": "Deprecated in patch 9.23",
"x-value": 800,
"x-deprecated": true,
"x-desc": "Co-op vs. AI Intermediate Bot games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_CO_OP_VS_AI_INTERMEDIATE_BOT"
},
{
"queueId": 810,
"map": "Twisted Treeline",
"description": "Co-op vs. AI Intro Bot games",
"notes": "Deprecated in patch 9.23",
"x-value": 810,
"x-deprecated": true,
"x-desc": "Co-op vs. AI Intro Bot games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_CO_OP_VS_AI_INTRO_BOT"
},
{
"queueId": 820,
"map": "Twisted Treeline",
"description": "Co-op vs. AI Beginner Bot games",
"notes": null,
"x-value": 820,
"x-deprecated": false,
"x-desc": "Co-op vs. AI Beginner Bot games on Twisted Treeline",
"x-name": "TWISTED_TREELINE_CO_OP_VS_AI_BEGINNER_BOT"
},
{
"queueId": 830,
"map": "Summoner's Rift",
"description": "Co-op vs. AI Intro Bot games",
"notes": null,
"x-value": 830,
"x-deprecated": false,
"x-desc": "Co-op vs. AI Intro Bot games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT"
},
{
"queueId": 840,
"map": "Summoner's Rift",
"description": "Co-op vs. AI Beginner Bot games",
"notes": null,
"x-value": 840,
"x-deprecated": false,
"x-desc": "Co-op vs. AI Beginner Bot games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT"
},
{
"queueId": 850,
"map": "Summoner's Rift",
"description": "Co-op vs. AI Intermediate Bot games",
"notes": null,
"x-value": 850,
"x-deprecated": false,
"x-desc": "Co-op vs. AI Intermediate Bot games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT"
},
{
"queueId": 900,
"map": "Summoner's Rift",
"description": "URF games",
"notes": null,
"x-value": 900,
"x-deprecated": false,
"x-desc": "URF games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_URF"
},
{
"queueId": 910,
"map": "Crystal Scar",
"description": "Ascension games",
"notes": null,
"x-value": 910,
"x-deprecated": false,
"x-desc": "Ascension games on Crystal Scar",
"x-name": "CRYSTAL_SCAR_ASCENSION"
},
{
"queueId": 920,
"map": "Howling Abyss",
"description": "Legend of the Poro King games",
"notes": null,
"x-value": 920,
"x-deprecated": false,
"x-desc": "Legend of the Poro King games on Howling Abyss",
"x-name": "HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING"
},
{
"queueId": 940,
"map": "Summoner's Rift",
"description": "Nexus Siege games",
"notes": null,
"x-value": 940,
"x-deprecated": false,
"x-desc": "Nexus Siege games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_NEXUS_SIEGE"
},
{
"queueId": 950,
"map": "Summoner's Rift",
"description": "Doom Bots Voting games",
"notes": null,
"x-value": 950,
"x-deprecated": false,
"x-desc": "Doom Bots Voting games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_DOOM_BOTS_VOTING"
},
{
"queueId": 960,
"map": "Summoner's Rift",
"description": "Doom Bots Standard games",
"notes": null,
"x-value": 960,
"x-deprecated": false,
"x-desc": "Doom Bots Standard games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_DOOM_BOTS_STANDARD"
},
{
"queueId": 980,
"map": "Valoran City Park",
"description": "Star Guardian Invasion: Normal games",
"notes": null,
"x-value": 980,
"x-deprecated": false,
"x-desc": "Star Guardian Invasion: Normal games on Valoran City Park",
"x-name": "VALORAN_CITY_PARK_STAR_GUARDIAN_INVASION_NORMAL"
},
{
"queueId": 990,
"map": "Valoran City Park",
"description": "Star Guardian Invasion: Onslaught games",
"notes": null,
"x-value": 990,
"x-deprecated": false,
"x-desc": "Star Guardian Invasion: Onslaught games on Valoran City Park",
"x-name": "VALORAN_CITY_PARK_STAR_GUARDIAN_INVASION_ONSLAUGHT"
},
{
"queueId": 1000,
"map": "Overcharge",
"description": "PROJECT: Hunters games",
"notes": null,
"x-value": 1000,
"x-deprecated": false,
"x-desc": "PROJECT: Hunters games on Overcharge",
"x-name": "OVERCHARGE_PROJECT_HUNTERS"
},
{
"queueId": 1010,
"map": "Summoner's Rift",
"description": "Snow ARURF games",
"notes": null,
"x-value": 1010,
"x-deprecated": false,
"x-desc": "Snow ARURF games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_SNOW_ARURF"
},
{
"queueId": 1020,
"map": "Summoner's Rift",
"description": "One for All games",
"notes": null,
"x-value": 1020,
"x-deprecated": false,
"x-desc": "One for All games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_ONE_FOR_ALL"
},
{
"queueId": 1030,
"map": "Crash Site",
"description": "Odyssey Extraction: Intro games",
"notes": null,
"x-value": 1030,
"x-deprecated": false,
"x-desc": "Odyssey Extraction: Intro games on Crash Site",
"x-name": "CRASH_SITE_ODYSSEY_EXTRACTION_INTRO"
},
{
"queueId": 1040,
"map": "Crash Site",
"description": "Odyssey Extraction: Cadet games",
"notes": null,
"x-value": 1040,
"x-deprecated": false,
"x-desc": "Odyssey Extraction: Cadet games on Crash Site",
"x-name": "CRASH_SITE_ODYSSEY_EXTRACTION_CADET"
},
{
"queueId": 1050,
"map": "Crash Site",
"description": "Odyssey Extraction: Crewmember games",
"notes": null,
"x-value": 1050,
"x-deprecated": false,
"x-desc": "Odyssey Extraction: Crewmember games on Crash Site",
"x-name": "CRASH_SITE_ODYSSEY_EXTRACTION_CREWMEMBER"
},
{
"queueId": 1060,
"map": "Crash Site",
"description": "Odyssey Extraction: Captain games",
"notes": null,
"x-value": 1060,
"x-deprecated": false,
"x-desc": "Odyssey Extraction: Captain games on Crash Site",
"x-name": "CRASH_SITE_ODYSSEY_EXTRACTION_CAPTAIN"
},
{
"queueId": 1070,
"map": "Crash Site",
"description": "Odyssey Extraction: Onslaught games",
"notes": null,
"x-value": 1070,
"x-deprecated": false,
"x-desc": "Odyssey Extraction: Onslaught games on Crash Site",
"x-name": "CRASH_SITE_ODYSSEY_EXTRACTION_ONSLAUGHT"
},
{
"queueId": 1090,
"map": "Convergence",
"description": "Teamfight Tactics games",
"notes": null,
"x-value": 1090,
"x-deprecated": false,
"x-desc": "Teamfight Tactics games on Convergence",
"x-name": "CONVERGENCE_TEAMFIGHT_TACTICS"
},
{
"queueId": 1100,
"map": "Convergence",
"description": "Ranked Teamfight Tactics games",
"notes": null,
"x-value": 1100,
"x-deprecated": false,
"x-desc": "Ranked Teamfight Tactics games on Convergence",
"x-name": "CONVERGENCE_RANKED_TEAMFIGHT_TACTICS"
},
{
"queueId": 1110,
"map": "Convergence",
"description": "Teamfight Tactics Tutorial games",
"notes": null,
"x-value": 1110,
"x-deprecated": false,
"x-desc": "Teamfight Tactics Tutorial games on Convergence",
"x-name": "CONVERGENCE_TEAMFIGHT_TACTICS_TUTORIAL"
},
{
"queueId": 1111,
"map": "Convergence",
"description": "Teamfight Tactics 1v0 testing games",
"notes": null,
"x-value": 1111,
"x-deprecated": false,
"x-desc": "Teamfight Tactics 1v0 testing games on Convergence",
"x-name": "CONVERGENCE_TEAMFIGHT_TACTICS_1V0_TESTING"
},
{
"queueId": 1200,
"map": "Nexus Blitz",
"description": "Nexus Blitz games",
"notes": "Deprecated in patch 9.2 in favor of queueId 1300",
"x-value": 1200,
"x-deprecated": true,
"x-desc": "Nexus Blitz games on Nexus Blitz",
"x-name": "NEXUS_BLITZ_NEXUS_BLITZ_DEPRECATED_1200"
},
{
"queueId": 1300,
"map": "Nexus Blitz",
"description": "Nexus Blitz games",
"notes": null,
"x-value": 1300,
"x-deprecated": false,
"x-desc": "Nexus Blitz games on Nexus Blitz",
"x-name": "NEXUS_BLITZ_NEXUS_BLITZ"
},
{
"queueId": 1400,
"map": "Summoner's Rift",
"description": "Ultimate Spellbook",
"notes": null,
"x-value": 1400,
"x-deprecated": false,
"x-desc": "Ultimate Spellbook games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_ULTIMATE_SPELLBOOK"
},
{
"queueId": 2000,
"map": "Summoner's Rift",
"description": "Tutorial 1",
"notes": null,
"x-value": 2000,
"x-deprecated": false,
"x-desc": "Tutorial 1 games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_TUTORIAL_1"
},
{
"queueId": 2010,
"map": "Summoner's Rift",
"description": "Tutorial 2",
"notes": null,
"x-value": 2010,
"x-deprecated": false,
"x-desc": "Tutorial 2 games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_TUTORIAL_2"
},
{
"queueId": 2020,
"map": "Summoner's Rift",
"description": "Tutorial 3",
"notes": null,
"x-value": 2020,
"x-deprecated": false,
"x-desc": "Tutorial 3 games on Summoner's Rift",
"x-name": "SUMMONERS_RIFT_TUTORIAL_3"
}
]

View File

@ -0,0 +1,98 @@
[
{
"id": 0,
"season": "PRESEASON 3",
"x-value": 0,
"x-name": "PRESEASON_3"
},
{
"id": 1,
"season": "SEASON 3",
"x-value": 1,
"x-name": "SEASON_3"
},
{
"id": 2,
"season": "PRESEASON 2014",
"x-value": 2,
"x-name": "PRESEASON_2014"
},
{
"id": 3,
"season": "SEASON 2014",
"x-value": 3,
"x-name": "SEASON_2014"
},
{
"id": 4,
"season": "PRESEASON 2015",
"x-value": 4,
"x-name": "PRESEASON_2015"
},
{
"id": 5,
"season": "SEASON 2015",
"x-value": 5,
"x-name": "SEASON_2015"
},
{
"id": 6,
"season": "PRESEASON 2016",
"x-value": 6,
"x-name": "PRESEASON_2016"
},
{
"id": 7,
"season": "SEASON 2016",
"x-value": 7,
"x-name": "SEASON_2016"
},
{
"id": 8,
"season": "PRESEASON 2017",
"x-value": 8,
"x-name": "PRESEASON_2017"
},
{
"id": 9,
"season": "SEASON 2017",
"x-value": 9,
"x-name": "SEASON_2017"
},
{
"id": 10,
"season": "PRESEASON 2018",
"x-value": 10,
"x-name": "PRESEASON_2018"
},
{
"id": 11,
"season": "SEASON 2018",
"x-value": 11,
"x-name": "SEASON_2018"
},
{
"id": 12,
"season": "PRESEASON 2019",
"x-value": 12,
"x-name": "PRESEASON_2019"
},
{
"id": 13,
"season": "SEASON 2019",
"x-value": 13,
"x-name": "SEASON_2019"
},
{
"id": 14,
"season": "PRESEASON 2020",
"x-value": 14,
"x-name": "PRESEASON_2020"
},
{
"id": 15,
"season": "SEASON 2020",
"x-value": 15,
"x-name": "SEASON_2020"
}
]

15386
riven/srcgen/.spec.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{{
const dotUtils = require('./dotUtils.js');
const readme = require('fs').readFileSync('../README.md', 'utf-8').split(/\r?\n/);
const readme = require('fs').readFileSync('../../README.md', 'utf-8').split(/\r?\n/);
}}{{= dotUtils.preamble() }}
#![forbid(unsafe_code)]

29
riven/srcgen/meta.rs.dt Normal file
View File

@ -0,0 +1,29 @@
{{
const spec = require('./.spec.json');
const dotUtils = require('./dotUtils.js');
const operations = [];
for (const [ route, path ] of Object.entries(spec.paths)) {
for (const [ method, operation ] of Object.entries(path)) {
if (method.startsWith('x-')) continue;
operations.push({ route, method, operation });
}
}
}}{{= dotUtils.preamble() }}
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version {{= spec.info.version }}
//! Metadata about the Riot API and Riven.
//!
//! Note: this modules is automatically generated.
pub static ALL_ENDPOINTS: [(reqwest::Method, &'static str, &'static str); {{= operations.length }}] = [
{{
for (const { route, method, operation } of operations) {
}}
(reqwest::Method::{{= method.toUpperCase() }}, "{{= route }}", "{{= operation.operationId }}"),
{{
}
}}
];

15
riven/srcgen/node_modules/.bin/dottojs generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../dot/bin/dot-packer" "$@"
ret=$?
else
node "$basedir/../dot/bin/dot-packer" "$@"
ret=$?
fi
exit $ret

17
riven/srcgen/node_modules/.bin/dottojs.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\dot\bin\dot-packer" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
riven/srcgen/node_modules/.bin/dottojs.ps1 generated vendored Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../dot/bin/dot-packer" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../dot/bin/dot-packer" $args
$ret=$LASTEXITCODE
}
exit $ret

15
riven/srcgen/node_modules/.bin/sshpk-conv generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@"
ret=$?
else
node "$basedir/../sshpk/bin/sshpk-conv" "$@"
ret=$?
fi
exit $ret

17
riven/srcgen/node_modules/.bin/sshpk-conv.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-conv" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
riven/srcgen/node_modules/.bin/sshpk-conv.ps1 generated vendored Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args
$ret=$LASTEXITCODE
}
exit $ret

15
riven/srcgen/node_modules/.bin/sshpk-sign generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@"
ret=$?
else
node "$basedir/../sshpk/bin/sshpk-sign" "$@"
ret=$?
fi
exit $ret

17
riven/srcgen/node_modules/.bin/sshpk-sign.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-sign" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
riven/srcgen/node_modules/.bin/sshpk-sign.ps1 generated vendored Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args
$ret=$LASTEXITCODE
}
exit $ret

15
riven/srcgen/node_modules/.bin/sshpk-verify generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@"
ret=$?
else
node "$basedir/../sshpk/bin/sshpk-verify" "$@"
ret=$?
fi
exit $ret

17
riven/srcgen/node_modules/.bin/sshpk-verify.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-verify" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
riven/srcgen/node_modules/.bin/sshpk-verify.ps1 generated vendored Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
$ret=$LASTEXITCODE
}
exit $ret

15
riven/srcgen/node_modules/.bin/uuid generated vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../uuid/bin/uuid" "$@"
ret=$?
else
node "$basedir/../uuid/bin/uuid" "$@"
ret=$?
fi
exit $ret

17
riven/srcgen/node_modules/.bin/uuid.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\uuid\bin\uuid" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
riven/srcgen/node_modules/.bin/uuid.ps1 generated vendored Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../uuid/bin/uuid" $args
$ret=$LASTEXITCODE
}
exit $ret

21
riven/srcgen/node_modules/@types/events/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
riven/srcgen/node_modules/@types/events/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/events`
# Summary
This package contains type definitions for events (https://github.com/Gozala/events).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/events
Additional Details
* Last updated: Thu, 24 Jan 2019 03:19:08 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by Yasunori Ohoka <https://github.com/yasupeke>, Shenwei Wang <https://github.com/weareoutman>.

28
riven/srcgen/node_modules/@types/events/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,28 @@
// Type definitions for events 3.0
// Project: https://github.com/Gozala/events
// Definitions by: Yasunori Ohoka <https://github.com/yasupeke>
// Shenwei Wang <https://github.com/weareoutman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type Listener = (...args: any[]) => void;
export class EventEmitter {
static listenerCount(emitter: EventEmitter, type: string | number): number;
static defaultMaxListeners: number;
eventNames(): Array<string | number>;
setMaxListeners(n: number): this;
getMaxListeners(): number;
emit(type: string | number, ...args: any[]): boolean;
addListener(type: string | number, listener: Listener): this;
on(type: string | number, listener: Listener): this;
once(type: string | number, listener: Listener): this;
prependListener(type: string | number, listener: Listener): this;
prependOnceListener(type: string | number, listener: Listener): this;
removeListener(type: string | number, listener: Listener): this;
off(type: string | number, listener: Listener): this;
removeAllListeners(type?: string | number): this;
listeners(type: string | number): Listener[];
listenerCount(type: string | number): number;
rawListeners(type: string | number): Listener[];
}

32
riven/srcgen/node_modules/@types/events/package.json generated vendored Normal file
View File

@ -0,0 +1,32 @@
{
"name": "@types/events",
"version": "3.0.0",
"description": "TypeScript definitions for events",
"license": "MIT",
"contributors": [
{
"name": "Yasunori Ohoka",
"url": "https://github.com/yasupeke",
"githubUsername": "yasupeke"
},
{
"name": "Shenwei Wang",
"url": "https://github.com/weareoutman",
"githubUsername": "weareoutman"
}
],
"main": "",
"types": "index",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "ae078136220837864b64cc7c1c5267ca1ceb809166fb74569e637bc7de9f2e12",
"typeScriptVersion": "2.0"
,"_resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz"
,"_integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g=="
,"_from": "@types/events@3.0.0"
}

21
riven/srcgen/node_modules/@types/glob/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
riven/srcgen/node_modules/@types/glob/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/glob`
# Summary
This package contains type definitions for Glob (https://github.com/isaacs/node-glob).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/glob
Additional Details
* Last updated: Thu, 27 Sep 2018 12:34:19 GMT
* Dependencies: events, minimatch, node
* Global values: none
# Credits
These definitions were written by vvakame <https://github.com/vvakame>, voy <https://github.com/voy>, Klaus Meinhardt <https://github.com/ajafff>.

87
riven/srcgen/node_modules/@types/glob/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,87 @@
// Type definitions for Glob 7.1
// Project: https://github.com/isaacs/node-glob
// Definitions by: vvakame <https://github.com/vvakame>
// voy <https://github.com/voy>
// Klaus Meinhardt <https://github.com/ajafff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import events = require("events");
import minimatch = require("minimatch");
declare function G(pattern: string, cb: (err: Error | null, matches: string[]) => void): void;
declare function G(pattern: string, options: G.IOptions, cb: (err: Error | null, matches: string[]) => void): void;
declare namespace G {
function __promisify__(pattern: string, options?: IOptions): Promise<string[]>;
function sync(pattern: string, options?: IOptions): string[];
function hasMagic(pattern: string, options?: IOptions): boolean;
let Glob: IGlobStatic;
let GlobSync: IGlobSyncStatic;
interface IOptions extends minimatch.IOptions {
cwd?: string;
root?: string;
dot?: boolean;
nomount?: boolean;
mark?: boolean;
nosort?: boolean;
stat?: boolean;
silent?: boolean;
strict?: boolean;
cache?: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> };
statCache?: { [path: string]: false | { isDirectory(): boolean} | undefined };
symlinks?: { [path: string]: boolean | undefined };
realpathCache?: { [path: string]: string };
sync?: boolean;
nounique?: boolean;
nonull?: boolean;
debug?: boolean;
nobrace?: boolean;
noglobstar?: boolean;
noext?: boolean;
nocase?: boolean;
matchBase?: any;
nodir?: boolean;
ignore?: string | ReadonlyArray<string>;
follow?: boolean;
realpath?: boolean;
nonegate?: boolean;
nocomment?: boolean;
absolute?: boolean;
}
interface IGlobStatic extends events.EventEmitter {
new (pattern: string, cb?: (err: Error | null, matches: string[]) => void): IGlob;
new (pattern: string, options: IOptions, cb?: (err: Error | null, matches: string[]) => void): IGlob;
prototype: IGlob;
}
interface IGlobSyncStatic {
new (pattern: string, options?: IOptions): IGlobBase;
prototype: IGlobBase;
}
interface IGlobBase {
minimatch: minimatch.IMinimatch;
options: IOptions;
aborted: boolean;
cache: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> };
statCache: { [path: string]: false | { isDirectory(): boolean; } | undefined };
symlinks: { [path: string]: boolean | undefined };
realpathCache: { [path: string]: string };
found: string[];
}
interface IGlob extends IGlobBase, events.EventEmitter {
pause(): void;
resume(): void;
abort(): void;
}
}
export = G;

40
riven/srcgen/node_modules/@types/glob/package.json generated vendored Normal file
View File

@ -0,0 +1,40 @@
{
"name": "@types/glob",
"version": "7.1.1",
"description": "TypeScript definitions for Glob",
"license": "MIT",
"contributors": [
{
"name": "vvakame",
"url": "https://github.com/vvakame",
"githubUsername": "vvakame"
},
{
"name": "voy",
"url": "https://github.com/voy",
"githubUsername": "voy"
},
{
"name": "Klaus Meinhardt",
"url": "https://github.com/ajafff",
"githubUsername": "ajafff"
}
],
"main": "",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"dependencies": {
"@types/events": "*",
"@types/minimatch": "*",
"@types/node": "*"
},
"typesPublisherContentHash": "43019f2af91c7a4ca3453c4b806a01c521ca3008ffe1bfefd37c5f9d6135660e",
"typeScriptVersion": "2.0"
,"_resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz"
,"_integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w=="
,"_from": "@types/glob@7.1.1"
}

21
riven/srcgen/node_modules/@types/minimatch/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
riven/srcgen/node_modules/@types/minimatch/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/minimatch`
# Summary
This package contains type definitions for Minimatch (https://github.com/isaacs/minimatch).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minimatch
Additional Details
* Last updated: Thu, 04 Jan 2018 23:26:01 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by vvakame <https://github.com/vvakame>, Shant Marouti <https://github.com/shantmarouti>.

214
riven/srcgen/node_modules/@types/minimatch/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,214 @@
// Type definitions for Minimatch 3.0
// Project: https://github.com/isaacs/minimatch
// Definitions by: vvakame <https://github.com/vvakame>
// Shant Marouti <https://github.com/shantmarouti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Tests a path against the pattern using the options.
*/
declare function M(target: string, pattern: string, options?: M.IOptions): boolean;
declare namespace M {
/**
* Match against the list of files, in the style of fnmatch or glob.
* If nothing is matched, and options.nonull is set,
* then return a list containing the pattern itself.
*/
function match(list: ReadonlyArray<string>, pattern: string, options?: IOptions): string[];
/**
* Returns a function that tests its supplied argument, suitable for use with Array.filter
*/
function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: ReadonlyArray<string>) => boolean;
/**
* Make a regular expression object from the pattern.
*/
function makeRe(pattern: string, options?: IOptions): RegExp;
let Minimatch: IMinimatchStatic;
interface IOptions {
/**
* Dump a ton of stuff to stderr.
*
* @default false
*/
debug?: boolean;
/**
* Do not expand {a,b} and {1..3} brace sets.
*
* @default false
*/
nobrace?: boolean;
/**
* Disable ** matching against multiple folder names.
*
* @default false
*/
noglobstar?: boolean;
/**
* Allow patterns to match filenames starting with a period,
* even if the pattern does not explicitly have a period in that spot.
*
* @default false
*/
dot?: boolean;
/**
* Disable "extglob" style patterns like +(a|b).
*
* @default false
*/
noext?: boolean;
/**
* Perform a case-insensitive match.
*
* @default false
*/
nocase?: boolean;
/**
* When a match is not found by minimatch.match,
* return a list containing the pattern itself if this option is set.
* Otherwise, an empty list is returned if there are no matches.
*
* @default false
*/
nonull?: boolean;
/**
* If set, then patterns without slashes will be matched against
* the basename of the path if it contains slashes.
*
* @default false
*/
matchBase?: boolean;
/**
* Suppress the behavior of treating #
* at the start of a pattern as a comment.
*
* @default false
*/
nocomment?: boolean;
/**
* Suppress the behavior of treating a leading ! character as negation.
*
* @default false
*/
nonegate?: boolean;
/**
* Returns from negate expressions the same as if they were not negated.
* (Ie, true on a hit, false on a miss.)
*
* @default false
*/
flipNegate?: boolean;
}
interface IMinimatchStatic {
new(pattern: string, options?: IOptions): IMinimatch;
prototype: IMinimatch;
}
interface IMinimatch {
/**
* The original pattern the minimatch object represents.
*/
pattern: string;
/**
* The options supplied to the constructor.
*/
options: IOptions;
/**
* A 2-dimensional array of regexp or string expressions.
*/
set: any[][]; // (RegExp | string)[][]
/**
* A single regular expression expressing the entire pattern.
* Created by the makeRe method.
*/
regexp: RegExp;
/**
* True if the pattern is negated.
*/
negate: boolean;
/**
* True if the pattern is a comment.
*/
comment: boolean;
/**
* True if the pattern is ""
*/
empty: boolean;
/**
* Generate the regexp member if necessary, and return it.
* Will return false if the pattern is invalid.
*/
makeRe(): RegExp; // regexp or boolean
/**
* Return true if the filename matches the pattern, or false otherwise.
*/
match(fname: string): boolean;
/**
* Take a /-split filename, and match it against a single row in the regExpSet.
* This method is mainly for internal use, but is exposed so that it can be used
* by a glob-walker that needs to avoid excessive filesystem calls.
*/
matchOne(files: string[], pattern: string[], partial: boolean): boolean;
/**
* Deprecated. For internal use.
*
* @private
*/
debug(): void;
/**
* Deprecated. For internal use.
*
* @private
*/
make(): void;
/**
* Deprecated. For internal use.
*
* @private
*/
parseNegate(): void;
/**
* Deprecated. For internal use.
*
* @private
*/
braceExpand(pattern: string, options: IOptions): void;
/**
* Deprecated. For internal use.
*
* @private
*/
parse(pattern: string, isSub?: boolean): void;
}
}
export = M;

View File

@ -0,0 +1,31 @@
{
"name": "@types/minimatch",
"version": "3.0.3",
"description": "TypeScript definitions for Minimatch",
"license": "MIT",
"contributors": [
{
"name": "vvakame",
"url": "https://github.com/vvakame",
"githubUsername": "vvakame"
},
{
"name": "Shant Marouti",
"url": "https://github.com/shantmarouti",
"githubUsername": "shantmarouti"
}
],
"main": "",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "e768e36348874adcc93ac67e9c3c7b5fcbd39079c0610ec16e410b8f851308d1",
"typeScriptVersion": "2.0"
,"_resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz"
,"_integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
,"_from": "@types/minimatch@3.0.3"
}

21
riven/srcgen/node_modules/@types/node/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
riven/srcgen/node_modules/@types/node/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/node`
# Summary
This package contains type definitions for Node.js (http://nodejs.org/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
Additional Details
* Last updated: Tue, 15 Oct 2019 23:57:18 GMT
* Dependencies: none
* Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
# Credits
These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Benjamin Toueg <https://github.com/btoueg>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, David Junger <https://github.com/touffy>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Huw <https://github.com/hoo29>, Kelvin Jin <https://github.com/kjin>, Klaus Meinhardt <https://github.com/ajafff>, Lishude <https://github.com/islishude>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, Mohsen Azimi <https://github.com/mohsen1>, Nicolas Even <https://github.com/n-e>, Nicolas Voigt <https://github.com/octo-sniffle>, Parambir Singh <https://github.com/parambirs>, Sebastian Silbermann <https://github.com/eps1lon>, Simon Schick <https://github.com/SimonSchick>, Thomas den Hollander <https://github.com/ThomasdenH>, Wilco Bakker <https://github.com/WilcoBakker>, wwwy3y3 <https://github.com/wwwy3y3>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Samuel Ainsworth <https://github.com/samuela>, Kyle Uehlein <https://github.com/kuehlein>, Jordi Oliveras Rovira <https://github.com/j-oliveras>, Thanik Bhongbhibhat <https://github.com/bhongy>, Marcin Kopacz <https://github.com/chyzwar>, Trivikram Kamat <https://github.com/trivikr>, and Minh Son Nguyen <https://github.com/nguymin4>.

52
riven/srcgen/node_modules/@types/node/assert.d.ts generated vendored Normal file
View File

@ -0,0 +1,52 @@
declare module "assert" {
function internal(value: any, message?: string | Error): void;
namespace internal {
class AssertionError implements Error {
name: string;
message: string;
actual: any;
expected: any;
operator: string;
generatedMessage: boolean;
code: 'ERR_ASSERTION';
constructor(options?: {
message?: string; actual?: any; expected?: any;
operator?: string; stackStartFn?: Function
});
}
function fail(message?: string | Error): never;
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
function ok(value: any, message?: string | Error): void;
/** @deprecated since v9.9.0 - use strictEqual() instead. */
function equal(actual: any, expected: any, message?: string | Error): void;
/** @deprecated since v9.9.0 - use notStrictEqual() instead. */
function notEqual(actual: any, expected: any, message?: string | Error): void;
/** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
function deepEqual(actual: any, expected: any, message?: string | Error): void;
/** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
function strictEqual(actual: any, expected: any, message?: string | Error): void;
function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
function throws(block: () => any, message?: string | Error): void;
function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void;
function doesNotThrow(block: () => any, message?: string | Error): void;
function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
function ifError(value: any): void;
function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
function rejects(block: (() => Promise<any>) | Promise<any>, error: RegExp | Function | Object | Error, message?: string | Error): Promise<void>;
function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
function doesNotReject(block: (() => Promise<any>) | Promise<any>, error: RegExp | Function, message?: string | Error): Promise<void>;
const strict: typeof internal;
}
export = internal;
}

132
riven/srcgen/node_modules/@types/node/async_hooks.d.ts generated vendored Normal file
View File

@ -0,0 +1,132 @@
/**
* Async Hooks module: https://nodejs.org/api/async_hooks.html
*/
declare module "async_hooks" {
/**
* Returns the asyncId of the current execution context.
*/
function executionAsyncId(): number;
/**
* Returns the ID of the resource responsible for calling the callback that is currently being executed.
*/
function triggerAsyncId(): number;
interface HookCallbacks {
/**
* Called when a class is constructed that has the possibility to emit an asynchronous event.
* @param asyncId a unique ID for the async resource
* @param type the type of the async resource
* @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
* @param resource reference to the resource representing the async operation, needs to be released during destroy
*/
init?(asyncId: number, type: string, triggerAsyncId: number, resource: Object): void;
/**
* When an asynchronous operation is initiated or completes a callback is called to notify the user.
* The before callback is called just before said callback is executed.
* @param asyncId the unique identifier assigned to the resource about to execute the callback.
*/
before?(asyncId: number): void;
/**
* Called immediately after the callback specified in before is completed.
* @param asyncId the unique identifier assigned to the resource which has executed the callback.
*/
after?(asyncId: number): void;
/**
* Called when a promise has resolve() called. This may not be in the same execution id
* as the promise itself.
* @param asyncId the unique id for the promise that was resolve()d.
*/
promiseResolve?(asyncId: number): void;
/**
* Called after the resource corresponding to asyncId is destroyed
* @param asyncId a unique ID for the async resource
*/
destroy?(asyncId: number): void;
}
interface AsyncHook {
/**
* Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
*/
enable(): this;
/**
* Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
*/
disable(): this;
}
/**
* Registers functions to be called for different lifetime events of each async operation.
* @param options the callbacks to register
* @return an AsyncHooks instance used for disabling and enabling hooks
*/
function createHook(options: HookCallbacks): AsyncHook;
interface AsyncResourceOptions {
/**
* The ID of the execution context that created this async event.
* Default: `executionAsyncId()`
*/
triggerAsyncId?: number;
/**
* Disables automatic `emitDestroy` when the object is garbage collected.
* This usually does not need to be set (even if `emitDestroy` is called
* manually), unless the resource's `asyncId` is retrieved and the
* sensitive API's `emitDestroy` is called with it.
* Default: `false`
*/
requireManualDestroy?: boolean;
}
/**
* The class AsyncResource was designed to be extended by the embedder's async resources.
* Using this users can easily trigger the lifetime events of their own resources.
*/
class AsyncResource {
/**
* AsyncResource() is meant to be extended. Instantiating a
* new AsyncResource() also triggers init. If triggerAsyncId is omitted then
* async_hook.executionAsyncId() is used.
* @param type The type of async event.
* @param triggerAsyncId The ID of the execution context that created
* this async event (default: `executionAsyncId()`), or an
* AsyncResourceOptions object (since 9.3)
*/
constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
/**
* Call the provided function with the provided arguments in the
* execution context of the async resource. This will establish the
* context, trigger the AsyncHooks before callbacks, call the function,
* trigger the AsyncHooks after callbacks, and then restore the original
* execution context.
* @param fn The function to call in the execution context of this
* async resource.
* @param thisArg The receiver to be used for the function call.
* @param args Optional arguments to pass to the function.
*/
runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
/**
* Call AsyncHooks destroy callbacks.
*/
emitDestroy(): void;
/**
* @return the unique ID assigned to this AsyncResource instance.
*/
asyncId(): number;
/**
* @return the trigger ID for this AsyncResource instance.
*/
triggerAsyncId(): number;
}
}

41
riven/srcgen/node_modules/@types/node/base.d.ts generated vendored Normal file
View File

@ -0,0 +1,41 @@
// base definnitions for all NodeJS modules that are not specific to any version of TypeScript
/// <reference path="globals.d.ts" />
/// <reference path="assert.d.ts" />
/// <reference path="async_hooks.d.ts" />
/// <reference path="buffer.d.ts" />
/// <reference path="child_process.d.ts" />
/// <reference path="cluster.d.ts" />
/// <reference path="console.d.ts" />
/// <reference path="constants.d.ts" />
/// <reference path="crypto.d.ts" />
/// <reference path="dgram.d.ts" />
/// <reference path="dns.d.ts" />
/// <reference path="domain.d.ts" />
/// <reference path="events.d.ts" />
/// <reference path="fs.d.ts" />
/// <reference path="http.d.ts" />
/// <reference path="http2.d.ts" />
/// <reference path="https.d.ts" />
/// <reference path="inspector.d.ts" />
/// <reference path="module.d.ts" />
/// <reference path="net.d.ts" />
/// <reference path="os.d.ts" />
/// <reference path="path.d.ts" />
/// <reference path="perf_hooks.d.ts" />
/// <reference path="process.d.ts" />
/// <reference path="punycode.d.ts" />
/// <reference path="querystring.d.ts" />
/// <reference path="readline.d.ts" />
/// <reference path="repl.d.ts" />
/// <reference path="stream.d.ts" />
/// <reference path="string_decoder.d.ts" />
/// <reference path="timers.d.ts" />
/// <reference path="tls.d.ts" />
/// <reference path="trace_events.d.ts" />
/// <reference path="tty.d.ts" />
/// <reference path="url.d.ts" />
/// <reference path="util.d.ts" />
/// <reference path="v8.d.ts" />
/// <reference path="vm.d.ts" />
/// <reference path="worker_threads.d.ts" />
/// <reference path="zlib.d.ts" />

22
riven/srcgen/node_modules/@types/node/buffer.d.ts generated vendored Normal file
View File

@ -0,0 +1,22 @@
declare module "buffer" {
export const INSPECT_MAX_BYTES: number;
export const kMaxLength: number;
export const kStringMaxLength: number;
export const constants: {
MAX_LENGTH: number;
MAX_STRING_LENGTH: number;
};
const BuffType: typeof Buffer;
export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
export const SlowBuffer: {
/** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */
new(size: number): Buffer;
prototype: Buffer;
};
export { BuffType as Buffer };
}

View File

@ -0,0 +1,478 @@
declare module "child_process" {
import * as events from "events";
import * as net from "net";
import { Writable, Readable, Stream, Pipe } from "stream";
interface ChildProcess extends events.EventEmitter {
stdin: Writable | null;
stdout: Readable | null;
stderr: Readable | null;
readonly channel?: Pipe | null;
readonly stdio: [
Writable | null, // stdin
Readable | null, // stdout
Readable | null, // stderr
Readable | Writable | null | undefined, // extra
Readable | Writable | null | undefined // extra
];
readonly killed: boolean;
readonly pid: number;
readonly connected: boolean;
kill(signal?: string): void;
send(message: any, callback?: (error: Error | null) => void): boolean;
send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error | null) => void): boolean;
send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
disconnect(): void;
unref(): void;
ref(): void;
/**
* events.EventEmitter
* 1. close
* 2. disconnect
* 3. error
* 4. exit
* 5. message
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: "close", listener: (code: number, signal: string) => void): this;
addListener(event: "disconnect", listener: () => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: "close", code: number, signal: string): boolean;
emit(event: "disconnect"): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "exit", code: number | null, signal: string | null): boolean;
emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: "close", listener: (code: number, signal: string) => void): this;
on(event: "disconnect", listener: () => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: "close", listener: (code: number, signal: string) => void): this;
once(event: "disconnect", listener: () => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: "close", listener: (code: number, signal: string) => void): this;
prependListener(event: "disconnect", listener: () => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this;
prependOnceListener(event: "disconnect", listener: () => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
}
// return this object when stdio option is undefined or not specified
interface ChildProcessWithoutNullStreams extends ChildProcess {
stdin: Writable;
stdout: Readable;
stderr: Readable;
readonly stdio: [
Writable, // stdin
Readable, // stdout
Readable, // stderr
Readable | Writable | null | undefined, // extra, no modification
Readable | Writable | null | undefined // extra, no modification
];
}
// return this object when stdio option is a tuple of 3
interface ChildProcessByStdio<
I extends null | Writable,
O extends null | Readable,
E extends null | Readable,
> extends ChildProcess {
stdin: I;
stdout: O;
stderr: E;
readonly stdio: [
I,
O,
E,
Readable | Writable | null | undefined, // extra, no modification
Readable | Writable | null | undefined // extra, no modification
];
}
interface MessageOptions {
keepOpen?: boolean;
}
type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
interface ProcessEnvOptions {
uid?: number;
gid?: number;
cwd?: string;
env?: NodeJS.ProcessEnv;
}
interface CommonOptions extends ProcessEnvOptions {
/**
* @default true
*/
windowsHide?: boolean;
/**
* @default 0
*/
timeout?: number;
}
interface SpawnOptions extends CommonOptions {
argv0?: string;
stdio?: StdioOptions;
detached?: boolean;
shell?: boolean | string;
windowsVerbatimArguments?: boolean;
}
interface SpawnOptionsWithoutStdio extends SpawnOptions {
stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
}
type StdioNull = 'inherit' | 'ignore' | Stream;
type StdioPipe = undefined | null | 'pipe';
interface SpawnOptionsWithStdioTuple<
Stdin extends StdioNull | StdioPipe,
Stdout extends StdioNull | StdioPipe,
Stderr extends StdioNull | StdioPipe,
> extends SpawnOptions {
stdio: [Stdin, Stdout, Stderr];
}
// overloads of spawn without 'args'
function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
function spawn(
command: string,
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
): ChildProcessByStdio<Writable, Readable, Readable>;
function spawn(
command: string,
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
): ChildProcessByStdio<Writable, Readable, null>;
function spawn(
command: string,
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
): ChildProcessByStdio<Writable, null, Readable>;
function spawn(
command: string,
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
): ChildProcessByStdio<null, Readable, Readable>;
function spawn(
command: string,
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
): ChildProcessByStdio<Writable, null, null>;
function spawn(
command: string,
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
): ChildProcessByStdio<null, Readable, null>;
function spawn(
command: string,
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
): ChildProcessByStdio<null, null, Readable>;
function spawn(
command: string,
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
): ChildProcessByStdio<null, null, null>;
function spawn(command: string, options: SpawnOptions): ChildProcess;
// overloads of spawn with 'args'
function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
function spawn(
command: string,
args: ReadonlyArray<string>,
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
): ChildProcessByStdio<Writable, Readable, Readable>;
function spawn(
command: string,
args: ReadonlyArray<string>,
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
): ChildProcessByStdio<Writable, Readable, null>;
function spawn(
command: string,
args: ReadonlyArray<string>,
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
): ChildProcessByStdio<Writable, null, Readable>;
function spawn(
command: string,
args: ReadonlyArray<string>,
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
): ChildProcessByStdio<null, Readable, Readable>;
function spawn(
command: string,
args: ReadonlyArray<string>,
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
): ChildProcessByStdio<Writable, null, null>;
function spawn(
command: string,
args: ReadonlyArray<string>,
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
): ChildProcessByStdio<null, Readable, null>;
function spawn(
command: string,
args: ReadonlyArray<string>,
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
): ChildProcessByStdio<null, null, Readable>;
function spawn(
command: string,
args: ReadonlyArray<string>,
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
): ChildProcessByStdio<null, null, null>;
function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
interface ExecOptions extends CommonOptions {
shell?: string;
maxBuffer?: number;
killSignal?: string;
}
interface ExecOptionsWithStringEncoding extends ExecOptions {
encoding: BufferEncoding;
}
interface ExecOptionsWithBufferEncoding extends ExecOptions {
encoding: string | null; // specify `null`.
}
interface ExecException extends Error {
cmd?: string;
killed?: boolean;
code?: number;
signal?: string;
}
// no `options` definitely means stdout/stderr are `string`.
function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
// `options` with well known `encoding` means stdout/stderr are definitely `string`.
function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
// `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
// There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
// `options` without an `encoding` means stdout/stderr are definitely `string`.
function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
// fallback if nothing else matches. Worst case is always `string | Buffer`.
function exec(
command: string,
options: ({ encoding?: string | null } & ExecOptions) | undefined | null,
callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
): ChildProcess;
interface PromiseWithChild<T> extends Promise<T> {
child: ChildProcess;
}
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
namespace exec {
function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
}
interface ExecFileOptions extends CommonOptions {
maxBuffer?: number;
killSignal?: string;
windowsVerbatimArguments?: boolean;
shell?: boolean | string;
}
interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
encoding: BufferEncoding;
}
interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
encoding: 'buffer' | null;
}
interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
encoding: string;
}
function execFile(file: string): ChildProcess;
function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
// no `options` definitely means stdout/stderr are `string`.
function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithBufferEncoding,
callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void,
): ChildProcess;
// `options` with well known `encoding` means stdout/stderr are definitely `string`.
function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithStringEncoding,
callback: (error: Error | null, stdout: string, stderr: string) => void,
): ChildProcess;
// `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
// There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
function execFile(
file: string,
options: ExecFileOptionsWithOtherEncoding,
callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithOtherEncoding,
callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void,
): ChildProcess;
// `options` without an `encoding` means stdout/stderr are definitely `string`.
function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
// fallback if nothing else matches. Worst case is always `string | Buffer`.
function execFile(
file: string,
options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
): ChildProcess;
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
namespace execFile {
function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(
file: string,
args: string[] | undefined | null,
options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
}
interface ForkOptions extends ProcessEnvOptions {
execPath?: string;
execArgv?: string[];
silent?: boolean;
stdio?: StdioOptions;
detached?: boolean;
windowsVerbatimArguments?: boolean;
}
function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
interface SpawnSyncOptions extends CommonOptions {
argv0?: string; // Not specified in the docs
input?: string | NodeJS.ArrayBufferView;
stdio?: StdioOptions;
killSignal?: string | number;
maxBuffer?: number;
encoding?: string;
shell?: boolean | string;
windowsVerbatimArguments?: boolean;
}
interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
encoding: BufferEncoding;
}
interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
encoding: string; // specify `null`.
}
interface SpawnSyncReturns<T> {
pid: number;
output: string[];
stdout: T;
stderr: T;
status: number | null;
signal: string | null;
error?: Error;
}
function spawnSync(command: string): SpawnSyncReturns<Buffer>;
function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
interface ExecSyncOptions extends CommonOptions {
input?: string | Uint8Array;
stdio?: StdioOptions;
shell?: string;
killSignal?: string | number;
maxBuffer?: number;
encoding?: string;
}
interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
encoding: BufferEncoding;
}
interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
encoding: string; // specify `null`.
}
function execSync(command: string): Buffer;
function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
function execSync(command: string, options?: ExecSyncOptions): Buffer;
interface ExecFileSyncOptions extends CommonOptions {
input?: string | NodeJS.ArrayBufferView;
stdio?: StdioOptions;
killSignal?: string | number;
maxBuffer?: number;
encoding?: string;
shell?: boolean | string;
}
interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
encoding: BufferEncoding;
}
interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
encoding: string; // specify `null`.
}
function execFileSync(command: string): Buffer;
function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
}

260
riven/srcgen/node_modules/@types/node/cluster.d.ts generated vendored Normal file
View File

@ -0,0 +1,260 @@
declare module "cluster" {
import * as child from "child_process";
import * as events from "events";
import * as net from "net";
// interfaces
interface ClusterSettings {
execArgv?: string[]; // default: process.execArgv
exec?: string;
args?: string[];
silent?: boolean;
stdio?: any[];
uid?: number;
gid?: number;
inspectPort?: number | (() => number);
}
interface Address {
address: string;
port: number;
addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6"
}
class Worker extends events.EventEmitter {
id: number;
process: child.ChildProcess;
send(message: any, sendHandle?: any, callback?: (error: Error | null) => void): boolean;
kill(signal?: string): void;
destroy(signal?: string): void;
disconnect(): void;
isConnected(): boolean;
isDead(): boolean;
exitedAfterDisconnect: boolean;
/**
* events.EventEmitter
* 1. disconnect
* 2. error
* 3. exit
* 4. listening
* 5. message
* 6. online
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: "disconnect", listener: () => void): this;
addListener(event: "error", listener: (error: Error) => void): this;
addListener(event: "exit", listener: (code: number, signal: string) => void): this;
addListener(event: "listening", listener: (address: Address) => void): this;
addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: "online", listener: () => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: "disconnect"): boolean;
emit(event: "error", error: Error): boolean;
emit(event: "exit", code: number, signal: string): boolean;
emit(event: "listening", address: Address): boolean;
emit(event: "message", message: any, handle: net.Socket | net.Server): boolean;
emit(event: "online"): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: "disconnect", listener: () => void): this;
on(event: "error", listener: (error: Error) => void): this;
on(event: "exit", listener: (code: number, signal: string) => void): this;
on(event: "listening", listener: (address: Address) => void): this;
on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "online", listener: () => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: "disconnect", listener: () => void): this;
once(event: "error", listener: (error: Error) => void): this;
once(event: "exit", listener: (code: number, signal: string) => void): this;
once(event: "listening", listener: (address: Address) => void): this;
once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "online", listener: () => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: "disconnect", listener: () => void): this;
prependListener(event: "error", listener: (error: Error) => void): this;
prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
prependListener(event: "listening", listener: (address: Address) => void): this;
prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: "online", listener: () => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: "disconnect", listener: () => void): this;
prependOnceListener(event: "error", listener: (error: Error) => void): this;
prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
prependOnceListener(event: "listening", listener: (address: Address) => void): this;
prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: "online", listener: () => void): this;
}
interface Cluster extends events.EventEmitter {
Worker: Worker;
disconnect(callback?: () => void): void;
fork(env?: any): Worker;
isMaster: boolean;
isWorker: boolean;
// TODO: cluster.schedulingPolicy
settings: ClusterSettings;
setupMaster(settings?: ClusterSettings): void;
worker?: Worker;
workers?: {
[index: string]: Worker | undefined
};
/**
* events.EventEmitter
* 1. disconnect
* 2. exit
* 3. fork
* 4. listening
* 5. message
* 6. online
* 7. setup
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: "disconnect", listener: (worker: Worker) => void): this;
addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
addListener(event: "fork", listener: (worker: Worker) => void): this;
addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: "online", listener: (worker: Worker) => void): this;
addListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: "disconnect", worker: Worker): boolean;
emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
emit(event: "fork", worker: Worker): boolean;
emit(event: "listening", worker: Worker, address: Address): boolean;
emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
emit(event: "online", worker: Worker): boolean;
emit(event: "setup", settings: ClusterSettings): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: "disconnect", listener: (worker: Worker) => void): this;
on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
on(event: "fork", listener: (worker: Worker) => void): this;
on(event: "listening", listener: (worker: Worker, address: Address) => void): this;
on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "online", listener: (worker: Worker) => void): this;
on(event: "setup", listener: (settings: ClusterSettings) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: "disconnect", listener: (worker: Worker) => void): this;
once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
once(event: "fork", listener: (worker: Worker) => void): this;
once(event: "listening", listener: (worker: Worker, address: Address) => void): this;
once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "online", listener: (worker: Worker) => void): this;
once(event: "setup", listener: (settings: ClusterSettings) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: "disconnect", listener: (worker: Worker) => void): this;
prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
prependListener(event: "fork", listener: (worker: Worker) => void): this;
prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: "online", listener: (worker: Worker) => void): this;
prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this;
prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
prependOnceListener(event: "fork", listener: (worker: Worker) => void): this;
prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
// the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
prependOnceListener(event: "online", listener: (worker: Worker) => void): this;
prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
}
function disconnect(callback?: () => void): void;
function fork(env?: any): Worker;
const isMaster: boolean;
const isWorker: boolean;
// TODO: cluster.schedulingPolicy
const settings: ClusterSettings;
function setupMaster(settings?: ClusterSettings): void;
const worker: Worker;
const workers: {
[index: string]: Worker | undefined
};
/**
* events.EventEmitter
* 1. disconnect
* 2. exit
* 3. fork
* 4. listening
* 5. message
* 6. online
* 7. setup
*/
function addListener(event: string, listener: (...args: any[]) => void): Cluster;
function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
function addListener(event: "fork", listener: (worker: Worker) => void): Cluster;
function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
function addListener(event: "online", listener: (worker: Worker) => void): Cluster;
function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
function emit(event: string | symbol, ...args: any[]): boolean;
function emit(event: "disconnect", worker: Worker): boolean;
function emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
function emit(event: "fork", worker: Worker): boolean;
function emit(event: "listening", worker: Worker, address: Address): boolean;
function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
function emit(event: "online", worker: Worker): boolean;
function emit(event: "setup", settings: ClusterSettings): boolean;
function on(event: string, listener: (...args: any[]) => void): Cluster;
function on(event: "disconnect", listener: (worker: Worker) => void): Cluster;
function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
function on(event: "fork", listener: (worker: Worker) => void): Cluster;
function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function on(event: "online", listener: (worker: Worker) => void): Cluster;
function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
function once(event: string, listener: (...args: any[]) => void): Cluster;
function once(event: "disconnect", listener: (worker: Worker) => void): Cluster;
function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
function once(event: "fork", listener: (worker: Worker) => void): Cluster;
function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function once(event: "online", listener: (worker: Worker) => void): Cluster;
function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
function removeListener(event: string, listener: (...args: any[]) => void): Cluster;
function removeAllListeners(event?: string): Cluster;
function setMaxListeners(n: number): Cluster;
function getMaxListeners(): number;
function listeners(event: string): Function[];
function listenerCount(type: string): number;
function prependListener(event: string, listener: (...args: any[]) => void): Cluster;
function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster;
function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
function prependListener(event: "online", listener: (worker: Worker) => void): Cluster;
function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster;
function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster;
function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster;
function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
function eventNames(): string[];
}

3
riven/srcgen/node_modules/@types/node/console.d.ts generated vendored Normal file
View File

@ -0,0 +1,3 @@
declare module "console" {
export = console;
}

278
riven/srcgen/node_modules/@types/node/constants.d.ts generated vendored Normal file
View File

@ -0,0 +1,278 @@
declare module "constants" {
const E2BIG: number;
const EACCES: number;
const EADDRINUSE: number;
const EADDRNOTAVAIL: number;
const EAFNOSUPPORT: number;
const EAGAIN: number;
const EALREADY: number;
const EBADF: number;
const EBADMSG: number;
const EBUSY: number;
const ECANCELED: number;
const ECHILD: number;
const ECONNABORTED: number;
const ECONNREFUSED: number;
const ECONNRESET: number;
const EDEADLK: number;
const EDESTADDRREQ: number;
const EDOM: number;
const EEXIST: number;
const EFAULT: number;
const EFBIG: number;
const EHOSTUNREACH: number;
const EIDRM: number;
const EILSEQ: number;
const EINPROGRESS: number;
const EINTR: number;
const EINVAL: number;
const EIO: number;
const EISCONN: number;
const EISDIR: number;
const ELOOP: number;
const EMFILE: number;
const EMLINK: number;
const EMSGSIZE: number;
const ENAMETOOLONG: number;
const ENETDOWN: number;
const ENETRESET: number;
const ENETUNREACH: number;
const ENFILE: number;
const ENOBUFS: number;
const ENODATA: number;
const ENODEV: number;
const ENOENT: number;
const ENOEXEC: number;
const ENOLCK: number;
const ENOLINK: number;
const ENOMEM: number;
const ENOMSG: number;
const ENOPROTOOPT: number;
const ENOSPC: number;
const ENOSR: number;
const ENOSTR: number;
const ENOSYS: number;
const ENOTCONN: number;
const ENOTDIR: number;
const ENOTEMPTY: number;
const ENOTSOCK: number;
const ENOTSUP: number;
const ENOTTY: number;
const ENXIO: number;
const EOPNOTSUPP: number;
const EOVERFLOW: number;
const EPERM: number;
const EPIPE: number;
const EPROTO: number;
const EPROTONOSUPPORT: number;
const EPROTOTYPE: number;
const ERANGE: number;
const EROFS: number;
const ESPIPE: number;
const ESRCH: number;
const ETIME: number;
const ETIMEDOUT: number;
const ETXTBSY: number;
const EWOULDBLOCK: number;
const EXDEV: number;
const WSAEINTR: number;
const WSAEBADF: number;
const WSAEACCES: number;
const WSAEFAULT: number;
const WSAEINVAL: number;
const WSAEMFILE: number;
const WSAEWOULDBLOCK: number;
const WSAEINPROGRESS: number;
const WSAEALREADY: number;
const WSAENOTSOCK: number;
const WSAEDESTADDRREQ: number;
const WSAEMSGSIZE: number;
const WSAEPROTOTYPE: number;
const WSAENOPROTOOPT: number;
const WSAEPROTONOSUPPORT: number;
const WSAESOCKTNOSUPPORT: number;
const WSAEOPNOTSUPP: number;
const WSAEPFNOSUPPORT: number;
const WSAEAFNOSUPPORT: number;
const WSAEADDRINUSE: number;
const WSAEADDRNOTAVAIL: number;
const WSAENETDOWN: number;
const WSAENETUNREACH: number;
const WSAENETRESET: number;
const WSAECONNABORTED: number;
const WSAECONNRESET: number;
const WSAENOBUFS: number;
const WSAEISCONN: number;
const WSAENOTCONN: number;
const WSAESHUTDOWN: number;
const WSAETOOMANYREFS: number;
const WSAETIMEDOUT: number;
const WSAECONNREFUSED: number;
const WSAELOOP: number;
const WSAENAMETOOLONG: number;
const WSAEHOSTDOWN: number;
const WSAEHOSTUNREACH: number;
const WSAENOTEMPTY: number;
const WSAEPROCLIM: number;
const WSAEUSERS: number;
const WSAEDQUOT: number;
const WSAESTALE: number;
const WSAEREMOTE: number;
const WSASYSNOTREADY: number;
const WSAVERNOTSUPPORTED: number;
const WSANOTINITIALISED: number;
const WSAEDISCON: number;
const WSAENOMORE: number;
const WSAECANCELLED: number;
const WSAEINVALIDPROCTABLE: number;
const WSAEINVALIDPROVIDER: number;
const WSAEPROVIDERFAILEDINIT: number;
const WSASYSCALLFAILURE: number;
const WSASERVICE_NOT_FOUND: number;
const WSATYPE_NOT_FOUND: number;
const WSA_E_NO_MORE: number;
const WSA_E_CANCELLED: number;
const WSAEREFUSED: number;
const SIGHUP: number;
const SIGINT: number;
const SIGILL: number;
const SIGABRT: number;
const SIGFPE: number;
const SIGKILL: number;
const SIGSEGV: number;
const SIGTERM: number;
const SIGBREAK: number;
const SIGWINCH: number;
const SSL_OP_ALL: number;
const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
const SSL_OP_CISCO_ANYCONNECT: number;
const SSL_OP_COOKIE_EXCHANGE: number;
const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
const SSL_OP_EPHEMERAL_RSA: number;
const SSL_OP_LEGACY_SERVER_CONNECT: number;
const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
const SSL_OP_NETSCAPE_CA_DN_BUG: number;
const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
const SSL_OP_NO_COMPRESSION: number;
const SSL_OP_NO_QUERY_MTU: number;
const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
const SSL_OP_NO_SSLv2: number;
const SSL_OP_NO_SSLv3: number;
const SSL_OP_NO_TICKET: number;
const SSL_OP_NO_TLSv1: number;
const SSL_OP_NO_TLSv1_1: number;
const SSL_OP_NO_TLSv1_2: number;
const SSL_OP_PKCS1_CHECK_1: number;
const SSL_OP_PKCS1_CHECK_2: number;
const SSL_OP_SINGLE_DH_USE: number;
const SSL_OP_SINGLE_ECDH_USE: number;
const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
const SSL_OP_TLS_D5_BUG: number;
const SSL_OP_TLS_ROLLBACK_BUG: number;
const ENGINE_METHOD_DSA: number;
const ENGINE_METHOD_DH: number;
const ENGINE_METHOD_RAND: number;
const ENGINE_METHOD_ECDH: number;
const ENGINE_METHOD_ECDSA: number;
const ENGINE_METHOD_CIPHERS: number;
const ENGINE_METHOD_DIGESTS: number;
const ENGINE_METHOD_STORE: number;
const ENGINE_METHOD_PKEY_METHS: number;
const ENGINE_METHOD_PKEY_ASN1_METHS: number;
const ENGINE_METHOD_ALL: number;
const ENGINE_METHOD_NONE: number;
const DH_CHECK_P_NOT_SAFE_PRIME: number;
const DH_CHECK_P_NOT_PRIME: number;
const DH_UNABLE_TO_CHECK_GENERATOR: number;
const DH_NOT_SUITABLE_GENERATOR: number;
const RSA_PKCS1_PADDING: number;
const RSA_SSLV23_PADDING: number;
const RSA_NO_PADDING: number;
const RSA_PKCS1_OAEP_PADDING: number;
const RSA_X931_PADDING: number;
const RSA_PKCS1_PSS_PADDING: number;
const POINT_CONVERSION_COMPRESSED: number;
const POINT_CONVERSION_UNCOMPRESSED: number;
const POINT_CONVERSION_HYBRID: number;
const O_RDONLY: number;
const O_WRONLY: number;
const O_RDWR: number;
const S_IFMT: number;
const S_IFREG: number;
const S_IFDIR: number;
const S_IFCHR: number;
const S_IFBLK: number;
const S_IFIFO: number;
const S_IFSOCK: number;
const S_IRWXU: number;
const S_IRUSR: number;
const S_IWUSR: number;
const S_IXUSR: number;
const S_IRWXG: number;
const S_IRGRP: number;
const S_IWGRP: number;
const S_IXGRP: number;
const S_IRWXO: number;
const S_IROTH: number;
const S_IWOTH: number;
const S_IXOTH: number;
const S_IFLNK: number;
const O_CREAT: number;
const O_EXCL: number;
const O_NOCTTY: number;
const O_DIRECTORY: number;
const O_NOATIME: number;
const O_NOFOLLOW: number;
const O_SYNC: number;
const O_DSYNC: number;
const O_SYMLINK: number;
const O_DIRECT: number;
const O_NONBLOCK: number;
const O_TRUNC: number;
const O_APPEND: number;
const F_OK: number;
const R_OK: number;
const W_OK: number;
const X_OK: number;
const COPYFILE_EXCL: number;
const COPYFILE_FICLONE: number;
const COPYFILE_FICLONE_FORCE: number;
const UV_UDP_REUSEADDR: number;
const SIGQUIT: number;
const SIGTRAP: number;
const SIGIOT: number;
const SIGBUS: number;
const SIGUSR1: number;
const SIGUSR2: number;
const SIGPIPE: number;
const SIGALRM: number;
const SIGCHLD: number;
const SIGSTKFLT: number;
const SIGCONT: number;
const SIGSTOP: number;
const SIGTSTP: number;
const SIGTTIN: number;
const SIGTTOU: number;
const SIGURG: number;
const SIGXCPU: number;
const SIGXFSZ: number;
const SIGVTALRM: number;
const SIGPROF: number;
const SIGIO: number;
const SIGPOLL: number;
const SIGPWR: number;
const SIGSYS: number;
const SIGUNUSED: number;
const defaultCoreCipherList: string;
const defaultCipherList: string;
const ENGINE_METHOD_RSA: number;
const ALPN_ENABLED: number;
}

612
riven/srcgen/node_modules/@types/node/crypto.d.ts generated vendored Normal file
View File

@ -0,0 +1,612 @@
declare module "crypto" {
import * as stream from "stream";
interface Certificate {
exportChallenge(spkac: BinaryLike): Buffer;
exportPublicKey(spkac: BinaryLike): Buffer;
verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
}
const Certificate: {
new(): Certificate;
(): Certificate;
};
namespace constants { // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
const OPENSSL_VERSION_NUMBER: number;
/** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
const SSL_OP_ALL: number;
/** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
/** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
/** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
const SSL_OP_CISCO_ANYCONNECT: number;
/** Instructs OpenSSL to turn on cookie exchange. */
const SSL_OP_COOKIE_EXCHANGE: number;
/** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
/** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
/** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
const SSL_OP_EPHEMERAL_RSA: number;
/** Allows initial connection to servers that do not support RI. */
const SSL_OP_LEGACY_SERVER_CONNECT: number;
const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
/** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
const SSL_OP_NETSCAPE_CA_DN_BUG: number;
const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
/** Instructs OpenSSL to disable support for SSL/TLS compression. */
const SSL_OP_NO_COMPRESSION: number;
const SSL_OP_NO_QUERY_MTU: number;
/** Instructs OpenSSL to always start a new session when performing renegotiation. */
const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
const SSL_OP_NO_SSLv2: number;
const SSL_OP_NO_SSLv3: number;
const SSL_OP_NO_TICKET: number;
const SSL_OP_NO_TLSv1: number;
const SSL_OP_NO_TLSv1_1: number;
const SSL_OP_NO_TLSv1_2: number;
const SSL_OP_PKCS1_CHECK_1: number;
const SSL_OP_PKCS1_CHECK_2: number;
/** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
const SSL_OP_SINGLE_DH_USE: number;
/** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
const SSL_OP_SINGLE_ECDH_USE: number;
const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
const SSL_OP_TLS_D5_BUG: number;
/** Instructs OpenSSL to disable version rollback attack detection. */
const SSL_OP_TLS_ROLLBACK_BUG: number;
const ENGINE_METHOD_RSA: number;
const ENGINE_METHOD_DSA: number;
const ENGINE_METHOD_DH: number;
const ENGINE_METHOD_RAND: number;
const ENGINE_METHOD_EC: number;
const ENGINE_METHOD_CIPHERS: number;
const ENGINE_METHOD_DIGESTS: number;
const ENGINE_METHOD_PKEY_METHS: number;
const ENGINE_METHOD_PKEY_ASN1_METHS: number;
const ENGINE_METHOD_ALL: number;
const ENGINE_METHOD_NONE: number;
const DH_CHECK_P_NOT_SAFE_PRIME: number;
const DH_CHECK_P_NOT_PRIME: number;
const DH_UNABLE_TO_CHECK_GENERATOR: number;
const DH_NOT_SUITABLE_GENERATOR: number;
const ALPN_ENABLED: number;
const RSA_PKCS1_PADDING: number;
const RSA_SSLV23_PADDING: number;
const RSA_NO_PADDING: number;
const RSA_PKCS1_OAEP_PADDING: number;
const RSA_X931_PADDING: number;
const RSA_PKCS1_PSS_PADDING: number;
/** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
const RSA_PSS_SALTLEN_DIGEST: number;
/** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
const RSA_PSS_SALTLEN_MAX_SIGN: number;
/** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
const RSA_PSS_SALTLEN_AUTO: number;
const POINT_CONVERSION_COMPRESSED: number;
const POINT_CONVERSION_UNCOMPRESSED: number;
const POINT_CONVERSION_HYBRID: number;
/** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
const defaultCoreCipherList: string;
/** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
const defaultCipherList: string;
}
interface HashOptions extends stream.TransformOptions {
/**
* For XOF hash functions such as `shake256`, the
* outputLength option can be used to specify the desired output length in bytes.
*/
outputLength?: number;
}
/** @deprecated since v10.0.0 */
const fips: boolean;
function createHash(algorithm: string, options?: HashOptions): Hash;
function createHmac(algorithm: string, key: BinaryLike, options?: stream.TransformOptions): Hmac;
type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1";
type HexBase64Latin1Encoding = "latin1" | "hex" | "base64";
type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary";
type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
class Hash extends stream.Transform {
private constructor();
update(data: BinaryLike): Hash;
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash;
digest(): Buffer;
digest(encoding: HexBase64Latin1Encoding): string;
}
class Hmac extends stream.Transform {
private constructor();
update(data: BinaryLike): Hmac;
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
digest(): Buffer;
digest(encoding: HexBase64Latin1Encoding): string;
}
export type KeyObjectType = 'secret' | 'public' | 'private';
interface KeyExportOptions<T extends KeyFormat> {
type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
format: T;
cipher?: string;
passphrase?: string | Buffer;
}
class KeyObject {
private constructor();
asymmetricKeyType?: KeyType;
/**
* For asymmetric keys, this property represents the size of the embedded key in
* bytes. This property is `undefined` for symmetric keys.
*/
asymmetricKeySize?: number;
export(options: KeyExportOptions<'pem'>): string | Buffer;
export(options?: KeyExportOptions<'der'>): Buffer;
symmetricSize?: number;
type: KeyObjectType;
}
type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm';
type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
type BinaryLike = string | NodeJS.ArrayBufferView;
type CipherKey = BinaryLike | KeyObject;
interface CipherCCMOptions extends stream.TransformOptions {
authTagLength: number;
}
interface CipherGCMOptions extends stream.TransformOptions {
authTagLength?: number;
}
/** @deprecated since v10.0.0 use createCipheriv() */
function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
/** @deprecated since v10.0.0 use createCipheriv() */
function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
/** @deprecated since v10.0.0 use createCipheriv() */
function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
function createCipheriv(
algorithm: CipherCCMTypes,
key: CipherKey,
iv: BinaryLike | null,
options: CipherCCMOptions
): CipherCCM;
function createCipheriv(
algorithm: CipherGCMTypes,
key: CipherKey,
iv: BinaryLike | null,
options?: CipherGCMOptions
): CipherGCM;
function createCipheriv(
algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions
): Cipher;
class Cipher extends stream.Transform {
private constructor();
update(data: BinaryLike): Buffer;
update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string;
update(data: string, input_encoding: Utf8AsciiBinaryEncoding | undefined, output_encoding: HexBase64BinaryEncoding): string;
final(): Buffer;
final(output_encoding: string): string;
setAutoPadding(auto_padding?: boolean): this;
// getAuthTag(): Buffer;
// setAAD(buffer: Buffer): this; // docs only say buffer
}
interface CipherCCM extends Cipher {
setAAD(buffer: Buffer, options: { plaintextLength: number }): this;
getAuthTag(): Buffer;
}
interface CipherGCM extends Cipher {
setAAD(buffer: Buffer, options?: { plaintextLength: number }): this;
getAuthTag(): Buffer;
}
/** @deprecated since v10.0.0 use createCipheriv() */
function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
/** @deprecated since v10.0.0 use createCipheriv() */
function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
/** @deprecated since v10.0.0 use createCipheriv() */
function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
function createDecipheriv(
algorithm: CipherCCMTypes,
key: BinaryLike,
iv: BinaryLike | null,
options: CipherCCMOptions,
): DecipherCCM;
function createDecipheriv(
algorithm: CipherGCMTypes,
key: BinaryLike,
iv: BinaryLike | null,
options?: CipherGCMOptions,
): DecipherGCM;
function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
class Decipher extends stream.Transform {
private constructor();
update(data: NodeJS.ArrayBufferView): Buffer;
update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
update(data: string, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
final(): Buffer;
final(output_encoding: string): string;
setAutoPadding(auto_padding?: boolean): this;
// setAuthTag(tag: NodeJS.ArrayBufferView): this;
// setAAD(buffer: NodeJS.ArrayBufferView): this;
}
interface DecipherCCM extends Decipher {
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
}
interface DecipherGCM extends Decipher {
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
}
interface PrivateKeyInput {
key: string | Buffer;
format?: KeyFormat;
type?: 'pkcs1' | 'pkcs8' | 'sec1';
passphrase?: string | Buffer;
}
interface PublicKeyInput {
key: string | Buffer;
format?: KeyFormat;
type?: 'pkcs1' | 'spki';
}
function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject;
function createSecretKey(key: Buffer): KeyObject;
function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
interface SigningOptions {
/**
* @See crypto.constants.RSA_PKCS1_PADDING
*/
padding?: number;
saltLength?: number;
}
interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {
}
type KeyLike = string | Buffer | KeyObject;
class Signer extends stream.Writable {
private constructor();
update(data: BinaryLike): Signer;
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
sign(private_key: SignPrivateKeyInput | KeyLike): Buffer;
sign(private_key: SignPrivateKeyInput | KeyLike, output_format: HexBase64Latin1Encoding): string;
}
function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
class Verify extends stream.Writable {
private constructor();
update(data: BinaryLike): Verify;
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify;
verify(object: Object | KeyLike, signature: NodeJS.ArrayBufferView): boolean;
verify(object: Object | KeyLike, signature: string, signature_format?: HexBase64Latin1Encoding): boolean;
// https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
// The signature field accepts a TypedArray type, but it is only available starting ES2017
}
function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman;
class DiffieHellman {
private constructor();
generateKeys(): Buffer;
generateKeys(encoding: HexBase64Latin1Encoding): string;
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string;
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
getPrime(): Buffer;
getPrime(encoding: HexBase64Latin1Encoding): string;
getGenerator(): Buffer;
getGenerator(encoding: HexBase64Latin1Encoding): string;
getPublicKey(): Buffer;
getPublicKey(encoding: HexBase64Latin1Encoding): string;
getPrivateKey(): Buffer;
getPrivateKey(encoding: HexBase64Latin1Encoding): string;
setPublicKey(public_key: NodeJS.ArrayBufferView): void;
setPublicKey(public_key: string, encoding: string): void;
setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
setPrivateKey(private_key: string, encoding: string): void;
verifyError: number;
}
function getDiffieHellman(group_name: string): DiffieHellman;
function pbkdf2(
password: BinaryLike,
salt: BinaryLike,
iterations: number,
keylen: number,
digest: string,
callback: (err: Error | null, derivedKey: Buffer) => any,
): void;
function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
function randomBytes(size: number): Buffer;
function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
function pseudoRandomBytes(size: number): Buffer;
function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
interface ScryptOptions {
N?: number;
r?: number;
p?: number;
maxmem?: number;
}
function scrypt(
password: BinaryLike,
salt: BinaryLike,
keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void,
): void;
function scrypt(
password: BinaryLike,
salt: BinaryLike,
keylen: number,
options: ScryptOptions,
callback: (err: Error | null, derivedKey: Buffer) => void,
): void;
function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
interface RsaPublicKey {
key: KeyLike;
padding?: number;
}
interface RsaPrivateKey {
key: KeyLike;
passphrase?: string;
/**
* @default 'sha1'
*/
oaepHash?: string;
oaepLabel?: NodeJS.TypedArray;
padding?: number;
}
function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
function getCiphers(): string[];
function getCurves(): string[];
function getHashes(): string[];
class ECDH {
private constructor();
static convertKey(
key: BinaryLike,
curve: string,
inputEncoding?: HexBase64Latin1Encoding,
outputEncoding?: "latin1" | "hex" | "base64",
format?: "uncompressed" | "compressed" | "hybrid",
): Buffer | string;
generateKeys(): Buffer;
generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string;
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
getPrivateKey(): Buffer;
getPrivateKey(encoding: HexBase64Latin1Encoding): string;
getPublicKey(): Buffer;
getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void;
}
function createECDH(curve_name: string): ECDH;
function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
/** @deprecated since v10.0.0 */
const DEFAULT_ENCODING: string;
export type KeyType = 'rsa' | 'dsa' | 'ec';
export type KeyFormat = 'pem' | 'der';
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
format: T;
cipher?: string;
passphrase?: string;
}
interface KeyPairKeyObjectResult {
publicKey: KeyObject;
privateKey: KeyObject;
}
interface ECKeyPairKeyObjectOptions {
/**
* Name of the curve to use.
*/
namedCurve: string;
}
interface RSAKeyPairKeyObjectOptions {
/**
* Key size in bits
*/
modulusLength: number;
/**
* @default 0x10001
*/
publicExponent?: number;
}
interface DSAKeyPairKeyObjectOptions {
/**
* Key size in bits
*/
modulusLength: number;
/**
* Size of q in bits
*/
divisorLength: number;
}
interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
/**
* Key size in bits
*/
modulusLength: number;
/**
* @default 0x10001
*/
publicExponent?: number;
publicKeyEncoding: {
type: 'pkcs1' | 'spki';
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs1' | 'pkcs8';
};
}
interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
/**
* Key size in bits
*/
modulusLength: number;
/**
* Size of q in bits
*/
divisorLength: number;
publicKeyEncoding: {
type: 'spki';
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
};
}
interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
/**
* Name of the curve to use.
*/
namedCurve: string;
publicKeyEncoding: {
type: 'pkcs1' | 'spki';
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'sec1' | 'pkcs8';
};
}
interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
publicKey: T1;
privateKey: T2;
}
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
namespace generateKeyPair {
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
}
/**
* Calculates and returns the signature for `data` using the given private key and
* algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
* dependent upon the key type (especially Ed25519 and Ed448).
*
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
* passed to [`crypto.createPrivateKey()`][].
*/
function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignPrivateKeyInput): Buffer;
interface VerifyKeyWithOptions extends KeyObject, SigningOptions {
}
/**
* Calculates and returns the signature for `data` using the given private key and
* algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
* dependent upon the key type (especially Ed25519 and Ed448).
*
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
* passed to [`crypto.createPublicKey()`][].
*/
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyWithOptions, signature: NodeJS.ArrayBufferView): Buffer;
}

102
riven/srcgen/node_modules/@types/node/dgram.d.ts generated vendored Normal file
View File

@ -0,0 +1,102 @@
declare module "dgram" {
import { AddressInfo } from "net";
import * as dns from "dns";
import * as events from "events";
interface RemoteInfo {
address: string;
family: 'IPv4' | 'IPv6';
port: number;
size: number;
}
interface BindOptions {
port: number;
address?: string;
exclusive?: boolean;
}
type SocketType = "udp4" | "udp6";
interface SocketOptions {
type: SocketType;
reuseAddr?: boolean;
/**
* @default false
*/
ipv6Only?: boolean;
recvBufferSize?: number;
sendBufferSize?: number;
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
}
function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
class Socket extends events.EventEmitter {
send(msg: string | Uint8Array | any[], port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
bind(port?: number, address?: string, callback?: () => void): void;
bind(port?: number, callback?: () => void): void;
bind(callback?: () => void): void;
bind(options: BindOptions, callback?: () => void): void;
close(callback?: () => void): void;
address(): AddressInfo | string;
setBroadcast(flag: boolean): void;
setTTL(ttl: number): void;
setMulticastTTL(ttl: number): void;
setMulticastInterface(multicastInterface: string): void;
setMulticastLoopback(flag: boolean): void;
addMembership(multicastAddress: string, multicastInterface?: string): void;
dropMembership(multicastAddress: string, multicastInterface?: string): void;
ref(): this;
unref(): this;
setRecvBufferSize(size: number): void;
setSendBufferSize(size: number): void;
getRecvBufferSize(): number;
getSendBufferSize(): number;
/**
* events.EventEmitter
* 1. close
* 2. error
* 3. listening
* 4. message
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "listening", listener: () => void): this;
addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: "close"): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "listening"): boolean;
emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: "close", listener: () => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "listening", listener: () => void): this;
on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: "close", listener: () => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "listening", listener: () => void): this;
once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "listening", listener: () => void): this;
prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "listening", listener: () => void): this;
prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
}
}

366
riven/srcgen/node_modules/@types/node/dns.d.ts generated vendored Normal file
View File

@ -0,0 +1,366 @@
declare module "dns" {
// Supported getaddrinfo flags.
const ADDRCONFIG: number;
const V4MAPPED: number;
interface LookupOptions {
family?: number;
hints?: number;
all?: boolean;
verbatim?: boolean;
}
interface LookupOneOptions extends LookupOptions {
all?: false;
}
interface LookupAllOptions extends LookupOptions {
all: true;
}
interface LookupAddress {
address: string;
family: number;
}
function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
namespace lookup {
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
}
function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
namespace lookupService {
function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
}
interface ResolveOptions {
ttl: boolean;
}
interface ResolveWithTtlOptions extends ResolveOptions {
ttl: true;
}
interface RecordWithTtl {
address: string;
ttl: number;
}
/** @deprecated Use AnyARecord or AnyAaaaRecord instead. */
type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
interface AnyARecord extends RecordWithTtl {
type: "A";
}
interface AnyAaaaRecord extends RecordWithTtl {
type: "AAAA";
}
interface MxRecord {
priority: number;
exchange: string;
}
interface AnyMxRecord extends MxRecord {
type: "MX";
}
interface NaptrRecord {
flags: string;
service: string;
regexp: string;
replacement: string;
order: number;
preference: number;
}
interface AnyNaptrRecord extends NaptrRecord {
type: "NAPTR";
}
interface SoaRecord {
nsname: string;
hostmaster: string;
serial: number;
refresh: number;
retry: number;
expire: number;
minttl: number;
}
interface AnySoaRecord extends SoaRecord {
type: "SOA";
}
interface SrvRecord {
priority: number;
weight: number;
port: number;
name: string;
}
interface AnySrvRecord extends SrvRecord {
type: "SRV";
}
interface AnyTxtRecord {
type: "TXT";
entries: string[];
}
interface AnyNsRecord {
type: "NS";
value: string;
}
interface AnyPtrRecord {
type: "PTR";
value: string;
}
interface AnyCnameRecord {
type: "CNAME";
value: string;
}
type AnyRecord = AnyARecord |
AnyAaaaRecord |
AnyCnameRecord |
AnyMxRecord |
AnyNaptrRecord |
AnyNsRecord |
AnyPtrRecord |
AnySoaRecord |
AnySrvRecord |
AnyTxtRecord;
function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
function resolve(
hostname: string,
rrtype: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
): void;
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
namespace resolve {
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
}
function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
namespace resolve4 {
function __promisify__(hostname: string): Promise<string[]>;
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
}
function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
namespace resolve6 {
function __promisify__(hostname: string): Promise<string[]>;
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
}
function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
namespace resolveCname {
function __promisify__(hostname: string): Promise<string[]>;
}
function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
namespace resolveMx {
function __promisify__(hostname: string): Promise<MxRecord[]>;
}
function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
namespace resolveNaptr {
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
}
function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
namespace resolveNs {
function __promisify__(hostname: string): Promise<string[]>;
}
function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
namespace resolvePtr {
function __promisify__(hostname: string): Promise<string[]>;
}
function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
namespace resolveSoa {
function __promisify__(hostname: string): Promise<SoaRecord>;
}
function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
namespace resolveSrv {
function __promisify__(hostname: string): Promise<SrvRecord[]>;
}
function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
namespace resolveTxt {
function __promisify__(hostname: string): Promise<string[][]>;
}
function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
namespace resolveAny {
function __promisify__(hostname: string): Promise<AnyRecord[]>;
}
function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
function setServers(servers: ReadonlyArray<string>): void;
function getServers(): string[];
// Error codes
const NODATA: string;
const FORMERR: string;
const SERVFAIL: string;
const NOTFOUND: string;
const NOTIMP: string;
const REFUSED: string;
const BADQUERY: string;
const BADNAME: string;
const BADFAMILY: string;
const BADRESP: string;
const CONNREFUSED: string;
const TIMEOUT: string;
const EOF: string;
const FILE: string;
const NOMEM: string;
const DESTRUCTION: string;
const BADSTR: string;
const BADFLAGS: string;
const NONAME: string;
const BADHINTS: string;
const NOTINITIALIZED: string;
const LOADIPHLPAPI: string;
const ADDRGETNETWORKPARAMS: string;
const CANCELLED: string;
class Resolver {
getServers: typeof getServers;
setServers: typeof setServers;
resolve: typeof resolve;
resolve4: typeof resolve4;
resolve6: typeof resolve6;
resolveAny: typeof resolveAny;
resolveCname: typeof resolveCname;
resolveMx: typeof resolveMx;
resolveNaptr: typeof resolveNaptr;
resolveNs: typeof resolveNs;
resolvePtr: typeof resolvePtr;
resolveSoa: typeof resolveSoa;
resolveSrv: typeof resolveSrv;
resolveTxt: typeof resolveTxt;
reverse: typeof reverse;
cancel(): void;
}
namespace promises {
function getServers(): string[];
function lookup(hostname: string, family: number): Promise<LookupAddress>;
function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
function lookup(hostname: string): Promise<LookupAddress>;
function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
function resolve(hostname: string): Promise<string[]>;
function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
function resolve4(hostname: string): Promise<string[]>;
function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
function resolve6(hostname: string): Promise<string[]>;
function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
function resolveAny(hostname: string): Promise<AnyRecord[]>;
function resolveCname(hostname: string): Promise<string[]>;
function resolveMx(hostname: string): Promise<MxRecord[]>;
function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
function resolveNs(hostname: string): Promise<string[]>;
function resolvePtr(hostname: string): Promise<string[]>;
function resolveSoa(hostname: string): Promise<SoaRecord>;
function resolveSrv(hostname: string): Promise<SrvRecord[]>;
function resolveTxt(hostname: string): Promise<string[][]>;
function reverse(ip: string): Promise<string[]>;
function setServers(servers: ReadonlyArray<string>): void;
class Resolver {
getServers: typeof getServers;
resolve: typeof resolve;
resolve4: typeof resolve4;
resolve6: typeof resolve6;
resolveAny: typeof resolveAny;
resolveCname: typeof resolveCname;
resolveMx: typeof resolveMx;
resolveNaptr: typeof resolveNaptr;
resolveNs: typeof resolveNs;
resolvePtr: typeof resolvePtr;
resolveSoa: typeof resolveSoa;
resolveSrv: typeof resolveSrv;
resolveTxt: typeof resolveTxt;
reverse: typeof reverse;
setServers: typeof setServers;
}
}
}

16
riven/srcgen/node_modules/@types/node/domain.d.ts generated vendored Normal file
View File

@ -0,0 +1,16 @@
declare module "domain" {
import * as events from "events";
class Domain extends events.EventEmitter implements NodeJS.Domain {
run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
add(emitter: events.EventEmitter | NodeJS.Timer): void;
remove(emitter: events.EventEmitter | NodeJS.Timer): void;
bind<T extends Function>(cb: T): T;
intercept<T extends Function>(cb: T): T;
members: Array<events.EventEmitter | NodeJS.Timer>;
enter(): void;
exit(): void;
}
function create(): Domain;
}

39
riven/srcgen/node_modules/@types/node/events.d.ts generated vendored Normal file
View File

@ -0,0 +1,39 @@
declare module "events" {
class internal extends NodeJS.EventEmitter { }
interface NodeEventTarget {
once(event: string | symbol, listener: (...args: any[]) => void): this;
}
interface DOMEventTarget {
addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
}
namespace internal {
function once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
function once(emitter: DOMEventTarget, event: string): Promise<any[]>;
class EventEmitter extends internal {
/** @deprecated since v4.0.0 */
static listenerCount(emitter: EventEmitter, event: string | symbol): number;
static defaultMaxListeners: number;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
off(event: string | symbol, listener: (...args: any[]) => void): this;
removeAllListeners(event?: string | symbol): this;
setMaxListeners(n: number): this;
getMaxListeners(): number;
listeners(event: string | symbol): Function[];
rawListeners(event: string | symbol): Function[];
emit(event: string | symbol, ...args: any[]): boolean;
eventNames(): Array<string | symbol>;
listenerCount(type: string | symbol): number;
}
}
export = internal;
}

2391
riven/srcgen/node_modules/@types/node/fs.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1154
riven/srcgen/node_modules/@types/node/globals.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More